Changeset 112587 in webkit


Ignore:
Timestamp:
Mar 29, 2012 3:21:01 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Update CSS Exclusion wrap-flow values left & right to start & end
https://bugs.webkit.org/show_bug.cgi?id=82366

Source/WebCore:

http://dev.w3.org/csswg/css3-exclusions/
-webkit-wrap-flow now takes the values start and end rather than
left and right. Updating the code to reflect this. Functionality
is covered by existing tests.

Patch by Bear Travis <betravis@adobe.com> on 2012-03-29
Reviewed by Andreas Kling.

  • css/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator WrapFlow):

  • rendering/style/RenderStyleConstants.h:

LayoutTests:

Updating test values for the wrap-flow and wrap shorthand property

Patch by Bear Travis <betravis@adobe.com> on 2012-03-29
Reviewed by Andreas Kling.

  • fast/exclusions/script-tests/wrap-flow-parsing.js:
  • fast/exclusions/script-tests/wrap-parsing.js:
  • fast/exclusions/wrap-flow-parsing-expected.txt:
  • fast/exclusions/wrap-parsing-expected.txt:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r112586 r112587  
     12012-03-29  Bear Travis  <betravis@adobe.com>
     2
     3        Update CSS Exclusion wrap-flow values left & right to start & end
     4        https://bugs.webkit.org/show_bug.cgi?id=82366
     5
     6        Updating test values for the wrap-flow and wrap shorthand property
     7       
     8        Reviewed by Andreas Kling.
     9
     10        * fast/exclusions/script-tests/wrap-flow-parsing.js:
     11        * fast/exclusions/script-tests/wrap-parsing.js:
     12        * fast/exclusions/wrap-flow-parsing-expected.txt:
     13        * fast/exclusions/wrap-parsing-expected.txt:
     14
    1152012-03-29  Enrica Casucci  <enrica@apple.com>
    216
  • trunk/LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js

    r100570 r112587  
    3535shouldBeEqualToString('test("-webkit-wrap-flow: auto")', "auto");
    3636shouldBeEqualToString('test("-webkit-wrap-flow: both")', "both");
    37 shouldBeEqualToString('test("-webkit-wrap-flow: left")', "left");
    38 shouldBeEqualToString('test("-webkit-wrap-flow: right")', "right");
     37shouldBeEqualToString('test("-webkit-wrap-flow: start")', "start");
     38shouldBeEqualToString('test("-webkit-wrap-flow: end")', "end");
    3939shouldBeEqualToString('test("-webkit-wrap-flow: maximum")', "maximum");
    4040shouldBeEqualToString('test("-webkit-wrap-flow: clear")', "clear");
     
    4949shouldBeEqualToString('testComputedStyle("\'string\'")', "auto");
    5050
    51 shouldBeEqualToString('testNotInherited("auto", "left")', "left");
    52 shouldBeEqualToString('testNotInherited("right", "auto")', "auto");
     51shouldBeEqualToString('testNotInherited("auto", "start")', "start");
     52shouldBeEqualToString('testNotInherited("end", "auto")', "auto");
    5353shouldBeEqualToString('testNotInherited("both", "clear")', "clear");
  • trunk/LayoutTests/fast/exclusions/script-tests/wrap-parsing.js

    r101078 r112587  
    1919
    2020shouldBeEqualToString('test("-webkit-wrap: auto")', "auto");
    21 shouldBeEqualToString('test("-webkit-wrap: left 1px")', "left 1px");
    22 shouldBeEqualToString('test("-webkit-wrap: right 1px 2px")', "right 1px 2px");
     21shouldBeEqualToString('test("-webkit-wrap: start 1px")', "start 1px");
     22shouldBeEqualToString('test("-webkit-wrap: end 1px 2px")', "end 1px 2px");
    2323shouldBeEqualToString('test("-webkit-wrap: 5px both 10pt;")', "both 5px 10pt");
    2424shouldBeEqualToString('test("-webkit-wrap: 2px 3px clear;")', "clear 2px 3px");
     
    3131shouldBeEqualToString('test("-webkit-wrap: auto both;")', "");
    3232shouldBeEqualToString('test("-webkit-wrap: auto 1px -10px;")', "");
    33 shouldBeEqualToString('test("-webkit-wrap: -5px left;")', "");
    34 shouldBeEqualToString('test("-webkit-wrap: 5px right \'string\';")', "");
     33shouldBeEqualToString('test("-webkit-wrap: -5px start;")', "");
     34shouldBeEqualToString('test("-webkit-wrap: 5px end \'string\';")', "");
    3535
    3636shouldBeEqualToString('testComputedStyle("auto")', "auto 0px 0px");
    37 shouldBeEqualToString('testComputedStyle("left 1px")', "left 1px 0px");
    38 shouldBeEqualToString('testComputedStyle("right 1px 2px")', "right 1px 2px");
     37shouldBeEqualToString('testComputedStyle("start 1px")', "start 1px 0px");
     38shouldBeEqualToString('testComputedStyle("end 1px 2px")', "end 1px 2px");
    3939shouldBeEqualToString('testComputedStyle("5px maximum")', "maximum 5px 0px");
    4040shouldBeEqualToString('testComputedStyle("5px")', "auto 5px 0px");
  • trunk/LayoutTests/fast/exclusions/wrap-flow-parsing-expected.txt

    r100570 r112587  
    66PASS test("-webkit-wrap-flow: auto") is "auto"
    77PASS test("-webkit-wrap-flow: both") is "both"
    8 PASS test("-webkit-wrap-flow: left") is "left"
    9 PASS test("-webkit-wrap-flow: right") is "right"
     8PASS test("-webkit-wrap-flow: start") is "start"
     9PASS test("-webkit-wrap-flow: end") is "end"
    1010PASS test("-webkit-wrap-flow: maximum") is "maximum"
    1111PASS test("-webkit-wrap-flow: clear") is "clear"
     
    1717PASS testComputedStyle("5") is "auto"
    1818PASS testComputedStyle("'string'") is "auto"
    19 PASS testNotInherited("auto", "left") is "left"
    20 PASS testNotInherited("right", "auto") is "auto"
     19PASS testNotInherited("auto", "start") is "start"
     20PASS testNotInherited("end", "auto") is "auto"
    2121PASS testNotInherited("both", "clear") is "clear"
    2222PASS successfullyParsed is true
  • trunk/LayoutTests/fast/exclusions/wrap-parsing-expected.txt

    r101078 r112587  
    55
    66PASS test("-webkit-wrap: auto") is "auto"
    7 PASS test("-webkit-wrap: left 1px") is "left 1px"
    8 PASS test("-webkit-wrap: right 1px 2px") is "right 1px 2px"
     7PASS test("-webkit-wrap: start 1px") is "start 1px"
     8PASS test("-webkit-wrap: end 1px 2px") is "end 1px 2px"
    99PASS test("-webkit-wrap: 5px both 10pt;") is "both 5px 10pt"
    1010PASS test("-webkit-wrap: 2px 3px clear;") is "clear 2px 3px"
     
    1616PASS test("-webkit-wrap: auto both;") is ""
    1717PASS test("-webkit-wrap: auto 1px -10px;") is ""
    18 PASS test("-webkit-wrap: -5px left;") is ""
    19 PASS test("-webkit-wrap: 5px right 'string';") is ""
     18PASS test("-webkit-wrap: -5px start;") is ""
     19PASS test("-webkit-wrap: 5px end 'string';") is ""
    2020PASS testComputedStyle("auto") is "auto 0px 0px"
    21 PASS testComputedStyle("left 1px") is "left 1px 0px"
    22 PASS testComputedStyle("right 1px 2px") is "right 1px 2px"
     21PASS testComputedStyle("start 1px") is "start 1px 0px"
     22PASS testComputedStyle("end 1px 2px") is "end 1px 2px"
    2323PASS testComputedStyle("5px maximum") is "maximum 5px 0px"
    2424PASS testComputedStyle("5px") is "auto 5px 0px"
  • trunk/Source/WebCore/ChangeLog

    r112584 r112587  
     12012-03-29  Bear Travis  <betravis@adobe.com>
     2
     3        Update CSS Exclusion wrap-flow values left & right to start & end
     4        https://bugs.webkit.org/show_bug.cgi?id=82366
     5
     6        http://dev.w3.org/csswg/css3-exclusions/
     7        -webkit-wrap-flow now takes the values start and end rather than
     8        left and right. Updating the code to reflect this. Functionality
     9        is covered by existing tests.
     10       
     11        Reviewed by Andreas Kling.
     12
     13        * css/CSSParser.cpp:
     14        (WebCore::isValidKeywordPropertyAndValue):
     15        * css/CSSPrimitiveValueMappings.h:
     16        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
     17        (WebCore::CSSPrimitiveValue::operator WrapFlow):
     18        * rendering/style/RenderStyleConstants.h:
     19
    1202012-03-29  Dirk Pranke  <dpranke@chromium.org>
    221
  • trunk/Source/WebCore/css/CSSParser.cpp

    r112537 r112587  
    776776        break;
    777777    case CSSPropertyWebkitWrapFlow:
    778         if (valueID == CSSValueAuto || valueID == CSSValueBoth || valueID == CSSValueLeft || valueID == CSSValueRight || valueID == CSSValueMaximum || valueID == CSSValueClear)
     778        if (valueID == CSSValueAuto || valueID == CSSValueBoth || valueID == CSSValueStart || valueID == CSSValueEnd || valueID == CSSValueMaximum || valueID == CSSValueClear)
    779779            return true;
    780780        break;
  • trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h

    r112301 r112587  
    37053705        m_value.ident = CSSValueBoth;
    37063706        break;
    3707     case WrapFlowLeft:
    3708         m_value.ident = CSSValueLeft;
    3709         break;
    3710     case WrapFlowRight:
    3711         m_value.ident = CSSValueRight;
     3707    case WrapFlowStart:
     3708        m_value.ident = CSSValueStart;
     3709        break;
     3710    case WrapFlowEnd:
     3711        m_value.ident = CSSValueEnd;
    37123712        break;
    37133713    case WrapFlowMaximum:
     
    37273727    case CSSValueBoth:
    37283728        return WrapFlowBoth;
    3729     case CSSValueLeft:
    3730         return WrapFlowLeft;
    3731     case CSSValueRight:
    3732         return WrapFlowRight;
     3729    case CSSValueStart:
     3730        return WrapFlowStart;
     3731    case CSSValueEnd:
     3732        return WrapFlowEnd;
    37333733    case CSSValueMaximum:
    37343734        return WrapFlowMaximum;
  • trunk/Source/WebCore/rendering/style/RenderStyleConstants.h

    r111342 r112587  
    460460enum LineAlign { LineAlignNone, LineAlignEdges };
    461461
    462 enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowLeft, WrapFlowRight, WrapFlowMaximum, WrapFlowClear };
     462enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowStart, WrapFlowEnd, WrapFlowMaximum, WrapFlowClear };
    463463
    464464enum WrapThrough { WrapThroughWrap, WrapThroughNone };
Note: See TracChangeset for help on using the changeset viewer.