CSS exclusions: parse the wrap-flow and wrap-through properties
authormihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2011 08:08:31 +0000 (08:08 +0000)
committermihnea@adobe.com <mihnea@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2011 08:08:31 +0000 (08:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71904

Reviewed by Dean Jackson.

Source/WebCore:

Tests: fast/exclusions/wrap-flow-parsing.html
       fast/exclusions/wrap-through-parsing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::wrapFlow):
(WebCore::InheritedFlags::wrapThrough):
(WebCore::InheritedFlags::setWrapFlow):
(WebCore::InheritedFlags::setWrapThrough):
(WebCore::InheritedFlags::initialWrapFlow):
(WebCore::InheritedFlags::initialWrapThrough):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/exclusions/script-tests/wrap-flow-parsing.js: Added.
* fast/exclusions/script-tests/wrap-through-parsing.js: Added.
* fast/exclusions/wrap-flow-parsing-expected.txt: Added.
* fast/exclusions/wrap-flow-parsing.html: Added.
* fast/exclusions/wrap-through-parsing-expected.txt: Added.
* fast/exclusions/wrap-through-parsing.html: Added.
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

26 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js [new file with mode: 0644]
LayoutTests/fast/exclusions/script-tests/wrap-through-parsing.js [new file with mode: 0644]
LayoutTests/fast/exclusions/wrap-flow-parsing-expected.txt [new file with mode: 0644]
LayoutTests/fast/exclusions/wrap-flow-parsing.html [new file with mode: 0644]
LayoutTests/fast/exclusions/wrap-through-parsing-expected.txt [new file with mode: 0644]
LayoutTests/fast/exclusions/wrap-through-parsing.html [new file with mode: 0644]
LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h

index 15d289c..4688e40 100644 (file)
@@ -1,3 +1,23 @@
+2011-11-17  Mihnea Ovidenie  <mihnea@adobe.com>
+
+        CSS exclusions: parse the wrap-flow and wrap-through properties
+        https://bugs.webkit.org/show_bug.cgi?id=71904
+
+        Reviewed by Dean Jackson.
+
+        * fast/css/getComputedStyle/computed-style-expected.txt:
+        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * fast/exclusions/script-tests/wrap-flow-parsing.js: Added.
+        * fast/exclusions/script-tests/wrap-through-parsing.js: Added.
+        * fast/exclusions/wrap-flow-parsing-expected.txt: Added.
+        * fast/exclusions/wrap-flow-parsing.html: Added.
+        * fast/exclusions/wrap-through-parsing-expected.txt: Added.
+        * fast/exclusions/wrap-through-parsing.html: Added.
+        * platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
+        * platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
+        * svg/css/getComputedStyle-basic-expected.txt:
+
 2011-11-16  Dean Jackson  <dino@apple.com>
 
         Implement filter function shorthands
index 44cdf5a..e38c815 100644 (file)
@@ -211,6 +211,8 @@ zoom: 1;
 -webkit-region-break-after: auto;
 -webkit-region-break-before: auto;
 -webkit-region-break-inside: auto;
+-webkit-wrap-flow: auto;
+-webkit-wrap-through: wrap;
 clip-path: none;
 clip-rule: nonzero;
 mask: none;
index b7a896c..e325579 100644 (file)
@@ -210,6 +210,8 @@ Computed style of an element whose parent's 'display' value is 'none':
     -webkit-region-break-after: auto
     -webkit-region-break-before: auto
     -webkit-region-break-inside: auto
+    -webkit-wrap-flow: auto
+    -webkit-wrap-through: wrap
     clip-path: none
     clip-rule: nonzero
     mask: none
