Changeset 142893 in webkit


Ignore:
Timestamp:
Feb 14, 2013 11:09:41 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Make outside-shape the default value for shape-inside
https://bugs.webkit.org/show_bug.cgi?id=109605

Patch by Bear Travis <betravis@adobe.com> on 2013-02-14
Reviewed by Levi Weintraub.

Source/WebCore:

Creating a single reference outside-shape value and setting it as the default
for shape-inside.

Existing tests cover the default value, just updating them to use outside-shape.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
value.
(WebCore):

  • rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp

file.

LayoutTests:

Updating tests to account for the new default value of shape-inside.

  • fast/exclusions/css-exclusions-disabled-expected.txt:
  • fast/exclusions/css-exclusions-disabled.html:
  • fast/exclusions/parsing-wrap-shape-inside-expected.txt:
  • fast/exclusions/parsing-wrap-shape-lengths-expected.txt:
  • fast/exclusions/parsing-wrap-shape-lengths.html:
  • fast/exclusions/script-tests/parsing-wrap-shape-inside.js:

(negative_test):

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r142889 r142893  
     12013-02-14  Bear Travis  <betravis@adobe.com>
     2
     3        Make outside-shape the default value for shape-inside
     4        https://bugs.webkit.org/show_bug.cgi?id=109605
     5
     6        Reviewed by Levi Weintraub.
     7
     8        Updating tests to account for the new default value of shape-inside.
     9
     10        * fast/exclusions/css-exclusions-disabled-expected.txt:
     11        * fast/exclusions/css-exclusions-disabled.html:
     12        * fast/exclusions/parsing-wrap-shape-inside-expected.txt:
     13        * fast/exclusions/parsing-wrap-shape-lengths-expected.txt:
     14        * fast/exclusions/parsing-wrap-shape-lengths.html:
     15        * fast/exclusions/script-tests/parsing-wrap-shape-inside.js:
     16        (negative_test):
     17
    1182013-02-14  Tony Chang  <tony@chromium.org>
    219
  • trunk/LayoutTests/fast/exclusions/css-exclusions-disabled-expected.txt

    r134433 r142893  
    1515PASS testComputedStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)") is "auto"
    1616PASS testInlineStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)") is null
    17 PASS testComputedStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)") is "auto"
     17PASS testComputedStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)") is "outside-shape"
    1818PASS successfullyParsed is true
    1919
  • trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html

    r134433 r142893  
    4040
    4141testStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)", "auto");
    42 testStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)", "auto");
     42testStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)", "outside-shape");
    4343
    4444</script>
  • trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt

    r135314 r142893  
    2626PASS testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"
    2727PASS testNotInherited("outside-shape", "rectangle(10px, 20px, 30px, 40px)") is "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)"
    28 PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
    29 PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
     28PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"
     29PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"
    3030PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "inherit") is "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)"
    31 PASS testNotInherited("", "inherit") is "parent: auto, child: auto"
     31PASS testNotInherited("", "inherit") is "parent: outside-shape, child: outside-shape"
    3232PASS testNotInherited("auto", "inherit") is "parent: auto, child: auto"
    3333PASS testCSSText("calc()") is ""
    34 PASS testComputedStyle("calc()") is "auto"
     34PASS testComputedStyle("calc()") is "outside-shape"
    3535PASS testCSSText("none") is ""
    36 PASS testComputedStyle("none") is "auto"
     36PASS testComputedStyle("none") is "outside-shape"
    3737PASS testCSSText("rectangle()") is ""
    38 PASS testComputedStyle("rectangle()") is "auto"
     38PASS testComputedStyle("rectangle()") is "outside-shape"
    3939PASS testCSSText("rectangle(10px)") is ""
    40 PASS testComputedStyle("rectangle(10px)") is "auto"
     40PASS testComputedStyle("rectangle(10px)") is "outside-shape"
    4141PASS testCSSText("rectangle(10px, 10px)") is ""
    42 PASS testComputedStyle("rectangle(10px, 10px)") is "auto"
     42PASS testComputedStyle("rectangle(10px, 10px)") is "outside-shape"
    4343PASS testCSSText("rectangle(10px, 20px, 30px)") is ""
    44 PASS testComputedStyle("rectangle(10px, 20px, 30px)") is "auto"
     44PASS testComputedStyle("rectangle(10px, 20px, 30px)") is "outside-shape"
    4545PASS testCSSText("rectangle(10px 20px 30px 40px)") is ""
    46 PASS testComputedStyle("rectangle(10px 20px 30px 40px)") is "auto"
     46PASS testComputedStyle("rectangle(10px 20px 30px 40px)") is "outside-shape"
    4747PASS testCSSText("rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)") is ""
    48 PASS testComputedStyle("rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)") is "auto"
     48PASS testComputedStyle("rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)") is "outside-shape"
    4949PASS testCSSText("circle()") is ""
    50 PASS testComputedStyle("circle()") is "auto"
     50PASS testComputedStyle("circle()") is "outside-shape"
    5151PASS testCSSText("circle(10px)") is ""
    52 PASS testComputedStyle("circle(10px)") is "auto"
     52PASS testComputedStyle("circle(10px)") is "outside-shape"
    5353PASS testCSSText("circle(10px, 20px)") is ""
    54 PASS testComputedStyle("circle(10px, 20px)") is "auto"
     54PASS testComputedStyle("circle(10px, 20px)") is "outside-shape"
    5555PASS testCSSText("circle(10px 20px 30px)") is ""
    56 PASS testComputedStyle("circle(10px 20px 30px)") is "auto"
     56PASS testComputedStyle("circle(10px 20px 30px)") is "outside-shape"
    5757PASS testCSSText("circle(10px, 20px, 30px, 40px)") is ""
    58 PASS testComputedStyle("circle(10px, 20px, 30px, 40px)") is "auto"
     58PASS testComputedStyle("circle(10px, 20px, 30px, 40px)") is "outside-shape"
    5959PASS testCSSText("ellipse()") is ""
    60 PASS testComputedStyle("ellipse()") is "auto"
     60PASS testComputedStyle("ellipse()") is "outside-shape"
    6161PASS testCSSText("ellipse(10px)") is ""
    62 PASS testComputedStyle("ellipse(10px)") is "auto"
     62PASS testComputedStyle("ellipse(10px)") is "outside-shape"
    6363PASS testCSSText("ellipse(10px, 20px)") is ""
    64 PASS testComputedStyle("ellipse(10px, 20px)") is "auto"
     64PASS testComputedStyle("ellipse(10px, 20px)") is "outside-shape"
    6565PASS testCSSText("ellipse(10px, 20px, 30px)") is ""
    66 PASS testComputedStyle("ellipse(10px, 20px, 30px)") is "auto"
     66PASS testComputedStyle("ellipse(10px, 20px, 30px)") is "outside-shape"
    6767PASS testCSSText("ellipse(10px 20px 30px 40px)") is ""
    68 PASS testComputedStyle("ellipse(10px 20px 30px 40px)") is "auto"
     68PASS testComputedStyle("ellipse(10px 20px 30px 40px)") is "outside-shape"
    6969PASS testCSSText("polygon()") is ""
    70 PASS testComputedStyle("polygon()") is "auto"
     70PASS testComputedStyle("polygon()") is "outside-shape"
    7171PASS testCSSText("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is ""
    72 PASS testComputedStyle("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is "auto"
     72PASS testComputedStyle("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is "outside-shape"
    7373PASS testCSSText("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is ""
    74 PASS testComputedStyle("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is "auto"
     74PASS testComputedStyle("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is "outside-shape"
    7575PASS testCSSText("polygon(nonzero)") is ""
    76 PASS testComputedStyle("polygon(nonzero)") is "auto"
     76PASS testComputedStyle("polygon(nonzero)") is "outside-shape"
    7777PASS testCSSText("polygon(evenodd)") is ""
    78 PASS testComputedStyle("polygon(evenodd)") is "auto"
     78PASS testComputedStyle("polygon(evenodd)") is "outside-shape"
    7979PASS testCSSText("polygon(10px)") is ""
    80 PASS testComputedStyle("polygon(10px)") is "auto"
     80PASS testComputedStyle("polygon(10px)") is "outside-shape"
    8181PASS testCSSText("polygon(nonzero,10px)") is ""
    82 PASS testComputedStyle("polygon(nonzero,10px)") is "auto"
     82PASS testComputedStyle("polygon(nonzero,10px)") is "outside-shape"
    8383PASS testCSSText("polygon(evenodd,12px)") is ""
    84 PASS testComputedStyle("polygon(evenodd,12px)") is "auto"
     84PASS testComputedStyle("polygon(evenodd,12px)") is "outside-shape"
    8585PASS testCSSText("polygon(10px, 20px, 30px, 40px, 40px, 50px)") is ""
    86 PASS testComputedStyle("polygon(10px, 20px, 30px, 40px, 40px, 50px)") is "auto"
     86PASS testComputedStyle("polygon(10px, 20px, 30px, 40px, 40px, 50px)") is "outside-shape"
    8787PASS successfullyParsed is true
    8888
  • trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths-expected.txt

    r123405 r142893  
    3131PASS computedStyle("-webkit-shape-inside", "polygon(10% 20%, 30% 40%, 40% 50%)") is "polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)"
    3232PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, 1)") is null
    33 PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1)") is "auto"
     33PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1)") is "outside-shape"
    3434PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, px)") is null
    35 PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, px)") is "auto"
     35PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, px)") is "outside-shape"
    3636PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, 1p)") is null
    37 PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1p)") is "auto"
     37PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1p)") is "outside-shape"
    3838PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, calc())") is null
    39 PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, calc())") is "auto"
     39PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, calc())") is "outside-shape"
    4040PASS innerStyle("-webkit-shape-inside", "circle(-1.5px, +1.5px, -1.5px)") is null
    41 PASS computedStyle("-webkit-shape-inside", "circle(-1.5px, +1.5px, -1.5px)") is "auto"
     41PASS computedStyle("-webkit-shape-inside", "circle(-1.5px, +1.5px, -1.5px)") is "outside-shape"
    4242PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)") is null
    43 PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)") is "auto"
     43PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)") is "outside-shape"
    4444PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)") is null
    45 PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)") is "auto"
     45PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)") is "outside-shape"
    4646PASS innerStyle("-webkit-shape-inside", "ellipse(1em, 1em, -1em, 1em)") is null
    47 PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, -1em, 1em)") is "auto"
     47PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, -1em, 1em)") is "outside-shape"
    4848PASS innerStyle("-webkit-shape-inside", "ellipse(1em, 1em, 1em, -1em)") is null
    49 PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, 1em, -1em)") is "auto"
     49PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, 1em, -1em)") is "outside-shape"
    5050PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is null
    51 PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is "auto"
     51PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is "outside-shape"
    5252PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is null
    53 PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is "auto"
     53PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is "outside-shape"
    5454PASS successfullyParsed is true
    5555
  • trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html

    r123405 r142893  
    4141function negativeTest(property, value) {
    4242    testInner(property, value, null);
    43     testComputed(property, value, 'auto');
     43    testComputed(property, value, 'outside-shape');
    4444}
    4545
  • trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js

    r135314 r142893  
    5353    var unevaledString = '"' + value.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"';
    5454    shouldBeEqualToString('testCSSText(' + unevaledString + ')', '');
    55     shouldBeEqualToString('testComputedStyle(' + unevaledString + ')', 'auto');
     55    shouldBeEqualToString('testComputedStyle(' + unevaledString + ')', 'outside-shape');
    5656}
    5757
     
    7474shouldBeEqualToString('testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)")', "parent: auto, child: rectangle(10px, 20px, 30px, 40px)");
    7575shouldBeEqualToString('testNotInherited("outside-shape", "rectangle(10px, 20px, 30px, 40px)")', "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)");
    76 shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: auto");
    77 shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "")', "parent: rectangle(10px, 20px, 30px, 40px), child: auto");
     76shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape");
     77shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "")', "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape");
    7878shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "inherit")', "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)");
    79 shouldBeEqualToString('testNotInherited("", "inherit")', "parent: auto, child: auto");
     79shouldBeEqualToString('testNotInherited("", "inherit")', "parent: outside-shape, child: outside-shape");
    8080shouldBeEqualToString('testNotInherited("auto", "inherit")', "parent: auto, child: auto");
    8181
  • trunk/Source/WebCore/ChangeLog

    r142891 r142893  
     12013-02-14  Bear Travis  <betravis@adobe.com>
     2
     3        Make outside-shape the default value for shape-inside
     4        https://bugs.webkit.org/show_bug.cgi?id=109605
     5
     6        Reviewed by Levi Weintraub.
     7
     8        Creating a single reference outside-shape value and setting it as the default
     9        for shape-inside.
     10
     11        Existing tests cover the default value, just updating them to use outside-shape.
     12
     13        * rendering/style/RenderStyle.cpp:
     14        (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
     15        value.
     16        (WebCore):
     17        * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp
     18        file.
     19
    1202013-02-14  Min Qin  <qinmin@chromium.org>
    221
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r142404 r142893  
    16351635}
    16361636
     1637ExclusionShapeValue* RenderStyle::initialShapeInside()
     1638{
     1639    DEFINE_STATIC_LOCAL(RefPtr<ExclusionShapeValue>, sOutsideValue, (ExclusionShapeValue::createOutsideValue()));
     1640    return sOutsideValue.get();
     1641}
     1642
    16371643void RenderStyle::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
    16381644{
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r142823 r142893  
    14291429    ExclusionShapeValue* shapeOutside() const { return rareNonInheritedData->m_shapeOutside.get(); }
    14301430
    1431     static ExclusionShapeValue* initialShapeInside() { return 0; }
     1431    static ExclusionShapeValue* initialShapeInside();
    14321432    static ExclusionShapeValue* initialShapeOutside() { return 0; }
    14331433
Note: See TracChangeset for help on using the changeset viewer.