[CSS Regions] Rename region-overflow to region-fragment
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jun 2013 14:19:13 +0000 (14:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Jun 2013 14:19:13 +0000 (14:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117397

PerformanceTests:

Renamed -webkit-region-overflow to -webkit-region-fragment according to the new working draft
at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property

Patch by Radu Stavila <stavila@adobe.com> on 2013-06-10
Reviewed by Alexander Pavlov.

* Layout/resources/regions.css:

Source/WebCore:

Renamed -webkit-region-overflow to -webkit-region-fragment and
webkitRegionOverflow to webkitRegionFragment according to the new working draft
at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property

Patch by Radu Stavila <stavila@adobe.com> on 2013-06-10
Reviewed by Alexander Pavlov.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::hasNextPage):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::overflowRectForFlowThreadPortion):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

Renamed -webkit-region-overflow to -webkit-region-fragment and
webkitRegionOverflow to webkitRegionFragment according to the new working draft
at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property

Patch by Radu Stavila <stavila@adobe.com> on 2013-06-10
Reviewed by Alexander Pavlov.

* fast/regions/autoheight-breakafteralways-maxheight.html:
* fast/regions/autoheight-breakbeforealways.html:
* fast/regions/autoheight-singleregion-breakafteralways-maxheight.html:
* fast/regions/autoheight-singleregion-breakafteralways.html:
* fast/regions/autoheight-singleregion-breakaftermargin.html:
* fast/regions/autoheight-singleregion-breakbeforealways-minheight.html:
* fast/regions/autoheight-singleregion-breakbeforealways.html:
* fast/regions/autoheight-singleregion-multiplebreaks.html:
* fast/regions/css-regions-disabled-expected.txt:
* fast/regions/region-overflow-auto-overflow-hidden.html:
* fast/regions/region-overflow-auto-overflow-visible.html:
* fast/regions/region-overflow-break.html:
* fast/regions/regions-widows-and-orphans.html:
* fast/regions/script-tests/css-regions-disabled.js:
* fast/regions/script-tests/webkit-region-overflow-parsing.js:
* fast/regions/webkit-region-overflow-parsing-expected.txt:

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

37 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/regions/autoheight-breakafteralways-maxheight.html
LayoutTests/fast/regions/autoheight-breakbeforealways.html
LayoutTests/fast/regions/autoheight-singleregion-breakafteralways-maxheight.html
LayoutTests/fast/regions/autoheight-singleregion-breakafteralways.html
LayoutTests/fast/regions/autoheight-singleregion-breakaftermargin.html
LayoutTests/fast/regions/autoheight-singleregion-breakbeforealways-minheight.html
LayoutTests/fast/regions/autoheight-singleregion-breakbeforealways.html
LayoutTests/fast/regions/autoheight-singleregion-multiplebreaks.html
LayoutTests/fast/regions/css-regions-disabled-expected.txt
LayoutTests/fast/regions/region-overflow-auto-overflow-hidden.html
LayoutTests/fast/regions/region-overflow-auto-overflow-visible.html
LayoutTests/fast/regions/region-overflow-break.html
LayoutTests/fast/regions/regions-widows-and-orphans.html
LayoutTests/fast/regions/script-tests/css-regions-disabled.js
LayoutTests/fast/regions/script-tests/webkit-region-fragment-parsing.js [moved from LayoutTests/fast/regions/script-tests/webkit-region-overflow-parsing.js with 58% similarity]
LayoutTests/fast/regions/webkit-region-fragment-parsing-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/webkit-region-fragment-parsing.html [moved from LayoutTests/fast/regions/webkit-region-overflow-parsing.html with 77% similarity]
LayoutTests/fast/regions/webkit-region-overflow-parsing-expected.txt [deleted file]
PerformanceTests/ChangeLog
PerformanceTests/Layout/resources/regions.css
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/CSSValueKeywords.in
Source/WebCore/css/DeprecatedStyleBuilder.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderRegion.cpp
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 7db962f..2f1dd78 100644 (file)
@@ -1,3 +1,31 @@
+2013-06-10  Radu Stavila  <stavila@adobe.com>
+
+        [CSS Regions] Rename region-overflow to region-fragment
+        https://bugs.webkit.org/show_bug.cgi?id=117397
+
+        Renamed -webkit-region-overflow to -webkit-region-fragment and 
+        webkitRegionOverflow to webkitRegionFragment according to the new working draft
+        at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
+
+        Reviewed by Alexander Pavlov.
+
+        * fast/regions/autoheight-breakafteralways-maxheight.html:
+        * fast/regions/autoheight-breakbeforealways.html:
+        * fast/regions/autoheight-singleregion-breakafteralways-maxheight.html:
+        * fast/regions/autoheight-singleregion-breakafteralways.html:
+        * fast/regions/autoheight-singleregion-breakaftermargin.html:
+        * fast/regions/autoheight-singleregion-breakbeforealways-minheight.html:
+        * fast/regions/autoheight-singleregion-breakbeforealways.html:
+        * fast/regions/autoheight-singleregion-multiplebreaks.html:
+        * fast/regions/css-regions-disabled-expected.txt:
+        * fast/regions/region-overflow-auto-overflow-hidden.html:
+        * fast/regions/region-overflow-auto-overflow-visible.html:
+        * fast/regions/region-overflow-break.html:
+        * fast/regions/regions-widows-and-orphans.html:
+        * fast/regions/script-tests/css-regions-disabled.js:
+        * fast/regions/script-tests/webkit-region-overflow-parsing.js:
+        * fast/regions/webkit-region-overflow-parsing-expected.txt:
+
 2013-06-10  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
 
         Web Inspector: refactor statusBarItems getter in front-end.
