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

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

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: Rebase again. Created 3 years, 9 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
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index aa776fe5d5856992187bb0d11e30007de7347304..222a4e02ce27fb3d427ec684553fc1c35090b7b8 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -1081,12 +1081,19 @@ void LocalDOMWindow::setName(const AtomicString& name) {
if (!isCurrentlyDisplayedInFrame())
return;
+ // Avoid calling out to notify the embedder if the browsing context name
+ // didn't change. This is important to avoid violating the browser assumption
+ // that the unique name doesn't change if the browsing context name doesn't
+ // change.
+ // TODO(dcheng): This comment is indicative of a problematic layering
+ // violation. The browser should not be relying on the renderer to get this
+ // correct; unique name calculation should be moved up into the browser.
if (name == frame()->tree().name())
return;
frame()->tree().setName(name);
ASSERT(frame()->loader().client());
- frame()->loader().client()->didChangeName(name, frame()->tree().uniqueName());
+ frame()->loader().client()->didChangeName(name);
}
void LocalDOMWindow::setStatus(const String& string) {

Powered by Google App Engine
This is Rietveld 408576698