Title: [142893] trunk
Revision
142893
Author
commit-qu...@webkit.org
Date
2013-02-14 11:09:41 -0800 (Thu, 14 Feb 2013)

Log Message

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

Patch by Bear Travis <betra...@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):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (142892 => 142893)


--- trunk/LayoutTests/ChangeLog	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/ChangeLog	2013-02-14 19:09:41 UTC (rev 142893)
@@ -1,3 +1,20 @@
+2013-02-14  Bear Travis  <betra...@adobe.com>
+
+        Make outside-shape the default value for shape-inside
+        https://bugs.webkit.org/show_bug.cgi?id=109605
+
+        Reviewed by Levi Weintraub.
+
+        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):
+
 2013-02-14  Tony Chang  <t...@chromium.org>
 
         Padding and border changes doesn't trigger relayout of children

Modified: trunk/LayoutTests/fast/exclusions/css-exclusions-disabled-expected.txt (142892 => 142893)


--- trunk/LayoutTests/fast/exclusions/css-exclusions-disabled-expected.txt	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/fast/exclusions/css-exclusions-disabled-expected.txt	2013-02-14 19:09:41 UTC (rev 142893)
@@ -14,7 +14,7 @@
 PASS testInlineStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)") is null
 PASS testComputedStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)") is "auto"
 PASS testInlineStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)") is null
-PASS testComputedStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)") is "auto"
+PASS testComputedStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)") is "outside-shape"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html (142892 => 142893)


--- trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/fast/exclusions/css-exclusions-disabled.html	2013-02-14 19:09:41 UTC (rev 142893)
@@ -39,7 +39,7 @@
 testInlineStyle("-webkit-wrap", "both 10px 10px");
 
 testStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)", "auto");
-testStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)", "auto");
+testStyle("-webkit-shape-inside", "circle(10px, 10px, 10px)", "outside-shape");
 
 </script>
 <script src=""

Modified: trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt (142892 => 142893)


--- trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-inside-expected.txt	2013-02-14 19:09:41 UTC (rev 142893)
@@ -25,65 +25,65 @@
 PASS testComputedStyle("polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)") is "polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)"
 PASS testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)") is "parent: auto, child: rectangle(10px, 20px, 30px, 40px)"
 PASS testNotInherited("outside-shape", "rectangle(10px, 20px, 30px, 40px)") is "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)"
-PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
-PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: auto"
+PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial") is "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"
+PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "") is "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape"
 PASS testNotInherited("rectangle(10px, 20px, 30px, 40px)", "inherit") is "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)"
-PASS testNotInherited("", "inherit") is "parent: auto, child: auto"
+PASS testNotInherited("", "inherit") is "parent: outside-shape, child: outside-shape"
 PASS testNotInherited("auto", "inherit") is "parent: auto, child: auto"
 PASS testCSSText("calc()") is ""
-PASS testComputedStyle("calc()") is "auto"
+PASS testComputedStyle("calc()") is "outside-shape"
 PASS testCSSText("none") is ""
-PASS testComputedStyle("none") is "auto"
+PASS testComputedStyle("none") is "outside-shape"
 PASS testCSSText("rectangle()") is ""
-PASS testComputedStyle("rectangle()") is "auto"
+PASS testComputedStyle("rectangle()") is "outside-shape"
 PASS testCSSText("rectangle(10px)") is ""
-PASS testComputedStyle("rectangle(10px)") is "auto"
+PASS testComputedStyle("rectangle(10px)") is "outside-shape"
 PASS testCSSText("rectangle(10px, 10px)") is ""
-PASS testComputedStyle("rectangle(10px, 10px)") is "auto"
+PASS testComputedStyle("rectangle(10px, 10px)") is "outside-shape"
 PASS testCSSText("rectangle(10px, 20px, 30px)") is ""
-PASS testComputedStyle("rectangle(10px, 20px, 30px)") is "auto"
+PASS testComputedStyle("rectangle(10px, 20px, 30px)") is "outside-shape"
 PASS testCSSText("rectangle(10px 20px 30px 40px)") is ""
-PASS testComputedStyle("rectangle(10px 20px 30px 40px)") is "auto"
+PASS testComputedStyle("rectangle(10px 20px 30px 40px)") is "outside-shape"
 PASS testCSSText("rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)") is ""
-PASS testComputedStyle("rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)") is "auto"
+PASS testComputedStyle("rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)") is "outside-shape"
 PASS testCSSText("circle()") is ""
-PASS testComputedStyle("circle()") is "auto"
+PASS testComputedStyle("circle()") is "outside-shape"
 PASS testCSSText("circle(10px)") is ""
-PASS testComputedStyle("circle(10px)") is "auto"
+PASS testComputedStyle("circle(10px)") is "outside-shape"
 PASS testCSSText("circle(10px, 20px)") is ""
