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

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

Issue 325673002: Fixing handling of Ligature when letter-spacing is present (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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
new file mode 100644
index 0000000000000000000000000000000000000000..a4fa19ec1b37f5c44af19fe68378434baa9c6639
--- /dev/null
+++ b/LayoutTests/fast/text/font-ligature-letter-spacing.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+<title>Letter spacing and Ligature</title>
+
+<style type="text/css">
+@font-face {
+ font-family: megalopolis;
+ src: url(../../third_party/MEgalopolis/MEgalopolisExtra.woff) format("woff");
+}
+
+.dligDiv {
+-moz-font-feature-settings:"frac" 1, "dlig" 1;
+-moz-font-feature-settings:"frac=1, dlig=1";
+-ms-font-feature-settings:"frac" 1, "dlig" 1;
+-o-font-feature-settings:"frac" 1, "dlig" 1;
+-webkit-font-feature-settings:"frac" 1, "dlig" 1;
+font-feature-settings:"frac" 1, "dlig" 1;
+}
+
+.common {
+font-size: 24px;
+line-height: 100%;
+padding: 0px;
+letter-spacing:20px;
+font-family: megalopolis;
+}
+
+p { font-family: serif; font-style: italic; }
+</style>
+
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+ setup({ explicit_done: true });
+ function testLetterSpaceAndLigature() {
+ elementWidth_1 = document.getElementsByClassName("dligSpan")[0].getBoundingClientRect().width;
Inactive 2014/06/09 13:14:47 Use "var" to declare variable. Also, please use be
h.joshi 2014/06/09 13:33:53 Done, using new variable in separate line as using
+ elementWidth_2 = document.getElementsByClassName("letterSpace")[0].getBoundingClientRect().width;
Inactive 2014/06/09 13:14:46 var elementWidth_2
h.joshi 2014/06/09 13:33:53 Changed to new name.
+ test(function() {
+ assert_equals(elementWidth_1, elementWidth_2, "Ligature not applied due to letter spacing.");
+ }, "Ligature expected not to be applied due to letter spacing.");
+ done();
+ }
+</script>
+</head>
+
Inactive 2014/06/09 13:14:47 No need for the blank line.
h.joshi 2014/06/09 13:33:53 Blank line removed between </head> and <body>
+<body onload="testLetterSpaceAndLigature();">
+<div class="dligDiv common">
+ <span class="dligSpan">CACACACA</span>
+</div>
+
+<div class="common">
+ <span class="letterSpace">CACACACA</span>
+</div>
+
+<div id="log"></div>
Inactive 2014/06/09 13:14:47 Why this div?
h.joshi 2014/06/09 13:33:53 This is used by testharness script to insert logs,
+</body></html>
Inactive 2014/06/09 13:14:47 We usually have </html> on its own line.
h.joshi 2014/06/09 13:33:53 Done.

Powered by Google App Engine
This is Rietveld 408576698