Title: [141028] trunk
Revision
141028
Author
[email protected]
Date
2013-01-28 17:01:37 -0800 (Mon, 28 Jan 2013)

Log Message

Implement CompositionEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=107919

Reviewed by Sam Weinig.

This patch implements a CompositionEvent constructor under
a DOM4_EVENTS_CONSTRUCTOR flag.

Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm

Source/WebCore:

Test: fast/events/constructors/composition-event-constructor.html

* dom/CompositionEvent.cpp:
(WebCore::CompositionEventInit::CompositionEventInit):
(WebCore):
(WebCore::CompositionEvent::CompositionEvent):
* dom/CompositionEvent.h:
(CompositionEventInit):
(WebCore):
(CompositionEvent):
(WebCore::CompositionEvent::create):
(WebCore::CompositionEvent::data):
* dom/CompositionEvent.idl:

LayoutTests:

* fast/dom/constructed-objects-prototypes-expected.txt:
* fast/events/constructors/composition-event-constructor-expected.txt: Added.
* fast/events/constructors/composition-event-constructor.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

* fast/dom/constructed-objects-prototypes-expected.txt:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (141027 => 141028)


--- trunk/LayoutTests/ChangeLog	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/ChangeLog	2013-01-29 01:01:37 UTC (rev 141028)
@@ -1,3 +1,31 @@
+2013-01-27  Kentaro Hara  <[email protected]>
+
+        Implement CompositionEvent constructor
+        https://bugs.webkit.org/show_bug.cgi?id=107919
+
+        Reviewed by Sam Weinig.
+
+        This patch implements a CompositionEvent constructor under
+        a DOM4_EVENTS_CONSTRUCTOR flag.
+
+        Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
+
+        * fast/dom/constructed-objects-prototypes-expected.txt:
+        * fast/events/constructors/composition-event-constructor-expected.txt: Added.
+        * fast/events/constructors/composition-event-constructor.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wincairo/TestExpectations:
+
+        * fast/dom/constructed-objects-prototypes-expected.txt:
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/TestExpectations:
+        * platform/wincairo/TestExpectations:
+
 2013-01-28  Joshua Bell  <[email protected]>
 
         [Chromium] Unreviewed gardening, removing Crash expectations from storage/indexeddb tests.

Modified: trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt (141027 => 141028)


--- trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt	2013-01-29 01:01:37 UTC (rev 141028)
@@ -11,6 +11,8 @@
 PASS (new inner.Blob()).constructor.isInner is true
 PASS (new inner.CloseEvent()).isInner is true
 PASS (new inner.CloseEvent()).constructor.isInner is true
+PASS (new inner.CompositionEvent()).isInner is true
+PASS (new inner.CompositionEvent()).constructor.isInner is true
 PASS (new inner.CustomEvent()).isInner is true
 PASS (new inner.CustomEvent()).constructor.isInner is true
 PASS (new inner.DOMParser()).isInner is true

Modified: trunk/LayoutTests/platform/efl/TestExpectations (141027 => 141028)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-01-29 01:01:37 UTC (rev 141028)
@@ -1230,6 +1230,7 @@
 # DOM4_EVENTS_CONSTRUCTOR is not yet enabled.
 webkit.org/b/107428 fast/events/constructors/ui-event-constructor.html [ Skip ]
 webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ]
+webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ]
 
 # Requires support for Web notifications
 webkit.org/b/73544 fast/notifications [ Skip ]

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (141027 => 141028)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-01-29 01:01:37 UTC (rev 141028)
@@ -391,6 +391,7 @@
 # DOM4_EVENTS_CONSTRUCTOR is not yet enabled.
 webkit.org/b/107428 fast/events/constructors/ui-event-constructor.html [ Skip ]
 webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ]
+webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ]
 
 # No CORS support for media elements is implemented yet.
 webkit.org/b/99037 http/tests/security/video-cross-origin-readback.html [ Failure ]

Modified: trunk/LayoutTests/platform/qt/TestExpectations (141027 => 141028)


--- trunk/LayoutTests/platform/qt/TestExpectations	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2013-01-29 01:01:37 UTC (rev 141028)
@@ -107,6 +107,7 @@
 # ENABLE(DOM4_EVENTS_CONSTRUCTOR) is disabled.
 fast/events/constructors/ui-event-constructor.html
 fast/events/constructors/mouse-event-constructor.html
+fast/events/constructors/composition-event-constructor.html
 
 # ENABLE(INDEXED_DATABASE) is disabled.
 storage/indexeddb

Modified: trunk/LayoutTests/platform/win/TestExpectations (141027 => 141028)


--- trunk/LayoutTests/platform/win/TestExpectations	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/platform/win/TestExpectations	2013-01-29 01:01:37 UTC (rev 141028)
@@ -1213,6 +1213,7 @@
 # DOM4_EVENTS_CONSTRUCTOR is not yet enabled.
 fast/events/constructors/ui-event-constructor.html
 fast/events/constructors/mouse-event-constructor.html
+fast/events/constructors/composition-event-constructor.html
 
 # Disable until the windows WebKit API supports injecting in the top frame only.
 # https://bugs.webkit.org/show_bug.cgi?id=41800

Modified: trunk/LayoutTests/platform/wincairo/TestExpectations (141027 => 141028)


--- trunk/LayoutTests/platform/wincairo/TestExpectations	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/LayoutTests/platform/wincairo/TestExpectations	2013-01-29 01:01:37 UTC (rev 141028)
@@ -1740,6 +1740,7 @@
 # DOM4_EVENTS_CONSTRUCTOR is not yet enabled.
 fast/events/constructors/ui-event-constructor.html
 fast/events/constructors/mouse-event-constructor.html
