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

Unified Diff: Source/core/html/HTMLFrameElementBase.cpp

Issue 19272007: Update parent layout when child frame requests innerHeight/innerWidth. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
Index: Source/core/html/HTMLFrameElementBase.cpp
diff --git a/Source/core/html/HTMLFrameElementBase.cpp b/Source/core/html/HTMLFrameElementBase.cpp
index 892878eda97acaa7506f50579f9ddc4eccddbb99..c7569db6cdcb94b1c247866275a4cd800a865751 100644
--- a/Source/core/html/HTMLFrameElementBase.cpp
+++ b/Source/core/html/HTMLFrameElementBase.cpp
@@ -82,6 +82,14 @@ void HTMLFrameElementBase::openURL(bool lockBackForwardList)
if (!parentFrame)
return;
+ // Force layout before loading a subframe because the frame may need to know
+ // its dimensions and we don't want the frame to waste effort laying out
+ // with incorrect dimensions.
+ //
+ // FIXME: This is potentially too much work. We really only need to do
+ // enough to calculate the width and height of the subframe.
+ document()->updateLayoutIgnorePendingStylesheets();
esprehn 2013/07/16 00:49:41 This isn't the right place to do this, you're goin
+
parentFrame->loader()->subframeLoader()->requestFrame(this, m_URL, m_frameName, lockBackForwardList);
}

Powered by Google App Engine
This is Rietveld 408576698