[CSS Grid Layout] Rename named areas property
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2014 18:07:05 +0000 (18:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Feb 2014 18:07:05 +0000 (18:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127990

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-02-13
Reviewed by Sergio Villar Senin.

From Blink r165891 by <rego@igalia.com>

The property 'grid-template' has been renamed to 'grid-template-areas'
in the last two versions of the spec.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSGridTemplateAreasValue.cpp: Renamed from Source/WebCore/css/CSSGridTemplateValue.cpp.
(WebCore::CSSGridTemplateAreasValue::CSSGridTemplateAreasValue):
(WebCore::stringForPosition):
(WebCore::CSSGridTemplateAreasValue::customCSSText):
* css/CSSGridTemplateAreasValue.h: Renamed from Source/WebCore/css/CSSGridTemplateValue.h.
(WebCore::CSSGridTemplateAreasValue::create):
(WebCore::CSSGridTemplateAreasValue::~CSSGridTemplateAreasValue):
(WebCore::CSSGridTemplateAreasValue::gridAreaMap):
(WebCore::CSSGridTemplateAreasValue::rowCount):
(WebCore::CSSGridTemplateAreasValue::columnCount):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridTemplateAreas):
* css/CSSParser.h:
* css/CSSPropertyNames.in:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isGridTemplateAreasValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

Source/WebInspectorUI:

* Tools/PrettyPrinting/css.js:
* UserInterface/External/CodeMirror/css.js:

LayoutTests:

* fast/css-grid-layout/grid-item-area-get-set.html:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-start-before-get-set.html:
* fast/css-grid-layout/grid-template-get-set-expected.txt:
* fast/css-grid-layout/grid-template-get-set.html:

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

26 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-item-area-get-set.html
LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html
LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.html
LayoutTests/fast/css-grid-layout/grid-item-named-grid-area-resolution.html
LayoutTests/fast/css-grid-layout/grid-item-start-before-get-set.html
LayoutTests/fast/css-grid-layout/grid-template-get-set-expected.txt
LayoutTests/fast/css-grid-layout/grid-template-get-set.html
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSGridTemplateAreasValue.cpp [moved from Source/WebCore/css/CSSGridTemplateValue.cpp with 90% similarity]
Source/WebCore/css/CSSGridTemplateAreasValue.h [moved from Source/WebCore/css/CSSGridTemplateValue.h with 76% similarity]
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValue.h
Source/WebCore/css/StyleResolver.cpp
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Tools/PrettyPrinting/css.js
Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js

index be18517..e1aafc3 100644 (file)
@@ -1,3 +1,23 @@
+2014-02-13  Javier Fernandez  <jfernandez@igalia.com>
+
+        [CSS Grid Layout] Rename named areas property
+        https://bugs.webkit.org/show_bug.cgi?id=127990
+
+        Reviewed by Sergio Villar Senin.
+
+        From Blink r165891 by <rego@igalia.com>
+
+        The property 'grid-template' has been renamed to 'grid-template-areas'
+        in the last two versions of the spec.
+
+        * fast/css-grid-layout/grid-item-area-get-set.html:
+        * fast/css-grid-layout/grid-item-column-row-get-set.html:
+        * fast/css-grid-layout/grid-item-end-after-get-set.html:
+        * fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
+        * fast/css-grid-layout/grid-item-start-before-get-set.html:
+        * fast/css-grid-layout/grid-template-get-set-expected.txt:
+        * fast/css-grid-layout/grid-template-get-set.html:
+
 2014-02-13  Brady Eidson  <beidson@apple.com>
 
         IDB: TestExpectations batch - "transaction-abort.html to versionchangerequest-activedomobject.html”
index 892572e..38aa5a8 100644 (file)
@@ -8,8 +8,8 @@ if (window.testRunner)
 <link href="resources/grid.css" rel="stylesheet">
 <style>
 .grid {
-    -webkit-grid-template: "firstArea secondArea"
-                           "thirdArea thirdArea";
+    -webkit-grid-template-areas: "firstArea secondArea"
+                                 "thirdArea thirdArea";
 }
 
 #oneValueGridArea {
index 757456d..a05bf9d 100755 (executable)
@@ -8,8 +8,8 @@ if (window.testRunner)
 </script>
 <style>
 .grid {
-    -webkit-grid-template: "firstArea secondArea"
-                           "thirdArea thirdArea";
+    -webkit-grid-template-areas: "firstArea secondArea"
+                                 "thirdArea thirdArea";
 }
 
 .gridItemWithPositiveInteger {
index db88367..2c15f54 100644 (file)
@@ -8,8 +8,8 @@ if (window.testRunner)
 <link href="resources/grid.css" rel="stylesheet">
 <style>
 .grid {
-    -webkit-grid-template: "firstArea secondArea"
-                           "thirdArea thirdArea";
+    -webkit-grid-template-areas: "firstArea secondArea"
+                                 "thirdArea thirdArea";
 }
 
 .gridItemWithPositiveInteger {
index 3ef5393..25c7e0f 100644 (file)
@@ -13,13 +13,13 @@ if (window.testRunner)
 }
 
 .gridWithoutRepeat {
-    -webkit-grid-template: "first second third"
-                           "fourth fifth sixth";
+    -webkit-grid-template-areas: "first second third"
+                                 "fourth fifth sixth";
 }
 
 .gridWithRepeat {
-    -webkit-grid-template: "first  second third"
-                           "fourth fourth third";
+    -webkit-grid-template-areas: "first  second third"
+                                 "fourth fourth third";
 }
 
 .gridItemFirstArea {
index d8f3cd0..4ad167c 100644 (file)
@@ -8,8 +8,8 @@ if (window.testRunner)
 <link href="resources/grid.css" rel="stylesheet">
 <style>
 .grid {
-    -webkit-grid-template: "firstArea secondArea"
-                           "thirdArea thirdArea";
+    -webkit-grid-template-areas: "firstArea secondArea"
+                                 "thirdArea thirdArea";
 }
 
 .gridItemWithPositiveInteger {
index 5805b7a..4ba0b11 100644 (file)
@@ -1,30 +1,30 @@
-This test checks that grid-template is properly parsed.
+This test checks that grid-template-areas is properly parsed.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-Test getting grid-template set through CSS.
-PASS getComputedStyle(gridWithDefaultTemplate).getPropertyValue('-webkit-grid-template') is "none"
-PASS getComputedStyle(gridWithSingleStringTemplate).getPropertyValue('-webkit-grid-template') is "\"area\""
-PASS getComputedStyle(gridWithTwoColumnsTemplate).getPropertyValue('-webkit-grid-template') is "\"first second\""
-PASS getComputedStyle(gridWithTwoRowsTemplate).getPropertyValue('-webkit-grid-template') is "\"first\" \"second\""
-PASS getComputedStyle(gridWithSpanningColumnsTemplate).getPropertyValue('-webkit-grid-template') is "\"span span\""
-PASS getComputedStyle(gridWithSpanningRowsDotTemplate).getPropertyValue('-webkit-grid-template') is "\"span\" \".\""
-PASS getComputedStyle(gridWithDotColumn).getPropertyValue('-webkit-grid-template') is "\"header .\" \"footer .\""
-Test grid-template: initial
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "\"foobar\""
-Test grid-template: inherit
-PASS getComputedStyle(parentElement).getPropertyValue('-webkit-grid-template') is "\"foo bar\""
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "\"foo bar\""
-Test invalid grid-template values.
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "none"
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "none"
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "none"
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "none"
-PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template') is "none"
+Test getting grid-template-areas set through CSS.
+PASS getComputedStyle(gridWithDefaultTemplate).getPropertyValue('-webkit-grid-template-areas') is "none"
+PASS getComputedStyle(gridWithSingleStringTemplate).getPropertyValue('-webkit-grid-template-areas') is "\"area\""
+PASS getComputedStyle(gridWithTwoColumnsTemplate).getPropertyValue('-webkit-grid-template-areas') is "\"first second\""
+PASS getComputedStyle(gridWithTwoRowsTemplate).getPropertyValue('-webkit-grid-template-areas') is "\"first\" \"second\""
+PASS getComputedStyle(gridWithSpanningColumnsTemplate).getPropertyValue('-webkit-grid-template-areas') is "\"span span\""
+PASS getComputedStyle(gridWithSpanningRowsDotTemplate).getPropertyValue('-webkit-grid-template-areas') is "\"span\" \".\""
+PASS getComputedStyle(gridWithDotColumn).getPropertyValue('-webkit-grid-template-areas') is "\"header .\" \"footer .\""
+Test grid-template-areas: initial
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "\"foobar\""
+Test grid-template-areas: inherit
+PASS getComputedStyle(parentElement).getPropertyValue('-webkit-grid-template-areas') is "\"foo bar\""
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "\"foo bar\""
+Test invalid grid-template-areas values.
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
+PASS getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') is "none"
 
 FIXME: We currently don't validate that the named grid areas are <indent>.
-FAIL getComputedStyle(element).getPropertyValue('-webkit-grid-template') should be none. Was "nav-up".
+FAIL getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas') should be none. Was "nav-up".
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 6d42d3d..7081425 100644 (file)
@@ -8,30 +8,30 @@ if (window.testRunner)
 <link href="resources/grid.css" rel="stylesheet">
 <style>
 #gridWithSingleStringTemplate {
-    -webkit-grid-template: "area";
+    -webkit-grid-template-areas: "area";
 }
 
 #gridWithTwoColumnsTemplate {
-    -webkit-grid-template: "first second";
+    -webkit-grid-template-areas: "first second";
 }
 
 #gridWithTwoRowsTemplate {
-    -webkit-grid-template: "first"
-                   "second";
+    -webkit-grid-template-areas: "first"
+                                 "second";
 }
 
 #gridWithSpanningColumnsTemplate {
-    -webkit-grid-template: "span span";
+    -webkit-grid-template-areas: "span span";
 }
 
 #gridWithSpanningRowsDotTemplate {
-    -webkit-grid-template: "span"
-                   ".";
+    -webkit-grid-template-areas: "span"
+                                 ".";
 }
 
 #gridWithDotColumn {
-    -webkit-grid-template: "header ."
-                   "footer .";
+    -webkit-grid-template-areas: "header ."
+                                 "footer .";
 }
 </style>
 <script src="../../resources/js-test-pre.js"></script>
@@ -45,75 +45,75 @@ if (window.testRunner)
 <div class="grid" id="gridWithSpanningRowsDotTemplate"></div>
 <div class="grid" id="gridWithDotColumn"></div>
 <script>
-    description("This test checks that grid-template is properly parsed.");
+    description("This test checks that grid-template-areas is properly parsed.");
 
-    function testGridTemplate(gridItemID, expectedResult) {
-        shouldBeEqualToString("getComputedStyle(" + gridItemID + ").getPropertyValue('-webkit-grid-template')", expectedResult);
+    function testGridTemplateAreas(gridItemID, expectedResult) {
+        shouldBeEqualToString("getComputedStyle(" + gridItemID + ").getPropertyValue('-webkit-grid-template-areas')", expectedResult);
     }
 
-    function testJSGridTemplate(element, expectedResult) {
+    function testJSGridTemplateAreas(element, expectedResult) {
         this.element = element;
-        shouldBeEqualToString("getComputedStyle(element).getPropertyValue('-webkit-grid-template')", expectedResult);
+        shouldBeEqualToString("getComputedStyle(element).getPropertyValue('-webkit-grid-template-areas')", expectedResult);
     }
 
-    debug("Test getting grid-template set through CSS.");
-    testGridTemplate("gridWithDefaultTemplate", "none");
-    testGridTemplate("gridWithSingleStringTemplate", '"area"');
-    testGridTemplate("gridWithTwoColumnsTemplate", '"first second"');
-    testGridTemplate("gridWithTwoRowsTemplate", '"first" "second"');
-    testGridTemplate("gridWithSpanningColumnsTemplate", '"span span"');
-    testGridTemplate("gridWithSpanningRowsDotTemplate", '"span" "."');
-    testGridTemplate("gridWithDotColumn", '"header ." "footer ."');
+    debug("Test getting grid-template-areas set through CSS.");
+    testGridTemplateAreas("gridWithDefaultTemplate", "none");
+    testGridTemplateAreas("gridWithSingleStringTemplate", '"area"');
+    testGridTemplateAreas("gridWithTwoColumnsTemplate", '"first second"');
+    testGridTemplateAreas("gridWithTwoRowsTemplate", '"first" "second"');
+    testGridTemplateAreas("gridWithSpanningColumnsTemplate", '"span span"');
+    testGridTemplateAreas("gridWithSpanningRowsDotTemplate", '"span" "."');
+    testGridTemplateAreas("gridWithDotColumn", '"header ." "footer ."');
 
-    debug("Test grid-template: initial");
+    debug("Test grid-template-areas: initial");
     var element = document.createElement("div");
     document.body.appendChild(element);
-    element.style.webkitGridTemplate = "'foobar'";
-    testJSGridTemplate(element, '"foobar"');
-    element.style.webkitGridTemplate = "initial";
+    element.style.webkitGridTemplateAreas = "'foobar'";
+    testJSGridTemplateAreas(element, '"foobar"');
+    element.style.webkitGridTemplateAreas = "initial";
     document.body.removeChild(element);
 
-    debug("Test grid-template: inherit");
+    debug("Test grid-template-areas: inherit");
     var parentElement = document.createElement("div");
     document.body.appendChild(parentElement);
-    parentElement.style.webkitGridTemplate = "'foo bar'";
-    shouldBeEqualToString("getComputedStyle(parentElement).getPropertyValue('-webkit-grid-template')", '"foo bar"');
+    parentElement.style.webkitGridTemplateAreas = "'foo bar'";
+    shouldBeEqualToString("getComputedStyle(parentElement).getPropertyValue('-webkit-grid-template-areas')", '"foo bar"');
 
     var element = document.createElement("div");
     parentElement.appendChild(element);
-    element.style.webkitGridTemplate = "inherit";
-    testJSGridTemplate(element, '"foo bar"');
+    element.style.webkitGridTemplateAreas = "inherit";
+    testJSGridTemplateAreas(element, '"foo bar"');
     document.body.removeChild(parentElement);
 
-    debug("Test invalid grid-template values.");
+    debug("Test invalid grid-template-areas values.");
     var element = document.createElement("div");
     document.body.appendChild(element);
 
     // 'nav' is not a rectangular definition.
-    element.style.webkitGridTemplate = "'nav head' 'nav nav'";
-    testJSGridTemplate(element, "none");
+    element.style.webkitGridTemplateAreas = "'nav head' 'nav nav'";
+    testJSGridTemplateAreas(element, "none");
 
     // 'nav' is not contiguous in the column direction.
-    element.style.webkitGridTemplate = "'nav head nav'";
-    testJSGridTemplate(element, "none");
+    element.style.webkitGridTemplateAreas = "'nav head nav'";
+    testJSGridTemplateAreas(element, "none");
 
     // 'nav' is not contiguous in the row direction.
-    element.style.webkitGridTemplate = "'nav head' 'middle middle' 'nav footer'";
-    testJSGridTemplate(element, "none");
+    element.style.webkitGridTemplateAreas = "'nav head' 'middle middle' 'nav footer'";
+    testJSGridTemplateAreas(element, "none");
 
     // The rows don't have the same number of columns.
-    element.style.webkitGridTemplate = "'nav head' 'foot'";
-    testJSGridTemplate(element, "none");
+    element.style.webkitGridTemplateAreas = "'nav head' 'foot'";
+    testJSGridTemplateAreas(element, "none");
 
     // Empty rows.
-    element.style.webkitGridTemplate = "'' ''";
-    testJSGridTemplate(element, "none");
+    element.style.webkitGridTemplateAreas = "'' ''";
+    testJSGridTemplateAreas(element, "none");
 
     debug("");
     debug("FIXME: We currently don't validate that the named grid areas are &lt;indent&gt;.");
     // <ident> only allows a leading '-'.
-    element.style.webkitGridTemplate = "'nav-up'";
-    testJSGridTemplate(element, "none");
+    element.style.webkitGridTemplateAreas = "'nav-up'";
+    testJSGridTemplateAreas(element, "none");
 </script>
 <script src="../../resources/js-test-post.js"></script>
 </body>
index 6675357..56b3608 100644 (file)
@@ -1041,7 +1041,7 @@ set(WebCore_SOURCES
     css/CSSFontValue.cpp
     css/CSSFunctionValue.cpp
     css/CSSGradientValue.cpp
-    css/CSSGridTemplateValue.cpp
+    css/CSSGridTemplateAreasValue.cpp
     css/CSSGroupingRule.cpp
     css/CSSImageGeneratorValue.cpp
     css/CSSImageSetValue.cpp
index 672f524..5b0e203 100644 (file)
@@ -1,3 +1,46 @@
+2014-02-13  Javier Fernandez  <jfernandez@igalia.com>
+
+        [CSS Grid Layout] Rename named areas property
+        https://bugs.webkit.org/show_bug.cgi?id=127990
+
+        Reviewed by Sergio Villar Senin.
+
+        From Blink r165891 by <rego@igalia.com>
+
+        The property 'grid-template' has been renamed to 'grid-template-areas'
+        in the last two versions of the spec.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSGridTemplateAreasValue.cpp: Renamed from Source/WebCore/css/CSSGridTemplateValue.cpp.
+        (WebCore::CSSGridTemplateAreasValue::CSSGridTemplateAreasValue):
+        (WebCore::stringForPosition):
+        (WebCore::CSSGridTemplateAreasValue::customCSSText):
+        * css/CSSGridTemplateAreasValue.h: Renamed from Source/WebCore/css/CSSGridTemplateValue.h.
+        (WebCore::CSSGridTemplateAreasValue::create):
+        (WebCore::CSSGridTemplateAreasValue::~CSSGridTemplateAreasValue):
+        (WebCore::CSSGridTemplateAreasValue::gridAreaMap):
+        (WebCore::CSSGridTemplateAreasValue::rowCount):
+        (WebCore::CSSGridTemplateAreasValue::columnCount):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseGridTemplateAreas):
+        * css/CSSParser.h:
+        * css/CSSPropertyNames.in:
+        * css/CSSValue.cpp:
+        (WebCore::CSSValue::equals):
+        (WebCore::CSSValue::cssText):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isGridTemplateAreasValue):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::applyProperty):
+
 2014-02-13  Adrian Bunk  <bunk@stusta.de>
 
         Remove the last remnants of Maemo support
