Changeset 82250 in webkit


Ignore:
Timestamp:
Mar 29, 2011 7:41:01 AM (13 years ago)
Author:
jeremy@chromium.org
Message:

2011-03-29 Jeremy Moskovich <jeremy@chromium.org>

Reviewed by Eric Seidel.

Implement text-align:match-parent as -webkit-match-parent.
https://bugs.webkit.org/show_bug.cgi?id=50951

Add tests to verify that the implementation works as expected.

  • fast/css/text-align-webkit-match-parent-expected.txt: Added.
  • fast/css/text-align-webkit-match-parent-parse-expected.txt: Added.
  • fast/css/text-align-webkit-match-parent-parse.html: Added.
  • fast/css/text-align-webkit-match-parent.html: Added.

2011-03-29 Jeremy Moskovich <jeremy@chromium.org>

Reviewed by Eric Seidel.

Implement text-align:match-parent as -webkit-match-parent.
https://bugs.webkit.org/show_bug.cgi?id=50951

Add support to the CSS parser.

Tests: fast/css/text-align-webkit-match-parent-parse.html

fast/css/text-align-webkit-match-parent.html

  • css/CSSParser.cpp: (WebCore::CSSParser::parseValue):
  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty):
  • css/CSSValueKeywords.in:
Location:
trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r82248 r82250  
     12011-03-29  Jeremy Moskovich  <jeremy@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Implement text-align:match-parent as -webkit-match-parent.
     6        https://bugs.webkit.org/show_bug.cgi?id=50951
     7
     8        Add tests to verify that the implementation works as expected.
     9
     10        * fast/css/text-align-webkit-match-parent-expected.txt: Added.
     11        * fast/css/text-align-webkit-match-parent-parse-expected.txt: Added.
     12        * fast/css/text-align-webkit-match-parent-parse.html: Added.
     13        * fast/css/text-align-webkit-match-parent.html: Added.
     14
    1152011-03-29  Adam Roben  <aroben@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r82249 r82250  
     12011-03-29  Jeremy Moskovich  <jeremy@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Implement text-align:match-parent as -webkit-match-parent.
     6        https://bugs.webkit.org/show_bug.cgi?id=50951
     7
     8        Add support to the CSS parser.
     9
     10        Tests: fast/css/text-align-webkit-match-parent-parse.html
     11               fast/css/text-align-webkit-match-parent.html
     12
     13        * css/CSSParser.cpp:
     14        (WebCore::CSSParser::parseValue):
     15        * css/CSSStyleSelector.cpp:
     16        (WebCore::CSSStyleSelector::applyProperty):
     17        * css/CSSValueKeywords.in:
     18
    1192011-03-29  Eric Seidel  <eric@webkit.org>
    220
  • trunk/Source/WebCore/css/CSSParser.cpp

    r82215 r82250  
    789789
    790790    case CSSPropertyTextAlign:
    791         // left | right | center | justify | webkit_left | webkit_right | webkit_center | start | end | <string> | inherit
    792         if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitCenter) || id == CSSValueStart || id == CSSValueEnd ||
    793              value->unit == CSSPrimitiveValue::CSS_STRING)
     791        // left | right | center | justify | webkit_left | webkit_right | webkit_center | webkit_match_parent |
     792        // start | end | <string> | inherit
     793        if ((id >= CSSValueWebkitAuto && id <= CSSValueWebkitMatchParent) || id == CSSValueStart || id == CSSValueEnd
     794             || value->unit == CSSPrimitiveValue::CSS_STRING)
    794795            validPrimitive = true;
    795796        break;
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r82184 r82250  
    46214621        if (!primitiveValue)
    46224622            return;
     4623        if (primitiveValue->getIdent() == CSSValueWebkitMatchParent) {
     4624            if (m_parentStyle->textAlign() == TASTART)
     4625                m_style->setTextAlign(m_parentStyle->isLeftToRightDirection() ? LEFT : RIGHT);
     4626            else if (m_parentStyle->textAlign() == TAEND)
     4627                m_style->setTextAlign(m_parentStyle->isLeftToRightDirection() ? RIGHT : LEFT);
     4628            else
     4629                m_style->setTextAlign(m_parentStyle->textAlign());
     4630            return;
     4631        }
    46234632        m_style->setTextAlign(*primitiveValue);
    46244633        return;
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r82215 r82250  
    213213-webkit-right
    214214-webkit-center
     215-webkit-match-parent
    215216#
    216217# CSS_PROP_LIST_STYLE_POSITION:
Note: See TracChangeset for help on using the changeset viewer.