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

Unified Diff: LayoutTests/fast/text-autosizing/inline-width.html

Issue 218863002: [FastTextAutosizer] Fix the inline overlap issue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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
Index: LayoutTests/fast/text-autosizing/inline-width.html
diff --git a/LayoutTests/fast/text-autosizing/inline-width.html b/LayoutTests/fast/text-autosizing/inline-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..dab668177d32142085cc631bde36b8a47c7be732
--- /dev/null
+++ b/LayoutTests/fast/text-autosizing/inline-width.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+
+<meta name="viewport" content="width=800">
+<style>
+html { font-size: x-small; }
+.inline { display: inline; font-weight: normal; font-style: normal; background-color: green; }
skobes 2014/03/31 17:19:58 Suggest putting each property on its own line for
pdr. 2014/04/01 06:06:43 Done.
+i.inline { background-color: blue; }
+b { font-weight: normal; font-style: normal; background-color: purple; }
+</style>
+
+<script src="resources/autosizingTest.js"></script>
+
+<script>
+onload = function() {
skobes 2014/03/31 17:19:58 Nit: you can probably inline this at the bottom of
pdr. 2014/04/01 06:06:43 Done.
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ var pass = true;
+ var inlines = document.getElementsByClassName('inline');
+ var referenceWidth = inlines[0].offsetWidth;
+ for (var i = 1; i < inlines.length; i++) {
+ if (inlines[i].offsetWidth != referenceWidth)
+ pass = false;
+ }
+ if (pass)
+ document.write('PASS: All inlines have the same width.');
+ else
+ document.write('FAIL: All inlines do not have the same width.');
+}
+</script>
+
+</head>
+<body>
+This test passes if all lines have the same width.<br/>
+<div class="inline">
+AutosizeAutosizeAutosizeAutosize<br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+<i class="inline">AutosizeAutosizeAutosizeAutosize</i><br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+<b><b><b><i class="inline"><b><b><b>AutosizeAutosizeAutosizeAutosize</b></b></b></i></b></b></b><br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+AutosizeAutosizeAutosizeAutosize<br/>
+</div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/text-autosizing/inline-width-expected.txt » ('j') | Source/core/rendering/FastTextAutosizer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698