index 33c168c..bbc63b2 100644 (file)
@@ -2566,8 +2566,8 @@ webcore_sources += \
        Source/WebCore/css/CSSFunctionValue.h \
        Source/WebCore/css/CSSGradientValue.cpp \
        Source/WebCore/css/CSSGradientValue.h \
-       Source/WebCore/css/CSSGridTemplateValue.cpp \
-       Source/WebCore/css/CSSGridTemplateValue.h \
+       Source/WebCore/css/CSSGridTemplateAreasValue.cpp \
+       Source/WebCore/css/CSSGridTemplateAreasValue.h \
        Source/WebCore/css/CSSGroupingRule.cpp \
        Source/WebCore/css/CSSGroupingRule.h \
        Source/WebCore/css/CSSHelper.h \
index d6c5cba..7b74985 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\css\CSSGridTemplateValue.cpp" />
+    <ClCompile Include="..\css\CSSGridTemplateAreasValue.cpp" />
     <ClCompile Include="..\css\CSSGroupingRule.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     <ClInclude Include="..\css\CSSFontValue.h" />
     <ClInclude Include="..\css\CSSFunctionValue.h" />
     <ClInclude Include="..\css\CSSGradientValue.h" />
-    <ClInclude Include="..\css\CSSGridTemplateValue.h" />
+    <ClInclude Include="..\css\CSSGridTemplateAreasValue.h" />
     <ClInclude Include="..\css\CSSGroupingRule.h" />
     <ClInclude Include="..\css\CSSHelper.h" />
     <ClInclude Include="..\css\CSSImageGeneratorValue.h" />