index de64701..4c04078 100644 (file)
@@ -8,7 +8,7 @@
             #p1 { -webkit-region-break-after: always; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 100px; max-height: 100px; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 100px; max-height: 100px; }
 
              .redBox { position: absolute; height: 50px; background-color: red; }
              #red { top: 150px; }
index 5425bc8..5f97652 100644 (file)
@@ -8,7 +8,7 @@
             #p2 { -webkit-region-break-before: always; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 100px; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 100px; }
 
             .redBox { position: absolute; height: 50px; background-color: red; }
             #red { top: 150px; }
index e9650cc..6e8d1e7 100644 (file)
@@ -8,7 +8,7 @@
             #p1 { -webkit-region-break-after: always; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 100px; max-height: 100px; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 100px; max-height: 100px; }
 
              .redBox { position: absolute; height: 50px; background-color: red; }
              #red { top: 150px; }
index 41138c0..46d1eb7 100644 (file)
@@ -6,7 +6,7 @@
             #article { -webkit-flow-into: flow; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 100px; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 100px; }
 
             #p2 { -webkit-region-break-after: always; }
 
index 170e3a5..f0adc8e 100644 (file)
@@ -8,7 +8,7 @@
             #p1 { -webkit-region-break-after: always; margin-top: 75px; margin-bottom: 75px; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 150px; border: 15px solid green;}
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 150px; border: 15px solid green;}
 
             .redContainer { border: 15px solid red; position: absolute; top: 150px; width: 250px; height: 200px; }
             .redBox { width: 250px; height: 50px; margin-top: 75px; margin-bottom: 75px; background-color: red; }
index 2870537..42d4f14 100644 (file)
@@ -6,7 +6,7 @@
             #article { -webkit-flow-into: flow; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 150px; min-height: 150px; background-color: green; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 150px; min-height: 150px; background-color: green; }
 
             .redBox { position: absolute; height: 150px; background-color: red; }
             #red { top: 150px; }
index ce0343d..31d6445 100644 (file)
@@ -8,7 +8,7 @@
              #p2 { -webkit-region-break-before: always; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 100px; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 100px; }
 
             .redBox { position: absolute; height: 50px; background-color: red; }
             #red { top: 150px; }
index c0fdc2e..154ebe9 100644 (file)
@@ -8,7 +8,7 @@
              #p2, #p3 { -webkit-region-break-before: always; }
 
             .regionSize { width: 250px; }
-            #region { -webkit-flow-from: flow; -webkit-region-overflow: break; position: absolute; top: 100px; }
+            #region { -webkit-flow-from: flow; -webkit-region-fragment: break; position: absolute; top: 100px; }
 
             .redBox { position: absolute; height: 50px; background-color: red; }
             #red { top: 150px; }