diff --git a/LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js b/LayoutTests/fast/exclusions/script-tests/wrap-flow-parsing.js
new file mode 100644 (file)
index 0000000..2031908
--- /dev/null
@@ -0,0 +1,53 @@
+description('Test parsing of the CSS wrap-flow property.');
+
+function test(declaration) {
+    var div = document.createElement("div");
+    div.setAttribute("style", declaration);
+    return div.style.webkitWrapFlow;
+}
+
+function testComputedStyle(value) {
+    var div = document.createElement("div");
+    document.body.appendChild(div);
+    div.style.setProperty("-webkit-wrap-flow", value);
+    var webkitWrapFlowComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-flow");
+    document.body.removeChild(div);
+    return webkitWrapFlowComputedValue;
+}
+
+function testNotInherited(parentValue, childValue) {
+    var parentDiv = document.createElement("div");
+    document.body.appendChild(parentDiv);
+    parentDiv.style.setProperty("-webkit-wrap-flow", parentValue);
+
+    var childDiv = document.createElement("div");
+    parentDiv.appendChild(childDiv);
+    childDiv.style.setProperty("-webkit-wrap-flow", childValue);
+
+    var childWebKitWrapFlowComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-flow");
+
+    parentDiv.removeChild(childDiv);
+    document.body.removeChild(parentDiv);
+
+    return childWebKitWrapFlowComputedValue;
+}
+
+shouldBeEqualToString('test("-webkit-wrap-flow: auto")', "auto");
+shouldBeEqualToString('test("-webkit-wrap-flow: both")', "both");
+shouldBeEqualToString('test("-webkit-wrap-flow: left")', "left");
+shouldBeEqualToString('test("-webkit-wrap-flow: right")', "right");
+shouldBeEqualToString('test("-webkit-wrap-flow: maximum")', "maximum");
+shouldBeEqualToString('test("-webkit-wrap-flow: clear")', "clear");
+
+shouldBeEqualToString('test("-webkit-wrap-flow: ;")', "");
+shouldBeEqualToString('test("-webkit-wrap-flow: 5")', "");
+shouldBeEqualToString('test("-webkit-wrap-flow: -1.2")', "");
+shouldBeEqualToString('test("-webkit-wrap-flow: \'string\'")', "");
+
+shouldBeEqualToString('testComputedStyle("auto")', "auto");
+shouldBeEqualToString('testComputedStyle("5")', "auto");
+shouldBeEqualToString('testComputedStyle("\'string\'")', "auto");
+
+shouldBeEqualToString('testNotInherited("auto", "left")', "left");
+shouldBeEqualToString('testNotInherited("right", "auto")', "auto");
+shouldBeEqualToString('testNotInherited("both", "clear")', "clear");
diff --git a/LayoutTests/fast/exclusions/script-tests/wrap-through-parsing.js b/LayoutTests/fast/exclusions/script-tests/wrap-through-parsing.js
new file mode 100644 (file)
index 0000000..03ba423
--- /dev/null
@@ -0,0 +1,48 @@
+description('Test parsing of the CSS wrap-through property.');
+
+function test(declaration) {
+    var div = document.createElement("div");
+    div.setAttribute("style", declaration);
+    return div.style.webkitWrapThrough;
+}
+
+function testComputedStyle(value) {
+    var div = document.createElement("div");
+    document.body.appendChild(div);
+    div.style.setProperty("-webkit-wrap-through", value);
+    var webkitWrapThroughComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-through");
+    document.body.removeChild(div);
+    return webkitWrapThroughComputedValue;
+}
+
+function testNotInherited(parentValue, childValue) {
+    var parentDiv = document.createElement("div");
+    document.body.appendChild(parentDiv);
+    parentDiv.style.setProperty("-webkit-wrap-through", parentValue);
+
+    var childDiv = document.createElement("div");
+    parentDiv.appendChild(childDiv);
+    childDiv.style.setProperty("-webkit-wrap-through", childValue);
+
+    var childWebKitWrapThroughComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-through");
+
+    parentDiv.removeChild(childDiv);
+    document.body.removeChild(parentDiv);
+
+    return childWebKitWrapThroughComputedValue;
+}
+
+shouldBeEqualToString('test("-webkit-wrap-through: wrap")', "wrap");
+shouldBeEqualToString('test("-webkit-wrap-through: none")', "none");
+
+shouldBeEqualToString('test("-webkit-wrap-through: ;")', "");
+shouldBeEqualToString('test("-webkit-wrap-through: 5")', "");
+shouldBeEqualToString('test("-webkit-wrap-through: -1.2")', "");
+shouldBeEqualToString('test("-webkit-wrap-through: \'string\'")', "");
+
+shouldBeEqualToString('testComputedStyle("wrap")', "wrap");
+shouldBeEqualToString('testComputedStyle("5")', "wrap");
+shouldBeEqualToString('testComputedStyle("\'string\'")', "wrap");
+
+shouldBeEqualToString('testNotInherited("wrap", "none")', "none");
+shouldBeEqualToString('testNotInherited("none", "wrap")', "wrap");
diff --git a/LayoutTests/fast/exclusions/wrap-flow-parsing-expected.txt b/LayoutTests/fast/exclusions/wrap-flow-parsing-expected.txt
new file mode 100644 (file)
index 0000000..93630b8
--- /dev/null
@@ -0,0 +1,25 @@
+Test parsing of the CSS wrap-flow property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-wrap-flow: auto") is "auto"
+PASS test("-webkit-wrap-flow: both") is "both"
+PASS test("-webkit-wrap-flow: left") is "left"
+PASS test("-webkit-wrap-flow: right") is "right"
+PASS test("-webkit-wrap-flow: maximum") is "maximum"
+PASS test("-webkit-wrap-flow: clear") is "clear"
+PASS test("-webkit-wrap-flow: ;") is ""
+PASS test("-webkit-wrap-flow: 5") is ""
+PASS test("-webkit-wrap-flow: -1.2") is ""
+PASS test("-webkit-wrap-flow: 'string'") is ""
+PASS testComputedStyle("auto") is "auto"
+PASS testComputedStyle("5") is "auto"
+PASS testComputedStyle("'string'") is "auto"
+PASS testNotInherited("auto", "left") is "left"
+PASS testNotInherited("right", "auto") is "auto"
+PASS testNotInherited("both", "clear") is "clear"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/exclusions/wrap-flow-parsing.html b/LayoutTests/fast/exclusions/wrap-flow-parsing.html
new file mode 100644 (file)
index 0000000..6da35df
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="script-tests/wrap-flow-parsing.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/exclusions/wrap-through-parsing-expected.txt b/LayoutTests/fast/exclusions/wrap-through-parsing-expected.txt
new file mode 100644 (file)
index 0000000..2831c9d
--- /dev/null
@@ -0,0 +1,20 @@
+Test parsing of the CSS wrap-through property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-wrap-through: wrap") is "wrap"
+PASS test("-webkit-wrap-through: none") is "none"
+PASS test("-webkit-wrap-through: ;") is ""
+PASS test("-webkit-wrap-through: 5") is ""
+PASS test("-webkit-wrap-through: -1.2") is ""
+PASS test("-webkit-wrap-through: 'string'") is ""
+PASS testComputedStyle("wrap") is "wrap"
+PASS testComputedStyle("5") is "wrap"
+PASS testComputedStyle("'string'") is "wrap"
+PASS testNotInherited("wrap", "none") is "none"
+PASS testNotInherited("none", "wrap") is "wrap"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/exclusions/wrap-through-parsing.html b/LayoutTests/fast/exclusions/wrap-through-parsing.html
new file mode 100644 (file)
index 0000000..0045590
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="script-tests/wrap-through-parsing.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index 964775d..0384330 100644 (file)
@@ -211,6 +211,8 @@ zoom: 1;
 -webkit-region-break-after: auto;
 -webkit-region-break-before: auto;
 -webkit-region-break-inside: auto;
