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 // Internally, Blink uses CommittedMultipleRealLoads to track whether the |
| 1952 // next commit should create a new history item or not. Ensure we have |
| 1953 // reached that state. |
| 1954 if (frameLoader.stateMachine()->committedMultipleRealLoads()) |
1952 return; | 1955 return; |
1953 frameLoader.stateMachine()->advanceTo(frameLoader.client()->backForwardLengt
h() > 1 ? | 1956 frameLoader.stateMachine()->advanceTo(FrameLoaderStateMachine::CommittedMult
ipleRealLoads); |
1954 FrameLoaderStateMachine::CommittedMultipleRealLoads : FrameLoaderStateMa
chine::CommittedFirstRealLoad); | |
1955 } | 1957 } |
1956 | 1958 |
1957 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra
me, const WebString& name, WebSandboxFlags flags) | 1959 void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra
me, const WebString& name, WebSandboxFlags flags) |
1958 { | 1960 { |
1959 Frame* oldFrame = toCoreFrame(oldWebFrame); | 1961 Frame* oldFrame = toCoreFrame(oldWebFrame); |
1960 // Note: this *always* temporarily sets a frame owner, even for main frames! | 1962 // 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 | 1963 // 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 | 1964 // 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. | 1965 // disappear, so Page::m_mainFrame can't be updated just yet. |
1964 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu
llptr, SandboxNone); | 1966 OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nu
llptr, SandboxNone); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 { | 2114 { |
2113 m_frameWidget = frameWidget; | 2115 m_frameWidget = frameWidget; |
2114 } | 2116 } |
2115 | 2117 |
2116 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2118 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
2117 { | 2119 { |
2118 return m_frameWidget; | 2120 return m_frameWidget; |
2119 } | 2121 } |
2120 | 2122 |
2121 } // namespace blink | 2123 } // namespace blink |
OLD | NEW |