Title: [198858] trunk
- Revision
- 198858
- Author
- [email protected]
- Date
- 2016-03-30 15:06:38 -0700 (Wed, 30 Mar 2016)
Log Message
-webkit-text-underline-position: under; does not work in ToT
https://bugs.webkit.org/show_bug.cgi?id=156038
Reviewed by David Hyatt.
Source/WebCore:
Test: fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html
* style/InlineTextBoxStyle.cpp:
(WebCore::computeUnderlineOffset):
Only resolve the underline position when based on the InlineTextBox when it is specified as auto.
LayoutTests:
* fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic-expected-mismatch.html: Added.
* fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html: Added.
Add mismatch test to show that -webkit-text-underline-position: under works.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (198857 => 198858)
--- trunk/LayoutTests/ChangeLog 2016-03-30 22:05:04 UTC (rev 198857)
+++ trunk/LayoutTests/ChangeLog 2016-03-30 22:06:38 UTC (rev 198858)
@@ -1,3 +1,14 @@
+2016-03-30 Sam Weinig <[email protected]>
+
+ -webkit-text-underline-position: under; does not work in ToT
+ https://bugs.webkit.org/show_bug.cgi?id=156038
+
+ Reviewed by David Hyatt.
+
+ * fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic-expected-mismatch.html: Added.
+ * fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html: Added.
+ Add mismatch test to show that -webkit-text-underline-position: under works.
+
2016-03-30 Eric Carlson <[email protected]>
Fix the media test added in r185402
Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic-expected-mismatch.html (0 => 198858)
--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic-expected-mismatch.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic-expected-mismatch.html 2016-03-30 22:06:38 UTC (rev 198858)
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+.alphabetic {
+ -webkit-text-decoration-style: solid;
+ -webkit-text-decoration-line: underline;
+ -webkit-text-underline-position: alphabetic;
+}
+
+.under {
+ -webkit-text-decoration-style: solid;
+ -webkit-text-decoration-line: underline;
+ -webkit-text-underline-position: under;
+}
+</style>
+</head>
+<body>
+ <span class="alphabetic">
+ Under
+ </span>
+ <span class="alphabetic">
+ Alphabetic
+ </span>
+</body>
+</html>
Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html (0 => 198858)
--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html 2016-03-30 22:06:38 UTC (rev 198858)
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+.alphabetic {
+ -webkit-text-decoration-style: solid;
+ -webkit-text-decoration-line: underline;
+ -webkit-text-underline-position: alphabetic;
+}
+
+.under {
+ -webkit-text-decoration-style: solid;
+ -webkit-text-decoration-line: underline;
+ -webkit-text-underline-position: under;
+}
+</style>
+</head>
+<body>
+ <span class="under">
+ Under
+ </span>
+ <span class="alphabetic">
+ Alphabetic
+ </span>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (198857 => 198858)
--- trunk/Source/WebCore/ChangeLog 2016-03-30 22:05:04 UTC (rev 198857)
+++ trunk/Source/WebCore/ChangeLog 2016-03-30 22:06:38 UTC (rev 198858)
@@ -1,3 +1,16 @@
+2016-03-30 Sam Weinig <[email protected]>
+
+ -webkit-text-underline-position: under; does not work in ToT
+ https://bugs.webkit.org/show_bug.cgi?id=156038
+
+ Reviewed by David Hyatt.
+
+ Test: fast/css3-text/css3-text-decoration/text-underline-position/text-underline-position-under-vs-alphabetic.html
+
+ * style/InlineTextBoxStyle.cpp:
+ (WebCore::computeUnderlineOffset):
+ Only resolve the underline position when based on the InlineTextBox when it is specified as auto.
+
2016-03-30 Alex Christensen <[email protected]>
Fix Windows EWS after r198766
Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (198857 => 198858)
--- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2016-03-30 22:05:04 UTC (rev 198857)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2016-03-30 22:06:38 UTC (rev 198858)
@@ -46,8 +46,15 @@
// even if it is horizontal, but detecting this has performance implications. For now we only work with
// vertical text, since we already determined the baseline type to be ideographic in that
// case.
- TextUnderlinePosition resolvedUnderlinePosition = underlinePosition == TextUnderlinePositionAuto && inlineTextBox && inlineTextBox->root().baselineType() == IdeographicBaseline ? TextUnderlinePositionUnder : TextUnderlinePositionAlphabetic;
+ TextUnderlinePosition resolvedUnderlinePosition = underlinePosition;
+ if (resolvedUnderlinePosition == TextUnderlinePositionAuto) {
+ if (inlineTextBox)
+ resolvedUnderlinePosition = inlineTextBox->root().baselineType() == IdeographicBaseline ? TextUnderlinePositionUnder : TextUnderlinePositionAlphabetic;
+ else
+ resolvedUnderlinePosition = TextUnderlinePositionAlphabetic;
+ }
+
switch (resolvedUnderlinePosition) {
case TextUnderlinePositionAlphabetic:
return fontMetrics.ascent() + gap;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes