Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 136463002: Don't fire popstate event on initial document load (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix replacestate-in-iframe test Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/http/tests/navigation/redirect-on-reload-updates-history-item-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 void DOMWindow::dispatchWindowLoadEvent() 443 void DOMWindow::dispatchWindowLoadEvent()
444 { 444 {
445 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 445 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
446 dispatchLoadEvent(); 446 dispatchLoadEvent();
447 } 447 }
448 448
449 void DOMWindow::documentWasClosed() 449 void DOMWindow::documentWasClosed()
450 { 450 {
451 dispatchWindowLoadEvent(); 451 dispatchWindowLoadEvent();
452 enqueuePageshowEvent(PageshowEventNotPersisted); 452 enqueuePageshowEvent(PageshowEventNotPersisted);
453 enqueuePopstateEvent(m_pendingStateObject ? m_pendingStateObject.release() : SerializedScriptValue::nullValue()); 453 if (m_pendingStateObject)
454 enqueuePopstateEvent(m_pendingStateObject.release());
454 } 455 }
455 456
456 void DOMWindow::enqueuePageshowEvent(PageshowEventPersistence persisted) 457 void DOMWindow::enqueuePageshowEvent(PageshowEventPersistence persisted)
457 { 458 {
458 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36334 Pageshow event needs to fire asynchronously. 459 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=36334 Pageshow event needs to fire asynchronously.
459 dispatchEvent(PageTransitionEvent::create(EventTypeNames::pageshow, persiste d), m_document.get()); 460 dispatchEvent(PageTransitionEvent::create(EventTypeNames::pageshow, persiste d), m_document.get());
460 } 461 }
461 462
462 void DOMWindow::enqueueHashchangeEvent(const String& oldURL, const String& newUR L) 463 void DOMWindow::enqueueHashchangeEvent(const String& oldURL, const String& newUR L)
463 { 464 {
(...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier()); 1866 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>: :lifecycleNotifier());
1866 } 1867 }
1867 1868
1868 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() 1869 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier()
1869 { 1870 {
1870 return DOMWindowLifecycleNotifier::create(this); 1871 return DOMWindowLifecycleNotifier::create(this);
1871 } 1872 }
1872 1873
1873 1874
1874 } // namespace WebCore 1875 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/navigation/redirect-on-reload-updates-history-item-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698