https://bugs.webkit.org/show_bug.cgi?id=128786
Reviewed by Dean Jackson.
http://lists.w3.org/Archives/Public/www-style/
2014Feb/0485.html
We are updating the initial value of text-decoration-skip to a new value, "auto".
On Mac + iOS, this will have the same behavior as "skip".
Source/WebCore:
Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationSkipFlagsToCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseTextDecorationSkip):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::valueToDecorationSkip):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDecoration):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
LayoutTests:
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default-expected.txt: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt:
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164115
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-02-14 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Implement text-decoration-skip: auto
+ https://bugs.webkit.org/show_bug.cgi?id=128786
+
+ Reviewed by Dean Jackson.
+
+ http://lists.w3.org/Archives/Public/www-style/2014Feb/0485.html
+ We are updating the initial value of text-decoration-skip to a new value, "auto".
+ On Mac + iOS, this will have the same behavior as "skip".
+
+ * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default-expected.txt: Added.
+ * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html: Added.
+ * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt:
+ * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html:
+
2014-02-14 Brent Fulgham <bfulgham@apple.com>
Unreviewed test correction to get bots green.
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<div id="a"></div>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+var d = document.getElementById("a");
+var s = window.getComputedStyle(d);
+var p = s.getPropertyValue("-webkit-text-decoration-skip");
+d.innerHTML = p;
+</script>
+</body>
+</html>
PASS cssRule.type is cssRule.STYLE_RULE
PASS declaration.length is 0
PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is null
-PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "objects"
+PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
PASS cssRule.type is cssRule.STYLE_RULE
PASS declaration.length is 1
PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "initial"
-PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "objects"
+PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
PASS cssRule.type is cssRule.STYLE_RULE
PASS declaration.length is 1
PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "ink"
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "ink"
PASS cssRule.type is cssRule.STYLE_RULE
PASS declaration.length is 0
-PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "objects"
+PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
PASS cssRule.type is cssRule.STYLE_RULE
PASS declaration.length is 1
PASS declaration.getPropertyValue('-webkit-text-decoration-skip') is "ink"
PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "none"
PASS cssRule.type is cssRule.STYLE_RULE
PASS declaration.length is 0
-PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "objects"
+PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is "auto"
shouldBe("declaration.length", "0");
shouldBe("declaration.getPropertyValue('-webkit-text-decoration-skip')", "null");
computedStyle = window.getComputedStyle(target, null);
- shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "\"objects\"");
+ shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "\"auto\"");
stylesheet.deleteRule(0);
}
- function testInitialIsObjects(stylesheet, target) {
+ function testInitialIsAuto(stylesheet, target) {
cssRule = stylesheet.cssRules.item(0);
shouldBe("cssRule.type", "cssRule.STYLE_RULE");
declaration = cssRule.style;
shouldBe("declaration.length", "1");
shouldBe("declaration.getPropertyValue('-webkit-text-decoration-skip')", "\"initial\"");
computedStyle = window.getComputedStyle(target, null);
- shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "\"objects\"");
+ shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "\"auto\"");
stylesheet.deleteRule(0);
}
declaration = cssRule.style;
shouldBe("declaration.length", "0");
computedStyle = window.getComputedStyle(target, null);
- shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "\"objects\"");
+ shouldBe("computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText", "\"auto\"");
stylesheet.deleteRule(0);
}
testEmptyIsObjects(stylesheet, target);
stylesheet.insertRule(".p { -webkit-text-decoration-skip: initial; }", 0);
- testInitialIsObjects(stylesheet, target);
+ testInitialIsAuto(stylesheet, target);
stylesheet.insertRule(".p { -webkit-text-decoration-skip: ink; }", 0);
testInkIsValid(stylesheet, target);
+2014-02-14 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Implement text-decoration-skip: auto
+ https://bugs.webkit.org/show_bug.cgi?id=128786
+
+ Reviewed by Dean Jackson.
+
+ http://lists.w3.org/Archives/Public/www-style/2014Feb/0485.html
+ We are updating the initial value of text-decoration-skip to a new value, "auto".
+ On Mac + iOS, this will have the same behavior as "skip".
+
+ Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-default.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::renderTextDecorationSkipFlagsToCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseTextDecorationSkip):
+ * css/DeprecatedStyleBuilder.cpp:
+ (WebCore::valueToDecorationSkip):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paintDecoration):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/RenderStyleConstants.h:
+
2014-02-13 Simon Fraser <simon.fraser@apple.com>
Give ScrollingTree(State)Nodes a reference to another layer, which is used for moving overflow:scroll contents around
static PassRef<CSSValue> renderTextDecorationSkipFlagsToCSSValue(TextDecorationSkip textDecorationSkip)
{
switch (textDecorationSkip) {
+ case TextDecorationSkipAuto:
+ return cssValuePool().createIdentifierValue(CSSValueAuto);
case TextDecorationSkipNone:
return cssValuePool().createIdentifierValue(CSSValueNone);
case TextDecorationSkipInk:
do {
switch (value->id) {
case CSSValueNone:
+ case CSSValueAuto:
case CSSValueInk:
case CSSValueObjects:
addProperty(CSSPropertyWebkitTextDecorationSkip, cssValuePool().createIdentifierValue(value->id), important);
ASSERT(primitiveValue.isValueID());
switch (primitiveValue.getValueID()) {
+ case CSSValueAuto:
+ return TextDecorationSkipAuto;
case CSSValueNone:
return TextDecorationSkipNone;
case CSSValueInk:
}
default:
#if ENABLE(CSS3_TEXT_DECORATION_SKIP_INK)
- if (lineStyle.textDecorationSkip() == TextDecorationSkipInk && isHorizontal()) {
+ if ((lineStyle.textDecorationSkip() == TextDecorationSkipInk || lineStyle.textDecorationSkip() == TextDecorationSkipAuto) && isHorizontal()) {
if (!context.paintingDisabled()) {
drawSkipInkUnderline(textPainter, context, localOrigin, underlineOffset, width, isPrinting);
}
default:
#if ENABLE(CSS3_TEXT_DECORATION_SKIP_INK)
- if (lineStyle.textDecorationSkip() == TextDecorationSkipInk) {
+ if ((lineStyle.textDecorationSkip() == TextDecorationSkipInk || lineStyle.textDecorationSkip() == TextDecorationSkipAuto) && isHorizontal()) {
if (!context.paintingDisabled()) {
drawSkipInkUnderline(textPainter, context, localOrigin, 0, width, isPrinting);
static TextJustify initialTextJustify() { return TextJustifyAuto; }
#endif // CSS3_TEXT
static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; }
- static TextDecorationSkip initialTextDecorationSkip() { return TextDecorationSkipObjects; }
+ static TextDecorationSkip initialTextDecorationSkip() { return TextDecorationSkipAuto; }
static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePositionAuto; }
static float initialZoom() { return 1.0f; }
static int initialOutlineOffset() { return 0; }
enum TextDecorationSkipItems {
TextDecorationSkipNone = 0,
TextDecorationSkipInk = 1 << 0,
- TextDecorationSkipObjects = 1 << 1
+ TextDecorationSkipObjects = 1 << 1,
+ TextDecorationSkipAuto = 1 << 2
};
typedef unsigned TextDecorationSkip;