Changeset 192369 in webkit


Ignore:
Timestamp:
Nov 12, 2015 10:39:08 AM (8 years ago)
Author:
jhoneycutt@apple.com
Message:

popstate event should be dispatched asynchronously
https://bugs.webkit.org/show_bug.cgi?id=36202
<rdar://problem/7761279>

Based on an original patch by Mihai Parparita <mihaip@chromium.org>.

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: fast/loader/remove-iframe-during-history-navigation-different.html

fast/loader/remove-iframe-during-history-navigation-same.html
fast/loader/stateobjects/popstate-is-asynchronous.html

  • dom/Document.cpp:

(WebCore::Document::enqueuePopstateEvent):
Use enqueueWindowEvent().

LayoutTests:

  • fast/loader/remove-iframe-during-history-navigation-different-expected.txt: Added.
  • fast/loader/remove-iframe-during-history-navigation-different.html: Added.

Imported from Blink.

  • fast/loader/remove-iframe-during-history-navigation-same-expected.txt: Added.
  • fast/loader/remove-iframe-during-history-navigation-same.html: Added.

Ditto.

  • fast/loader/stateobjects/popstate-fires-on-history-traversal.html:

Modified to account for popstate firing asynchronously.

  • fast/loader/stateobjects/popstate-is-asynchronous-expected.txt: Added.
  • fast/loader/stateobjects/popstate-is-asynchronous.html: Added.

Based on Mihai's original test. Modified to pass in current WebKit.

Location:
trunk
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r192365 r192369  
     12015-11-11  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        popstate event should be dispatched asynchronously
     4        https://bugs.webkit.org/show_bug.cgi?id=36202
     5        <rdar://problem/7761279>
     6
     7        Based on an original patch by Mihai Parparita <mihaip@chromium.org>.
     8
     9        Reviewed by Brent Fulgham.
     10
     11        * fast/loader/remove-iframe-during-history-navigation-different-expected.txt: Added.
     12        * fast/loader/remove-iframe-during-history-navigation-different.html: Added.
     13        Imported from Blink.
     14        * fast/loader/remove-iframe-during-history-navigation-same-expected.txt: Added.
     15        * fast/loader/remove-iframe-during-history-navigation-same.html: Added.
     16        Ditto.
     17        * fast/loader/stateobjects/popstate-fires-on-history-traversal.html:
     18        Modified to account for popstate firing asynchronously.
     19        * fast/loader/stateobjects/popstate-is-asynchronous-expected.txt: Added.
     20        * fast/loader/stateobjects/popstate-is-asynchronous.html: Added.
     21        Based on Mihai's original test. Modified to pass in current WebKit.
     22
    1232015-11-12  Eric Carlson  <eric.carlson@apple.com>
    224
  • trunk/LayoutTests/fast/loader/stateobjects/popstate-fires-on-history-traversal.html

    r190505 r192369  
    5151   
    5252    currentStep++;
    53    
    54     setTimeout(step, 0);
    5553}
    5654
     
    5957    debug('popstate fired with state ' + event.state);
    6058    popstateFireCount++;
     59    setTimeout(step, 0);
    6160}
    6261var jsTestIsAsync = true;
  • trunk/Source/WebCore/ChangeLog

    r192368 r192369  
     12015-11-11  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        popstate event should be dispatched asynchronously
     4        https://bugs.webkit.org/show_bug.cgi?id=36202
     5        <rdar://problem/7761279>
     6
     7        Based on an original patch by Mihai Parparita <mihaip@chromium.org>.
     8
     9        Reviewed by Brent Fulgham.
     10
     11        Tests: fast/loader/remove-iframe-during-history-navigation-different.html
     12               fast/loader/remove-iframe-during-history-navigation-same.html
     13               fast/loader/stateobjects/popstate-is-asynchronous.html
     14
     15        * dom/Document.cpp:
     16        (WebCore::Document::enqueuePopstateEvent):
     17        Use enqueueWindowEvent().
     18
    1192015-11-12  Csaba Osztrogonác  <ossy@webkit.org>
    220
  • trunk/Source/WebCore/dom/Document.cpp

    r192354 r192369  
    53755375void Document::enqueuePopstateEvent(PassRefPtr<SerializedScriptValue> stateObject)
    53765376{
    5377     // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36202 Popstate event needs to fire asynchronously
    5378     dispatchWindowEvent(PopStateEvent::create(stateObject, m_domWindow ? m_domWindow->history() : nullptr));
     5377    enqueueWindowEvent(PopStateEvent::create(stateObject, m_domWindow ? m_domWindow->history() : nullptr));
    53795378}
    53805379
Note: See TracChangeset for help on using the changeset viewer.