index c79c1b2..79a2cf5 100644 (file)
     <ClCompile Include="..\rendering\SimpleLineLayoutFunctions.cpp">
       <Filter>rendering</Filter>
     </ClCompile>
-    <ClCompile Include="..\css\CSSGridTemplateValue.cpp">
+    <ClCompile Include="..\css\CSSGridTemplateAreasValue.cpp">
       <Filter>css</Filter>
     </ClCompile>
     <ClCompile Include="..\Modules\indexeddb\IDBCursorBackend.cpp">
     <ClInclude Include="..\rendering\SimpleLineLayoutFunctions.h">
       <Filter>rendering</Filter>
     </ClInclude>
-    <ClInclude Include="..\css\CSSGridTemplateValue.h">
+    <ClInclude Include="..\css\CSSGridTemplateAreasValue.h">
       <Filter>css</Filter>
     </ClInclude>
     <ClInclude Include="..\Modules\indexeddb\IDBDatabaseBackend.h">
index 7bc1fd7..85ce14d 100644 (file)
                CD3A496417A9D01B00274E42 /* SourceBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3A495B17A9D01B00274E42 /* SourceBufferList.cpp */; };
                CD3A496517A9D01B00274E42 /* SourceBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3A495C17A9D01B00274E42 /* SourceBufferList.h */; };
                CD3E251C18046B0600E27F56 /* GridCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3E251B18046B0600E27F56 /* GridCoordinate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               CD3E252318046BCD00E27F56 /* CSSGridTemplateValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3E252118046BCD00E27F56 /* CSSGridTemplateValue.cpp */; };
