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

Unified Diff: third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp

Issue 2906033002: Fix narrow child cluster inherit multiplier from wide parent cluster (Closed)
Patch Set: format Created 3 years, 7 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/TextAutosizer.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/layout/TextAutosizerTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp b/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
index da1c58804a77623961a6f2c10dca1c6e3aa4328f..b6fdb705e83f0f5073a0e77eb7aea56d397a0e30 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
@@ -739,7 +739,7 @@ TEST_F(TextAutosizerTest, ResizeAndGlyphOverflowChanged) {
Element* html = GetDocument().body()->parentElement();
html->setInnerHTML(
"<head>"
- " <meta name='viewport' content='800'>"
+ " <meta name='viewport' content='width=800'>"
" <style>"
" html { font-size:16px; font-family:'Times New Roman';}"
" </style>"
@@ -774,4 +774,41 @@ TEST_F(TextAutosizerTest, ResizeAndGlyphOverflowChanged) {
IntSize(360, 640));
GetDocument().View()->UpdateAllLifecyclePhases();
}
+
+TEST_F(TextAutosizerTest, narrowContentInsideNestedWideBlock) {
+ Element* html = GetDocument().body()->parentElement();
+ html->setInnerHTML(
+ "<head>"
+ " <meta name='viewport' content='width=800'>"
+ " <style>"
+ " html { font-size:16px;}"
+ " </style>"
+ "</head>"
+ "<body>"
+ " <div style='width:800px'>"
+ " <div style='width:800px'>"
+ " <div style='width:200px' id='content'>"
+ " Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed "
+ " do eiusmod tempor incididunt ut labore et dolore magna aliqua."
+ " Ut enim ad minim veniam, quis nostrud exercitation ullamco "
+ " laboris nisi ut aliquip ex ea commodo consequat. Duis aute "
+ " irure dolor in reprehenderit in voluptate velit esse cillum "
+ " dolore eu fugiat nulla pariatur. Excepteur sint occaecat "
+ " cupidatat non proident, sunt in culpa qui officia deserunt "
+ " mollit anim id est laborum."
+ " </div>"
+ " </div>"
+ " Content belong to first wide block."
+ " </div>"
+ "</body>",
+ ASSERT_NO_EXCEPTION);
+ GetDocument().View()->UpdateAllLifecyclePhases();
+
+ Element* content = GetDocument().getElementById("content");
+ //(content width = 200px) / (window width = 320px) < 1.0f, multiplier = 1.0,
+ // font-size = 16px;
+ EXPECT_FLOAT_EQ(16.f,
+ content->GetLayoutObject()->Style()->ComputedFontSize());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/TextAutosizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698