Changeset 134156 in webkit


Ignore:
Timestamp:
Nov 10, 2012 6:41:52 AM (11 years ago)
Author:
Bruno de Oliveira Abinader
Message:

[css] text-decoration:none no longer valid
https://bugs.webkit.org/show_bug.cgi?id=101529

Reviewed by Ojan Vafai.

Source/WebCore:

This patch fixes an issue where the 'none' value was parsed as explicitly
'initial' value. However true in a sense that the initial value for the
'text-decoration' property is 'none', the value itself could not be parsed as
'initial'.

The getComputedStyle layout tests for 'text-decoration' and
'-webkit-text-decoration-line' CSS properties are updated with the correct
results.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseTextDecoration): When parsed, 'none' value
gets its own identifier value instead of explicit initial.

LayoutTests:

The getComputedStyle layout tests for 'text-decoration' and
'-webkit-text-decoration-line' CSS properties are updated with the correct
results for the 'none' value.

  • fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt:
  • fast/css/getComputedStyle/script-tests/getComputedStyle-text-decoration.js:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt:
  • fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js:
  • inspector/console/console-format-style-whitelist-expected.txt:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r134155 r134156  
     12012-11-10  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
     2
     3        [css] text-decoration:none no longer valid
     4        https://bugs.webkit.org/show_bug.cgi?id=101529
     5
     6        Reviewed by Ojan Vafai.
     7
     8        The getComputedStyle layout tests for 'text-decoration' and
     9        '-webkit-text-decoration-line' CSS properties are updated with the correct
     10        results for the 'none' value.
     11
     12        * fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt:
     13        * fast/css/getComputedStyle/script-tests/getComputedStyle-text-decoration.js:
     14        * fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt:
     15        * fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js:
     16        * inspector/console/console-format-style-whitelist-expected.txt:
     17
    1182012-11-10  Noel Gordon  <noel.gordon@gmail.com>
    219
  • trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt

    r134078 r134156  
    1919
    2020Value 'none':
    21 PASS e.style.textDecoration is 'initial'
    22 PASS e.style.getPropertyCSSValue('text-decoration').toString() is '[object CSSValue]'
    23 PASS e.style.getPropertyCSSValue('text-decoration').cssText is 'initial'
     21PASS e.style.textDecoration is 'none'
     22PASS e.style.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
     23PASS e.style.getPropertyCSSValue('text-decoration').cssText is 'none'
    2424PASS computedStyle.textDecoration is 'none'
    2525PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
  • trunk/LayoutTests/fast/css/getComputedStyle/script-tests/getComputedStyle-text-decoration.js

    r134078 r134156  
    3838debug("Value 'none':");
    3939e.style.textDecoration = 'none';
    40 testElementStyle("textDecoration", "text-decoration", "[object CSSValue]", "initial");
     40testElementStyle("textDecoration", "text-decoration", "[object CSSPrimitiveValue]", "none");
    4141testComputedStyle("textDecoration", "text-decoration", "[object CSSPrimitiveValue]", "none");
    4242debug('');
  • trunk/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt

    r132043 r134156  
    1919
    2020Value 'none':
    21 PASS e.style.webkitTextDecorationLine is 'initial'
    22 PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSValue]'
    23 PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'initial'
     21PASS e.style.webkitTextDecorationLine is 'none'
     22PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSPrimitiveValue]'
     23PASS e.style.getPropertyCSSValue('-webkit-text-decoration-line').cssText is 'none'
    2424PASS computedStyle.webkitTextDecorationLine is 'none'
    2525PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-line').toString() is '[object CSSPrimitiveValue]'
  • trunk/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js

    r132043 r134156  
    3838debug("Value 'none':");
    3939e.style.webkitTextDecorationLine = 'none';
    40 testElementStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSValue]", "initial");
     40testElementStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSPrimitiveValue]", "none");
    4141testComputedStyle("webkitTextDecorationLine", "-webkit-text-decoration-line", "[object CSSPrimitiveValue]", "none");
    4242debug('');
  • trunk/LayoutTests/inspector/console/console-format-style-whitelist-expected.txt

    r131448 r134156  
    1414Style: border: 1px solid red; margin: 20px; padding: 10px;
    1515text-* is fine by us! console-format-style-whitelist.html:11
    16 Style: text-decoration: initial;
     16Style: text-decoration: none;
    1717Display, on the other hand, is bad news. console-format-style-whitelist.html:13
    1818Style: NO STYLES DEFINED.
  • trunk/Source/WebCore/ChangeLog

    r134154 r134156  
     12012-11-10  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
     2
     3        [css] text-decoration:none no longer valid
     4        https://bugs.webkit.org/show_bug.cgi?id=101529
     5
     6        Reviewed by Ojan Vafai.
     7
     8        This patch fixes an issue where the 'none' value was parsed as explicitly
     9        'initial' value. However true in a sense that the initial value for the
     10        'text-decoration' property is 'none', the value itself could not be parsed as
     11        'initial'.
     12
     13        The getComputedStyle layout tests for 'text-decoration' and
     14        '-webkit-text-decoration-line' CSS properties are updated with the correct
     15        results.
     16
     17        * css/CSSParser.cpp:
     18        (WebCore::CSSParser::parseTextDecoration): When parsed, 'none' value
     19        gets its own identifier value instead of explicit initial.
     20
    1212012-11-09  Dean Jackson  <dino@apple.com>
    222
  • trunk/Source/WebCore/css/CSSParser.cpp

    r134078 r134156  
    82378237    CSSParserValue* value = m_valueList->current();
    82388238    if (value->id == CSSValueNone) {
    8239         addTextDecorationProperty(propId, cssValuePool().createExplicitInitialValue(), important);
     8239        addTextDecorationProperty(propId, cssValuePool().createIdentifierValue(CSSValueNone), important);
    82408240        m_valueList->next();
    82418241        return true;
Note: See TracChangeset for help on using the changeset viewer.