+-webkit-wrap-flow: auto;
+-webkit-wrap-through: wrap;
 clip-path: none;
 clip-rule: nonzero;
 mask: none;
index 7cb08c8..2b42282 100644 (file)
@@ -210,6 +210,8 @@ Computed style of an element whose parent's 'display' value is 'none':
     -webkit-region-break-after: auto
     -webkit-region-break-before: auto
     -webkit-region-break-inside: auto
+    -webkit-wrap-flow: auto
+    -webkit-wrap-through: wrap
     clip-path: none
     clip-rule: nonzero
     mask: none
index c9646ed..4fb9c5f 100644 (file)
@@ -420,6 +420,10 @@ rect: style.getPropertyValue(-webkit-region-break-before) : auto
 rect: style.getPropertyCSSValue(-webkit-region-break-before) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-region-break-inside) : auto
 rect: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-wrap-flow) : auto
+rect: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-wrap-through) : wrap
+rect: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(clip-path) : none
 rect: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(clip-rule) : nonzero
@@ -916,6 +920,10 @@ g: style.getPropertyValue(-webkit-region-break-before) : auto
 g: style.getPropertyCSSValue(-webkit-region-break-before) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-region-break-inside) : auto
 g: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-wrap-flow) : auto
+g: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-wrap-through) : wrap
+g: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(clip-path) : none
 g: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(clip-rule) : nonzero
