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

Unified Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 23819019: Refactor fixed layout mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDevToolsAgentImpl.cpp
diff --git a/Source/web/WebDevToolsAgentImpl.cpp b/Source/web/WebDevToolsAgentImpl.cpp
index 5a76762c6a438ad67ea3a590fd4dc4e857632a7d..7767191ec5d0c3f9b50c9164d756e9b58d383963 100644
--- a/Source/web/WebDevToolsAgentImpl.cpp
+++ b/Source/web/WebDevToolsAgentImpl.cpp
@@ -332,9 +332,14 @@ private:
int overrideWidth = effectiveEmulatedSize.width + scrollbarDimensions.width;
int overrideHeight = effectiveEmulatedSize.height + scrollbarDimensions.height;
- if (IntSize(overrideWidth, overrideHeight) != frameView->size())
+ if (IntSize(overrideWidth, overrideHeight) != frameView->size()) {
frameView->resize(overrideWidth, overrideHeight);
+ // Since we're resizing the main-frame, we need to resize its layout size too since
+ // main frames' layout sizes are manually managed by WebViewImpl
+ frameView->setLayoutSize(IntSize(overrideWidth, overrideHeight));
+ }
+
Document* doc = frameView->frame().document();
doc->styleResolverChanged(RecalcStyleImmediately);
doc->updateLayout();
« no previous file with comments | « Source/web/ChromeClientImpl.cpp ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698