Chromium Code Reviews| OLD | NEW | 
|---|---|
| 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 Loading... | |
| 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 2359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2509 if (!beforeUnloadEvent->defaultPrevented()) | 2510 if (!beforeUnloadEvent->defaultPrevented()) | 
| 2510 defaultEventHandler(beforeUnloadEvent.get()); | 2511 defaultEventHandler(beforeUnloadEvent.get()); | 
| 2511 if (beforeUnloadEvent->returnValue().isNull()) | 2512 if (beforeUnloadEvent->returnValue().isNull()) | 
| 2512 return true; | 2513 return true; | 
| 2513 | 2514 | 
| 2514 if (didAllowNavigation) { | 2515 if (didAllowNavigation) { | 
| 2515 addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt t o show multiple 'beforeunload' confirmation panels for a single navigation."); | 2516 addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt t o show multiple 'beforeunload' confirmation panels for a single navigation."); | 
| 2516 return true; | 2517 return true; | 
| 2517 } | 2518 } | 
| 2518 | 2519 | 
| 2520 // http://whatwg.org/html#pause | |
| 
 
tkent
2014/02/06 04:27:46
This comment doesn't explain why we need to pause
 
 | |
| 2521 StableState::provide(); | |
| 2522 | |
| 2519 String text = beforeUnloadEvent->returnValue(); | 2523 String text = beforeUnloadEvent->returnValue(); | 
| 2520 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { | 2524 if (chrome.runBeforeUnloadConfirmPanel(text, m_frame)) { | 
| 2521 didAllowNavigation = true; | 2525 didAllowNavigation = true; | 
| 2522 return true; | 2526 return true; | 
| 2523 } | 2527 } | 
| 2524 return false; | 2528 return false; | 
| 2525 } | 2529 } | 
| 2526 | 2530 | 
| 2527 void Document::dispatchUnloadEvents() | 2531 void Document::dispatchUnloadEvents() | 
| 2528 { | 2532 { | 
| (...skipping 2897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5426 void Document::defaultEventHandler(Event* event) | 5430 void Document::defaultEventHandler(Event* event) | 
| 5427 { | 5431 { | 
| 5428 if (frame() && frame()->remotePlatformLayer()) { | 5432 if (frame() && frame()->remotePlatformLayer()) { | 
| 5429 frame()->chromeClient().forwardInputEvent(this, event); | 5433 frame()->chromeClient().forwardInputEvent(this, event); | 
| 5430 return; | 5434 return; | 
| 5431 } | 5435 } | 
| 5432 Node::defaultEventHandler(event); | 5436 Node::defaultEventHandler(event); | 
| 5433 } | 5437 } | 
| 5434 | 5438 | 
| 5435 } // namespace WebCore | 5439 } // namespace WebCore | 
| OLD | NEW |