index 9038bc3..f30ebd8 100644 (file)
@@ -420,6 +420,10 @@ rect: style.getPropertyValue(-webkit-region-break-before) : auto
 rect: style.getPropertyCSSValue(-webkit-region-break-before) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-region-break-inside) : auto
 rect: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-wrap-flow) : auto
+rect: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-wrap-through) : wrap
+rect: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(clip-path) : none
 rect: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(clip-rule) : nonzero
@@ -916,6 +920,10 @@ g: style.getPropertyValue(-webkit-region-break-before) : auto
 g: style.getPropertyCSSValue(-webkit-region-break-before) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-region-break-inside) : auto
 g: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-wrap-flow) : auto
+g: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-wrap-through) : wrap
+g: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(clip-path) : none
 g: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(clip-rule) : nonzero
index 6e03dcd..1a29361 100644 (file)
@@ -1,3 +1,42 @@
+2011-11-17  Mihnea Ovidenie  <mihnea@adobe.com>
+
+        CSS exclusions: parse the wrap-flow and wrap-through properties
+        https://bugs.webkit.org/show_bug.cgi?id=71904
+
+        Reviewed by Dean Jackson.
+
+        Tests: fast/exclusions/wrap-flow-parsing.html
+               fast/exclusions/wrap-through-parsing.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator WrapFlow):
+        (WebCore::CSSPrimitiveValue::operator WrapThrough):
+        * css/CSSProperty.cpp:
+        (WebCore::CSSProperty::isInheritedProperty):
+        * css/CSSPropertyNames.in:
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * css/CSSValueKeywords.in:
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::diff):
+        * rendering/style/RenderStyle.h:
+        (WebCore::InheritedFlags::wrapFlow):
+        (WebCore::InheritedFlags::wrapThrough):
+        (WebCore::InheritedFlags::setWrapFlow):
+        (WebCore::InheritedFlags::setWrapThrough):
+        (WebCore::InheritedFlags::initialWrapFlow):
+        (WebCore::InheritedFlags::initialWrapThrough):
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator==):
+        * rendering/style/StyleRareNonInheritedData.h:
+
 2011-11-16  Dean Jackson  <dino@apple.com>
 
         Implement filter function shorthands
