| OLD | NEW |
| 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 Loading... |
| 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 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>:
:lifecycleNotifier()); | 1863 return static_cast<DOMWindowLifecycleNotifier&>(LifecycleContext<DOMWindow>:
:lifecycleNotifier()); |
| 1863 } | 1864 } |
| 1864 | 1865 |
| 1865 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() | 1866 PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() |
| 1866 { | 1867 { |
| 1867 return DOMWindowLifecycleNotifier::create(this); | 1868 return DOMWindowLifecycleNotifier::create(this); |
| 1868 } | 1869 } |
| 1869 | 1870 |
| 1870 | 1871 |
| 1871 } // namespace WebCore | 1872 } // namespace WebCore |
| OLD | NEW |