+2012-11-13 Bem Jones-Bey <bjonesbe@adobe.com>
+
+ [CSS Exclusions] Update wrap-margin/padding to shape-margin/padding
+ https://bugs.webkit.org/show_bug.cgi?id=97736
+
+ Reviewed by Andreas Kling.
+
+ Rename properties to match updated spec.
+
+ * fast/exclusions/css-exclusions-disabled-expected.txt:
+ * fast/exclusions/css-exclusions-disabled.html:
+ * fast/exclusions/script-tests/shape-margin-parsing.js: Added.
+ (test):
+ (testComputedStyle):
+ (testNotInherited):
+ * fast/exclusions/script-tests/shape-padding-parsing.js: Added.
+ (test):
+ (testComputedStyle):
+ (testNotInherited):
+ * fast/exclusions/script-tests/wrap-margin-parsing.js: Removed.
+ * fast/exclusions/script-tests/wrap-padding-parsing.js: Removed.
+ * fast/exclusions/script-tests/wrap-parsing.js:
+ (testComputedStyle):
+ * fast/exclusions/shape-margin-parsing-expected.txt: Added.
+ * fast/exclusions/shape-margin-parsing.html: Renamed from LayoutTests/fast/exclusions/wrap-padding-parsing.html.
+ * fast/exclusions/shape-padding-parsing-expected.txt: Added.
+ * fast/exclusions/shape-padding-parsing.html: Renamed from LayoutTests/fast/exclusions/wrap-margin-parsing.html.
+ * fast/exclusions/wrap-margin-parsing-expected.txt: Removed.
+ * fast/exclusions/wrap-padding-parsing-expected.txt: Removed.
+
2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r134418.
PASS testInlineStyle("-webkit-wrap-flow", "both") is null
PASS testComputedStyle("-webkit-wrap-flow", "both") is "auto"
-PASS testInlineStyle("-webkit-wrap-margin", "10px") is null
-PASS testComputedStyle("-webkit-wrap-margin", "10px") is "0px"
-PASS testInlineStyle("-webkit-wrap-padding", "10px") is null
-PASS testComputedStyle("-webkit-wrap-padding", "10px") is "0px"
+PASS testInlineStyle("-webkit-shape-margin", "10px") is null
+PASS testComputedStyle("-webkit-shape-margin", "10px") is "0px"
+PASS testInlineStyle("-webkit-shape-padding", "10px") is null
+PASS testComputedStyle("-webkit-shape-padding", "10px") is "0px"
PASS testInlineStyle("-webkit-wrap-through", "none") is null
PASS testComputedStyle("-webkit-wrap-through", "none") is "wrap"
PASS testInlineStyle("-webkit-shape-outside", "circle(10px, 10px, 10px)") is null
testStyle("-webkit-wrap-flow", "both", "auto");
-testStyle("-webkit-wrap-margin", "10px", "0px");
-testStyle("-webkit-wrap-padding", "10px", "0px");
+testStyle("-webkit-shape-margin", "10px", "0px");
+testStyle("-webkit-shape-padding", "10px", "0px");
testStyle("-webkit-wrap-through", "none", "wrap");
--- /dev/null
+description('Test parsing of the CSS shape-margin property.');
+
+if (window.internals)
+ window.internals.settings.setCSSExclusionsEnabled(true);
+
+function test(declaration) {
+ var div = document.createElement("div");
+ div.setAttribute("style", declaration);
+ return div.style.webkitShapeMargin;
+}
+
+function testComputedStyle(value) {
+ var div = document.createElement("div");
+ document.body.appendChild(div);
+ div.style.setProperty("-webkit-shape-margin", value);
+ var webkitShapeMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-shape-margin");
+ document.body.removeChild(div);
+ return webkitShapeMarginComputedValue;
+}
+
+function testNotInherited(parentValue, childValue) {
+ var parentDiv = document.createElement("div");
+ document.body.appendChild(parentDiv);
+ parentDiv.style.setProperty("-webkit-shape-margin", parentValue);
+
+ var childDiv = document.createElement("div");
+ parentDiv.appendChild(childDiv);
+ childDiv.style.setProperty("-webkit-shape-margin", childValue);
+
+ var childWebKitShapeMarginComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-shape-margin");
+
+ parentDiv.removeChild(childDiv);
+ document.body.removeChild(parentDiv);
+
+ return childWebKitShapeMarginComputedValue;
+}
+
+shouldBeEqualToString('test("-webkit-shape-margin: 0")', "0px");
+shouldBeEqualToString('test("-webkit-shape-margin: 1.5ex")', "1.5ex");
+shouldBeEqualToString('test("-webkit-shape-margin: 2em")', "2em");
+shouldBeEqualToString('test("-webkit-shape-margin: 2.5in")', "2.5in");
+shouldBeEqualToString('test("-webkit-shape-margin: 3cm")', "3cm");
+shouldBeEqualToString('test("-webkit-shape-margin: 3.5mm")', "3.5mm");
+shouldBeEqualToString('test("-webkit-shape-margin: 4pt")', "4pt");
+shouldBeEqualToString('test("-webkit-shape-margin: 4.5pc")', "4.5pc");
+shouldBeEqualToString('test("-webkit-shape-margin: 5px")', "5px");
+
+shouldBeEqualToString('test("-webkit-shape-margin: -5px")', "");
+shouldBeEqualToString('test("-webkit-shape-margin: auto")', "");
+shouldBeEqualToString('test("-webkit-shape-margin: \'string\'")', "");
+shouldBeEqualToString('test("-webkit-shape-margin: 120%")', "");
+
+shouldBeEqualToString('testComputedStyle("0")', "0px");
+shouldBeEqualToString('testComputedStyle("1px")', "1px");
+shouldBeEqualToString('testComputedStyle("-5em")', "0px");
+shouldBeEqualToString('testComputedStyle("identifier")', "0px");
+shouldBeEqualToString('testComputedStyle("\'string\'")', "0px");
+
+shouldBeEqualToString('testNotInherited("0", "0")', "0px");
+shouldBeEqualToString('testNotInherited("0", "1px")', "1px");
+shouldBeEqualToString('testNotInherited("1px", "-1em")', "0px");
+shouldBeEqualToString('testNotInherited("2px", "1px")', "1px");
--- /dev/null
+description('Test parsing of the CSS shape-padding property.');
+
+if (window.internals)
+ window.internals.settings.setCSSExclusionsEnabled(true);
+
+function test(declaration) {
+ var div = document.createElement("div");
+ div.setAttribute("style", declaration);
+ return div.style.webkitShapePadding;
+}
+
+function testComputedStyle(value) {
+ var div = document.createElement("div");
+ document.body.appendChild(div);
+ div.style.setProperty("-webkit-shape-padding", value);
+ var webkitShapePaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-shape-padding");
+ document.body.removeChild(div);
+ return webkitShapePaddingComputedValue;
+}
+
+function testNotInherited(parentValue, childValue) {
+ var parentDiv = document.createElement("div");
+ document.body.appendChild(parentDiv);
+ parentDiv.style.setProperty("-webkit-shape-padding", parentValue);
+
+ var childDiv = document.createElement("div");
+ parentDiv.appendChild(childDiv);
+ childDiv.style.setProperty("-webkit-shape-padding", childValue);
+
+ var childWebKitShapePaddingComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-shape-padding");
+
+ parentDiv.removeChild(childDiv);
+ document.body.removeChild(parentDiv);
+
+ return childWebKitShapePaddingComputedValue;
+}
+
+shouldBeEqualToString('test("-webkit-shape-padding: 0")', "0px");
+shouldBeEqualToString('test("-webkit-shape-padding: 1.5ex")', "1.5ex");
+shouldBeEqualToString('test("-webkit-shape-padding: 2em")', "2em");
+shouldBeEqualToString('test("-webkit-shape-padding: 2.5in")', "2.5in");
+shouldBeEqualToString('test("-webkit-shape-padding: 3cm")', "3cm");
+shouldBeEqualToString('test("-webkit-shape-padding: 3.5mm")', "3.5mm");
+shouldBeEqualToString('test("-webkit-shape-padding: 4pt")', "4pt");
+shouldBeEqualToString('test("-webkit-shape-padding: 4.5pc")', "4.5pc");
+shouldBeEqualToString('test("-webkit-shape-padding: 5px")', "5px");
+
+shouldBeEqualToString('test("-webkit-shape-padding: -5px")', "");
+shouldBeEqualToString('test("-webkit-shape-padding: auto")', "");
+shouldBeEqualToString('test("-webkit-shape-padding: \'string\'")', "");
+shouldBeEqualToString('test("-webkit-shape-padding: 120%")', "");
+
+shouldBeEqualToString('testComputedStyle("0")', "0px");
+shouldBeEqualToString('testComputedStyle("1px")', "1px");
+shouldBeEqualToString('testComputedStyle("-5em")', "0px");
+shouldBeEqualToString('testComputedStyle("identifier")', "0px");
+shouldBeEqualToString('testComputedStyle("\'string\'")', "0px");
+
+shouldBeEqualToString('testNotInherited("0", "0")', "0px");
+shouldBeEqualToString('testNotInherited("0", "1px")', "1px");
+shouldBeEqualToString('testNotInherited("1px", "-1em")', "0px");
+shouldBeEqualToString('testNotInherited("2px", "1px")', "1px");
+++ /dev/null
-description('Test parsing of the CSS wrap-margin property.');
-
-if (window.internals)
- window.internals.settings.setCSSExclusionsEnabled(true);
-
-function test(declaration) {
- var div = document.createElement("div");
- div.setAttribute("style", declaration);
- return div.style.webkitWrapMargin;
-}
-
-function testComputedStyle(value) {
- var div = document.createElement("div");
- document.body.appendChild(div);
- div.style.setProperty("-webkit-wrap-margin", value);
- var webkitWrapMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-margin");
- document.body.removeChild(div);
- return webkitWrapMarginComputedValue;
-}
-
-function testNotInherited(parentValue, childValue) {
- var parentDiv = document.createElement("div");
- document.body.appendChild(parentDiv);
- parentDiv.style.setProperty("-webkit-wrap-margin", parentValue);
-
- var childDiv = document.createElement("div");
- parentDiv.appendChild(childDiv);
- childDiv.style.setProperty("-webkit-wrap-margin", childValue);
-
- var childWebKitWrapMarginComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-margin");
-
- parentDiv.removeChild(childDiv);
- document.body.removeChild(parentDiv);
-
- return childWebKitWrapMarginComputedValue;
-}
-
-shouldBeEqualToString('test("-webkit-wrap-margin: 0")', "0px");
-shouldBeEqualToString('test("-webkit-wrap-margin: 1.5ex")', "1.5ex");
-shouldBeEqualToString('test("-webkit-wrap-margin: 2em")', "2em");
-shouldBeEqualToString('test("-webkit-wrap-margin: 2.5in")', "2.5in");
-shouldBeEqualToString('test("-webkit-wrap-margin: 3cm")', "3cm");
-shouldBeEqualToString('test("-webkit-wrap-margin: 3.5mm")', "3.5mm");
-shouldBeEqualToString('test("-webkit-wrap-margin: 4pt")', "4pt");
-shouldBeEqualToString('test("-webkit-wrap-margin: 4.5pc")', "4.5pc");
-shouldBeEqualToString('test("-webkit-wrap-margin: 5px")', "5px");
-
-shouldBeEqualToString('test("-webkit-wrap-margin: -5px")', "");
-shouldBeEqualToString('test("-webkit-wrap-margin: auto")', "");
-shouldBeEqualToString('test("-webkit-wrap-margin: \'string\'")', "");
-shouldBeEqualToString('test("-webkit-wrap-margin: 120%")', "");
-
-shouldBeEqualToString('testComputedStyle("0")', "0px");
-shouldBeEqualToString('testComputedStyle("1px")', "1px");
-shouldBeEqualToString('testComputedStyle("-5em")', "0px");
-shouldBeEqualToString('testComputedStyle("identifier")', "0px");
-shouldBeEqualToString('testComputedStyle("\'string\'")', "0px");
-
-shouldBeEqualToString('testNotInherited("0", "0")', "0px");
-shouldBeEqualToString('testNotInherited("0", "1px")', "1px");
-shouldBeEqualToString('testNotInherited("1px", "-1em")', "0px");
-shouldBeEqualToString('testNotInherited("2px", "1px")', "1px");
+++ /dev/null
-description('Test parsing of the CSS wrap-padding property.');
-
-if (window.internals)
- window.internals.settings.setCSSExclusionsEnabled(true);
-
-function test(declaration) {
- var div = document.createElement("div");
- div.setAttribute("style", declaration);
- return div.style.webkitWrapPadding;
-}
-
-function testComputedStyle(value) {
- var div = document.createElement("div");
- document.body.appendChild(div);
- div.style.setProperty("-webkit-wrap-padding", value);
- var webkitWrapPaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-padding");
- document.body.removeChild(div);
- return webkitWrapPaddingComputedValue;
-}
-
-function testNotInherited(parentValue, childValue) {
- var parentDiv = document.createElement("div");
- document.body.appendChild(parentDiv);
- parentDiv.style.setProperty("-webkit-wrap-padding", parentValue);
-
- var childDiv = document.createElement("div");
- parentDiv.appendChild(childDiv);
- childDiv.style.setProperty("-webkit-wrap-padding", childValue);
-
- var childWebKitWrapPaddingComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-padding");
-
- parentDiv.removeChild(childDiv);
- document.body.removeChild(parentDiv);
-
- return childWebKitWrapPaddingComputedValue;
-}
-
-shouldBeEqualToString('test("-webkit-wrap-padding: 0")', "0px");
-shouldBeEqualToString('test("-webkit-wrap-padding: 1.5ex")', "1.5ex");
-shouldBeEqualToString('test("-webkit-wrap-padding: 2em")', "2em");
-shouldBeEqualToString('test("-webkit-wrap-padding: 2.5in")', "2.5in");
-shouldBeEqualToString('test("-webkit-wrap-padding: 3cm")', "3cm");
-shouldBeEqualToString('test("-webkit-wrap-padding: 3.5mm")', "3.5mm");
-shouldBeEqualToString('test("-webkit-wrap-padding: 4pt")', "4pt");
-shouldBeEqualToString('test("-webkit-wrap-padding: 4.5pc")', "4.5pc");
-shouldBeEqualToString('test("-webkit-wrap-padding: 5px")', "5px");
-
-shouldBeEqualToString('test("-webkit-wrap-padding: -5px")', "");
-shouldBeEqualToString('test("-webkit-wrap-padding: auto")', "");
-shouldBeEqualToString('test("-webkit-wrap-padding: \'string\'")', "");
-shouldBeEqualToString('test("-webkit-wrap-padding: 120%")', "");
-
-shouldBeEqualToString('testComputedStyle("0")', "0px");
-shouldBeEqualToString('testComputedStyle("1px")', "1px");
-shouldBeEqualToString('testComputedStyle("-5em")', "0px");
-shouldBeEqualToString('testComputedStyle("identifier")', "0px");
-shouldBeEqualToString('testComputedStyle("\'string\'")', "0px");
-
-shouldBeEqualToString('testNotInherited("0", "0")', "0px");
-shouldBeEqualToString('testNotInherited("0", "1px")', "1px");
-shouldBeEqualToString('testNotInherited("1px", "-1em")', "0px");
-shouldBeEqualToString('testNotInherited("2px", "1px")', "1px");
document.body.appendChild(div);
div.style.setProperty("-webkit-wrap", value);
var webkitWrapFlowComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-flow");
- var webkitWrapMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-margin");
- var webkitWrapPaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-padding");
+ var webkitShapeMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-shape-margin");
+ var webkitShapePaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-shape-padding");
document.body.removeChild(div);
- return webkitWrapFlowComputedValue + " " + webkitWrapMarginComputedValue + " " + webkitWrapPaddingComputedValue;
+ return webkitWrapFlowComputedValue + " " + webkitShapeMarginComputedValue + " " + webkitShapePaddingComputedValue;
}
shouldBeEqualToString('test("-webkit-wrap: auto")', "auto");
--- /dev/null
+Test parsing of the CSS shape-margin property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-shape-margin: 0") is "0px"
+PASS test("-webkit-shape-margin: 1.5ex") is "1.5ex"
+PASS test("-webkit-shape-margin: 2em") is "2em"
+PASS test("-webkit-shape-margin: 2.5in") is "2.5in"
+PASS test("-webkit-shape-margin: 3cm") is "3cm"
+PASS test("-webkit-shape-margin: 3.5mm") is "3.5mm"
+PASS test("-webkit-shape-margin: 4pt") is "4pt"
+PASS test("-webkit-shape-margin: 4.5pc") is "4.5pc"
+PASS test("-webkit-shape-margin: 5px") is "5px"
+PASS test("-webkit-shape-margin: -5px") is ""
+PASS test("-webkit-shape-margin: auto") is ""
+PASS test("-webkit-shape-margin: 'string'") is ""
+PASS test("-webkit-shape-margin: 120%") is ""
+PASS testComputedStyle("0") is "0px"
+PASS testComputedStyle("1px") is "1px"
+PASS testComputedStyle("-5em") is "0px"
+PASS testComputedStyle("identifier") is "0px"
+PASS testComputedStyle("'string'") is "0px"
+PASS testNotInherited("0", "0") is "0px"
+PASS testNotInherited("0", "1px") is "1px"
+PASS testNotInherited("1px", "-1em") is "0px"
+PASS testNotInherited("2px", "1px") is "1px"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
-<script src="script-tests/wrap-padding-parsing.js"></script>
+<script src="script-tests/shape-margin-parsing.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
--- /dev/null
+Test parsing of the CSS shape-padding property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-shape-padding: 0") is "0px"
+PASS test("-webkit-shape-padding: 1.5ex") is "1.5ex"
+PASS test("-webkit-shape-padding: 2em") is "2em"
+PASS test("-webkit-shape-padding: 2.5in") is "2.5in"
+PASS test("-webkit-shape-padding: 3cm") is "3cm"
+PASS test("-webkit-shape-padding: 3.5mm") is "3.5mm"
+PASS test("-webkit-shape-padding: 4pt") is "4pt"
+PASS test("-webkit-shape-padding: 4.5pc") is "4.5pc"
+PASS test("-webkit-shape-padding: 5px") is "5px"
+PASS test("-webkit-shape-padding: -5px") is ""
+PASS test("-webkit-shape-padding: auto") is ""
+PASS test("-webkit-shape-padding: 'string'") is ""
+PASS test("-webkit-shape-padding: 120%") is ""
+PASS testComputedStyle("0") is "0px"
+PASS testComputedStyle("1px") is "1px"
+PASS testComputedStyle("-5em") is "0px"
+PASS testComputedStyle("identifier") is "0px"
+PASS testComputedStyle("'string'") is "0px"
+PASS testNotInherited("0", "0") is "0px"
+PASS testNotInherited("0", "1px") is "1px"
+PASS testNotInherited("1px", "-1em") is "0px"
+PASS testNotInherited("2px", "1px") is "1px"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
-<script src="script-tests/wrap-margin-parsing.js"></script>
+<script src="script-tests/shape-padding-parsing.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
+++ /dev/null
-Test parsing of the CSS wrap-margin property.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS test("-webkit-wrap-margin: 0") is "0px"
-PASS test("-webkit-wrap-margin: 1.5ex") is "1.5ex"
-PASS test("-webkit-wrap-margin: 2em") is "2em"
-PASS test("-webkit-wrap-margin: 2.5in") is "2.5in"
-PASS test("-webkit-wrap-margin: 3cm") is "3cm"
-PASS test("-webkit-wrap-margin: 3.5mm") is "3.5mm"
-PASS test("-webkit-wrap-margin: 4pt") is "4pt"
-PASS test("-webkit-wrap-margin: 4.5pc") is "4.5pc"
-PASS test("-webkit-wrap-margin: 5px") is "5px"
-PASS test("-webkit-wrap-margin: -5px") is ""
-PASS test("-webkit-wrap-margin: auto") is ""
-PASS test("-webkit-wrap-margin: 'string'") is ""
-PASS test("-webkit-wrap-margin: 120%") is ""
-PASS testComputedStyle("0") is "0px"
-PASS testComputedStyle("1px") is "1px"
-PASS testComputedStyle("-5em") is "0px"
-PASS testComputedStyle("identifier") is "0px"
-PASS testComputedStyle("'string'") is "0px"
-PASS testNotInherited("0", "0") is "0px"
-PASS testNotInherited("0", "1px") is "1px"
-PASS testNotInherited("1px", "-1em") is "0px"
-PASS testNotInherited("2px", "1px") is "1px"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+++ /dev/null
-Test parsing of the CSS wrap-padding property.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS test("-webkit-wrap-padding: 0") is "0px"
-PASS test("-webkit-wrap-padding: 1.5ex") is "1.5ex"
-PASS test("-webkit-wrap-padding: 2em") is "2em"
-PASS test("-webkit-wrap-padding: 2.5in") is "2.5in"
-PASS test("-webkit-wrap-padding: 3cm") is "3cm"
-PASS test("-webkit-wrap-padding: 3.5mm") is "3.5mm"
-PASS test("-webkit-wrap-padding: 4pt") is "4pt"
-PASS test("-webkit-wrap-padding: 4.5pc") is "4.5pc"
-PASS test("-webkit-wrap-padding: 5px") is "5px"
-PASS test("-webkit-wrap-padding: -5px") is ""
-PASS test("-webkit-wrap-padding: auto") is ""
-PASS test("-webkit-wrap-padding: 'string'") is ""
-PASS test("-webkit-wrap-padding: 120%") is ""
-PASS testComputedStyle("0") is "0px"
-PASS testComputedStyle("1px") is "1px"
-PASS testComputedStyle("-5em") is "0px"
-PASS testComputedStyle("identifier") is "0px"
-PASS testComputedStyle("'string'") is "0px"
-PASS testNotInherited("0", "0") is "0px"
-PASS testNotInherited("0", "1px") is "1px"
-PASS testNotInherited("1px", "-1em") is "0px"
-PASS testNotInherited("2px", "1px") is "1px"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+2012-11-13 Bem Jones-Bey <bjonesbe@adobe.com>
+
+ [CSS Exclusions] Update wrap-margin/padding to shape-margin/padding
+ https://bugs.webkit.org/show_bug.cgi?id=97736
+
+ Reviewed by Andreas Kling.
+
+ Rename properties to match updated spec.
+
+ Tests: fast/exclusions/shape-margin-parsing.html
+ fast/exclusions/shape-padding-parsing.html
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore):
+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+ * css/CSSParser.cpp:
+ (WebCore::isSimpleLengthPropertyID):
+ (WebCore::CSSParser::parseValue):
+ * css/CSSProperty.cpp:
+ (WebCore::CSSProperty::isInheritedProperty):
+ * css/CSSPropertyNames.in:
+ * css/StyleBuilder.cpp:
+ (WebCore::StyleBuilder::StyleBuilder):
+ * css/StylePropertySet.cpp:
+ (WebCore::StylePropertySet::asText):
+ * css/StylePropertyShorthand.cpp:
+ (WebCore::webkitWrapShorthand):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyProperty):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::diff):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/StyleRareNonInheritedData.cpp:
+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+ (WebCore::StyleRareNonInheritedData::operator==):
+ * rendering/style/StyleRareNonInheritedData.h:
+ (StyleRareNonInheritedData):
+
2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
Unreviewed, rolling out r134418.
#endif
#if ENABLE(CSS_EXCLUSIONS)
CSSPropertyWebkitWrapFlow,
- CSSPropertyWebkitWrapMargin,
- CSSPropertyWebkitWrapPadding,
+ CSSPropertyWebkitShapeMargin,
+ CSSPropertyWebkitShapePadding,
CSSPropertyWebkitWrapThrough,
#endif
#if ENABLE(SVG)
#if ENABLE(CSS_EXCLUSIONS)
case CSSPropertyWebkitWrapFlow:
return cssValuePool().createValue(style->wrapFlow());
- case CSSPropertyWebkitWrapMargin:
- return cssValuePool().createValue(style->wrapMargin());
- case CSSPropertyWebkitWrapPadding:
- return cssValuePool().createValue(style->wrapPadding());
+ case CSSPropertyWebkitShapeMargin:
+ return cssValuePool().createValue(style->shapeMargin());
+ case CSSPropertyWebkitShapePadding:
+ return cssValuePool().createValue(style->shapePadding());
case CSSPropertyWebkitShapeInside:
if (!style->shapeInside())
return cssValuePool().createIdentifierValue(CSSValueAuto);
acceptsNegativeNumbers = false;
return true;
#if ENABLE(CSS_EXCLUSIONS)
- case CSSPropertyWebkitWrapMargin:
- case CSSPropertyWebkitWrapPadding:
+ case CSSPropertyWebkitShapeMargin:
+ case CSSPropertyWebkitShapePadding:
acceptsNegativeNumbers = false;
return RuntimeEnabledFeatures::cssExclusionsEnabled();
#endif
else if (value->unit == CSSParserValue::Function)
return parseBasicShape(propId, important);
break;
- case CSSPropertyWebkitWrapMargin:
- case CSSPropertyWebkitWrapPadding:
+ case CSSPropertyWebkitShapeMargin:
+ case CSSPropertyWebkitShapePadding:
validPrimitive = (RuntimeEnabledFeatures::cssExclusionsEnabled() && !id && validUnit(value, FLength | FNonNeg));
break;
case CSSPropertyWebkitWrap:
#if ENABLE(CSS_EXCLUSIONS)
case CSSPropertyWebkitWrap:
case CSSPropertyWebkitWrapFlow:
- case CSSPropertyWebkitWrapMargin:
- case CSSPropertyWebkitWrapPadding:
+ case CSSPropertyWebkitShapeMargin:
+ case CSSPropertyWebkitShapePadding:
case CSSPropertyWebkitShapeInside:
case CSSPropertyWebkitShapeOutside:
case CSSPropertyWebkitWrapThrough:
#if defined(ENABLE_CSS_EXCLUSIONS) && ENABLE_CSS_EXCLUSIONS
-webkit-shape-inside
-webkit-shape-outside
--webkit-wrap-margin
--webkit-wrap-padding
+-webkit-shape-margin
+-webkit-shape-padding
-webkit-wrap-flow
-webkit-wrap-through
-webkit-wrap
setPropertyHandler(CSSPropertyWebkitClipPath, ApplyPropertyClipPath<&RenderStyle::clipPath, &RenderStyle::setClipPath, &RenderStyle::initialClipPath>::createHandler());
#if ENABLE(CSS_EXCLUSIONS)
- setPropertyHandler(CSSPropertyWebkitWrap, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitWrapFlow, CSSPropertyWebkitWrapMargin, CSSPropertyWebkitWrapPadding>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitWrap, ApplyPropertyExpanding<SuppressValue, CSSPropertyWebkitWrapFlow, CSSPropertyWebkitShapeMargin, CSSPropertyWebkitShapePadding>::createHandler());
setPropertyHandler(CSSPropertyWebkitWrapFlow, ApplyPropertyDefault<WrapFlow, &RenderStyle::wrapFlow, WrapFlow, &RenderStyle::setWrapFlow, WrapFlow, &RenderStyle::initialWrapFlow>::createHandler());
- setPropertyHandler(CSSPropertyWebkitWrapMargin, ApplyPropertyLength<&RenderStyle::wrapMargin, &RenderStyle::setWrapMargin, &RenderStyle::initialWrapMargin>::createHandler());
- setPropertyHandler(CSSPropertyWebkitWrapPadding, ApplyPropertyLength<&RenderStyle::wrapPadding, &RenderStyle::setWrapPadding, &RenderStyle::initialWrapPadding>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitShapeMargin, ApplyPropertyLength<&RenderStyle::shapeMargin, &RenderStyle::setShapeMargin, &RenderStyle::initialShapeMargin>::createHandler());
+ setPropertyHandler(CSSPropertyWebkitShapePadding, ApplyPropertyLength<&RenderStyle::shapePadding, &RenderStyle::setShapePadding, &RenderStyle::initialShapePadding>::createHandler());
setPropertyHandler(CSSPropertyWebkitWrapThrough, ApplyPropertyDefault<WrapThrough, &RenderStyle::wrapThrough, WrapThrough, &RenderStyle::setWrapThrough, WrapThrough, &RenderStyle::initialWrapThrough>::createHandler());
setPropertyHandler(CSSPropertyWebkitShapeInside, ApplyPropertyExclusionShape<&RenderStyle::shapeInside, &RenderStyle::setShapeInside, &RenderStyle::initialShapeInside>::createHandler());
setPropertyHandler(CSSPropertyWebkitShapeOutside, ApplyPropertyExclusionShape<&RenderStyle::shapeOutside, &RenderStyle::setShapeOutside, &RenderStyle::initialShapeOutside>::createHandler());
break;
#if ENABLE(CSS_EXCLUSIONS)
case CSSPropertyWebkitWrapFlow:
- case CSSPropertyWebkitWrapMargin:
- case CSSPropertyWebkitWrapPadding:
+ case CSSPropertyWebkitShapeMargin:
+ case CSSPropertyWebkitShapePadding:
shorthandPropertyID = CSSPropertyWebkitWrap;
break;
#endif
{
static const CSSPropertyID webkitWrapProperties[] = {
CSSPropertyWebkitWrapFlow,
- CSSPropertyWebkitWrapMargin,
- CSSPropertyWebkitWrapPadding
+ CSSPropertyWebkitShapeMargin,
+ CSSPropertyWebkitShapePadding
};
DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitWrapLonghands, (webkitWrapProperties, WTF_ARRAY_LENGTH(webkitWrapProperties)));
return webkitWrapLonghands;
#if ENABLE(CSS_EXCLUSIONS)
case CSSPropertyWebkitWrap:
case CSSPropertyWebkitWrapFlow:
- case CSSPropertyWebkitWrapMargin:
- case CSSPropertyWebkitWrapPadding:
+ case CSSPropertyWebkitShapeMargin:
+ case CSSPropertyWebkitShapePadding:
case CSSPropertyWebkitWrapThrough:
case CSSPropertyWebkitShapeInside:
case CSSPropertyWebkitShapeOutside:
if (rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow
|| rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough
- || rareNonInheritedData->m_wrapMargin != other->rareNonInheritedData->m_wrapMargin
- || rareNonInheritedData->m_wrapPadding != other->rareNonInheritedData->m_wrapPadding)
+ || rareNonInheritedData->m_shapeMargin != other->rareNonInheritedData->m_shapeMargin
+ || rareNonInheritedData->m_shapePadding != other->rareNonInheritedData->m_shapePadding)
return StyleDifferenceLayout;
if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other->rareNonInheritedData->m_deprecatedFlexibleBox.get()
static ClipPathOperation* initialClipPath() { return 0; }
- Length wrapPadding() const { return rareNonInheritedData->m_wrapPadding; }
- void setWrapPadding(Length wrapPadding) { SET_VAR(rareNonInheritedData, m_wrapPadding, wrapPadding); }
- static Length initialWrapPadding() { return Length(0, Fixed); }
+ Length shapePadding() const { return rareNonInheritedData->m_shapePadding; }
+ void setShapePadding(Length shapePadding) { SET_VAR(rareNonInheritedData, m_shapePadding, shapePadding); }
+ static Length initialShapePadding() { return Length(0, Fixed); }
- Length wrapMargin() const { return rareNonInheritedData->m_wrapMargin; }
- void setWrapMargin(Length wrapMargin) { SET_VAR(rareNonInheritedData, m_wrapMargin, wrapMargin); }
- static Length initialWrapMargin() { return Length(0, Fixed); }
+ Length shapeMargin() const { return rareNonInheritedData->m_shapeMargin; }
+ void setShapeMargin(Length shapeMargin) { SET_VAR(rareNonInheritedData, m_shapeMargin, shapeMargin); }
+ static Length initialShapeMargin() { return Length(0, Fixed); }
bool hasContent() const { return contentData(); }
const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
, m_pageSize()
, m_shapeInside(RenderStyle::initialShapeInside())
, m_shapeOutside(RenderStyle::initialShapeOutside())
- , m_wrapMargin(RenderStyle::initialWrapMargin())
- , m_wrapPadding(RenderStyle::initialWrapPadding())
+ , m_shapeMargin(RenderStyle::initialShapeMargin())
+ , m_shapePadding(RenderStyle::initialShapePadding())
, m_clipPath(RenderStyle::initialClipPath())
, m_visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor())
, m_order(RenderStyle::initialOrder())
, m_pageSize(o.m_pageSize)
, m_shapeInside(o.m_shapeInside)
, m_shapeOutside(o.m_shapeOutside)
- , m_wrapMargin(o.m_wrapMargin)
- , m_wrapPadding(o.m_wrapPadding)
+ , m_shapeMargin(o.m_shapeMargin)
+ , m_shapePadding(o.m_shapePadding)
, m_clipPath(o.m_clipPath)
, m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
, m_visitedLinkOutlineColor(o.m_visitedLinkOutlineColor)
&& m_pageSize == o.m_pageSize
&& m_shapeInside == o.m_shapeInside
&& m_shapeOutside == o.m_shapeOutside
- && m_wrapMargin == o.m_wrapMargin
- && m_wrapPadding == o.m_wrapPadding
+ && m_shapeMargin == o.m_shapeMargin
+ && m_shapePadding == o.m_shapePadding
&& m_clipPath == o.m_clipPath
&& m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
&& m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
RefPtr<BasicShape> m_shapeInside;
RefPtr<BasicShape> m_shapeOutside;
- Length m_wrapMargin;
- Length m_wrapPadding;
+ Length m_shapeMargin;
+ Length m_shapePadding;
RefPtr<ClipPathOperation> m_clipPath;