+fast/events/constructors/composition-event-constructor.html
 
 # Disable until the windows WebKit API supports injecting in the top frame only.
 # https://bugs.webkit.org/show_bug.cgi?id=41800

Modified: trunk/Source/WebCore/ChangeLog (141027 => 141028)


--- trunk/Source/WebCore/ChangeLog	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/Source/WebCore/ChangeLog	2013-01-29 01:01:37 UTC (rev 141028)
@@ -1,3 +1,29 @@
+2013-01-27  Kentaro Hara  <[email protected]>
+
+        Implement CompositionEvent constructor
+        https://bugs.webkit.org/show_bug.cgi?id=107919
+
+        Reviewed by Sam Weinig.
+
+        This patch implements a CompositionEvent constructor under
+        a DOM4_EVENTS_CONSTRUCTOR flag.
+
+        Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
+
+        Test: fast/events/constructors/composition-event-constructor.html
+
+        * dom/CompositionEvent.cpp:
+        (WebCore::CompositionEventInit::CompositionEventInit):
+        (WebCore):
+        (WebCore::CompositionEvent::CompositionEvent):
+        * dom/CompositionEvent.h:
+        (CompositionEventInit):
+        (WebCore):
+        (CompositionEvent):
+        (WebCore::CompositionEvent::create):
+        (WebCore::CompositionEvent::data):
+        * dom/CompositionEvent.idl:
+
 2013-01-28  Pratik Solanki  <[email protected]>
 
         PLATFORM(IOS) should come before __MAC_OS_X_VERSION_MIN_REQUIRED

Modified: trunk/Source/WebCore/dom/CompositionEvent.cpp (141027 => 141028)


--- trunk/Source/WebCore/dom/CompositionEvent.cpp	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/Source/WebCore/dom/CompositionEvent.cpp	2013-01-29 01:01:37 UTC (rev 141028)
@@ -31,6 +31,10 @@
 
 namespace WebCore {
 
+CompositionEventInit::CompositionEventInit()
+{
+}
+
 CompositionEvent::CompositionEvent()
 {
 }
@@ -41,6 +45,12 @@
 {
 }
 
+CompositionEvent::CompositionEvent(const AtomicString& type, const CompositionEventInit& initializer)
+    : UIEvent(type, initializer)
+    , m_data(initializer.data)
+{
+}
+
 CompositionEvent::~CompositionEvent()
 {
 }

Modified: trunk/Source/WebCore/dom/CompositionEvent.h (141027 => 141028)


--- trunk/Source/WebCore/dom/CompositionEvent.h	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/Source/WebCore/dom/CompositionEvent.h	2013-01-29 01:01:37 UTC (rev 141028)
@@ -31,31 +31,45 @@
 
 namespace WebCore {
 
-    class CompositionEvent : public UIEvent {
-    public:
-        static PassRefPtr<CompositionEvent> create()
-        {
-            return adoptRef(new CompositionEvent);
-        }
-        static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data)
-        {
-          return adoptRef(new CompositionEvent(type, view, data));
-        }
-        virtual ~CompositionEvent();
+struct CompositionEventInit : UIEventInit {
+    CompositionEventInit();
 
-        void initCompositionEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, const String& data);
+    String data;
+};
 
-        String data() const { return m_data; }
+class CompositionEvent : public UIEvent {
+public:
+    static PassRefPtr<CompositionEvent> create()
+    {
+        return adoptRef(new CompositionEvent);
+    }
 
-        virtual const AtomicString& interfaceName() const;
+    static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data)
+    {
+        return adoptRef(new CompositionEvent(type, view, data));
+    }
 
-    private:
-        CompositionEvent();
-        CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data);
+    static PassRefPtr<CompositionEvent> create(const AtomicString& type, const CompositionEventInit& initializer)
+    {
+        return adoptRef(new CompositionEvent(type, initializer));
+    }
 
-        String m_data;
-    };
+    virtual ~CompositionEvent();
 
+    void initCompositionEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, const String& data);
+
+    String data() const { return m_data; }
+
+    virtual const AtomicString& interfaceName() const;
+
+private:
+    CompositionEvent();
+    CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView>, const String&);
+    CompositionEvent(const AtomicString& type, const CompositionEventInit&);
+
+    String m_data;
+};
+
 } // namespace WebCore
 
 #endif // CompositionEvent_h

Modified: trunk/Source/WebCore/dom/CompositionEvent.idl (141027 => 141028)


--- trunk/Source/WebCore/dom/CompositionEvent.idl	2013-01-29 01:01:03 UTC (rev 141027)
+++ trunk/Source/WebCore/dom/CompositionEvent.idl	2013-01-29 01:01:37 UTC (rev 141028)
@@ -23,10 +23,12 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-// Introduced in DOM Level 3:
-interface CompositionEvent : UIEvent {
+[
+    ConstructorConditional=DOM4_EVENTS_CONSTRUCTOR,
+    ConstructorTemplate=Event
+] interface CompositionEvent : UIEvent {
 
-    readonly attribute DOMString data;
+    [InitializedByEventConstructor] readonly attribute DOMString data;
 
     void initCompositionEvent(in [Optional=DefaultIsUndefined] DOMString typeArg, 
                               in [Optional=DefaultIsUndefined] boolean canBubbleArg, 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to