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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 209353003: Clean up handling of autosizing state changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@crap_base
Patch Set: Fix segfault in unit test. Created 6 years, 9 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/core/rendering/FastTextAutosizer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index a13a00c1f5328cf08572e2cc2291c1776e3e1df8..5975d51d80a5bee4ce4d586e26ec33523b84eebf 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -113,6 +113,7 @@
#include "core/page/PointerLockController.h"
#include "core/page/ScopedPageLoadDeferrer.h"
#include "core/page/TouchDisambiguation.h"
+#include "core/rendering/FastTextAutosizer.h"
#include "core/rendering/RenderView.h"
#include "core/rendering/RenderWidget.h"
#include "core/rendering/TextAutosizer.h"
@@ -2863,6 +2864,11 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
}
updateMainFrameLayoutSize();
+
+ if (LocalFrame* frame = page()->mainFrame()) {
+ if (FastTextAutosizer* textAutosizer = frame->document()->fastTextAutosizer())
+ textAutosizer->updatePageInfoInAllFrames();
+ }
}
void WebViewImpl::updateMainFrameLayoutSize()
@@ -2881,8 +2887,7 @@ void WebViewImpl::updateMainFrameLayoutSize()
bool textAutosizingEnabled = page()->settings().textAutosizingEnabled();
if (textAutosizingEnabled && layoutSize.width != view->layoutSize().width()) {
- TextAutosizer* textAutosizer = page()->mainFrame()->document()->textAutosizer();
- if (textAutosizer)
+ if (TextAutosizer* textAutosizer = page()->mainFrame()->document()->textAutosizer())
textAutosizer->recalculateMultipliers();
}
}
« no previous file with comments | « Source/core/rendering/FastTextAutosizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698