WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP Patch
162921_KeyboardEvent_isComposing_wip.patch (text/plain), 3.13 KB, created by
Chris Dumez
on 2016-10-04 11:01:25 PDT
(
hide
)
Description:
WIP Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2016-10-04 11:01:25 PDT
Size:
3.13 KB
patch
obsolete
>diff --git a/Source/WebCore/dom/KeyboardEvent.cpp b/Source/WebCore/dom/KeyboardEvent.cpp >index 2d5b6b0..4630da3 100644 >--- a/Source/WebCore/dom/KeyboardEvent.cpp >+++ b/Source/WebCore/dom/KeyboardEvent.cpp >@@ -24,6 +24,7 @@ > #include "KeyboardEvent.h" > > #include "Document.h" >+#include "Editor.h" > #include "EventDispatcher.h" > #include "EventHandler.h" > #include "EventNames.h" >@@ -93,7 +94,9 @@ static inline KeyboardEvent::KeyLocationCode keyLocationCode(const PlatformKeybo > > KeyboardEvent::KeyboardEvent() > : m_location(DOM_KEY_LOCATION_STANDARD) >+ , m_repeat(false) > , m_altGraphKey(false) >+ , m_isComposing(false) > #if PLATFORM(COCOA) > , m_handledByInputMethod(false) > #endif >@@ -111,6 +114,7 @@ KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, DOMWindow* view) > , m_location(keyLocationCode(key)) > , m_repeat(key.isAutoRepeat()) > , m_altGraphKey(false) >+ , m_isComposing(view && view->frame() ? view->frame()->editor().hasComposition() : false) > #if PLATFORM(COCOA) > #if USE(APPKIT) > , m_handledByInputMethod(key.handledByInputMethod()) >@@ -137,6 +141,7 @@ KeyboardEvent::KeyboardEvent(const AtomicString& eventType, const KeyboardEventI > , m_location(initializer.location) > , m_repeat(initializer.repeat) > , m_altGraphKey(false) >+ , m_isComposing(initializer.isComposing) > #if PLATFORM(COCOA) > , m_handledByInputMethod(false) > #endif >diff --git a/Source/WebCore/dom/KeyboardEvent.h b/Source/WebCore/dom/KeyboardEvent.h >index 7109199..6c05a86 100644 >--- a/Source/WebCore/dom/KeyboardEvent.h >+++ b/Source/WebCore/dom/KeyboardEvent.h >@@ -40,6 +40,7 @@ struct KeyboardEventInit : public UIEventWithKeyStateInit { > String keyIdentifier; > unsigned location { 0 }; > bool repeat { false }; >+ bool isComposing { false }; > }; > > class KeyboardEvent final : public UIEventWithKeyState { >@@ -100,6 +101,8 @@ public: > bool isKeyboardEvent() const final; > int which() const final; > >+ bool isComposing() const { return m_isComposing; } >+ > #if PLATFORM(COCOA) > bool handledByInputMethod() const { return m_handledByInputMethod; } > const Vector<KeypressCommand>& keypressCommands() const { return m_keypressCommands; } >@@ -124,10 +127,11 @@ private: > unsigned m_location; > bool m_repeat : 1; > bool m_altGraphKey : 1; >+ bool m_isComposing : 1; > > #if PLATFORM(COCOA) > // Commands that were sent by AppKit when interpreting the event. Doesn't include input method commands. >- bool m_handledByInputMethod; >+ bool m_handledByInputMethod : 1; > Vector<KeypressCommand> m_keypressCommands; > #endif > }; >diff --git a/Source/WebCore/dom/KeyboardEvent.idl b/Source/WebCore/dom/KeyboardEvent.idl >index 1ea236c..b12ef2b 100644 >--- a/Source/WebCore/dom/KeyboardEvent.idl >+++ b/Source/WebCore/dom/KeyboardEvent.idl >@@ -41,8 +41,7 @@ > [InitializedByEventConstructor] readonly attribute boolean metaKey; > [InitializedByEventConstructor] readonly attribute boolean repeat; > >- // FIXME: We should support this. >- // readonly attribute boolean isComposing; >+ [InitializedByEventConstructor] readonly attribute boolean isComposing; > > boolean getModifierState(DOMString keyArg); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 162921
:
290621
|
290623
|
290630
|
290664
|
290667