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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 215503003: Reland text autosizing changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« Source/core/dom/Document.cpp ('K') | « Source/core/rendering/RenderBlock.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 9bbc57e15937f157cf554080c4cbd57548f8581a..1ccbdb99fde300665f5cebbdf06720e9d0ec88bb 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"
@@ -2864,6 +2865,11 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
}
updateMainFrameLayoutSize();
+
+ if (LocalFrame* frame = page()->mainFrame()) {
+ if (FastTextAutosizer* textAutosizer = frame->document()->fastTextAutosizer())
+ textAutosizer->updatePageInfoInAllFrames();
+ }
}
void WebViewImpl::updateMainFrameLayoutSize()
@@ -2882,8 +2888,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();
}
}
« Source/core/dom/Document.cpp ('K') | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698