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

Unified Diff: LayoutTests/fast/text/font-ligature-letter-spacing.html

Issue 847813002: Update typesetting features when letter-spacing is changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | LayoutTests/fast/text/font-ligature-letter-spacing-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/text/font-ligature-letter-spacing.html
diff --git a/LayoutTests/fast/text/font-ligature-letter-spacing.html b/LayoutTests/fast/text/font-ligature-letter-spacing.html
index df295aebea8deb041f8849d665401480b722c760..a0e8c3748f1eefa81a3f4cafb758d75c990ccf96 100644
--- a/LayoutTests/fast/text/font-ligature-letter-spacing.html
+++ b/LayoutTests/fast/text/font-ligature-letter-spacing.html
@@ -19,6 +19,10 @@
font-feature-settings:"frac" 1, "dlig" 1;
}
+.fontVariantDiv {
+font-variant-ligatures: discretionary-ligatures;
+}
+
.common {
font-size: 24px;
line-height: 100%;
@@ -34,23 +38,32 @@ p { font-family: serif; font-style: italic; }
<script src="../../resources/testharnessreport.js"></script>
<script>
setup({ explicit_done: true });
- function testLetterSpaceAndLigature() {
- var elementWidthWithLigatureAndLetterSpacing = document.getElementsByClassName("dligSpan")[0].getBoundingClientRect().width;
- var elementWidthWithLetterSpacing = document.getElementsByClassName("letterSpace")[0].getBoundingClientRect().width;
+ function testLetterSpaceAndLigature(element) {
+ var elementWidthWithLigatureAndLetterSpacing = element.getBoundingClientRect().width;
+ var elementWidthWithLetterSpacing = letterSpace.getBoundingClientRect().width;
test(function() {
assert_equals(elementWidthWithLigatureAndLetterSpacing, elementWidthWithLetterSpacing, "Ligature not applied due to letter spacing.");
}, "Ligature expected not to be applied due to letter spacing.");
+ }
+
+ function runTest() {
+ testLetterSpaceAndLigature(dligSpan);
+ testLetterSpaceAndLigature(fontVariantSpan);
done();
}
</script>
</head>
-<body onload="testLetterSpaceAndLigature();">
+<body onload="runTest();">
<div class="dligDiv common">
- <span class="dligSpan">CACACACA</span>
+ <span id="dligSpan">CACACACA</span>
+</div>
+
+<div class="fontVariantDiv common">
+ <span id="fontVariantSpan">CACACACA</span>
</div>
<div class="common">
- <span class="letterSpace">CACACACA</span>
+ <span id="letterSpace">CACACACA</span>
</div>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/fast/text/font-ligature-letter-spacing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698