summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp')
-rw-r--r--third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
index 2ff512f..53454bd 100644
--- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/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();