-               CD3E252418046BCD00E27F56 /* CSSGridTemplateValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3E252218046BCD00E27F56 /* CSSGridTemplateValue.h */; };
+               CD3E252318046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD3E252118046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp */; };
+               CD3E252418046BCD00E27F56 /* CSSGridTemplateAreasValue.h in Headers */ = {isa = PBXBuildFile; fileRef = CD3E252218046BCD00E27F56 /* CSSGridTemplateAreasValue.h */; };
                CD47B3FC16CC34F800A21EC8 /* CDMPrivateAVFoundation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD47B3FA16CC34F800A21EC8 /* CDMPrivateAVFoundation.mm */; };
                CD4AC52A1496AE9A0087C4EF /* Composite.wav in Copy Audio Resources */ = {isa = PBXBuildFile; fileRef = CD4AC5281496AE2F0087C4EF /* Composite.wav */; };
                CD5393D3175E018600C07123 /* JSMemoryInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393D1175E018600C07123 /* JSMemoryInfo.cpp */; };
                CD3A495C17A9D01B00274E42 /* SourceBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceBufferList.h; sourceTree = "<group>"; };
                CD3A495D17A9D01B00274E42 /* SourceBufferList.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SourceBufferList.idl; sourceTree = "<group>"; };
                CD3E251B18046B0600E27F56 /* GridCoordinate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GridCoordinate.h; path = style/GridCoordinate.h; sourceTree = "<group>"; };
-               CD3E252118046BCD00E27F56 /* CSSGridTemplateValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGridTemplateValue.cpp; sourceTree = "<group>"; };
-               CD3E252218046BCD00E27F56 /* CSSGridTemplateValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGridTemplateValue.h; sourceTree = "<group>"; };
+               CD3E252118046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSGridTemplateAreasValue.cpp; sourceTree = "<group>"; };
+               CD3E252218046BCD00E27F56 /* CSSGridTemplateAreasValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGridTemplateAreasValue.h; sourceTree = "<group>"; };
                CD47B3F916CC34F800A21EC8 /* CDMPrivateAVFoundation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDMPrivateAVFoundation.h; sourceTree = "<group>"; };
                CD47B3FA16CC34F800A21EC8 /* CDMPrivateAVFoundation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CDMPrivateAVFoundation.mm; sourceTree = "<group>"; };
                CD4AC5281496AE2F0087C4EF /* Composite.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = Composite.wav; path = platform/audio/resources/Composite.wav; sourceTree = SOURCE_ROOT; };
                F523D18402DE42E8018635CA /* css */ = {
                        isa = PBXGroup;
                        children = (
-                               CD3E252118046BCD00E27F56 /* CSSGridTemplateValue.cpp */,
-                               CD3E252218046BCD00E27F56 /* CSSGridTemplateValue.h */,
+                               CD3E252118046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp */,
+                               CD3E252218046BCD00E27F56 /* CSSGridTemplateAreasValue.h */,
                                93CA4C9C09DF93FA00DF8677 /* maketokenizer */,
                                FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */,
                                FBD6AF8515EF21D4008B7110 /* BasicShapeFunctions.h */,
                                BE16C59517CFE17200852C04 /* InbandWebVTTTextTrack.h in Headers */,
                                BC10D76817D8EE71005E2626 /* RenderBlockFlow.h in Headers */,
                                CD3E251C18046B0600E27F56 /* GridCoordinate.h in Headers */,
-                               CD3E252418046BCD00E27F56 /* CSSGridTemplateValue.h in Headers */,
+                               CD3E252418046BCD00E27F56 /* CSSGridTemplateAreasValue.h in Headers */,
                                CDEF4FD717E85C8F00AEE24B /* GridLength.h in Headers */,
                                CDE7FC45181904B1002BBB77 /* OrderIterator.h in Headers */,
                                BE913D80181EF92400DCB09E /* TrackPrivateBase.h in Headers */,
                                BE16C59217CFE17200852C04 /* InbandGenericTextTrack.cpp in Sources */,
                                BE16C59417CFE17200852C04 /* InbandWebVTTTextTrack.cpp in Sources */,
                                BC10D76717D8EE6E005E2626 /* RenderBlockFlow.cpp in Sources */,
-                               CD3E252318046BCD00E27F56 /* CSSGridTemplateValue.cpp in Sources */,
+                               CD3E252318046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp in Sources */,
                                CDE7FC44181904B1002BBB77 /* OrderIterator.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
index 18a0ab1..3f59432 100644 (file)
@@ -34,7 +34,7 @@
 #include "CSSFontFeatureValue.h"
 #include "CSSFontValue.h"
 #include "CSSFunctionValue.h"
-#include "CSSGridTemplateValue.h"
+#include "CSSGridTemplateAreasValue.h"
 #include "CSSLineBoxContainValue.h"
 #include "CSSParser.h"
 #include "CSSPrimitiveValue.h"
@@ -2100,13 +2100,13 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
         case CSSPropertyWebkitGridRow:
             return getCSSPropertyValuesForGridShorthand(webkitGridRowShorthand());
 
-        case CSSPropertyWebkitGridTemplate:
+        case CSSPropertyWebkitGridTemplateAreas:
             if (!style->namedGridAreaRowCount()) {
                 ASSERT(!style->namedGridAreaColumnCount());
                 return cssValuePool().createIdentifierValue(CSSValueNone);
             }
 
-            return CSSGridTemplateValue::create(style->namedGridArea(), style->namedGridAreaRowCount(), style->namedGridAreaColumnCount());
+            return CSSGridTemplateAreasValue::create(style->namedGridArea(), style->namedGridAreaRowCount(), style->namedGridAreaColumnCount());
 
         case CSSPropertyHeight:
             if (renderer) {
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.
- * Copyright (C) 2013 Igalia S.L.
+ * Copyright (C) 2013, 2014 Igalia S.L.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  */
 
 #include "config.h"
-#include "CSSGridTemplateValue.h"
+#include "CSSGridTemplateAreasValue.h"
 
 #include "GridCoordinate.h"
 #include <wtf/text/StringBuilder.h>
 
 namespace WebCore {
 
-CSSGridTemplateValue::CSSGridTemplateValue(const NamedGridAreaMap& gridAreaMap, size_t rowCount, size_t columnCount)
-    : CSSValue(GridTemplateClass)
+CSSGridTemplateAreasValue::CSSGridTemplateAreasValue(const NamedGridAreaMap& gridAreaMap, size_t rowCount, size_t columnCount)
+    : CSSValue(GridTemplateAreasClass)
     , m_gridAreaMap(gridAreaMap)
     , m_rowCount(rowCount)
     , m_columnCount(columnCount)
@@ -66,7 +66,7 @@ static String stringForPosition(const NamedGridAreaMap& gridAreaMap, size_t row,
     return ".";
 }
 
-String CSSGridTemplateValue::customCSSText() const
+String CSSGridTemplateAreasValue::customCSSText() const
 {
     StringBuilder builder;
     for (size_t row = 0; row < m_rowCount; ++row) {
similarity index 76%
rename from Source/WebCore/css/CSSGridTemplateValue.h
rename to Source/WebCore/css/CSSGridTemplateAreasValue.h
index efae01c..2261df0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.
- * Copyright (C) 2013 Igalia S.L.
+ * Copyright (C) 2013, 2014 Igalia S.L.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef CSSGridTemplateValue_h
-#define CSSGridTemplateValue_h
+#ifndef CSSGridTemplateAreasValue_h
+#define CSSGridTemplateAreasValue_h
 
 #include "CSSValue.h"
 #include "GridCoordinate.h"
 
 namespace WebCore {
 
-class CSSGridTemplateValue : public CSSValue {
+class CSSGridTemplateAreasValue : public CSSValue {
 public:
-    static PassRef<CSSGridTemplateValue> create(const NamedGridAreaMap& gridAreaMap, size_t rowCount, size_t columnCount)
+    static PassRef<CSSGridTemplateAreasValue> create(const NamedGridAreaMap& gridAreaMap, size_t rowCount, size_t columnCount)
     {
-        return adoptRef(*new CSSGridTemplateValue(gridAreaMap, rowCount, columnCount));
+        return adoptRef(*new CSSGridTemplateAreasValue(gridAreaMap, rowCount, columnCount));
     }
 
-    ~CSSGridTemplateValue() { }
+    ~CSSGridTemplateAreasValue() { }
 
     String customCSSText() const;
 
@@ -53,15 +53,15 @@ public:
     size_t columnCount() const { return m_columnCount; }
 
 private:
-    CSSGridTemplateValue(const NamedGridAreaMap&, size_t rowCount, size_t columnCount);
+    CSSGridTemplateAreasValue(const NamedGridAreaMap&, size_t rowCount, size_t columnCount);
 
     NamedGridAreaMap m_gridAreaMap;
     size_t m_rowCount;
     size_t m_columnCount;
 };
 
-CSS_VALUE_TYPE_CASTS(CSSGridTemplateValue, isGridTemplateValue())
+CSS_VALUE_TYPE_CASTS(CSSGridTemplateAreasValue, isGridTemplateAreasValue())
 
 } // namespace WebCore
 
-#endif // CSSGridTemplateValue_h
+#endif // CSSGridTemplateAreasValue_h
index 925ef0f..a0295c8 100644 (file)
@@ -40,7 +40,7 @@
 #include "CSSFontValue.h"
 #include "CSSFunctionValue.h"
 #include "CSSGradientValue.h"
-#include "CSSGridTemplateValue.h"
+#include "CSSGridTemplateAreasValue.h"
 #include "CSSImageValue.h"
 #include "CSSInheritedValue.h"
 #include "CSSInitialValue.h"
@@ -2597,11 +2597,11 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
             return false;
         return parseGridAreaShorthand(important);
 
-    case CSSPropertyWebkitGridTemplate:
+    case CSSPropertyWebkitGridTemplateAreas:
         if (!cssGridLayoutEnabled())
             return false;
 
-        parsedValue = parseGridTemplate();
+        parsedValue = parseGridTemplateAreas();
         break;
 
     case CSSPropertyWebkitMarginCollapse: {
@@ -5130,7 +5130,7 @@ bool CSSParser::parseDashboardRegions(CSSPropertyID propId, bool important)
 
 #endif /* ENABLE(DASHBOARD_SUPPORT) */
 
-PassRefPtr<CSSValue> CSSParser::parseGridTemplate()
+PassRefPtr<CSSValue> CSSParser::parseGridTemplateAreas()
 {
     NamedGridAreaMap gridAreaMap;
     size_t rowCount = 0;
@@ -5202,7 +5202,7 @@ PassRefPtr<CSSValue> CSSParser::parseGridTemplate()
     if (!rowCount || !columnCount)
         return 0;
 
-    return CSSGridTemplateValue::create(gridAreaMap, rowCount, columnCount);
+    return CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
 }
 
 PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bool counters)
index e6d72e2..fd07719 100644 (file)
@@ -161,7 +161,7 @@ public:
     bool parseGridTrackRepeatFunction(CSSValueList&);
     PassRefPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList);
     PassRefPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue*);
-    PassRefPtr<CSSValue> parseGridTemplate();
+    PassRefPtr<CSSValue> parseGridTemplateAreas();
     void parseGridTrackNames(CSSParserValueList& inputList, CSSValueList& values);
 
     bool parseDashboardRegions(CSSPropertyID, bool important);
index 789af40..3ef0524 100644 (file)
@@ -310,7 +310,7 @@ z-index
 -webkit-grid-row-start
 -webkit-grid-column
 -webkit-grid-row
--webkit-grid-template
+-webkit-grid-template-areas
 -webkit-grid-auto-flow
 -webkit-hyphenate-character [Inherited]
 -webkit-hyphenate-limit-after [Inherited]
index 82e1c68..6f20634 100644 (file)
@@ -40,7 +40,7 @@
 #include "CSSFontValue.h"
 #include "CSSFunctionValue.h"
 #include "CSSGradientValue.h"
-#include "CSSGridTemplateValue.h"
+#include "CSSGridTemplateAreasValue.h"
 #include "CSSImageSetValue.h"
 #include "CSSImageValue.h"
 #include "CSSInheritedValue.h"
@@ -189,8 +189,8 @@ bool CSSValue::equals(const CSSValue& other) const
             return compareCSSValues<CSSInheritedValue>(*this, other);
         case InitialClass:
             return compareCSSValues<CSSInitialValue>(*this, other);
-        case GridTemplateClass:
-            return compareCSSValues<CSSGridTemplateValue>(*this, other);
+        case GridTemplateAreasClass:
+            return compareCSSValues<CSSGridTemplateAreasValue>(*this, other);
         case PrimitiveClass:
             return compareCSSValues<CSSPrimitiveValue>(*this, other);
         case ReflectClass:
@@ -275,8 +275,8 @@ String CSSValue::cssText() const
         return toCSSInheritedValue(this)->customCSSText();
     case InitialClass:
         return toCSSInitialValue(this)->customCSSText();
-    case GridTemplateClass:
-        return toCSSGridTemplateValue(this)->customCSSText();
+    case GridTemplateAreasClass:
+        return toCSSGridTemplateAreasValue(this)->customCSSText();
     case PrimitiveClass:
         return toCSSPrimitiveValue(this)->customCSSText();
     case ReflectClass:
@@ -366,8 +366,8 @@ void CSSValue::destroy()
     case InitialClass:
         delete toCSSInitialValue(this);
         return;
-    case GridTemplateClass:
-        delete toCSSGridTemplateValue(this);
+    case GridTemplateAreasClass:
+        delete toCSSGridTemplateAreasValue(this);
         return;
     case PrimitiveClass:
         delete toCSSPrimitiveValue(this);
index 3d46f6d..c024dab 100644 (file)
@@ -97,7 +97,7 @@ public:
     bool isFilterImageValue() const { return m_classType == FilterImageClass; }
     bool isWebKitCSSFilterValue() const { return m_classType == WebKitCSSFilterClass; }
 #endif // ENABLE(CSS_FILTERS)
-    bool isGridTemplateValue() const { return m_classType == GridTemplateClass; }
+    bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAreasClass; }
     bool isSVGColor() const { return m_classType == SVGColorClass || m_classType == SVGPaintClass; }
     bool isSVGPaint() const { return m_classType == SVGPaintClass; }
     bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass; }
@@ -157,7 +157,7 @@ protected:
         UnicodeRangeClass,
         LineBoxContainClass,
         CalculationClass,
-        GridTemplateClass,
+        GridTemplateAreasClass,
         SVGColorClass,
         SVGPaintClass,
 
index 01900e3..be6cfb9 100644 (file)
@@ -40,7 +40,7 @@
 #include "CSSFontSelector.h"
 #include "CSSFontValue.h"
 #include "CSSFunctionValue.h"
-#include "CSSGridTemplateValue.h"
+#include "CSSGridTemplateAreasValue.h"
 #include "CSSLineBoxContainValue.h"
 #include "CSSPageRule.h"
 #include "CSSParser.h"
@@ -2727,7 +2727,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
         state.style()->setGridItemRowEnd(rowEndPosition);
         return;
     }
-    case CSSPropertyWebkitGridTemplate: {
+    case CSSPropertyWebkitGridTemplateAreas: {
         if (isInherit) {
             state.style()->setNamedGridArea(state.parentStyle()->namedGridArea());
             state.style()->setNamedGridAreaRowCount(state.parentStyle()->namedGridAreaRowCount());
@@ -2746,7 +2746,7 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
             return;
         }
 
-        CSSGridTemplateValue* gridTemplateValue = toCSSGridTemplateValue(value);
+        CSSGridTemplateAreasValue* gridTemplateValue = toCSSGridTemplateAreasValue(value);
         state.style()->setNamedGridArea(gridTemplateValue->gridAreaMap());
         state.style()->setNamedGridAreaRowCount(gridTemplateValue->rowCount());
         state.style()->setNamedGridAreaColumnCount(gridTemplateValue->columnCount());
index 0724cb0..bf19df2 100644 (file)
@@ -1,3 +1,18 @@
+2014-02-13  Javier Fernandez  <jfernandez@igalia.com>
+
+        [CSS Grid Layout] Rename named areas property
+        https://bugs.webkit.org/show_bug.cgi?id=127990
+
+        Reviewed by Sergio Villar Senin.
+
+        From Blink r165891 by <rego@igalia.com>
+
+        The property 'grid-template' has been renamed to 'grid-template-areas'
+        in the last two versions of the spec.
+
+        * Tools/PrettyPrinting/css.js:
+        * UserInterface/External/CodeMirror/css.js:
+
 2014-02-11  Brian Burg  <bburg@apple.com>
 
         Web Inspector: DOMStorageView should listen for events from DOMStorageObject
index d8c30cf..799ea16 100644 (file)
@@ -377,7 +377,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
     "font-weight", "grid-cell", "grid-column", "grid-column-align",
     "grid-column-sizing", "grid-column-span", "grid-columns", "grid-flow",
     "grid-row", "grid-row-align", "grid-row-sizing", "grid-row-span",
-    "grid-rows", "grid-template", "hanging-punctuation", "height", "hyphens",
+    "grid-rows", "grid-template-areas", "hanging-punctuation", "height", "hyphens",
     "icon", "image-orientation", "image-rendering", "image-resolution",
     "inline-box-align", "justify-content", "left", "letter-spacing",
     "line-break", "line-height", "line-stacking", "line-stacking-ruby",
index 77545df..5ddef68 100644 (file)
@@ -377,7 +377,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
     "font-weight", "grid-cell", "grid-column", "grid-column-align",
     "grid-column-sizing", "grid-column-span", "grid-columns", "grid-flow",
     "grid-row", "grid-row-align", "grid-row-sizing", "grid-row-span",
-    "grid-rows", "grid-template", "hanging-punctuation", "height", "hyphens",
+    "grid-rows", "grid-template-areas", "hanging-punctuation", "height", "hyphens",
     "icon", "image-orientation", "image-rendering", "image-resolution",
     "inline-box-align", "justify-content", "left", "letter-spacing",
     "line-break", "line-height", "line-stacking", "line-stacking-ruby",