Changeset 141028 in webkit


Ignore:
Timestamp:
Jan 28, 2013 5:01:37 PM (11 years ago)
Author:
haraken@chromium.org
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:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r141014 r141028  
     12013-01-27  Kentaro Hara  <haraken@chromium.org>
     2
     3        Implement CompositionEvent constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=107919
     5
     6        Reviewed by Sam Weinig.
     7
     8        This patch implements a CompositionEvent constructor under
     9        a DOM4_EVENTS_CONSTRUCTOR flag.
     10
     11        Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
     12
     13        * fast/dom/constructed-objects-prototypes-expected.txt:
     14        * fast/events/constructors/composition-event-constructor-expected.txt: Added.
     15        * fast/events/constructors/composition-event-constructor.html: Added.
     16        * platform/efl/TestExpectations:
     17        * platform/gtk/TestExpectations:
     18        * platform/qt/TestExpectations:
     19        * platform/win/TestExpectations:
     20        * platform/wincairo/TestExpectations:
     21
     22        * fast/dom/constructed-objects-prototypes-expected.txt:
     23        * platform/efl/TestExpectations:
     24        * platform/gtk/TestExpectations:
     25        * platform/qt/TestExpectations:
     26        * platform/win/TestExpectations:
     27        * platform/wincairo/TestExpectations:
     28
    1292013-01-28  Joshua Bell  <jsbell@chromium.org>
    230
  • trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt

    r140657 r141028  
    1212PASS (new inner.CloseEvent()).isInner is true
    1313PASS (new inner.CloseEvent()).constructor.isInner is true
     14PASS (new inner.CompositionEvent()).isInner is true
     15PASS (new inner.CompositionEvent()).constructor.isInner is true
    1416PASS (new inner.CustomEvent()).isInner is true
    1517PASS (new inner.CustomEvent()).constructor.isInner is true
  • trunk/LayoutTests/platform/efl/TestExpectations

    r140975 r141028  
    12311231webkit.org/b/107428 fast/events/constructors/ui-event-constructor.html [ Skip ]
    12321232webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ]
     1233webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ]
    12331234
    12341235# Requires support for Web notifications
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r140991 r141028  
    392392webkit.org/b/107428 fast/events/constructors/ui-event-constructor.html [ Skip ]
    393393webkit.org/b/107428 fast/events/constructors/mouse-event-constructor.html [ Skip ]
     394webkit.org/b/107428 fast/events/constructors/composition-event-constructor.html [ Skip ]
    394395
    395396# No CORS support for media elements is implemented yet.
  • trunk/LayoutTests/platform/qt/TestExpectations

    r140975 r141028  
    108108fast/events/constructors/ui-event-constructor.html
    109109fast/events/constructors/mouse-event-constructor.html
     110fast/events/constructors/composition-event-constructor.html
    110111
    111112# ENABLE(INDEXED_DATABASE) is disabled.
  • trunk/LayoutTests/platform/win/TestExpectations

    r140975 r141028  
    12141214fast/events/constructors/ui-event-constructor.html
    12151215fast/events/constructors/mouse-event-constructor.html
     1216fast/events/constructors/composition-event-constructor.html
    12161217
    12171218# Disable until the windows WebKit API supports injecting in the top frame only.
  • trunk/LayoutTests/platform/wincairo/TestExpectations

    r140679 r141028  
    17411741fast/events/constructors/ui-event-constructor.html
    17421742fast/events/constructors/mouse-event-constructor.html
     1743fast/events/constructors/composition-event-constructor.html
    17431744
    17441745# Disable until the windows WebKit API supports injecting in the top frame only.
  • trunk/Source/WebCore/ChangeLog

    r141025 r141028  
     12013-01-27  Kentaro Hara  <haraken@chromium.org>
     2
     3        Implement CompositionEvent constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=107919
     5
     6        Reviewed by Sam Weinig.
     7
     8        This patch implements a CompositionEvent constructor under
     9        a DOM4_EVENTS_CONSTRUCTOR flag.
     10
     11        Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
     12
     13        Test: fast/events/constructors/composition-event-constructor.html
     14
     15        * dom/CompositionEvent.cpp:
     16        (WebCore::CompositionEventInit::CompositionEventInit):
     17        (WebCore):
     18        (WebCore::CompositionEvent::CompositionEvent):
     19        * dom/CompositionEvent.h:
     20        (CompositionEventInit):
     21        (WebCore):
     22        (CompositionEvent):
     23        (WebCore::CompositionEvent::create):
     24        (WebCore::CompositionEvent::data):
     25        * dom/CompositionEvent.idl:
     26
    1272013-01-28  Pratik Solanki  <psolanki@apple.com>
    228
  • trunk/Source/WebCore/dom/CompositionEvent.cpp

    r98146 r141028  
    3232namespace WebCore {
    3333
     34CompositionEventInit::CompositionEventInit()
     35{
     36}
     37
    3438CompositionEvent::CompositionEvent()
    3539{
     
    3943    : UIEvent(type, true, true, view, 0)
    4044    , m_data(data)
     45{
     46}
     47
     48CompositionEvent::CompositionEvent(const AtomicString& type, const CompositionEventInit& initializer)
     49    : UIEvent(type, initializer)
     50    , m_data(initializer.data)
    4151{
    4252}
  • trunk/Source/WebCore/dom/CompositionEvent.h

    r98146 r141028  
    3232namespace WebCore {
    3333
    34     class CompositionEvent : public UIEvent {
    35     public:
    36         static PassRefPtr<CompositionEvent> create()
    37         {
    38             return adoptRef(new CompositionEvent);
    39         }
    40         static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data)
    41         {
    42           return adoptRef(new CompositionEvent(type, view, data));
    43         }
    44         virtual ~CompositionEvent();
     34struct CompositionEventInit : UIEventInit {
     35    CompositionEventInit();
    4536
    46         void initCompositionEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, const String& data);
     37    String data;
     38};
    4739
    48         String data() const { return m_data; }
     40class CompositionEvent : public UIEvent {
     41public:
     42    static PassRefPtr<CompositionEvent> create()
     43    {
     44        return adoptRef(new CompositionEvent);
     45    }
    4946
    50         virtual const AtomicString& interfaceName() const;
     47    static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data)
     48    {
     49        return adoptRef(new CompositionEvent(type, view, data));
     50    }
    5151
    52     private:
    53         CompositionEvent();
    54         CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView> view, const String& data);
     52    static PassRefPtr<CompositionEvent> create(const AtomicString& type, const CompositionEventInit& initializer)
     53    {
     54        return adoptRef(new CompositionEvent(type, initializer));
     55    }
    5556
    56         String m_data;
    57     };
     57    virtual ~CompositionEvent();
     58
     59    void initCompositionEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<AbstractView>, const String& data);
     60
     61    String data() const { return m_data; }
     62
     63    virtual const AtomicString& interfaceName() const;
     64
     65private:
     66    CompositionEvent();
     67    CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView>, const String&);
     68    CompositionEvent(const AtomicString& type, const CompositionEventInit&);
     69
     70    String m_data;
     71};
    5872
    5973} // namespace WebCore
  • trunk/Source/WebCore/dom/CompositionEvent.idl

    r131145 r141028  
    2424 */
    2525
    26 // Introduced in DOM Level 3:
    27 interface CompositionEvent : UIEvent {
     26[
     27    ConstructorConditional=DOM4_EVENTS_CONSTRUCTOR,
     28    ConstructorTemplate=Event
     29] interface CompositionEvent : UIEvent {
    2830
    29     readonly attribute DOMString data;
     31    [InitializedByEventConstructor] readonly attribute DOMString data;
    3032
    3133    void initCompositionEvent(in [Optional=DefaultIsUndefined] DOMString typeArg,
Note: See TracChangeset for help on using the changeset viewer.