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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 153813002: Support "await a stable state" and "provide a stable state" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: assert more Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #include "core/html/HTMLHeadElement.h" 130 #include "core/html/HTMLHeadElement.h"
131 #include "core/html/HTMLIFrameElement.h" 131 #include "core/html/HTMLIFrameElement.h"
132 #include "core/html/HTMLImport.h" 132 #include "core/html/HTMLImport.h"
133 #include "core/html/HTMLInputElement.h" 133 #include "core/html/HTMLInputElement.h"
134 #include "core/html/HTMLLinkElement.h" 134 #include "core/html/HTMLLinkElement.h"
135 #include "core/html/HTMLNameCollection.h" 135 #include "core/html/HTMLNameCollection.h"
136 #include "core/html/HTMLScriptElement.h" 136 #include "core/html/HTMLScriptElement.h"
137 #include "core/html/HTMLStyleElement.h" 137 #include "core/html/HTMLStyleElement.h"
138 #include "core/html/HTMLTitleElement.h" 138 #include "core/html/HTMLTitleElement.h"
139 #include "core/html/PluginDocument.h" 139 #include "core/html/PluginDocument.h"
140 #include "core/html/StableState.h"
140 #include "core/html/forms/FormController.h" 141 #include "core/html/forms/FormController.h"
141 #include "core/html/parser/HTMLDocumentParser.h" 142 #include "core/html/parser/HTMLDocumentParser.h"
142 #include "core/html/parser/HTMLParserIdioms.h" 143 #include "core/html/parser/HTMLParserIdioms.h"
143 #include "core/html/parser/NestingLevelIncrementer.h" 144 #include "core/html/parser/NestingLevelIncrementer.h"
144 #include "core/html/parser/TextResourceDecoder.h" 145 #include "core/html/parser/TextResourceDecoder.h"
145 #include "core/inspector/InspectorCounters.h" 146 #include "core/inspector/InspectorCounters.h"
146 #include "core/inspector/InspectorInstrumentation.h" 147 #include "core/inspector/InspectorInstrumentation.h"
147 #include "core/inspector/ScriptCallStack.h" 148 #include "core/inspector/ScriptCallStack.h"
148 #include "core/loader/CookieJar.h" 149 #include "core/loader/CookieJar.h"
149 #include "core/loader/DocumentLoader.h" 150 #include "core/loader/DocumentLoader.h"
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 if (!beforeUnloadEvent->defaultPrevented()) 2504 if (!beforeUnloadEvent->defaultPrevented())
2504 defaultEventHandler(beforeUnloadEvent.get()); 2505 defaultEventHandler(beforeUnloadEvent.get());
2505 if (beforeUnloadEvent->returnValue().isNull()) 2506 if (beforeUnloadEvent->returnValue().isNull())
2506 return true; 2507 return true;
2507 2508
2508 if (didAllowNavigation) { 2509 if (didAllowNavigation) {
2509 addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt t o show multiple 'beforeunload' confirmation panels for a single navigation."); 2510 addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt t o show multiple 'beforeunload' confirmation panels for a single navigation.");
2510 return true; 2511 return true;
2511 } 2512 }
2512 2513
2514 // http://whatwg.org/html#pause
2515 StableState::provide();
2516
2513 String text = beforeUnloadEvent->returnValue(); 2517 String text = beforeUnloadEvent->returnValue();
2514 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { 2518 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) {
2515 didAllowNavigation = true; 2519 didAllowNavigation = true;
2516 return true; 2520 return true;
2517 } 2521 }
2518 return false; 2522 return false;
2519 } 2523 }
2520 2524
2521 void Document::dispatchUnloadEvents() 2525 void Document::dispatchUnloadEvents()
2522 { 2526 {
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
5414 void Document::defaultEventHandler(Event* event) 5418 void Document::defaultEventHandler(Event* event)
5415 { 5419 {
5416 if (frame() && frame()->remotePlatformLayer()) { 5420 if (frame() && frame()->remotePlatformLayer()) {
5417 frame()->chromeClient().forwardInputEvent(this, event); 5421 frame()->chromeClient().forwardInputEvent(this, event);
5418 return; 5422 return;
5419 } 5423 }
5420 Node::defaultEventHandler(event); 5424 Node::defaultEventHandler(event);
5421 } 5425 }
5422 5426
5423 } // namespace WebCore 5427 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698