Changeset 101183 in webkit


Ignore:
Timestamp:
Nov 25, 2011 3:34:42 PM (12 years ago)
Author:
haraken@chromium.org
Message:

Implement the WebGLContextEvent constructor
https://bugs.webkit.org/show_bug.cgi?id=72856

Reviewed by Adam Barth.

Source/WebCore:

This patch makes WebGLContextEvent constructable.
The spec: http://www.khronos.org/registry/webgl/specs/latest/#5.14

Test: fast/events/constructors/webgl-context-event-constructor.html

  • html/canvas/WebGLContextEvent.cpp: Added an implementation of the WebGLContextEvent constructor.

(WebCore::WebGLContextEventInit::WebGLContextEventInit):
(WebCore::WebGLContextEvent::WebGLContextEvent):

  • html/canvas/WebGLContextEvent.h: Added a definition of WebGLContextEventInit.

(WebCore::WebGLContextEvent::create):

  • html/canvas/WebGLContextEvent.idl: Added [ConstructorTemplate=Event] IDL.

LayoutTests:

webgl-context-event-constructor.html checks the behavior of the WebGLContextEvent constructor.

  • fast/dom/constructed-objects-prototypes-expected.txt: Added window.WebGLContextEvent.
  • fast/events/constructors/webgl-context-event-constructor-expected.txt: Added.
  • fast/events/constructors/webgl-context-event-constructor.html: Added.
Location:
trunk
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r101182 r101183  
     12011-11-25  Kentaro Hara  <haraken@chromium.org>
     2
     3        Implement the WebGLContextEvent constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=72856
     5
     6        Reviewed by Adam Barth.
     7
     8        webgl-context-event-constructor.html checks the behavior of the WebGLContextEvent constructor.
     9
     10        * fast/dom/constructed-objects-prototypes-expected.txt: Added window.WebGLContextEvent.
     11        * fast/events/constructors/webgl-context-event-constructor-expected.txt: Added.
     12        * fast/events/constructors/webgl-context-event-constructor.html: Added.
     13
    1142011-11-25  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/LayoutTests/fast/dom/constructed-objects-prototypes-expected.txt

    r100921 r101183  
    4040PASS (new inner.ProgressEvent()).isInner is true
    4141PASS (new inner.ProgressEvent()).constructor.isInner is true
     42PASS (new inner.WebGLContextEvent()).isInner is true
     43PASS (new inner.WebGLContextEvent()).constructor.isInner is true
    4244PASS (new inner.WebKitAnimationEvent()).isInner is true
    4345PASS (new inner.WebKitAnimationEvent()).constructor.isInner is true
  • trunk/Source/WebCore/ChangeLog

    r101181 r101183  
     12011-11-25  Kentaro Hara  <haraken@chromium.org>
     2
     3        Implement the WebGLContextEvent constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=72856
     5
     6        Reviewed by Adam Barth.
     7
     8        This patch makes WebGLContextEvent constructable.
     9        The spec: http://www.khronos.org/registry/webgl/specs/latest/#5.14
     10
     11        Test: fast/events/constructors/webgl-context-event-constructor.html
     12
     13        * html/canvas/WebGLContextEvent.cpp: Added an implementation of the WebGLContextEvent constructor.
     14        (WebCore::WebGLContextEventInit::WebGLContextEventInit):
     15        (WebCore::WebGLContextEvent::WebGLContextEvent):
     16        * html/canvas/WebGLContextEvent.h: Added a definition of WebGLContextEventInit.
     17        (WebCore::WebGLContextEvent::create):
     18        * html/canvas/WebGLContextEvent.idl: Added [ConstructorTemplate=Event] IDL.
     19
    1202011-11-25  Jeff Timanus  <twiz@chromium.org>
    221
  • trunk/Source/WebCore/html/canvas/WebGLContextEvent.cpp

    r99780 r101183  
    3131namespace WebCore {
    3232
     33WebGLContextEventInit::WebGLContextEventInit()
     34{
     35}
     36
    3337WebGLContextEvent::WebGLContextEvent()
    3438{
     
    3842    : Event(type, canBubble, cancelable)
    3943    , m_statusMessage(statusMessage)
     44{
     45}
     46
     47WebGLContextEvent::WebGLContextEvent(const AtomicString& type, const WebGLContextEventInit& initializer)
     48    : Event(type, initializer)
     49    , m_statusMessage(initializer.statusMessage)
    4050{
    4151}
  • trunk/Source/WebCore/html/canvas/WebGLContextEvent.h

    r99780 r101183  
    3131namespace WebCore {
    3232
     33struct WebGLContextEventInit : public EventInit {
     34    WebGLContextEventInit();
     35
     36    String statusMessage;
     37};
     38
    3339class WebGLContextEvent : public Event {
    3440public:
     
    4147        return adoptRef(new WebGLContextEvent(type, canBubble, cancelable, statusMessage));
    4248    }
     49    static PassRefPtr<WebGLContextEvent> create(const AtomicString& type, const WebGLContextEventInit& initializer)
     50    {
     51        return adoptRef(new WebGLContextEvent(type, initializer));
     52    }
    4353    virtual ~WebGLContextEvent();
    4454
     
    5060    WebGLContextEvent();
    5161    WebGLContextEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage);
     62    WebGLContextEvent(const AtomicString&, const WebGLContextEventInit&);
    5263
    5364    String m_statusMessage;
  • trunk/Source/WebCore/html/canvas/WebGLContextEvent.idl

    r99780 r101183  
    2525
    2626module html {
     27
    2728    interface [
    2829        Conditional=WEBGL,
     30        ConstructorTemplate=Event
    2931    ] WebGLContextEvent : Event {
    30         readonly attribute DOMString statusMessage;
     32        readonly attribute [InitializedByConstructor] DOMString statusMessage;
    3133    };
     34
    3235}
Note: See TracChangeset for help on using the changeset viewer.