index fa55f8d..eaa36f5 100644 (file)
@@ -11,10 +11,10 @@ PASS testWebKitFlowFrom("-webkit-flow-from: first-flow") is ""
 PASS testWebKitFlowFrom("-webkit-flow-from: none") is ""
 PASS testComputedStyleWebKitFlowFrom("first-flow") is "none"
 PASS testComputedStyleWebKitFlowFrom("none") is "none"
-PASS testWebKitRegionOverflow("-webkit-region-overflow: auto") is ""
-PASS testWebKitRegionOverflow("-webkit-region-overflow: break") is ""
-PASS testComputedStyleWebKitRegionOverflow("auto") is "auto"
-PASS testComputedStyleWebKitRegionOverflow("break") is "auto"
+PASS testWebKitRegionFragment("-webkit-region-fragment: auto") is ""
+PASS testWebKitRegionFragment("-webkit-region-fragment: break") is ""
+PASS testComputedStyleWebKitRegionFragment("auto") is "auto"
+PASS testComputedStyleWebKitRegionFragment("break") is "auto"
 PASS webkitRegionRuleIndex is -1
 PASS successfullyParsed is true
 
index f171ce2..1a52587 100644 (file)
@@ -12,7 +12,7 @@
 
             #region_1, #region_2 {
                 -webkit-flow-from: article;
-                -webkit-region-overflow: auto;
+                -webkit-region-fragment: auto;
                 overflow: hidden;
                 display: inline-block;
                 vertical-align: top;
index fb5045f..1d27050 100644 (file)
@@ -12,7 +12,7 @@
 
             #region_1, #region_2 {
                 -webkit-flow-from: article;
-                -webkit-region-overflow: auto;
+                -webkit-region-fragment: auto;
                 overflow: visible;
                 display: inline-block;
                 vertical-align: top;
index f5b633a..46345ea 100644 (file)
@@ -9,7 +9,7 @@ body { font-family: monospace; }
 
 #region_1, #region_2 {
     -webkit-flow-from: article;
-    -webkit-region-overflow: break;
+    -webkit-region-fragment: break;
     display:inline-block;
     vertical-align:top;
     margin:2px;
