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

Unified Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2341843002: Invalidate the text autosizer on meta viewport settings changes (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/Page.cpp
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
index 01e625f804c21cfbb0c1f2d0613081a300cf7636..e9ff729a99b9b02ac257460a85db1a309fe42e21 100644
--- a/third_party/WebKit/Source/core/page/Page.cpp
+++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -340,8 +340,12 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType)
setNeedsRecalcStyleInAllFrames();
break;
case SettingsDelegate::ViewportDescriptionChange:
- if (mainFrame() && mainFrame()->isLocalFrame())
+ if (mainFrame() && mainFrame()->isLocalFrame()) {
deprecatedLocalMainFrame()->document()->updateViewportDescription();
+ // The text autosizer has dependencies on the viewport.
+ if (TextAutosizer* textAutosizer = deprecatedLocalMainFrame()->document()->textAutosizer())
+ textAutosizer->updatePageInfoInAllFrames();
rune 2016/09/15 08:43:18 Wouldn't this also be an issue when you set the vi
skobes 2016/09/16 01:19:57 It looks like we already call updatePageInfoInAllF
pdr. 2016/09/17 05:14:53 This should only be called for settings changes li
+ }
break;
case SettingsDelegate::DNSPrefetchingChange:
for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698