Changeset 67898 in webkit


Ignore:
Timestamp:
Sep 20, 2010 5:22:13 PM (14 years ago)
Author:
mihaip@chromium.org
Message:

2010-09-20 Mihai Parparita <mihaip@chromium.org>

Reviewed by Dimitri Glazkov.

Hashchange event is no longer a simple event, needs to be its own interface
https://bugs.webkit.org/show_bug.cgi?id=36335

Add explicit test for newURL and oldURL properties of hashchange events.
Add HashChangeEvent to expected global objects.
Update stateobjects tests to also check newURL on the hashchange event.

The original version of this patch was written by
Steven Lai <s3lance@hotmail.com>.

  • fast/dom/Window/window-properties-expected.txt:
  • fast/dom/prototype-inheritance-expected.txt:
  • fast/js/global-constructors-expected.txt:
  • fast/loader/hashchange-event-properties-expected.txt: Added.
  • fast/loader/hashchange-event-properties.html: Added.
  • fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html:
  • fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html:

2010-09-20 Mihai Parparita <mihaip@chromium.org>

Reviewed by Dimitri Glazkov.

Hashchange event is no longer a simple event, needs to be its own interface
https://bugs.webkit.org/show_bug.cgi?id=36335

Add HashChangeEvent.idl and supporting files/changes.

Test: fast/loader/hashchange-event-properties.html

The original version of this patch was written by
Steven Lai <s3lance@hotmail.com>.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • GNUmakefile.am:
  • WebCore.gypi:
  • WebCore.pri:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSEventCustom.cpp: (WebCore::toJS):
  • bindings/v8/custom/V8EventCustom.cpp: (WebCore::toV8):
  • dom/Document.cpp: (WebCore::Document::enqueueHashchangeEvent):
  • dom/Event.cpp: (WebCore::Event::isHashChangeEvent):
  • dom/Event.h:
  • dom/HashChangeEvent.h: Added. (WebCore::HashChangeEvent::isHashChangeEvent): (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::initHashChangeEvent): (WebCore::HashChangeEvent::oldURL): (WebCore::HashChangeEvent::newURL): (WebCore::HashChangeEvent::HashChangeEvent):
  • dom/HashChangeEvent.idl: Added.
  • page/DOMWindow.idl:
Location:
trunk
Files:
4 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r67897 r67898  
     12010-09-20  Mihai Parparita  <mihaip@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Hashchange event is no longer a simple event, needs to be its own interface
     6        https://bugs.webkit.org/show_bug.cgi?id=36335
     7       
     8        Add explicit test for newURL and oldURL properties of hashchange events.
     9        Add HashChangeEvent to expected global objects.
     10        Update stateobjects tests to also check newURL on the hashchange event.
     11
     12        The original version of this patch was written by
     13        Steven Lai <s3lance@hotmail.com>.
     14
     15        * fast/dom/Window/window-properties-expected.txt:
     16        * fast/dom/prototype-inheritance-expected.txt:
     17        * fast/js/global-constructors-expected.txt:
     18        * fast/loader/hashchange-event-properties-expected.txt: Added.
     19        * fast/loader/hashchange-event-properties.html: Added.
     20        * fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html:
     21        * fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html:
     22
    1232010-09-20  Andrew Wilson  <atwilson@chromium.org>
    224
  • trunk/LayoutTests/fast/dom/Window/window-properties-expected.txt

    r66251 r67898  
    10801080window.HTMLVideoElement [object HTMLVideoElementConstructor]
    10811081window.HTMLVideoElement.prototype [printed above as window.Element.prototype]
     1082window.HashChangeEvent [object HashChangeEventConstructor]
     1083window.HashChangeEvent.prototype [printed above as window.Event.prototype]
    10821084window.Image [object ImageConstructor]
    10831085window.Image.prototype [printed above as window.Element.prototype]
  • trunk/LayoutTests/fast/dom/prototype-inheritance-expected.txt

    r63880 r67898  
    240240PASS inner.HTMLVideoElement.isInner is true
    241241PASS inner.HTMLVideoElement.constructor.isInner is true
     242PASS inner.HashChangeEvent.isInner is true
     243PASS inner.HashChangeEvent.constructor.isInner is true
    242244PASS inner.Image.isInner is true
    243245PASS inner.Image.constructor.isInner is true
  • trunk/LayoutTests/fast/js/global-constructors-expected.txt

    r62880 r67898  
    116116PASS HTMLUListElement.toString() is '[object HTMLUListElementConstructor]'
    117117PASS HTMLVideoElement.toString() is '[object HTMLVideoElementConstructor]'
     118PASS HashChangeEvent.toString() is '[object HashChangeEventConstructor]'
    118119PASS Image.toString() is '[object ImageConstructor]'
    119120PASS ImageData.toString() is '[object ImageDataConstructor]'
  • trunk/LayoutTests/fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html

    r66628 r67898  
    1010}
    1111
    12 function lastPathComponent()
     12function lastPathComponent(url)
    1313{
    14     return window.location.href.split('/').pop();
     14    return url.split('/').pop();
    1515}
    1616
     17function hashOf(url)
     18{
     19    return url.substring(url.lastIndexOf('#'));
     20}
     21 
    1722function runFirstStageOfTest()
    1823{   
     
    2429function runSecondStageOfTest()
    2530{
    26     alert("Last path component of location is " + lastPathComponent());
     31    alert("Last path component of location is " + lastPathComponent(location.href));
    2732    setTimeout("history.back();", 0);
    2833}
     
    4651var beganTest = false;
    4752
    48 function statePopped()
     53onpopstate = function()
    4954{
    5055    // The first time popstate fires, it's because the page has finished loading.
     
    8085}
    8186
    82 function hashChanged()
     87onhashchange = function(event)
    8388{
    84     alert("hashChanged - Last path component of location is " + lastPathComponent());
    85     if (window.location.hash == "#FirstEntryWillLaterBeReactivated") {
     89   alert("hashChanged - Last path component of location is " + lastPathComponent(event.newURL));
     90   if (hashOf(event.newURL) == "#FirstEntryWillLaterBeReactivated") {
    8691        alert("Test complete");
    8792        sessionStorage.clear();
     
    9297
    9398</script>
    94 <body onpopstate="statePopped();" onhashchange="hashChanged();" onunload="/* disable page cache */">
     99<body onunload="/* disable page cache */">
    95100<pre>
    96101This test:
  • trunk/LayoutTests/fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html

    r66628 r67898  
    4040}
    4141
    42 function lastPathComponent()
     42function lastPathComponent(url)
    4343{
    44     return window.location.href.split('/').pop();
     44    return url.split('/').pop();
    4545}
    4646
     
    5757    }
    5858
    59     log("State popped with event " + event.state + " (type " + typeof event.state + ") and last path component " + lastPathComponent());
     59    log("State popped with event " + event.state + " (type " + typeof event.state + ") and last path component " + lastPathComponent(location.href));
    6060    if (event.state != "OriginalEntry")
    6161        setTimeout("history.back();", 0);
     
    6464}
    6565
    66 onhashchange = function()
     66onhashchange = function(event)
    6767{
    68     log("Hash change fired and last path component is " + lastPathComponent());
     68    log("Hash change fired and last path component is " + lastPathComponent(event.newURL));
    6969}
    7070
  • trunk/WebCore/CMakeLists.txt

    r67785 r67898  
    165165    dom/EventException.idl
    166166    dom/Event.idl
     167    dom/HashChangeEvent.idl
    167168    dom/KeyboardEvent.idl
    168169    dom/MessageChannel.idl
  • trunk/WebCore/ChangeLog

    r67890 r67898  
     12010-09-20  Mihai Parparita  <mihaip@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Hashchange event is no longer a simple event, needs to be its own interface
     6        https://bugs.webkit.org/show_bug.cgi?id=36335
     7       
     8        Add HashChangeEvent.idl and supporting files/changes.
     9
     10        Test: fast/loader/hashchange-event-properties.html
     11
     12        The original version of this patch was written by
     13        Steven Lai <s3lance@hotmail.com>.
     14
     15        * CMakeLists.txt:
     16        * DerivedSources.cpp:
     17        * DerivedSources.make:
     18        * GNUmakefile.am:
     19        * WebCore.gypi:
     20        * WebCore.pri:
     21        * WebCore.vcproj/WebCore.vcproj:
     22        * WebCore.xcodeproj/project.pbxproj:
     23        * bindings/js/JSEventCustom.cpp:
     24        (WebCore::toJS):
     25        * bindings/v8/custom/V8EventCustom.cpp:
     26        (WebCore::toV8):
     27        * dom/Document.cpp:
     28        (WebCore::Document::enqueueHashchangeEvent):
     29        * dom/Event.cpp:
     30        (WebCore::Event::isHashChangeEvent):
     31        * dom/Event.h:
     32        * dom/HashChangeEvent.h: Added.
     33        (WebCore::HashChangeEvent::isHashChangeEvent):
     34        (WebCore::HashChangeEvent::create):
     35        (WebCore::HashChangeEvent::initHashChangeEvent):
     36        (WebCore::HashChangeEvent::oldURL):
     37        (WebCore::HashChangeEvent::newURL):
     38        (WebCore::HashChangeEvent::HashChangeEvent):
     39        * dom/HashChangeEvent.idl: Added.
     40        * page/DOMWindow.idl:
     41
    1422010-09-20  Andy Estes  <aestes@apple.com>
    243
  • trunk/WebCore/DerivedSources.cpp

    r67159 r67898  
    119119#include "JSGeolocation.cpp"
    120120#include "JSGeoposition.cpp"
     121#include "JSHashChangeEvent.cpp"
    121122#include "JSHistory.cpp"
    122123#include "JSHTMLAllCollection.cpp"
  • trunk/WebCore/DerivedSources.make

    r67251 r67898  
    165165    Geolocation \
    166166    Geoposition \
     167    HashChangeEvent \
     168    History \
    167169    HTMLAllCollection \
    168170    HTMLAnchorElement \
     
    237239    HTMLUListElement \
    238240    HTMLVideoElement \
    239     History \
    240241    IDBAny \
    241242    IDBCursor \
  • trunk/WebCore/GNUmakefile.am

    r67705 r67898  
    247247        DerivedSources/WebCore/JSGeoposition.cpp \
    248248        DerivedSources/WebCore/JSGeoposition.h \
     249        DerivedSources/WebCore/JSHashChangeEvent.cpp \
     250        DerivedSources/WebCore/JSHashChangeEvent.h \
    249251        DerivedSources/WebCore/JSHistory.cpp \
    250252        DerivedSources/WebCore/JSHistory.h \
     
    11271129        WebCore/dom/InputElement.cpp \
    11281130        WebCore/dom/InputElement.h \
     1131        WebCore/dom/HashChangeEvent.h \
    11291132        WebCore/dom/KeyboardEvent.cpp \
    11301133        WebCore/dom/KeyboardEvent.h \
  • trunk/WebCore/WebCore.gypi

    r67704 r67898  
    5757            'dom/EventListener.idl',
    5858            'dom/EventTarget.idl',
     59            'dom/HashChangeEvent.idl',
    5960            'dom/KeyboardEvent.idl',
    6061            'dom/MessageChannel.idl',
     
    12041205            'dom/InputElement.cpp',
    12051206            'dom/InputElement.h',
     1207            'dom/HashChangeEvent.h',
    12061208            'dom/KeyboardEvent.cpp',
    12071209            'dom/KeyboardEvent.h',
  • trunk/WebCore/WebCore.pri

    r67309 r67898  
    124124#    dom/EventListener.idl \
    125125#    dom/EventTarget.idl \
     126    dom/HashChangeEvent.idl \
    126127    dom/KeyboardEvent.idl \
    127128    dom/MouseEvent.idl \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r67704 r67898  
    53015301                                >
    53025302                        </File>
     5303                        <File
     5304                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHashChangeEvent.cpp"
     5305                                >
     5306                                <FileConfiguration
     5307                                        Name="Debug|Win32"
     5308                                        ExcludedFromBuild="true"
     5309                                        >
     5310                                        <Tool
     5311                                                Name="VCCLCompilerTool"
     5312                                        />
     5313                                </FileConfiguration>
     5314                                <FileConfiguration
     5315                                        Name="Release|Win32"
     5316                                        ExcludedFromBuild="true"
     5317                                        >
     5318                                        <Tool
     5319                                                Name="VCCLCompilerTool"
     5320                                        />
     5321                                </FileConfiguration>
     5322                                <FileConfiguration
     5323                                        Name="Debug_Internal|Win32"
     5324                                        ExcludedFromBuild="true"
     5325                                        >
     5326                                        <Tool
     5327                                                Name="VCCLCompilerTool"
     5328                                        />
     5329                                </FileConfiguration>
     5330                                <FileConfiguration
     5331                                        Name="Debug_Cairo|Win32"
     5332                                        ExcludedFromBuild="true"
     5333                                        >
     5334                                        <Tool
     5335                                                Name="VCCLCompilerTool"
     5336                                        />
     5337                                </FileConfiguration>
     5338                                <FileConfiguration
     5339                                        Name="Release_Cairo|Win32"
     5340                                        ExcludedFromBuild="true"
     5341                                        >
     5342                                        <Tool
     5343                                                Name="VCCLCompilerTool"
     5344                                        />
     5345                                </FileConfiguration>
     5346                                <FileConfiguration
     5347                                        Name="Debug_All|Win32"
     5348                                        ExcludedFromBuild="true"
     5349                                        >
     5350                                        <Tool
     5351                                                Name="VCCLCompilerTool"
     5352                                        />
     5353                                </FileConfiguration>
     5354                        </File>
     5355                        <File
     5356                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHashChangeEvent.h"
     5357                                >
     5358                        </File>
    53035359                        <File
    53045360                                RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSHistory.cpp"
     
    3391833974                        </File>
    3391933975                        <File
     33976                                RelativePath="..\dom\HashChangeEvent.cpp"
     33977                                >
     33978                        </File>
     33979                        <File
    3392033980                                RelativePath="..\dom\KeyboardEvent.cpp"
    3392133981                                >
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r67818 r67898  
    14891489                84801954108BAFB300CB2B1F /* FEGaussianBlur.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */; };
    14901490                84801955108BAFB300CB2B1F /* FEGaussianBlur.h in Headers */ = {isa = PBXBuildFile; fileRef = 84801953108BAFB300CB2B1F /* FEGaussianBlur.h */; };
     1491                8482B7461198C35400BFB005 /* HashChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2442BBF81194C9D300D49469 /* HashChangeEvent.h */; };
     1492                8482B7511198CB6B00BFB005 /* JSHashChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8482B74F1198CB6B00BFB005 /* JSHashChangeEvent.cpp */; };
     1493                8482B7521198CB6B00BFB005 /* JSHashChangeEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 8482B7501198CB6B00BFB005 /* JSHashChangeEvent.h */; };
    14911494                8485227B1190162C006EDC7F /* JSSVGHKernElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 848522771190162C006EDC7F /* JSSVGHKernElement.cpp */; };
    14921495                8485227C1190162C006EDC7F /* JSSVGHKernElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 848522781190162C006EDC7F /* JSSVGHKernElement.h */; };
     
    64976500                200B190811C277D900DCCD3A /* ScriptBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptBreakpoint.cpp; sourceTree = "<group>"; };
    64986501                228C284410D82500009D0D0E /* ScriptWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptWrappable.h; sourceTree = "<group>"; };
     6502                2442BBF81194C9D300D49469 /* HashChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashChangeEvent.h; sourceTree = "<group>"; };
    64996503                24F54EAA101FE914000AE741 /* ApplicationCacheHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplicationCacheHost.cpp; sourceTree = "<group>"; };
    65006504                24F54EAB101FE914000AE741 /* ApplicationCacheHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCacheHost.h; sourceTree = "<group>"; };
     
    74487452                84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FEGaussianBlur.cpp; path = filters/FEGaussianBlur.cpp; sourceTree = "<group>"; };
    74497453                84801953108BAFB300CB2B1F /* FEGaussianBlur.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FEGaussianBlur.h; path = filters/FEGaussianBlur.h; sourceTree = "<group>"; };
     7454                8482B7441198C32E00BFB005 /* HashChangeEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HashChangeEvent.idl; sourceTree = "<group>"; };
     7455                8482B74F1198CB6B00BFB005 /* JSHashChangeEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHashChangeEvent.cpp; sourceTree = "<group>"; };
     7456                8482B7501198CB6B00BFB005 /* JSHashChangeEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHashChangeEvent.h; sourceTree = "<group>"; };
    74507457                848522771190162C006EDC7F /* JSSVGHKernElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGHKernElement.cpp; sourceTree = "<group>"; };
    74517458                848522781190162C006EDC7F /* JSSVGHKernElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGHKernElement.h; sourceTree = "<group>"; };
     
    1523015237                                BC60D9BD0D2A269A00B9918F /* JSEventException.cpp */,
    1523115238                                BC60D9BE0D2A269A00B9918F /* JSEventException.h */,
     15239                                8482B74F1198CB6B00BFB005 /* JSHashChangeEvent.cpp */,
     15240                                8482B7501198CB6B00BFB005 /* JSHashChangeEvent.h */,
    1523215241                                A86629CE09DA2B47009633A5 /* JSKeyboardEvent.cpp */,
    1523315242                                A86629CD09DA2B47009633A5 /* JSKeyboardEvent.h */,
     
    1761017619                                935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
    1761117620                                A853123C11D0471B00D4D077 /* FragmentScriptingPermission.h */,
     17621                                8482B7441198C32E00BFB005 /* HashChangeEvent.idl */,
     17622                                2442BBF81194C9D300D49469 /* HashChangeEvent.h */,
    1761217623                                08700BE60F086C5300919419 /* InputElement.cpp */,
    1761317624                                08591AA40F085C4E009BACB1 /* InputElement.h */,
     
    1899919010                                C50B561712119D23008B46E0 /* GroupSettings.h in Headers */,
    1900019011                                7693BAD2106C2DCA007B0823 /* HaltablePlugin.h in Headers */,
     19012                                8482B7461198C35400BFB005 /* HashChangeEvent.h in Headers */,
    1900119013                                BC94D1540C275C8B006BC617 /* History.h in Headers */,
    1900219014                                97DCE20210807C750057D394 /* HistoryController.h in Headers */,
     
    1932919341                                FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */,
    1933019342                                FE80DA660E9C4703000D6F75 /* JSGeoposition.h in Headers */,
     19343                                8482B7521198CB6B00BFB005 /* JSHashChangeEvent.h in Headers */,
    1933119344                                BC94D14F0C275C68006BC617 /* JSHistory.h in Headers */,
    1933219345                                BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */,
     
    2186021873                                FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */,
    2186121874                                FE80DA650E9C4703000D6F75 /* JSGeoposition.cpp in Sources */,
     21875                                8482B7511198CB6B00BFB005 /* JSHashChangeEvent.cpp in Sources */,
    2186221876                                BC94D14E0C275C68006BC617 /* JSHistory.cpp in Sources */,
    2186321877                                BCE7B1930D4E86960075A539 /* JSHistoryCustom.cpp in Sources */,
  • trunk/WebCore/bindings/js/JSEventCustom.cpp

    r64845 r67898  
    4343#include "JSDeviceOrientationEvent.h"
    4444#include "JSErrorEvent.h"
     45#include "JSHashChangeEvent.h"
    4546#include "JSKeyboardEvent.h"
    4647#include "JSMessageEvent.h"
     
    5960#include "BeforeLoadEvent.h"
    6061#include "ErrorEvent.h"
     62#include "HashChangeEvent.h"
    6163#include "KeyboardEvent.h"
    6264#include "MessageEvent.h"
     
    171173        wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, ErrorEvent, event);
    172174#endif
     175    else if (event->isHashChangeEvent())
     176        wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, HashChangeEvent, event);
    173177    else if (event->isPopStateEvent())
    174178        wrapper = CREATE_DOM_OBJECT_WRAPPER(exec, globalObject, PopStateEvent, event);
  • trunk/WebCore/bindings/v8/custom/V8EventCustom.cpp

    r65071 r67898  
    4444#include "V8DeviceOrientationEvent.h"
    4545#include "V8ErrorEvent.h"
     46#include "V8HashChangeEvent.h"
    4647#include "V8IDBErrorEvent.h"
    4748#include "V8IDBSuccessEvent.h"
     
    121122        return toV8(static_cast<UIEvent*>(impl));
    122123    }
     124    if (impl->isHashChangeEvent())
     125        return toV8(static_cast<HashChangeEvent*>(impl));
    123126    if (impl->isMutationEvent())
    124127        return toV8(static_cast<MutationEvent*>(impl));
  • trunk/WebCore/dom/Document.cpp

    r67762 r67898  
    6666#include "FrameTree.h"
    6767#include "FrameView.h"
     68#include "HashChangeEvent.h"
    6869#include "HTMLAllCollection.h"
    6970#include "HTMLAnchorElement.h"
     
    46394640}
    46404641
    4641 void Document::enqueueHashchangeEvent(const String& /*oldURL*/, const String& /*newURL*/)
    4642 {
    4643     // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36335 Hashchange event is now its own interface and takes two
    4644     //   URL arguments which we need to pass in here.
    4645     enqueueEvent(Event::create(eventNames().hashchangeEvent, false, false));
     4642void Document::enqueueHashchangeEvent(const String& oldURL, const String& newURL)
     4643{
     4644    enqueueEvent(HashChangeEvent::create(oldURL, newURL));
    46464645}
    46474646
  • trunk/WebCore/dom/Event.cpp

    r65077 r67898  
    173173}
    174174
     175bool Event::isHashChangeEvent() const
     176{
     177    return false;
     178}
     179
    175180#if ENABLE(SVG)
    176181bool Event::isSVGZoomEvent() const
  • trunk/WebCore/dom/Event.h

    r65077 r67898  
    124124        virtual bool isWebKitTransitionEvent() const;
    125125        virtual bool isBeforeLoadEvent() const;
     126        virtual bool isHashChangeEvent() const;
    126127#if ENABLE(SVG)
    127128        virtual bool isSVGZoomEvent() const;
  • trunk/WebCore/page/DOMWindow.idl

    r67734 r67898  
    498498        attribute EventConstructor Event;
    499499        attribute BeforeLoadEventConstructor BeforeLoadEvent;
     500        attribute HashChangeEventConstructor HashChangeEvent;
    500501        attribute KeyboardEventConstructor KeyboardEvent;
    501502        attribute MouseEventConstructor MouseEvent;
Note: See TracChangeset for help on using the changeset viewer.