Changeset 150366 in webkit


Ignore:
Timestamp:
May 20, 2013 6:44:15 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

-webkit-text-underline-position should not be inherited
https://bugs.webkit.org/show_bug.cgi?id=116363

Patch by Lamarque V. Souza <Lamarque.Souza@basyskom.com> on 2013-05-20
Reviewed by Dean Jackson.

Source/WebCore:

Specification says text-underline-position should not be inherited.

No new tests, this updates existing tests.

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isInheritedProperty): Make
CSSPropertyWebkitTextUnderlinePosition return false.

  • rendering/style/RenderStyle.h: Treat TextUnderlinePosition as

non-inherited.

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.

  • rendering/style/StyleRareInheritedData.h:

(StyleRareInheritedData):

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.

  • rendering/style/StyleRareNonInheritedData.h:

(StyleRareNonInheritedData):

LayoutTests:

Update expected results.

  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position-expected.txt:
  • fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-underline-position.js:
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r150364 r150366  
     12013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
     2
     3        -webkit-text-underline-position should not be inherited
     4        https://bugs.webkit.org/show_bug.cgi?id=116363
     5
     6        Reviewed by Dean Jackson.
     7
     8        Update expected results.
     9
     10        * fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position-expected.txt:
     11        * fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-underline-position.js:
     12
    1132013-05-20  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
    214
  • trunk/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-underline-position-expected.txt

    r145450 r150366  
    4848PASS computedStyle.getPropertyCSSValue('-webkit-text-underline-position').cssText is 'under'
    4949
    50 Ancestor inherits values from parent:
     50Ancestor does not inherit values from parent:
    5151PASS e.style.getPropertyCSSValue('-webkit-text-underline-position') is null
    52 PASS computedStyle.webkitTextUnderlinePosition is 'under'
     52PASS computedStyle.webkitTextUnderlinePosition is 'auto'
    5353PASS computedStyle.getPropertyCSSValue('-webkit-text-underline-position').toString() is '[object CSSPrimitiveValue]'
    54 PASS computedStyle.getPropertyCSSValue('-webkit-text-underline-position').cssText is 'under'
     54PASS computedStyle.getPropertyCSSValue('-webkit-text-underline-position').cssText is 'auto'
    5555
    5656Value 'auto alphabetic':
  • trunk/LayoutTests/fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-underline-position.js

    r145450 r150366  
    6666
    6767testContainer.innerHTML = '<div id="test-parent" style="-webkit-text-underline-position: under;">hello <span id="test-ancestor">world</span></div>';
    68 debug("Ancestor inherits values from parent:");
     68debug("Ancestor does not inherit values from parent:");
    6969e = document.getElementById('test-ancestor');
    7070testElementStyle("webkitTextUnderlinePosition", "-webkit-text-underline-position", null, "");
    71 testComputedStyle("webkitTextUnderlinePosition", "-webkit-text-underline-position", "[object CSSPrimitiveValue]", "under");
     71testComputedStyle("webkitTextUnderlinePosition", "-webkit-text-underline-position", "[object CSSPrimitiveValue]", "auto");
    7272debug('');
    7373
  • trunk/Source/WebCore/ChangeLog

    r150365 r150366  
     12013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
     2
     3        -webkit-text-underline-position should not be inherited
     4        https://bugs.webkit.org/show_bug.cgi?id=116363
     5
     6        Reviewed by Dean Jackson.
     7
     8        Specification says text-underline-position should not be inherited.
     9
     10        No new tests, this updates existing tests.
     11
     12        * css/CSSProperty.cpp:
     13        (WebCore::CSSProperty::isInheritedProperty): Make
     14        CSSPropertyWebkitTextUnderlinePosition return false.
     15        * rendering/style/RenderStyle.h: Treat TextUnderlinePosition as
     16        non-inherited.
     17        * rendering/style/StyleRareInheritedData.cpp:
     18        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
     19        (WebCore::StyleRareInheritedData::operator==): Remove m_textUnderlinePosition.
     20        * rendering/style/StyleRareInheritedData.h:
     21        (StyleRareInheritedData):
     22        * rendering/style/StyleRareNonInheritedData.cpp:
     23        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
     24        (WebCore::StyleRareNonInheritedData::operator==): Add m_textUnderlinePosition.
     25        * rendering/style/StyleRareNonInheritedData.h:
     26        (StyleRareNonInheritedData):
     27
    1282013-05-20  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
    229
  • trunk/Source/WebCore/css/CSSProperty.cpp

    r149623 r150366  
    333333    case CSSPropertyWebkitTextAlignLast:
    334334    case CSSPropertyWebkitTextJustify:
    335     case CSSPropertyWebkitTextUnderlinePosition:
    336335#endif // CSS3_TEXT
    337336    case CSSPropertyWebkitTextDecorationsInEffect:
     
    649648    case CSSPropertyWebkitTextDecorationStyle:
    650649    case CSSPropertyWebkitTextDecorationColor:
     650    case CSSPropertyWebkitTextUnderlinePosition:
    651651#endif // CSS3_TEXT
    652652    case CSSPropertyWebkitTransform:
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r150348 r150366  
    581581    TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rareInheritedData->m_textAlignLast); }
    582582    TextJustify textJustify() const { return static_cast<TextJustify>(rareInheritedData->m_textJustify); }
    583     TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); }
     583    TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(rareNonInheritedData->m_textUnderlinePosition); }
    584584#else
    585585    TextDecorationStyle textDecorationStyle() const { return TextDecorationStyleSolid; }
     
    11511151    void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v); }
    11521152    void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustify, v); }
    1153     void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInheritedData, m_textUnderlinePosition, v); }
     1153    void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareNonInheritedData, m_textUnderlinePosition, v); }
    11541154#endif // CSS3_TEXT
    11551155    void setDirection(TextDirection v) { inherited_flags._direction = v; }
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp

    r149700 r150366  
    107107    , m_textAlignLast(RenderStyle::initialTextAlignLast())
    108108    , m_textJustify(RenderStyle::initialTextJustify())
    109     , m_textUnderlinePosition(RenderStyle::initialTextUnderlinePosition())
    110109#endif // CSS3_TEXT
    111110    , m_rubyPosition(RenderStyle::initialRubyPosition())
     
    182181    , m_textAlignLast(o.m_textAlignLast)
    183182    , m_textJustify(o.m_textJustify)
    184     , m_textUnderlinePosition(o.m_textUnderlinePosition)
    185183#endif // CSS3_TEXT
    186184    , m_rubyPosition(o.m_rubyPosition)
     
    292290        && m_textAlignLast == o.m_textAlignLast
    293291        && m_textJustify == o.m_textJustify
    294         && m_textUnderlinePosition == o.m_textUnderlinePosition
    295292#endif // CSS3_TEXT
    296293        && m_rubyPosition == o.m_rubyPosition
  • trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h

    r148921 r150366  
    121121    unsigned m_textAlignLast : 3; // TextAlignLast
    122122    unsigned m_textJustify : 3; // TextJustify
    123     unsigned m_textUnderlinePosition : 3; // TextUnderlinePosition
    124123#endif // CSS3_TEXT
    125124    unsigned m_rubyPosition : 1; // RubyPosition
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r148921 r150366  
    7676#if ENABLE(CSS3_TEXT)
    7777    , m_textDecorationStyle(RenderStyle::initialTextDecorationStyle())
     78    , m_textUnderlinePosition(RenderStyle::initialTextUnderlinePosition())
    7879#endif // CSS3_TEXT
    7980    , m_wrapFlow(RenderStyle::initialWrapFlow())
     
    159160#if ENABLE(CSS3_TEXT)
    160161    , m_textDecorationStyle(o.m_textDecorationStyle)
     162    , m_textUnderlinePosition(o.m_textUnderlinePosition)
    161163#endif // CSS3_TEXT
    162164    , m_wrapFlow(o.m_wrapFlow)
     
    248250#if ENABLE(CSS3_TEXT)
    249251        && m_textDecorationStyle == o.m_textDecorationStyle
     252        && m_textUnderlinePosition == o.m_textUnderlinePosition
    250253#endif // CSS3_TEXT
    251254        && m_wrapFlow == o.m_wrapFlow
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h

    r148921 r150366  
    184184#if ENABLE(CSS3_TEXT)
    185185    unsigned m_textDecorationStyle : 3; // TextDecorationStyle
     186    unsigned m_textUnderlinePosition : 3; // TextUnderlinePosition
    186187#endif // CSS3_TEXT
    187188    unsigned m_wrapFlow: 3; // WrapFlow
Note: See TracChangeset for help on using the changeset viewer.