Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1941 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR eturnValue(ScriptSourceCode(script)); | 1941 v8::Local<v8::Value> result = frame()->script().executeScriptInMainWorldAndR eturnValue(ScriptSourceCode(script)); |
| 1942 if (result.IsEmpty() || !result->IsString()) | 1942 if (result.IsEmpty() || !result->IsString()) |
| 1943 return; | 1943 return; |
| 1944 String scriptResult = toCoreString(v8::Local<v8::String>::Cast(result)); | 1944 String scriptResult = toCoreString(v8::Local<v8::String>::Cast(result)); |
| 1945 if (!frame()->navigationScheduler().locationChangePending()) | 1945 if (!frame()->navigationScheduler().locationChangePending()) |
| 1946 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul t, ownerDocument.get()); | 1946 frame()->loader().replaceDocumentWhileExecutingJavaScriptURL(scriptResul t, ownerDocument.get()); |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 static void ensureFrameLoaderHasCommitted(FrameLoader& frameLoader) | 1949 static void ensureFrameLoaderHasCommitted(FrameLoader& frameLoader) |
| 1950 { | 1950 { |
| 1951 if (frameLoader.stateMachine()->committedFirstRealDocumentLoad()) | 1951 if (frameLoader.stateMachine()->committedMultipleRealLoads()) |
| 1952 return; | 1952 return; |
| 1953 frameLoader.stateMachine()->advanceTo(frameLoader.client()->backForwardLengt h() > 1 ? | 1953 frameLoader.stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedMult ipleRealLoads); |
|
Charlie Reis
2015/06/09 07:14:18
After looking at how Blink uses these states, I th
Nate Chapin
2015/06/09 18:25:33
CommittedMultipleRealLoads isn't used for a whole
Charlie Reis
2015/06/11 16:43:48
Oh, I see; it was introduced in https://codereview
| |
| 1954 FrameLoaderStateMachine::CommittedMultipleRealLoads : FrameLoaderStateMa chine::CommittedFirstRealLoad); | |
| 1955 } | 1954 } |
| 1956 | 1955 |
| 1957 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra me, const WebString& name, WebSandboxFlags flags) | 1956 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra me, const WebString& name, WebSandboxFlags flags) |
| 1958 { | 1957 { |
| 1959 Frame* oldFrame = toCoreFrame(oldWebFrame); | 1958 Frame* oldFrame = toCoreFrame(oldWebFrame); |
| 1960 // Note: this *always* temporarily sets a frame owner, even for main frames! | 1959 // Note: this *always* temporarily sets a frame owner, even for main frames! |
| 1961 // When a core Frame is created with no owner, it attempts to set itself as | 1960 // When a core Frame is created with no owner, it attempts to set itself as |
| 1962 // the main frame of the Page. However, this is a provisional frame, and may | 1961 // the main frame of the Page. However, this is a provisional frame, and may |
| 1963 // disappear, so Page::m_mainFrame can't be updated just yet. | 1962 // disappear, so Page::m_mainFrame can't be updated just yet. |
| 1964 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu llptr, SandboxNone); | 1963 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu llptr, SandboxNone); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2112 { | 2111 { |
| 2113 m_frameWidget = frameWidget; | 2112 m_frameWidget = frameWidget; |
| 2114 } | 2113 } |
| 2115 | 2114 |
| 2116 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2115 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2117 { | 2116 { |
| 2118 return m_frameWidget; | 2117 return m_frameWidget; |
| 2119 } | 2118 } |
| 2120 | 2119 |
| 2121 } // namespace blink | 2120 } // namespace blink |
| OLD | NEW |