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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1397713004: Don't bother layout until first navigation is done. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another attempt to fix tests Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 1839
1840 if (!frame()->document() || !frame()->page()) 1840 if (!frame()->document() || !frame()->page())
1841 return; 1841 return;
1842 1842
1843 RefPtrWillBeRawPtr<Document> ownerDocument(frame()->document()); 1843 RefPtrWillBeRawPtr<Document> ownerDocument(frame()->document());
1844 1844
1845 // Protect privileged pages against bookmarklets and other javascript manipu lations. 1845 // Protect privileged pages against bookmarklets and other javascript manipu lations.
1846 if (SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(frame()- >document()->url().protocol())) 1846 if (SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs(frame()- >document()->url().protocol()))
1847 return; 1847 return;
1848 1848
1849 ownerDocument->markNonInitialEmptyDocument();
1850
1849 String script = decodeURLEscapeSequences(url.string().substring(strlen("java script:"))); 1851 String script = decodeURLEscapeSequences(url.string().substring(strlen("java script:")));
1850 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); 1852 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
1851 v8::HandleScope handleScope(toIsolate(frame())); 1853 v8::HandleScope handleScope(toIsolate(frame()));
1852 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR eturnValue(ScriptSourceCode(script)); 1854 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR eturnValue(ScriptSourceCode(script));
1853 if (result.IsEmpty() || !result->IsString()) 1855 if (result.IsEmpty() || !result->IsString())
1854 return; 1856 return;
1855 String scriptResult = toCoreString(v8::Local<v8::String>::Cast(result)); 1857 String scriptResult = toCoreString(v8::Local<v8::String>::Cast(result));
1856 if (!frame()->navigationScheduler().locationChangePending()) 1858 if (!frame()->navigationScheduler().locationChangePending())
1857 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul t, ownerDocument.get()); 1859 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul t, ownerDocument.get());
1858 } 1860 }
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 return WebSandboxFlags::None; 2188 return WebSandboxFlags::None;
2187 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( )); 2189 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags( ));
2188 } 2190 }
2189 2191
2190 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) 2192 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags)
2191 { 2193 {
2192 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); 2194 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags));
2193 } 2195 }
2194 2196
2195 } // namespace blink 2197 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameContentDumper.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698