-PASS testComputedStyle("circle(10px, 20px)") is "auto"
+PASS testComputedStyle("circle(10px, 20px)") is "outside-shape"
 PASS testCSSText("circle(10px 20px 30px)") is ""
-PASS testComputedStyle("circle(10px 20px 30px)") is "auto"
+PASS testComputedStyle("circle(10px 20px 30px)") is "outside-shape"
 PASS testCSSText("circle(10px, 20px, 30px, 40px)") is ""
-PASS testComputedStyle("circle(10px, 20px, 30px, 40px)") is "auto"
+PASS testComputedStyle("circle(10px, 20px, 30px, 40px)") is "outside-shape"
 PASS testCSSText("ellipse()") is ""
-PASS testComputedStyle("ellipse()") is "auto"
+PASS testComputedStyle("ellipse()") is "outside-shape"
 PASS testCSSText("ellipse(10px)") is ""
-PASS testComputedStyle("ellipse(10px)") is "auto"
+PASS testComputedStyle("ellipse(10px)") is "outside-shape"
 PASS testCSSText("ellipse(10px, 20px)") is ""
-PASS testComputedStyle("ellipse(10px, 20px)") is "auto"
+PASS testComputedStyle("ellipse(10px, 20px)") is "outside-shape"
 PASS testCSSText("ellipse(10px, 20px, 30px)") is ""
-PASS testComputedStyle("ellipse(10px, 20px, 30px)") is "auto"
+PASS testComputedStyle("ellipse(10px, 20px, 30px)") is "outside-shape"
 PASS testCSSText("ellipse(10px 20px 30px 40px)") is ""
-PASS testComputedStyle("ellipse(10px 20px 30px 40px)") is "auto"
+PASS testComputedStyle("ellipse(10px 20px 30px 40px)") is "outside-shape"
 PASS testCSSText("polygon()") is ""
-PASS testComputedStyle("polygon()") is "auto"
+PASS testComputedStyle("polygon()") is "outside-shape"
 PASS testCSSText("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is ""
-PASS testComputedStyle("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is "auto"
+PASS testComputedStyle("polygon(evenodd 10px 20px, 30px 40px, 40px 50px)") is "outside-shape"
 PASS testCSSText("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is ""
-PASS testComputedStyle("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is "auto"
+PASS testComputedStyle("polygon(nonzero 10px 20px, 30px 40px, 40px 50px)") is "outside-shape"
 PASS testCSSText("polygon(nonzero)") is ""
-PASS testComputedStyle("polygon(nonzero)") is "auto"
+PASS testComputedStyle("polygon(nonzero)") is "outside-shape"
 PASS testCSSText("polygon(evenodd)") is ""
-PASS testComputedStyle("polygon(evenodd)") is "auto"
+PASS testComputedStyle("polygon(evenodd)") is "outside-shape"
 PASS testCSSText("polygon(10px)") is ""
-PASS testComputedStyle("polygon(10px)") is "auto"
+PASS testComputedStyle("polygon(10px)") is "outside-shape"
 PASS testCSSText("polygon(nonzero,10px)") is ""
-PASS testComputedStyle("polygon(nonzero,10px)") is "auto"
+PASS testComputedStyle("polygon(nonzero,10px)") is "outside-shape"
 PASS testCSSText("polygon(evenodd,12px)") is ""
-PASS testComputedStyle("polygon(evenodd,12px)") is "auto"
+PASS testComputedStyle("polygon(evenodd,12px)") is "outside-shape"
 PASS testCSSText("polygon(10px, 20px, 30px, 40px, 40px, 50px)") is ""
-PASS testComputedStyle("polygon(10px, 20px, 30px, 40px, 40px, 50px)") is "auto"
+PASS testComputedStyle("polygon(10px, 20px, 30px, 40px, 40px, 50px)") is "outside-shape"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths-expected.txt (142892 => 142893)


--- trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths-expected.txt	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths-expected.txt	2013-02-14 19:09:41 UTC (rev 142893)
@@ -30,27 +30,27 @@
 PASS computedStyle("-webkit-shape-inside", "ellipse(100%, 100%, 100%, 100%)") is "ellipse(100%, 100%, 100%, 100%)"
 PASS computedStyle("-webkit-shape-inside", "polygon(10% 20%, 30% 40%, 40% 50%)") is "polygon(nonzero, 10% 20%, 30% 40%, 40% 50%)"
 PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, 1)") is null
-PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, px)") is null
-PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, px)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, px)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, 1p)") is null
-PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1p)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, 1p)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "circle(1px, 1px, calc())") is null
-PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, calc())") is "auto"
+PASS computedStyle("-webkit-shape-inside", "circle(1px, 1px, calc())") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "circle(-1.5px, +1.5px, -1.5px)") is null
-PASS computedStyle("-webkit-shape-inside", "circle(-1.5px, +1.5px, -1.5px)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "circle(-1.5px, +1.5px, -1.5px)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)") is null
-PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, -1pt, 1pc)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)") is null
-PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, 1px, 1pt, -1pc)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "ellipse(1em, 1em, -1em, 1em)") is null
-PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, -1em, 1em)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, -1em, 1em)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "ellipse(1em, 1em, 1em, -1em)") is null
-PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, 1em, -1em)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "ellipse(1em, 1em, 1em, -1em)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is null
-PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, -1in, 1px, 1pt, 1pc)") is "outside-shape"
 PASS innerStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is null
-PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is "auto"
+PASS computedStyle("-webkit-shape-inside", "rectangle(1cm, 1mm, 1in, -1px, 1pt, 1pc)") is "outside-shape"
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html (142892 => 142893)


--- trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/fast/exclusions/parsing-wrap-shape-lengths.html	2013-02-14 19:09:41 UTC (rev 142893)
@@ -40,7 +40,7 @@
 
 function negativeTest(property, value) {
     testInner(property, value, null);
-    testComputed(property, value, 'auto');
+    testComputed(property, value, 'outside-shape');
 }
 
 // absolute lengths - number serialization, units

Modified: trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js (142892 => 142893)


--- trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/LayoutTests/fast/exclusions/script-tests/parsing-wrap-shape-inside.js	2013-02-14 19:09:41 UTC (rev 142893)
@@ -52,7 +52,7 @@
 function negative_test(value) {
     var unevaledString = '"' + value.replace(/\\/g, "\\\\").replace(/"/g, "\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r") + '"';
     shouldBeEqualToString('testCSSText(' + unevaledString + ')', '');
-    shouldBeEqualToString('testComputedStyle(' + unevaledString + ')', 'auto');
+    shouldBeEqualToString('testComputedStyle(' + unevaledString + ')', 'outside-shape');
 }
 
 // positive tests
@@ -73,10 +73,10 @@
 
 shouldBeEqualToString('testNotInherited("auto", "rectangle(10px, 20px, 30px, 40px)")', "parent: auto, child: rectangle(10px, 20px, 30px, 40px)");
 shouldBeEqualToString('testNotInherited("outside-shape", "rectangle(10px, 20px, 30px, 40px)")', "parent: outside-shape, child: rectangle(10px, 20px, 30px, 40px)");
-shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: auto");
-shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "")', "parent: rectangle(10px, 20px, 30px, 40px), child: auto");
+shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "initial")', "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape");
+shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "")', "parent: rectangle(10px, 20px, 30px, 40px), child: outside-shape");
 shouldBeEqualToString('testNotInherited("rectangle(10px, 20px, 30px, 40px)", "inherit")', "parent: rectangle(10px, 20px, 30px, 40px), child: rectangle(10px, 20px, 30px, 40px)");
-shouldBeEqualToString('testNotInherited("", "inherit")', "parent: auto, child: auto");
+shouldBeEqualToString('testNotInherited("", "inherit")', "parent: outside-shape, child: outside-shape");
 shouldBeEqualToString('testNotInherited("auto", "inherit")', "parent: auto, child: auto");
 
 // negative tests

Modified: trunk/Source/WebCore/ChangeLog (142892 => 142893)


--- trunk/Source/WebCore/ChangeLog	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/Source/WebCore/ChangeLog	2013-02-14 19:09:41 UTC (rev 142893)
@@ -1,3 +1,22 @@
+2013-02-14  Bear Travis  <betra...@adobe.com>
+
+        Make outside-shape the default value for shape-inside
+        https://bugs.webkit.org/show_bug.cgi?id=109605
+
+        Reviewed by Levi Weintraub.
+
+        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.
+
 2013-02-14  Min Qin  <qin...@chromium.org>
 
         Passing alpha to DeferredImageDecoder once decoding completes

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (142892 => 142893)


--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp	2013-02-14 19:09:41 UTC (rev 142893)
@@ -1634,6 +1634,12 @@
     surround.access()->border.m_image.setOutset(outset);
 }
 
+ExclusionShapeValue* RenderStyle::initialShapeInside()
+{
+    DEFINE_STATIC_LOCAL(RefPtr<ExclusionShapeValue>, sOutsideValue, (ExclusionShapeValue::createOutsideValue()));
+    return sOutsideValue.get();
+}
+
 void RenderStyle::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
 {
     MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (142892 => 142893)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2013-02-14 19:06:26 UTC (rev 142892)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2013-02-14 19:09:41 UTC (rev 142893)
@@ -1428,7 +1428,7 @@
     }
     ExclusionShapeValue* shapeOutside() const { return rareNonInheritedData->m_shapeOutside.get(); }
 
-    static ExclusionShapeValue* initialShapeInside() { return 0; }
+    static ExclusionShapeValue* initialShapeInside();
     static ExclusionShapeValue* initialShapeOutside() { return 0; }
 
     void setClipPath(PassRefPtr<ClipPathOperation> operation)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to