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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2431613002: Initial viewport is not the same as FrameView rect. (Closed)
Patch Set: DCHECK that initial viewport size is read from main frame only. Created 4 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
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index efe1fe56aa7c0a9d1a22a1ee8207305873fa102a..b69fa59322144253bfe712c0f589afbdcdd9a763 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -120,6 +120,7 @@
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalDOMWindow.h"
+#include "core/frame/PageScaleConstraintsSet.h"
#include "core/frame/RemoteFrame.h"
#include "core/frame/Settings.h"
#include "core/frame/UseCounter.h"
@@ -1711,6 +1712,10 @@ void WebLocalFrameImpl::createFrameView() {
frame()->createView(initialSize, webView->baseBackgroundColor(),
isTransparent);
+ if (isMainFrame) {
+ frame()->view()->setInitialViewportSize(
+ webView->pageScaleConstraintsSet().initialViewportSize());
+ }
if (webView->shouldAutoResize() && frame()->isLocalRoot())
frame()->view()->enableAutoSizeMode(webView->minAutoSize(),
webView->maxAutoSize());
« no previous file with comments | « third_party/WebKit/Source/core/frame/PageScaleConstraintsSet.h ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698