+2013-02-14 Bear Travis <betravis@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 <tony@chromium.org>
Padding and border changes doesn't trigger relayout of children
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
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="../js/resources/js-test-post.js"></script>
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
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
function negativeTest(property, value) {
testInner(property, value, null);
- testComputed(property, value, 'auto');
+ testComputed(property, value, 'outside-shape');
}
// absolute lengths - number serialization, units
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
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
+2013-02-14 Bear Travis <betravis@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 <qinmin@chromium.org>
Passing alpha to DeferredImageDecoder once decoding completes
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);
}
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)