Remove initPopStateEvent method
authordominicc@chromium.org <dominicc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Nov 2011 21:59:19 +0000 (21:59 +0000)
committerdominicc@chromium.org <dominicc@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Nov 2011 21:59:19 +0000 (21:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71691

Reviewed by Ojan Vafai.

Source/WebCore:

* dom/PopStateEvent.cpp:
* dom/PopStateEvent.h:
* dom/PopStateEvent.idl:

LayoutTests:

* fast/events/fire-popstate-event.html: use 'new PopStateEvent' now

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99471 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/events/fire-popstate-event.html
Source/WebCore/ChangeLog
Source/WebCore/dom/PopStateEvent.cpp
Source/WebCore/dom/PopStateEvent.h
Source/WebCore/dom/PopStateEvent.idl

index b9594b2..f7ae1c2 100755 (executable)
@@ -1,3 +1,12 @@
+2011-11-07  Dominic Cooney  <dominicc@chromium.org>
+
+        Remove initPopStateEvent method
+        https://bugs.webkit.org/show_bug.cgi?id=71691
+
+        Reviewed by Ojan Vafai.
+
+        * fast/events/fire-popstate-event.html: use 'new PopStateEvent' now
+
 2011-11-07  Adam Barth  <abarth@webkit.org>
 
         iframe sandbox treats vertical tab as a valid delimiter
index a9fc566..ca200cd 100644 (file)
@@ -15,8 +15,11 @@ onpopstate = function(event)
 
 onload = function()
 {
-    var evt = document.createEvent("PopStateEvent");
-    evt.initPopStateEvent("popstate", false, false, { testValue: "Success"} );
+    var evt = new PopStateEvent('popstate', {
+            bubbles: false,
+            cancelable: false,
+            state: { testValue: 'Success' }
+        });
     window.dispatchEvent(evt);
 }
 
index 60a15c8..904b23c 100755 (executable)
@@ -1,3 +1,14 @@
+2011-11-07  Dominic Cooney  <dominicc@chromium.org>
+
+        Remove initPopStateEvent method
+        https://bugs.webkit.org/show_bug.cgi?id=71691
+
+        Reviewed by Ojan Vafai.
+
+        * dom/PopStateEvent.cpp:
+        * dom/PopStateEvent.h:
+        * dom/PopStateEvent.idl:
+
 2011-11-07  Andreas Kling  <kling@webkit.org>
 
         CSSValue: Devirtualize isFooType().
index 66a7914..8d0cb72 100644 (file)
@@ -85,16 +85,6 @@ PassRefPtr<PopStateEvent> PopStateEvent::create(const AtomicString& type, const
     return adoptRef(new PopStateEvent(type, initializer));
 }
 
-void PopStateEvent::initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& state)
-{
-    if (dispatched())
-        return;
-
-    initEvent(type, canBubble, cancelable);
-
-    m_state = state;
-}
-
 const AtomicString& PopStateEvent::interfaceName() const
 {
     return eventNames().interfaceForPopStateEvent;
index 8b3461f..5125fc1 100644 (file)
@@ -46,7 +46,6 @@ public:
     static PassRefPtr<PopStateEvent> create(const ScriptValue&);
     static PassRefPtr<PopStateEvent> create(PassRefPtr<SerializedScriptValue>);
     static PassRefPtr<PopStateEvent> create(const AtomicString&, const PopStateEventInit&);
-    void initPopStateEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue&);
 
     SerializedScriptValue* serializedState() const { return m_serializedState.get(); }
     ScriptValue state() const { return m_state; }
index a23e678..b31f98c 100644 (file)
@@ -31,11 +31,6 @@ module events {
         CanBeConstructed,
         CustomConstructor,
     ] PopStateEvent : Event {
-        void initPopStateEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, 
-                               in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
-                               in [Optional=CallWithDefaultValue] boolean cancelableArg, 
-                               in [Optional=CallWithDefaultValue] DOMObject stateArg);
-
         readonly attribute [CustomGetter] DOMObject state;
     };
 #endif