index e6da0d9..d700454 100644 (file)
@@ -10,7 +10,7 @@ body.hide-containers .container, body.hide-containers h3 {
 
 .region {
     height: 200px;
-    -webkit-region-overflow: break;
+    -webkit-region-fragment: break;
     display: inline-block;
 }
 
index fa68e19..abfef80 100644 (file)
@@ -15,10 +15,10 @@ function testWebKitFlowFrom(declaration) {
     return div.style.webkitFlowFrom;
 }
 
-function testWebKitRegionOverflow(declaration) {
+function testWebKitRegionFragment(declaration) {
     var div = document.createElement("div");
     div.setAttribute("style", declaration);
-    return div.style.webkitRegionOverflow;
+    return div.style.webkitRegionFragment;
 }
 
 function testComputedStyleWebKitFlowInto(value) {
@@ -39,11 +39,11 @@ function testComputedStyleWebKitFlowFrom(value) {
     return computedValue;
 }
 
-function testComputedStyleWebKitRegionOverflow(value) {
+function testComputedStyleWebKitRegionFragment(value) {
     var div = document.createElement("div");
     document.body.appendChild(div);
-    div.style.setProperty("-webkit-region-overflow", value);
-    var computedValue = getComputedStyle(div).getPropertyValue("-webkit-region-overflow");
+    div.style.setProperty("-webkit-region-fragment", value);
+    var computedValue = getComputedStyle(div).getPropertyValue("-webkit-region-fragment");
     document.body.removeChild(div);
     return computedValue;
 }
@@ -58,10 +58,10 @@ shouldBeEqualToString('testWebKitFlowFrom("-webkit-flow-from: none")', "");
 shouldBeEqualToString('testComputedStyleWebKitFlowFrom("first-flow")', "none");
 shouldBeEqualToString('testComputedStyleWebKitFlowFrom("none")', "none");
 
-shouldBeEqualToString('testWebKitRegionOverflow("-webkit-region-overflow: auto")', "");
-shouldBeEqualToString('testWebKitRegionOverflow("-webkit-region-overflow: break")', "");
-shouldBeEqualToString('testComputedStyleWebKitRegionOverflow("auto")', "auto");
-shouldBeEqualToString('testComputedStyleWebKitRegionOverflow("break")', "auto");
+shouldBeEqualToString('testWebKitRegionFragment("-webkit-region-fragment: auto")', "");
+shouldBeEqualToString('testWebKitRegionFragment("-webkit-region-fragment: break")', "");
+shouldBeEqualToString('testComputedStyleWebKitRegionFragment("auto")', "auto");
+shouldBeEqualToString('testComputedStyleWebKitRegionFragment("break")', "auto");
 
 // Test that region styling rules are not parsed.
 var styleElement = document.createElement("style");
@@ -1,31 +1,31 @@
-description('Tests parsing of webkit-region-overflow property');
+description('Tests parsing of webkit-region-fragment property');
 
-var webkitRegionOverflowProperty = "-webkit-region-overflow";
+var webkitRegionFragmentProperty = "-webkit-region-fragment";
 
 function testCSSText(declaration) {
     var div = document.createElement("div");
     div.setAttribute("style", declaration);
-    return div.style.webkitRegionOverflow;
+    return div.style.webkitRegionFragment;
 }
 
 function testComputedStyle(declaration) {
     var div = document.createElement("div");
     document.body.appendChild(div);
-    div.style.setProperty(webkitRegionOverflowProperty, declaration);
+    div.style.setProperty(webkitRegionFragmentProperty, declaration);
 
-    var contentComputedValue = getComputedStyle(div).getPropertyValue(webkitRegionOverflowProperty);
+    var contentComputedValue = getComputedStyle(div).getPropertyValue(webkitRegionFragmentProperty);
     document.body.removeChild(div);
     return contentComputedValue;
 }
 
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': auto")', "auto");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': initial")', "initial");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': inherit")', "inherit");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': break")', "break");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 0")', "");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': -1")', "");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 12.5")', "");
-shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 1px")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': auto")', "auto");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': initial")', "initial");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': inherit")', "inherit");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': break")', "break");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': 0")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': -1")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': 12.5")', "");
+shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': 1px")', "");
 
 shouldBeEqualToString('testComputedStyle("auto")', "auto");
 shouldBeEqualToString('testComputedStyle("initial")', "auto");
diff --git a/LayoutTests/fast/regions/webkit-region-fragment-parsing-expected.txt b/LayoutTests/fast/regions/webkit-region-fragment-parsing-expected.txt
new file mode 100644 (file)
index 0000000..4e258f7
--- /dev/null
@@ -0,0 +1,25 @@
+Tests parsing of webkit-region-fragment property
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS testCSSText("-webkit-region-fragment: auto") is "auto"
+PASS testCSSText("-webkit-region-fragment: initial") is "initial"
+PASS testCSSText("-webkit-region-fragment: inherit") is "inherit"
+PASS testCSSText("-webkit-region-fragment: break") is "break"
+PASS testCSSText("-webkit-region-fragment: 0") is ""
+PASS testCSSText("-webkit-region-fragment: -1") is ""
+PASS testCSSText("-webkit-region-fragment: 12.5") is ""
+PASS testCSSText("-webkit-region-fragment: 1px") is ""
+PASS testComputedStyle("auto") is "auto"
+PASS testComputedStyle("initial") is "auto"
+PASS testComputedStyle("inherit") is "auto"
+PASS testComputedStyle("break") is "break"
+PASS testComputedStyle("0") is "auto"
+PASS testComputedStyle("-1") is "auto"
+PASS testComputedStyle("12.5") is "auto"
+PASS testComputedStyle("1px") is "auto"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
@@ -4,7 +4,7 @@
 <script src="../../fast/js/resources/js-test-pre.js"></script>
 </head>
 <body>
-<script src="script-tests/webkit-region-overflow-parsing.js"></script>
+<script src="script-tests/webkit-region-fragment-parsing.js"></script>
 <script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
