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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 #include "core/editing/spellcheck/SpellChecker.h" | 128 #include "core/editing/spellcheck/SpellChecker.h" |
129 #include "core/events/BeforeUnloadEvent.h" | 129 #include "core/events/BeforeUnloadEvent.h" |
130 #include "core/events/Event.h" | 130 #include "core/events/Event.h" |
131 #include "core/events/EventFactory.h" | 131 #include "core/events/EventFactory.h" |
132 #include "core/events/EventListener.h" | 132 #include "core/events/EventListener.h" |
133 #include "core/events/HashChangeEvent.h" | 133 #include "core/events/HashChangeEvent.h" |
134 #include "core/events/PageTransitionEvent.h" | 134 #include "core/events/PageTransitionEvent.h" |
135 #include "core/events/ScopedEventQueue.h" | 135 #include "core/events/ScopedEventQueue.h" |
136 #include "core/events/VisualViewportResizeEvent.h" | 136 #include "core/events/VisualViewportResizeEvent.h" |
137 #include "core/events/VisualViewportScrollEvent.h" | 137 #include "core/events/VisualViewportScrollEvent.h" |
| 138 #include "core/frame/ContentSettingsClient.h" |
138 #include "core/frame/DOMTimer.h" | 139 #include "core/frame/DOMTimer.h" |
139 #include "core/frame/DOMVisualViewport.h" | 140 #include "core/frame/DOMVisualViewport.h" |
140 #include "core/frame/EventHandlerRegistry.h" | 141 #include "core/frame/EventHandlerRegistry.h" |
141 #include "core/frame/FrameConsole.h" | 142 #include "core/frame/FrameConsole.h" |
142 #include "core/frame/FrameView.h" | 143 #include "core/frame/FrameView.h" |
143 #include "core/frame/History.h" | 144 #include "core/frame/History.h" |
144 #include "core/frame/HostsUsingFeatures.h" | 145 #include "core/frame/HostsUsingFeatures.h" |
145 #include "core/frame/LocalDOMWindow.h" | 146 #include "core/frame/LocalDOMWindow.h" |
146 #include "core/frame/LocalFrame.h" | 147 #include "core/frame/LocalFrame.h" |
147 #include "core/frame/LocalFrameClient.h" | 148 #include "core/frame/LocalFrameClient.h" |
(...skipping 5483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5631 "Blocked script execution in '" + url().elidedString() + | 5632 "Blocked script execution in '" + url().elidedString() + |
5632 "' because the document's frame is sandboxed and the " | 5633 "' because the document's frame is sandboxed and the " |
5633 "'allow-scripts' permission is not set.")); | 5634 "'allow-scripts' permission is not set.")); |
5634 } | 5635 } |
5635 return false; | 5636 return false; |
5636 } | 5637 } |
5637 | 5638 |
5638 DCHECK(frame()) | 5639 DCHECK(frame()) |
5639 << "you are querying canExecuteScripts on a non contextDocument."; | 5640 << "you are querying canExecuteScripts on a non contextDocument."; |
5640 | 5641 |
5641 LocalFrameClient* client = frame()->loader().client(); | 5642 ContentSettingsClient* settingsClient = frame()->contentSettingsClient(); |
5642 if (!client) | 5643 if (!settingsClient) |
5643 return false; | 5644 return false; |
5644 | 5645 |
5645 Settings* settings = frame()->settings(); | 5646 Settings* settings = frame()->settings(); |
5646 if (!client->allowScript(settings && settings->getScriptEnabled())) { | 5647 if (!settingsClient->allowScript(settings && settings->getScriptEnabled())) { |
5647 if (reason == AboutToExecuteScript) | 5648 if (reason == AboutToExecuteScript) |
5648 client->didNotAllowScript(); | 5649 settingsClient->didNotAllowScript(); |
5649 | 5650 |
5650 return false; | 5651 return false; |
5651 } | 5652 } |
5652 | 5653 |
5653 return true; | 5654 return true; |
5654 } | 5655 } |
5655 | 5656 |
5656 bool Document::isRenderingReady() const { | 5657 bool Document::isRenderingReady() const { |
5657 return m_styleEngine->ignoringPendingStylesheets() || | 5658 return m_styleEngine->ignoringPendingStylesheets() || |
5658 (haveImportsLoaded() && haveRenderBlockingStylesheetsLoaded()); | 5659 (haveImportsLoaded() && haveRenderBlockingStylesheetsLoaded()); |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6628 } | 6629 } |
6629 | 6630 |
6630 void showLiveDocumentInstances() { | 6631 void showLiveDocumentInstances() { |
6631 WeakDocumentSet& set = liveDocumentSet(); | 6632 WeakDocumentSet& set = liveDocumentSet(); |
6632 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6633 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6633 for (blink::Document* document : set) | 6634 for (blink::Document* document : set) |
6634 fprintf(stderr, "- Document %p URL: %s\n", document, | 6635 fprintf(stderr, "- Document %p URL: %s\n", document, |
6635 document->url().getString().utf8().data()); | 6636 document->url().getString().utf8().data()); |
6636 } | 6637 } |
6637 #endif | 6638 #endif |
OLD | NEW |