index 9da4e29..bcf4220 100644 (file)
@@ -284,7 +284,9 @@ static const int computedProperties[] = {
     CSSPropertyWebkitRegionOverflow,
     CSSPropertyWebkitRegionBreakAfter,
     CSSPropertyWebkitRegionBreakBefore,
-    CSSPropertyWebkitRegionBreakInside
+    CSSPropertyWebkitRegionBreakInside,
+    CSSPropertyWebkitWrapFlow,
+    CSSPropertyWebkitWrapThrough
 #if ENABLE(SVG)
     ,
     CSSPropertyClipPath,
@@ -2153,6 +2155,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
 
             return primitiveValueCache->createValue(style->wrapShape());
 
+        case CSSPropertyWebkitWrapFlow:
+            return primitiveValueCache->createValue(style->wrapFlow());
+        case CSSPropertyWebkitWrapThrough:
+            return primitiveValueCache->createValue(style->wrapThrough());
 #if ENABLE(SVG)
         case CSSPropertyClipPath:
         case CSSPropertyClipRule:
index dca2e22..a0b7506 100644 (file)
@@ -2200,6 +2200,16 @@ bool CSSParser::parseValue(int propId, bool important)
             return parseWrapShape(important);
         break;
 
+    case CSSPropertyWebkitWrapFlow:
+        if (id == CSSValueAuto || id == CSSValueBoth || id == CSSValueLeft || id == CSSValueRight || id == CSSValueMaximum || id == CSSValueClear)
+            validPrimitive = true;
+        break;
+
+    case CSSPropertyWebkitWrapThrough:
+        if (id == CSSValueWrap || id == CSSValueNone)
+            validPrimitive = true;
+        break;
+
 #if ENABLE(SVG)
     default:
         return parseSVGValue(propId, important);
index c4d0d48..32aa167 100644 (file)
@@ -3452,6 +3452,80 @@ template<> inline CSSPrimitiveValue::operator ColumnAxis() const
     }
 }
 
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WrapFlow wrapFlow)
+: CSSValue(PrimitiveClass)
+{
+    m_primitiveUnitType = CSS_IDENT;
+    switch (wrapFlow) {
+    case WrapFlowAuto:
+        m_value.ident = CSSValueAuto;
+        break;
+    case WrapFlowBoth:
+        m_value.ident = CSSValueBoth;
+        break;
+    case WrapFlowLeft:
+        m_value.ident = CSSValueLeft;
+        break;
+    case WrapFlowRight:
+        m_value.ident = CSSValueRight;
+        break;
+    case WrapFlowMaximum:
+        m_value.ident = CSSValueMaximum;
+        break;
+    case WrapFlowClear:
+        m_value.ident = CSSValueClear;
+        break;
+    }
+}
+
+template<> inline CSSPrimitiveValue::operator WrapFlow() const
+{
+    switch (m_value.ident) {
+    case CSSValueAuto:
+        return WrapFlowAuto;
+    case CSSValueBoth:
+        return WrapFlowBoth;
+    case CSSValueLeft:
+        return WrapFlowLeft;
+    case CSSValueRight:
+        return WrapFlowRight;
+    case CSSValueMaximum:
+        return WrapFlowMaximum;
+    case CSSValueClear:
+        return WrapFlowClear;
+    default:
+        ASSERT_NOT_REACHED();
+        return WrapFlowAuto;
+    }
+}
+
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WrapThrough wrapThrough)
+: CSSValue(PrimitiveClass)
+{
+    m_primitiveUnitType = CSS_IDENT;
+    switch (wrapThrough) {
+    case WrapThroughWrap:
+        m_value.ident = CSSValueWrap;
+        break;
+    case WrapThroughNone:
+        m_value.ident = CSSValueNone;
+        break;
+    }
+}
+
+template<> inline CSSPrimitiveValue::operator WrapThrough() const
+{
+    switch (m_value.ident) {
+    case CSSValueWrap:
+        return WrapThroughWrap;
+    case CSSValueNone:
+        return WrapThroughNone;
+    default:
+        ASSERT_NOT_REACHED();
+        return WrapThroughWrap;
+    }
+}
+
 #if ENABLE(SVG)
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EColorInterpolation e)
index be0006e..984fb2d 100644 (file)
@@ -635,6 +635,8 @@ bool CSSProperty::isInheritedProperty(unsigned propertyID)
     case CSSPropertyWebkitRegionBreakAfter:
     case CSSPropertyWebkitRegionBreakBefore:
     case CSSPropertyWebkitRegionBreakInside:
+    case CSSPropertyWebkitWrapFlow:
+    case CSSPropertyWebkitWrapThrough:
 #if ENABLE(SVG)
     case CSSPropertyClipPath:
     case CSSPropertyMask:
index 971d10d..0d19b1d 100644 (file)
@@ -358,6 +358,8 @@ z-index
 -webkit-region-break-after
 -webkit-region-break-before
 -webkit-region-break-inside
+-webkit-wrap-flow
+-webkit-wrap-through
 #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
 -webkit-tap-highlight-color
 #endif
index 4a5a290..4bc5c0e 100644 (file)
@@ -3871,6 +3871,14 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
 
         return;
 
+    case CSSPropertyWebkitWrapFlow:
+        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(wrapFlow, WrapFlow);
+        return;
+
+    case CSSPropertyWebkitWrapThrough:
+        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(wrapThrough, WrapThrough);
+        return;
+
     // CSS Fonts Module Level 3
     case CSSPropertyWebkitFontFeatureSettings: {
         if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) {
index c9961c8..71bf7e1 100644 (file)
@@ -856,6 +856,18 @@ evenodd
 // auto
 break
 
+// -webkit-wrap-flow
+// auto
+// both
+// left
+// right
+maximum
+// clear
+
+// -webkit-wrap-through
+wrap
+// none
+
 #if defined(ENABLE_CSS_FILTERS) && ENABLE_CSS_FILTERS
 // -webkit-filter
 #if defined(ENABLE_CSS_SHADERS) && ENABLE_CSS_SHADERS
index 92a4997..e097385 100644 (file)
@@ -385,6 +385,10 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
         if (rareNonInheritedData->m_regionOverflow != other->rareNonInheritedData->m_regionOverflow)
             return StyleDifferenceLayout;
 
+        if (rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow
+            || rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough)
+            return StyleDifferenceLayout;
+
         if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other->rareNonInheritedData->m_deprecatedFlexibleBox.get()
             && *rareNonInheritedData->m_deprecatedFlexibleBox.get() != *other->rareNonInheritedData->m_deprecatedFlexibleBox.get())
             return StyleDifferenceLayout;