diff --git a/LayoutTests/fast/regions/webkit-region-overflow-parsing-expected.txt b/LayoutTests/fast/regions/webkit-region-overflow-parsing-expected.txt
deleted file mode 100644 (file)
index 2e5de07..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Tests parsing of webkit-region-overflow property
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS testCSSText("-webkit-region-overflow: auto") is "auto"
-PASS testCSSText("-webkit-region-overflow: initial") is "initial"
-PASS testCSSText("-webkit-region-overflow: inherit") is "inherit"
-PASS testCSSText("-webkit-region-overflow: break") is "break"
-PASS testCSSText("-webkit-region-overflow: 0") is ""
-PASS testCSSText("-webkit-region-overflow: -1") is ""
-PASS testCSSText("-webkit-region-overflow: 12.5") is ""
-PASS testCSSText("-webkit-region-overflow: 1px") is ""
-PASS testComputedStyle("auto") is "auto"
-PASS testComputedStyle("initial") is "auto"
-PASS testComputedStyle("inherit") is "auto"
-PASS testComputedStyle("break") is "break"
-PASS testComputedStyle("0") is "auto"
-PASS testComputedStyle("-1") is "auto"
-PASS testComputedStyle("12.5") is "auto"
-PASS testComputedStyle("1px") is "auto"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
index 71b162a..726f172 100644 (file)
@@ -1,3 +1,15 @@
+2013-06-10  Radu Stavila  <stavila@adobe.com>
+
+        [CSS Regions] Rename region-overflow to region-fragment
+        https://bugs.webkit.org/show_bug.cgi?id=117397
+
+        Renamed -webkit-region-overflow to -webkit-region-fragment according to the new working draft
+        at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
+
+        Reviewed by Alexander Pavlov.
+
+        * Layout/resources/regions.css:
+
 2013-06-05  Zan Dobersek  <zdobersek@igalia.com>
 
         Move MemoryInfo under window.internals
index 6364a64..c752952 100644 (file)
@@ -9,7 +9,7 @@
 .region {
     -webkit-flow-from: flow;
     border: 1px solid black;
-    -webkit-region-overflow: break;
+    -webkit-region-fragment: break;
 }
 
 .contentParagraph {
index ea27dbf..bb11230 100644 (file)
@@ -1,3 +1,44 @@
+2013-06-10  Radu Stavila  <stavila@adobe.com>
+
+        [CSS Regions] Rename region-overflow to region-fragment
+        https://bugs.webkit.org/show_bug.cgi?id=117397
+
+        Renamed -webkit-region-overflow to -webkit-region-fragment and 
+        webkitRegionOverflow to webkitRegionFragment according to the new working draft
+        at http://www.w3.org/TR/2013/WD-css3-regions-20130528/#the-region-fragment-property
+
+        Reviewed by Alexander Pavlov.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator RegionFragment):
+        * css/CSSProperty.cpp:
+        (WebCore::CSSProperty::isInheritedProperty):
+        * css/CSSPropertyNames.in:
+        * css/CSSValueKeywords.in:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::applyProperty):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::hasNextPage):
+        * rendering/RenderRegion.cpp:
+        (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeRequiresLayout):
+        * rendering/style/RenderStyle.h:
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator==):
+        * rendering/style/StyleRareNonInheritedData.h:
+
 2013-06-10  Christophe Dumez  <ch.dumez@sisa.samsung.com>
 
         Replace [ConstructorRaisesException] with [RaisesException]
index 3a94ef8..6f45cba 100644 (file)
@@ -369,10 +369,10 @@ static const CSSPropertyID computedProperties[] = {
 #if ENABLE(CSS_REGIONS)
     CSSPropertyWebkitFlowInto,
     CSSPropertyWebkitFlowFrom,
-    CSSPropertyWebkitRegionOverflow,
     CSSPropertyWebkitRegionBreakAfter,
     CSSPropertyWebkitRegionBreakBefore,
     CSSPropertyWebkitRegionBreakInside,
+    CSSPropertyWebkitRegionFragment,
 #endif
 #if ENABLE(DRAGGABLE_REGION)
     CSSPropertyWebkitAppRegion,
@@ -2682,8 +2682,8 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
             if (style->regionThread().isNull())
                 return cssValuePool().createIdentifierValue(CSSValueNone);
             return cssValuePool().createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING);
-        case CSSPropertyWebkitRegionOverflow:
-            return cssValuePool().createValue(style->regionOverflow());
+        case CSSPropertyWebkitRegionFragment:
+            return cssValuePool().createValue(style->regionFragment());
 #endif
 #if ENABLE(CSS_EXCLUSIONS)
         case CSSPropertyWebkitWrapFlow:
