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

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindow.cpp

Issue 2177233002: binding: Calls didAccessInitialDocument() for a returned Window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated SSLUITest's test expectation. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/DOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindow.cpp b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
index 3d1f12c7efdbb84f6907c18c4ecbfee3775d98b8..914aa05bd5397eeaed884cfeda28206e4d7e4ba2 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindow.cpp
@@ -130,8 +130,22 @@ DOMWindow* DOMWindow::anonymousIndexedGetter(uint32_t index) const
if (!frame())
return nullptr;
- Frame* child = frame()->tree().scopedChild(index);
- return child ? child->domWindow() : nullptr;
+ Frame* childFrame = frame()->tree().scopedChild(index);
+ if (!childFrame)
+ return nullptr;
+
+ DOMWindow* childWindow = childFrame->domWindow();
+ if (childWindow && childWindow->isLocalDOMWindow()) {
+ LocalFrame* targetFrame = blink::toLocalDOMWindow(childWindow)->frame();
+ if (targetFrame) {
+ // Notify the loader's client if the initial document has been accessed.
+ if (targetFrame->loader().stateMachine()->isDisplayingInitialEmptyDocument()) {
+ targetFrame->loader().didAccessInitialDocument();
+ }
+ }
+ }
+
+ return childWindow;
}
bool DOMWindow::isCurrentlyDisplayedInFrame() const
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698