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(); |