index 695f31d..66dd5cf 100644 (file)
@@ -963,7 +963,7 @@ static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int
         if (parserContext.isCSSRegionsEnabled && (valueID == CSSValueAuto || valueID == CSSValueAvoid))
             return true;
         break;
-    case CSSPropertyWebkitRegionOverflow:
+    case CSSPropertyWebkitRegionFragment:
         if (parserContext.isCSSRegionsEnabled && (valueID == CSSValueAuto || valueID == CSSValueBreak))
             return true;
         break;
@@ -1146,7 +1146,7 @@ static inline bool isKeywordPropertyID(CSSPropertyID propertyId)
     case CSSPropertyWebkitRegionBreakAfter:
     case CSSPropertyWebkitRegionBreakBefore:
     case CSSPropertyWebkitRegionBreakInside:
-    case CSSPropertyWebkitRegionOverflow:
+    case CSSPropertyWebkitRegionFragment:
 #endif
     case CSSPropertyWebkitRtlOrdering:
     case CSSPropertyWebkitRubyPosition:
@@ -3072,7 +3072,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyWebkitRegionBreakAfter:
     case CSSPropertyWebkitRegionBreakBefore:
     case CSSPropertyWebkitRegionBreakInside:
-    case CSSPropertyWebkitRegionOverflow:
+    case CSSPropertyWebkitRegionFragment:
 #endif
     case CSSPropertyWebkitRtlOrdering:
     case CSSPropertyWebkitRubyPosition:
