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

Unified Diff: third_party/WebKit/Source/core/layout/TextAutosizerTest.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
Index: third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp b/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
index c61b38a8a20fb16b8bd37275d059fc1e4b83dbd8..739591ee163894e120fd9e158d17893db0ba0293 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
@@ -384,15 +384,12 @@ TEST_F(TextAutosizerTest, DeviceScaleAdjustmentWithViewport)
EXPECT_FLOAT_EQ(40.f, autosized->layoutObject()->style()->computedFontSize());
document().settings()->setViewportMetaEnabled(false);
- // TODO(pdr): This should not be needed but changing viewport settings does
- // not invalidate TextAutosizing, see ViewportDescriptionChange in Page.cpp.
- document().settings()->setDeviceScaleAdjustment(2.0f);
document().view()->updateAllLifecyclePhases();
autosized = document().getElementById("autosized");
EXPECT_FLOAT_EQ(16.f, autosized->layoutObject()->style()->specifiedFontSize());
- // (device scale adjustment = 2) * (specified font-size = 16px) * (viewport width = 800px) / (window width = 320px) = 80px.
- EXPECT_FLOAT_EQ(80.f, autosized->layoutObject()->style()->computedFontSize());
+ // (device scale adjustment = 1.5) * (specified font-size = 16px) * (viewport width = 800px) / (window width = 320px) = 60px.
+ EXPECT_FLOAT_EQ(60.f, autosized->layoutObject()->style()->computedFontSize());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698