diff options
Diffstat (limited to 'Source/WebKit/chromium/src/WebFrameImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebFrameImpl.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/WebKit/chromium/src/WebFrameImpl.cpp b/Source/WebKit/chromium/src/WebFrameImpl.cpp index 7eef29343..1936476f3 100644 --- a/Source/WebKit/chromium/src/WebFrameImpl.cpp +++ b/Source/WebKit/chromium/src/WebFrameImpl.cpp @@ -82,6 +82,7 @@ #include "DOMUtilitiesPrivate.h" #include "DOMWindow.h" #include "DOMWindowIntents.h" +#include "DOMWrapperWorld.h" #include "DeliveredIntent.h" #include "DeliveredIntentClientImpl.h" #include "DirectoryEntry.h" @@ -148,6 +149,7 @@ #include "SubstituteData.h" #include "TextAffinity.h" #include "TextIterator.h" +#include "TraceEvent.h" #include "UserGestureIndicator.h" #include "V8DOMFileSystem.h" #include "V8DirectoryEntry.h" @@ -825,7 +827,13 @@ void WebFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScriptSour void WebFrameImpl::setIsolatedWorldSecurityOrigin(int worldID, const WebSecurityOrigin& securityOrigin) { ASSERT(frame()); - frame()->script()->setIsolatedWorldSecurityOrigin(worldID, securityOrigin.get()); + DOMWrapperWorld::setIsolatedWorldSecurityOrigin(worldID, securityOrigin.get()); +} + +void WebFrameImpl::setIsolatedWorldContentSecurityPolicy(int worldID, const WebString& policy) +{ + ASSERT(frame()); + DOMWrapperWorld::setIsolatedWorldContentSecurityPolicy(worldID, policy); } void WebFrameImpl::addMessageToConsole(const WebConsoleMessage& message) @@ -851,7 +859,7 @@ void WebFrameImpl::addMessageToConsole(const WebConsoleMessage& message) return; } - frame()->document()->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, webCoreMessageLevel, message.text); + frame()->document()->addConsoleMessage(OtherMessageSource, LogMessageType, webCoreMessageLevel, message.text); } void WebFrameImpl::collectGarbage() @@ -1114,15 +1122,7 @@ WebURLLoader* WebFrameImpl::createAssociatedURLLoader(const WebURLLoaderOptions& void WebFrameImpl::commitDocumentData(const char* data, size_t length) { - WebViewImpl* webView = viewImpl(); - bool isMainFrame = webView->mainFrameImpl()->frame() == frame(); - if (isMainFrame) - webView->suppressInvalidations(true); - frame()->loader()->documentLoader()->commitData(data, length); - - if (isMainFrame) - webView->suppressInvalidations(false); } unsigned WebFrameImpl::unloadListenerCount() const @@ -2275,6 +2275,8 @@ void WebFrameImpl::didChangeContentsSize(const IntSize& size) void WebFrameImpl::createFrameView() { + TRACE_EVENT0("webkit", "WebFrameImpl::createFrameView"); + ASSERT(frame()); // If frame() doesn't exist, we probably didn't init properly. WebViewImpl* webView = viewImpl(); @@ -2458,7 +2460,7 @@ bool WebFrameImpl::shouldScopeMatches(const String& searchText) // Don't scope if we can't find a frame or a view. // The user may have closed the tab/application, so abort. // Also ignore detached frames, as many find operations report to the main frame. - if (!frame() || !frame()->view() || !frame()->page()) + if (!frame() || !frame()->view() || !frame()->page() || !hasVisibleContent()) return false; ASSERT(frame()->document() && frame()->view()); |