index 4fd6cdb..2882a83 100644 (file)
@@ -1945,31 +1945,31 @@ template<> inline CSSPrimitiveValue::operator EMarqueeBehavior() const
     return MNONE;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionOverflow e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionFragment e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_IDENT;
     switch (e) {
-    case AutoRegionOverflow:
+    case AutoRegionFragment:
         m_value.ident = CSSValueAuto;
         break;
-    case BreakRegionOverflow:
+    case BreakRegionFragment:
         m_value.ident = CSSValueBreak;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator RegionOverflow() const
+template<> inline CSSPrimitiveValue::operator RegionFragment() const
 {
     switch (m_value.ident) {
     case CSSValueAuto:
-        return AutoRegionOverflow;
+        return AutoRegionFragment;
     case CSSValueBreak:
-        return BreakRegionOverflow;
+        return BreakRegionFragment;
     }
 
     ASSERT_NOT_REACHED();
-    return AutoRegionOverflow;
+    return AutoRegionFragment;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e)
index 680aa5c..c7c562e 100644 (file)
@@ -664,10 +664,10 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
 #if ENABLE(CSS_REGIONS)
     case CSSPropertyWebkitFlowInto:
     case CSSPropertyWebkitFlowFrom:
-    case CSSPropertyWebkitRegionOverflow:
     case CSSPropertyWebkitRegionBreakAfter:
     case CSSPropertyWebkitRegionBreakBefore:
     case CSSPropertyWebkitRegionBreakInside:
+    case CSSPropertyWebkitRegionFragment:
 #endif
 #if ENABLE(CSS_EXCLUSIONS)
     case CSSPropertyWebkitWrapFlow:
index fee824a..c908483 100644 (file)
@@ -415,7 +415,7 @@ z-index
 #if defined(ENABLE_CSS_REGIONS) && ENABLE_CSS_REGIONS
 -webkit-flow-into
 -webkit-flow-from
--webkit-region-overflow
+-webkit-region-fragment
 -webkit-region-break-after
 -webkit-region-break-before
 -webkit-region-break-inside
index c591996..679e736 100644 (file)
@@ -944,7 +944,7 @@ nonzero
 evenodd
 outside-shape
 
-// -webkit-region-overflow
+// -webkit-region-fragment
 // auto
 break
 
index 00f0be3..56e83eb 100644 (file)
@@ -2312,7 +2312,7 @@ DeprecatedStyleBuilder::DeprecatedStyleBuilder()
     setPropertyHandler(CSSPropertyWebkitRegionBreakAfter, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakAfter, EPageBreak, &RenderStyle::setRegionBreakAfter, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
     setPropertyHandler(CSSPropertyWebkitRegionBreakBefore, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakBefore, EPageBreak, &RenderStyle::setRegionBreakBefore, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
     setPropertyHandler(CSSPropertyWebkitRegionBreakInside, ApplyPropertyDefault<EPageBreak, &RenderStyle::regionBreakInside, EPageBreak, &RenderStyle::setRegionBreakInside, EPageBreak, &RenderStyle::initialPageBreak>::createHandler());
-    setPropertyHandler(CSSPropertyWebkitRegionOverflow, ApplyPropertyDefault<RegionOverflow, &RenderStyle::regionOverflow, RegionOverflow, &RenderStyle::setRegionOverflow, RegionOverflow, &RenderStyle::initialRegionOverflow>::createHandler());
+    setPropertyHandler(CSSPropertyWebkitRegionFragment, ApplyPropertyDefault<RegionFragment, &RenderStyle::regionFragment, RegionFragment, &RenderStyle::setRegionFragment, RegionFragment, &RenderStyle::initialRegionFragment>::createHandler());
 #endif
     setPropertyHandler(CSSPropertyWebkitRtlOrdering, ApplyPropertyDefault<Order, &RenderStyle::rtlOrdering, Order, &RenderStyle::setRTLOrdering, Order, &RenderStyle::initialRTLOrdering>::createHandler());
     setPropertyHandler(CSSPropertyWebkitRubyPosition, ApplyPropertyDefault<RubyPosition, &RenderStyle::rubyPosition, RubyPosition, &RenderStyle::setRubyPosition, RubyPosition, &RenderStyle::initialRubyPosition>::createHandler());
index 5736b0c..2da803d 100644 (file)
@@ -3089,7 +3089,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
     case CSSPropertyWebkitRegionBreakAfter:
     case CSSPropertyWebkitRegionBreakBefore:
     case CSSPropertyWebkitRegionBreakInside:
-    case CSSPropertyWebkitRegionOverflow:
+    case CSSPropertyWebkitRegionFragment:
 #endif
     case CSSPropertyWebkitRtlOrdering:
     case CSSPropertyWebkitRubyPosition:
index df26786..840b868 100644 (file)
@@ -7376,7 +7376,7 @@ bool RenderBlock::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pageBou
     if (!region)
         return false;
     if (region->isLastRegion())
-        return region->isRenderRegionSet() || region->style()->regionOverflow() == BreakRegionOverflow
+        return region->isRenderRegionSet() || region->style()->regionFragment() == BreakRegionFragment
             || (pageBoundaryRule == IncludePageBoundary && pageOffset == region->logicalTopForFlowThreadContent());
     return true;
 }
index 26119cb..a56beaa 100644 (file)
@@ -106,8 +106,8 @@ LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect& flow
     // folded into RenderBlock, switch to hasOverflowClip().
     bool clipX = style()->overflowX() != OVISIBLE;
     bool clipY = style()->overflowY() != OVISIBLE;
-    bool isLastRegionWithRegionOverflowBreak = (isLastPortion && (style()->regionOverflow() == BreakRegionOverflow));
-    if ((clipX && clipY) || isLastRegionWithRegionOverflowBreak)
+    bool isLastRegionWithRegionFragmentBreak = (isLastPortion && (style()->regionFragment() == BreakRegionFragment));
+    if ((clipX && clipY) || isLastRegionWithRegionFragmentBreak)
         return flowThreadPortionRect;
 
     LayoutRect flowThreadOverflow = m_flowThread->visualOverflowRect();
index b8b220a..fbbd6f0 100644 (file)
@@ -397,7 +397,7 @@ bool RenderStyle::changeRequiresLayout(const RenderStyle* other, unsigned& chang
             || rareNonInheritedData->textOverflow != other->rareNonInheritedData->textOverflow)
             return true;
 
-        if (rareNonInheritedData->m_regionOverflow != other->rareNonInheritedData->m_regionOverflow)
+        if (rareNonInheritedData->m_regionFragment != other->rareNonInheritedData->m_regionFragment)
             return true;
 
         if (rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow
index 69220f3..9df5725 100644 (file)
@@ -886,7 +886,7 @@ public:
 
     const AtomicString& flowThread() const { return rareNonInheritedData->m_flowThread; }
     const AtomicString& regionThread() const { return rareNonInheritedData->m_regionThread; }
-    RegionOverflow regionOverflow() const { return static_cast<RegionOverflow>(rareNonInheritedData->m_regionOverflow); }
+    RegionFragment regionFragment() const { return static_cast<RegionFragment>(rareNonInheritedData->m_regionFragment); }
 
     const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid; }
     LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData->m_lineSnap); }
