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

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

Issue 2961583003: Element with columnCount > 1 should be classified as INDEPENDENT (Closed)
Patch Set: nit Created 3 years, 6 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 8875de4b2a1d00b840bc0a9021291cd87c65a91d..4f736c9679bc51be9213cb953b64badb4654a2ff 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp
@@ -852,4 +852,36 @@ TEST_F(TextAutosizerTest, LayoutViewWidthProvider) {
content->GetLayoutObject()->Style()->ComputedFontSize());
}
+TEST_F(TextAutosizerTest, MultiColumns) {
+ Element* html = GetDocument().body()->parentElement();
+ html->setInnerHTML(
+ "<head>"
+ " <meta name='viewport' content='width=800'>"
+ " <style>"
+ " html { font-size:16px;}"
+ " #mc {columns: 3;}"
+ " </style>"
+ "</head>"
+ "<body>"
+ " <div id='mc'>"
+ " <div id='target'>"
+ " 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 "
+ " </div>"
+ " </div>"
+ " <div> hello </div>"
+ "</body>",
+ ASSERT_NO_EXCEPTION);
+ GetDocument().View()->UpdateAllLifecyclePhases();
+
+ Element* target = GetDocument().getElementById("target");
+ // (specified font-size = 16px) * ( thread flow layout width = 800px / 3) /
+ // (window width = 320px) < 16px.
+ EXPECT_FLOAT_EQ(16.f, target->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