index 9a09154..6e3c804 100644 (file)
@@ -808,6 +808,9 @@ public:
     const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid; }
     LineGridSnap lineGridSnap() const { return static_cast<LineGridSnap>(rareInheritedData->m_lineGridSnap); }
 
+    WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedData->m_wrapFlow); }
+    WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInheritedData->m_wrapThrough); }
+
     // Apple-specific property getter methods
     EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(inherited_flags._pointerEvents); }
     const AnimationList* animations() const { return rareNonInheritedData->m_animations.get(); }
@@ -1195,6 +1198,9 @@ public:
     void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInheritedData, m_regionThread, regionThread); }
     void setRegionOverflow(RegionOverflow regionOverflow) { SET_VAR(rareNonInheritedData, m_regionOverflow, regionOverflow); }
 
+    void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFlow, wrapFlow); }
+    void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); }
+
     // Apple-specific property setters
     void setPointerEvents(EPointerEvents p) { inherited_flags._pointerEvents = p; }
 
@@ -1482,6 +1488,9 @@ public:
     static const AtomicString& initialRegionThread() { return nullAtom; }
     static RegionOverflow initialRegionOverflow() { return AutoRegionOverflow; }
 
+    static WrapFlow initialWrapFlow() { return WrapFlowAuto; }
+    static WrapThrough initialWrapThrough() { return WrapThroughWrap; }
+
     // Keep these at the end.
     static LineClampValue initialLineClamp() { return LineClampValue(); }
     static bool initialTextSizeAdjust() { return true; }
index f63cce3..a22b7fb 100644 (file)
@@ -460,6 +460,10 @@ enum ColumnAxis { HorizontalColumnAxis, VerticalColumnAxis, AutoColumnAxis };
 
 enum LineGridSnap { LineGridSnapNone, LineGridSnapBaseline, LineGridSnapBounds };
 
+enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowLeft, WrapFlowRight, WrapFlowMaximum, WrapFlowClear };
+
+enum WrapThrough { WrapThroughWrap, WrapThroughNone };
+
 } // namespace WebCore
 
 #endif // RenderStyleConstants_h
index 8d90ca8..0ca2c56 100644 (file)
@@ -62,6 +62,8 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
     , m_appearance(RenderStyle::initialAppearance())
     , m_borderFit(RenderStyle::initialBorderFit())
     , m_textCombine(RenderStyle::initialTextCombine())
+    , m_wrapFlow(RenderStyle::initialWrapFlow())
+    , m_wrapThrough(RenderStyle::initialWrapThrough())
 #if USE(ACCELERATED_COMPOSITING)
     , m_runningAcceleratedAnimation(false)
 #endif
@@ -119,6 +121,8 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
     , m_appearance(o.m_appearance)
     , m_borderFit(o.m_borderFit)
     , m_textCombine(o.m_textCombine)
+    , m_wrapFlow(o.m_wrapFlow)
+    , m_wrapThrough(o.m_wrapThrough)
 #if USE(ACCELERATED_COMPOSITING)
     , m_runningAcceleratedAnimation(o.m_runningAcceleratedAnimation)
 #endif
@@ -176,6 +180,8 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
         && (m_regionThread == o.m_regionThread)
         && (m_regionOverflow == o.m_regionOverflow)
         && (m_wrapShape == o.m_wrapShape)
+        && (m_wrapFlow == o.m_wrapFlow)
+        && (m_wrapThrough == o.m_wrapThrough)
         && m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
         && m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
         && m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
index d2aa2e8..e04dc0a 100644 (file)
@@ -156,6 +156,9 @@ public:
     unsigned m_borderFit : 1; // EBorderFit
     unsigned m_textCombine : 1; // CSS3 text-combine properties
 
+    unsigned m_wrapFlow: 3; // WrapFlow
+    unsigned m_wrapThrough: 1; // WrapThrough
+
 #if USE(ACCELERATED_COMPOSITING)
     bool m_runningAcceleratedAnimation : 1;
 #endif