@@ -1386,7 +1386,7 @@ public:
 
     void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInheritedData, m_flowThread, flowThread); }
     void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInheritedData, m_regionThread, regionThread); }
-    void setRegionOverflow(RegionOverflow regionOverflow) { SET_VAR(rareNonInheritedData, m_regionOverflow, regionOverflow); }
+    void setRegionFragment(RegionFragment regionFragment) { SET_VAR(rareNonInheritedData, m_regionFragment, regionFragment); }
 
     void setWrapFlow(WrapFlow wrapFlow) { SET_VAR(rareNonInheritedData, m_wrapFlow, wrapFlow); }
     void setWrapThrough(WrapThrough wrapThrough) { SET_VAR(rareNonInheritedData, m_wrapThrough, wrapThrough); }
@@ -1739,7 +1739,7 @@ public:
 
     static const AtomicString& initialFlowThread() { return nullAtom; }
     static const AtomicString& initialRegionThread() { return nullAtom; }
-    static RegionOverflow initialRegionOverflow() { return AutoRegionOverflow; }
+    static RegionFragment initialRegionFragment() { return AutoRegionFragment; }
 
     static WrapFlow initialWrapFlow() { return WrapFlowAuto; }
     static WrapThrough initialWrapThrough() { return WrapThroughWrap; }
index d6b3849..830612e 100644 (file)
@@ -489,7 +489,7 @@ enum ImageResolutionSnap { ImageResolutionNoSnap = 0, ImageResolutionSnapPixels
 
 enum Order { LogicalOrder = 0, VisualOrder };
 
-enum RegionOverflow { AutoRegionOverflow, BreakRegionOverflow };
+enum RegionFragment { AutoRegionFragment, BreakRegionFragment };
 
 enum ColumnAxis { HorizontalColumnAxis, VerticalColumnAxis, AutoColumnAxis };
 
index f5c6bb8..966bfcb 100644 (file)
@@ -55,7 +55,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
     , m_order(RenderStyle::initialOrder())
     , m_flowThread(RenderStyle::initialFlowThread())
     , m_regionThread(RenderStyle::initialRegionThread())
-    , m_regionOverflow(RenderStyle::initialRegionOverflow())
+    , m_regionFragment(RenderStyle::initialRegionFragment())
     , m_regionBreakAfter(RenderStyle::initialPageBreak())
     , m_regionBreakBefore(RenderStyle::initialPageBreak())
     , m_regionBreakInside(RenderStyle::initialPageBreak())
@@ -138,7 +138,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
     , m_order(o.m_order)
     , m_flowThread(o.m_flowThread)
     , m_regionThread(o.m_regionThread)
-    , m_regionOverflow(o.m_regionOverflow)
+    , m_regionFragment(o.m_regionFragment)
     , m_regionBreakAfter(o.m_regionBreakAfter)
     , m_regionBreakBefore(o.m_regionBreakBefore)
     , m_regionBreakInside(o.m_regionBreakInside)
@@ -227,7 +227,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
         && m_order == o.m_order
         && m_flowThread == o.m_flowThread
         && m_regionThread == o.m_regionThread
-        && m_regionOverflow == o.m_regionOverflow
+        && m_regionFragment == o.m_regionFragment
         && m_regionBreakAfter == o.m_regionBreakAfter
         && m_regionBreakBefore == o.m_regionBreakBefore
         && m_regionBreakInside == o.m_regionBreakInside
index 0a3c7a8..f231da6 100644 (file)
@@ -158,7 +158,7 @@ public:
 
     AtomicString m_flowThread;
     AtomicString m_regionThread;
-    unsigned m_regionOverflow : 1; // RegionOverflow
+    unsigned m_regionFragment : 1; // RegionFragment
 
     unsigned m_regionBreakAfter : 2; // EPageBreak
     unsigned m_regionBreakBefore : 2; // EPageBreak