Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=78256
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 21:59:07 +0000 (21:59 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 21:59:07 +0000 (21:59 +0000)
Rename line-grid-snap to line-snap so that it matches the draft proposal for the
property.

Reviewed by Dan Bernstein.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator LineSnap):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::alignBoxesInBlockDirection):
(WebCore::RootInlineBox::lineSnapAdjustment):
* rendering/RootInlineBox.h:
(RootInlineBox):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):

LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=78256

Rename line-grid-snap to line-snap so that it matches the draft proposal for the
property.

Reviewed by Dan Bernstein.

* fast/line-grid/line-grid-contains-value.html:
* fast/line-grid/line-grid-floating.html:
* fast/line-grid/line-grid-inside-columns.html:
* fast/line-grid/line-grid-into-columns.html:
* fast/line-grid/line-grid-into-floats.html:
* fast/line-grid/line-grid-nested.html:
* fast/line-grid/line-grid-positioned.html:
* fast/line-grid/line-grid-snap-parsing.html: Removed.
* fast/line-grid/line-snap-parsing-expected.txt: Added.
* fast/line-grid/line-snap-parsing.html: Added.
* fast/line-grid/script-tests/line-grid-snap-parsing.js: Removed.
* fast/line-grid/script-tests/line-snap-parsing.js: Added.

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

27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/line-grid/line-grid-contains-value.html
LayoutTests/fast/line-grid/line-grid-floating.html
LayoutTests/fast/line-grid/line-grid-inside-columns.html
LayoutTests/fast/line-grid/line-grid-into-columns.html
LayoutTests/fast/line-grid/line-grid-into-floats.html
LayoutTests/fast/line-grid/line-grid-nested.html
LayoutTests/fast/line-grid/line-grid-positioned.html
LayoutTests/fast/line-grid/line-grid-snap-parsing-expected.txt [deleted file]
LayoutTests/fast/line-grid/line-snap-parsing-expected.txt [new file with mode: 0644]
LayoutTests/fast/line-grid/line-snap-parsing.html [moved from LayoutTests/fast/line-grid/line-grid-snap-parsing.html with 77% similarity]
LayoutTests/fast/line-grid/script-tests/line-snap-parsing.js [moved from LayoutTests/fast/line-grid/script-tests/line-grid-snap-parsing.js with 57% similarity]
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/CSSStyleApplyProperty.cpp
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h

index 777ed06..d0346cd 100644 (file)
@@ -1,3 +1,25 @@
+2012-02-09  David Hyatt  <hyatt@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=78256
+        
+        Rename line-grid-snap to line-snap so that it matches the draft proposal for the
+        property.
+        
+        Reviewed by Dan Bernstein.
+
+        * fast/line-grid/line-grid-contains-value.html:
+        * fast/line-grid/line-grid-floating.html:
+        * fast/line-grid/line-grid-inside-columns.html:
+        * fast/line-grid/line-grid-into-columns.html:
+        * fast/line-grid/line-grid-into-floats.html:
+        * fast/line-grid/line-grid-nested.html:
+        * fast/line-grid/line-grid-positioned.html:
+        * fast/line-grid/line-grid-snap-parsing.html: Removed.
+        * fast/line-grid/line-snap-parsing-expected.txt: Added.
+        * fast/line-grid/line-snap-parsing.html: Added.
+        * fast/line-grid/script-tests/line-grid-snap-parsing.js: Removed.
+        * fast/line-grid/script-tests/line-snap-parsing.js: Added.
+
 2012-02-09  Julien Chaffraix  <jchaffraix@webkit.org>
 
         Unreviewed rebaseline, yet another small font difference.
index 96f78f0..df1c6de 100644 (file)
@@ -2,14 +2,14 @@
 <html>
 <head>
 <style>
-.grid { -webkit-line-grid: simple; -webkit-line-grid-snap: baseline; 
+.grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 
         font-size:36px; position:absolute;
         padding:10px; }
 </style>
 </head>
 <body>
 <div style="left:10px; top:10px; width:600px" class="grid">
-<div style="-webkit-line-grid-snap:contain;font-size:48px">
+<div style="-webkit-line-snap:contain;font-size:48px">
 This header should be centered in the grid lines.
 </div>
 <div style="font-size:12px">
index 66a8378..68c6d04 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <style>
-.grid { -webkit-line-grid: simple; -webkit-line-grid-snap: baseline; 
+.grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 
         font-size:36px; float:left;border:2px solid black;
         padding:10px; margin:5px }
 </style>
index 4af3acd..b4a57e6 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <style>
-.grid { -webkit-line-grid: simple; -webkit-line-grid-snap: baseline; 
+.grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 
         font-size:36px; }</style>
 </head>
 <body>
index 8d5faaf..6db5585 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <style>
-.grid { -webkit-line-grid: simple; -webkit-line-grid-snap: baseline; 
+.grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 
         font-size:36px; position:relative; width:800px}</style>
 </head>
 <body style="margin:0">
index aa55510..6ca6b4b 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <style>
-.grid { -webkit-line-grid: simple; -webkit-line-grid-snap: baseline; 
+.grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 
         font-size:36px; 
         padding:10px; }
 </style>
index a24d309..b611d1e 100644 (file)
@@ -17,4 +17,4 @@ if (window.layoutTestController)
     </div>
   </div>
 This test passes if it doesn't crash.
-</body>
\ No newline at end of file
+</body>
index 078c817..48957c0 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <style>
-.grid { -webkit-line-grid: simple; -webkit-line-grid-snap: baseline; 
+.grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 
         font-size:36px; position:absolute;border:2px solid black;
         padding:10px; }
 </style>
diff --git a/LayoutTests/fast/line-grid/line-grid-snap-parsing-expected.txt b/LayoutTests/fast/line-grid/line-grid-snap-parsing-expected.txt
deleted file mode 100644 (file)
index 9d02389..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Test parsing of the CSS line-grid property.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS test("-webkit-line-grid-snap: none") is "none"
-PASS test("-webkit-line-grid-snap: baseline") is "baseline"
-PASS test("-webkit-line-grid-snap: contain") is "contain"
-PASS test("-webkit-line-grid-snap: ;") is ""
-PASS test("-webkit-line-grid-snap: 1") is ""
-PASS test("-webkit-line-grid-snap: 1.2") is ""
-PASS test("-webkit-line-grid-snap: -1") is ""
-PASS test("-webkit-line-grid-snap: 12px") is ""
-PASS testComputedStyle("none") is "none"
-PASS testComputedStyle("") is "none"
-PASS testComputedStyle("12px") is "none"
-PASS testInherited("none") is "none"
-PASS testInherited("baseline") is "baseline"
-PASS testInherited("contain") is "contain"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/line-grid/line-snap-parsing-expected.txt b/LayoutTests/fast/line-grid/line-snap-parsing-expected.txt
new file mode 100644 (file)
index 0000000..58c3a00
--- /dev/null
@@ -0,0 +1,23 @@
+Test parsing of the CSS line-snap property.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("-webkit-line-snap: none") is "none"
+PASS test("-webkit-line-snap: baseline") is "baseline"
+PASS test("-webkit-line-snap: contain") is "contain"
+PASS test("-webkit-line-snap: ;") is ""
+PASS test("-webkit-line-snap: 1") is ""
+PASS test("-webkit-line-snap: 1.2") is ""
+PASS test("-webkit-line-snap: -1") is ""
+PASS test("-webkit-line-snap: 12px") is ""
+PASS testComputedStyle("none") is "none"
+PASS testComputedStyle("") is "none"
+PASS testComputedStyle("12px") is "none"
+PASS testInherited("none") is "none"
+PASS testInherited("baseline") is "baseline"
+PASS testInherited("contain") is "contain"
+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/line-grid-snap-parsing.js"></script>
+<script src="script-tests/line-snap-parsing.js"></script>
 <script src="../../fast/js/resources/js-test-post.js"></script>
 </body>
 </html>
@@ -1,16 +1,16 @@
-description('Test parsing of the CSS line-grid property.');
+description('Test parsing of the CSS line-snap property.');
 
 function test(declaration) {
     var div = document.createElement("div");
     div.setAttribute("style", declaration);
-    return div.style.webkitLineGridSnap;
+    return div.style.webkitLineSnap;
 }
 
 function testComputedStyle(value) {
     var div = document.createElement("div");
     document.body.appendChild(div);
-    div.style.setProperty("-webkit-line-grid-snap", value);
-    var webkitFlowComputedValue = getComputedStyle(div).getPropertyValue("-webkit-line-grid-snap");
+    div.style.setProperty("-webkit-line-snap", value);
+    var webkitFlowComputedValue = getComputedStyle(div).getPropertyValue("-webkit-line-snap");
     document.body.removeChild(div);
     return webkitFlowComputedValue;
 }
@@ -18,12 +18,12 @@ function testComputedStyle(value) {
 function testInherited(parentValue) {
     var parentDiv = document.createElement("div");
     document.body.appendChild(parentDiv);
-    parentDiv.style.setProperty("-webkit-line-grid-snap", parentValue);
+    parentDiv.style.setProperty("-webkit-line-snap", parentValue);
 
     var childDiv = document.createElement("div");
     parentDiv.appendChild(childDiv);
 
-    var childWebKitFlowComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-line-grid-snap");
+    var childWebKitFlowComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-line-snap");
 
     parentDiv.removeChild(childDiv);
     document.body.removeChild(parentDiv);
@@ -31,14 +31,14 @@ function testInherited(parentValue) {
     return childWebKitFlowComputedValue;
 }
 
-shouldBeEqualToString('test("-webkit-line-grid-snap: none")', "none");
-shouldBeEqualToString('test("-webkit-line-grid-snap: baseline")', "baseline");
-shouldBeEqualToString('test("-webkit-line-grid-snap: contain")', "contain");
-shouldBeEqualToString('test("-webkit-line-grid-snap: ;")', "");
-shouldBeEqualToString('test("-webkit-line-grid-snap: 1")', "");
-shouldBeEqualToString('test("-webkit-line-grid-snap: 1.2")', "");
-shouldBeEqualToString('test("-webkit-line-grid-snap: -1")', "");
-shouldBeEqualToString('test("-webkit-line-grid-snap: 12px")', "");
+shouldBeEqualToString('test("-webkit-line-snap: none")', "none");
+shouldBeEqualToString('test("-webkit-line-snap: baseline")', "baseline");
+shouldBeEqualToString('test("-webkit-line-snap: contain")', "contain");
+shouldBeEqualToString('test("-webkit-line-snap: ;")', "");
+shouldBeEqualToString('test("-webkit-line-snap: 1")', "");
+shouldBeEqualToString('test("-webkit-line-snap: 1.2")', "");
+shouldBeEqualToString('test("-webkit-line-snap: -1")', "");
+shouldBeEqualToString('test("-webkit-line-snap: 12px")', "");
 
 shouldBeEqualToString('testComputedStyle("none")', "none");
 shouldBeEqualToString('testComputedStyle("")', "none");
index 11c9c4d..e673f25 100644 (file)
@@ -1,3 +1,42 @@
+2012-02-09  David Hyatt  <hyatt@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=78256
+        
+        Rename line-grid-snap to line-snap so that it matches the draft proposal for the
+        property.
+
+        Reviewed by Dan Bernstein.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator LineSnap):
+        * css/CSSProperty.cpp:
+        (WebCore::CSSProperty::isInheritedProperty):
+        * css/CSSPropertyNames.in:
+        * css/CSSStyleApplyProperty.cpp:
+        (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::alignBoxesInBlockDirection):
+        (WebCore::RootInlineBox::lineSnapAdjustment):
+        * rendering/RootInlineBox.h:
+        (RootInlineBox):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::diff):
+        * rendering/style/RenderStyle.h:
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+        (WebCore::StyleRareInheritedData::operator==):
+        * rendering/style/StyleRareInheritedData.h:
+        (StyleRareInheritedData):
+
 2012-02-09  Benjamin Poulain  <bpoulain@apple.com>
 
         The localization of htmlSelectMultipleItems() needs better support of pluralization
index d0131ee..97f02fc 100644 (file)
@@ -243,7 +243,7 @@ static const int computedProperties[] = {
     CSSPropertyWebkitLineBreak,
     CSSPropertyWebkitLineClamp,
     CSSPropertyWebkitLineGrid,
-    CSSPropertyWebkitLineGridSnap,
+    CSSPropertyWebkitLineSnap,
     CSSPropertyWebkitLocale,
     CSSPropertyWebkitMarginBeforeCollapse,
     CSSPropertyWebkitMarginAfterCollapse,
@@ -2207,8 +2207,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             if (style->lineGrid().isNull())
                 return cssValuePool->createIdentifierValue(CSSValueNone);
             return cssValuePool->createValue(style->lineGrid(), CSSPrimitiveValue::CSS_STRING);
-        case CSSPropertyWebkitLineGridSnap:
-            return CSSPrimitiveValue::create(style->lineGridSnap());
+        case CSSPropertyWebkitLineSnap:
+            return CSSPrimitiveValue::create(style->lineSnap());
         case CSSPropertyWebkitWritingMode:
             return cssValuePool->createValue(style->writingMode());
         case CSSPropertyWebkitTextCombine:
index 8a10751..a07f383 100644 (file)
@@ -2049,7 +2049,7 @@ bool CSSParser::parseValue(int propId, bool important)
             }
         }
         break;
-    case CSSPropertyWebkitLineGridSnap:
+    case CSSPropertyWebkitLineSnap:
         if (id == CSSValueNone || id == CSSValueBaseline || id == CSSValueContain)
             validPrimitive = true;
         break;
index a2434dd..fb39e67 100644 (file)
@@ -3158,35 +3158,35 @@ template<> inline CSSPrimitiveValue::operator Hyphens() const
     }
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineGridSnap gridSnap)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_IDENT;
     switch (gridSnap) {
-    case LineGridSnapNone:
+    case LineSnapNone:
         m_value.ident = CSSValueNone;
         break;
-    case LineGridSnapBaseline:
+    case LineSnapBaseline:
         m_value.ident = CSSValueBaseline;
         break;
-    case LineGridSnapContain:
+    case LineSnapContain:
         m_value.ident = CSSValueContain;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator LineGridSnap() const
+template<> inline CSSPrimitiveValue::operator LineSnap() const
 {
     switch (m_value.ident) {
     case CSSValueNone:
-        return LineGridSnapNone;
+        return LineSnapNone;
     case CSSValueBaseline:
-        return LineGridSnapBaseline;
+        return LineSnapBaseline;
     case CSSValueContain:
-        return LineGridSnapContain;
+        return LineSnapContain;
     default:
         ASSERT_NOT_REACHED();
-        return LineGridSnapNone;
+        return LineSnapNone;
     }
 }
 
index 1071bbe..ac1c79c 100644 (file)
@@ -331,7 +331,7 @@ bool CSSProperty::isInheritedProperty(unsigned propertyID)
     case CSSPropertyWebkitLineBoxContain:
     case CSSPropertyWebkitLineBreak:
     case CSSPropertyWebkitLineGrid:
-    case CSSPropertyWebkitLineGridSnap:
+    case CSSPropertyWebkitLineSnap:
     case CSSPropertyWebkitNbspMode:
     case CSSPropertyWebkitPrintColorAdjust:
     case CSSPropertyWebkitRtlOrdering:
index 92070f6..d5a3bfd 100644 (file)
@@ -274,7 +274,7 @@ z-index
 -webkit-line-break
 -webkit-line-clamp
 -webkit-line-grid
--webkit-line-grid-snap
+-webkit-line-snap
 -webkit-logical-width
 -webkit-logical-height
 -webkit-margin-after-collapse
index 524ed77..37329ce 100644 (file)
@@ -1926,7 +1926,7 @@ CSSStyleApplyProperty::CSSStyleApplyProperty()
     setPropertyHandler(CSSPropertyWebkitHyphenateLimitLines, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitLines, &RenderStyle::setHyphenationLimitLines, &RenderStyle::initialHyphenationLimitLines, CSSValueNoLimit>::createHandler());
 
     setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString<MapNoneToNull, &RenderStyle::lineGrid, &RenderStyle::setLineGrid, &RenderStyle::initialLineGrid>::createHandler());
-    setPropertyHandler(CSSPropertyWebkitLineGridSnap, ApplyPropertyDefault<LineGridSnap, &RenderStyle::lineGridSnap, LineGridSnap, &RenderStyle::setLineGridSnap, LineGridSnap, &RenderStyle::initialLineGridSnap>::createHandler());
+    setPropertyHandler(CSSPropertyWebkitLineSnap, ApplyPropertyDefault<LineSnap, &RenderStyle::lineSnap, LineSnap, &RenderStyle::setLineSnap, LineSnap, &RenderStyle::initialLineSnap>::createHandler());
 
     setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault<TextCombine, &RenderStyle::textCombine, TextCombine, &RenderStyle::setTextCombine, TextCombine, &RenderStyle::initialTextCombine>::createHandler());
     setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault<TextEmphasisPosition, &RenderStyle::textEmphasisPosition, TextEmphasisPosition, &RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &RenderStyle::initialTextEmphasisPosition>::createHandler());
index 7d84a81..5568835 100644 (file)
@@ -4070,7 +4070,7 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
     case CSSPropertyWebkitHyphenateLimitBefore:
     case CSSPropertyWebkitHyphenateLimitLines:
     case CSSPropertyWebkitLineGrid:
-    case CSSPropertyWebkitLineGridSnap:
+    case CSSPropertyWebkitLineSnap:
     case CSSPropertyWebkitTextCombine:
     case CSSPropertyWebkitTextEmphasisPosition:
     case CSSPropertyWebkitTextEmphasisStyle:
index 2acfaf0..8d84bfe 100644 (file)
@@ -286,7 +286,7 @@ LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G
         heightOfBlock += annotationsAdjustment;
     }
 
-    LayoutUnit gridSnapAdjustment = lineGridSnapAdjustment();
+    LayoutUnit gridSnapAdjustment = lineSnapAdjustment();
     if (gridSnapAdjustment) {
         adjustBlockDirectionPosition(gridSnapAdjustment);
         heightOfBlock += gridSnapAdjustment;
@@ -326,11 +326,11 @@ int RootInlineBox::beforeAnnotationsAdjustment() const
     return result;
 }
 
-LayoutUnit RootInlineBox::lineGridSnapAdjustment(LayoutUnit delta) const
+LayoutUnit RootInlineBox::lineSnapAdjustment(LayoutUnit delta) const
 {
     // If our block doesn't have snapping turned on, do nothing.
     // FIXME: Implement bounds snapping.
-    if (block()->style()->lineGridSnap() == LineGridSnapNone)
+    if (block()->style()->lineSnap() == LineSnapNone)
         return 0;
 
     // Get the current line grid and offset.
@@ -377,7 +377,7 @@ LayoutUnit RootInlineBox::lineGridSnapAdjustment(LayoutUnit delta) const
             firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderBefore() - lineGrid->paddingBefore() + lineGridPaginationOrigin;
     }
 
-    if (block()->style()->lineGridSnap() == LineGridSnapContain) {
+    if (block()->style()->lineSnap() == LineSnapContain) {
         // Compute the desired offset from the text-top of a grid line.
         // Look at our height (logicalHeight()).
         // Look at the total available height. It's going to be (textBottom - textTop) + (n-1)*(multiple with leading)
@@ -414,7 +414,7 @@ LayoutUnit RootInlineBox::lineGridSnapAdjustment(LayoutUnit delta) const
         return result;
     
     // Put ourselves at the top of the next page to force a snap onto the new grid established by that page.
-    return lineGridSnapAdjustment(newPageLogicalTop - (blockOffset + lineTopWithLeading()));
+    return lineSnapAdjustment(newPageLogicalTop - (blockOffset + lineTopWithLeading()));
 }
 
 GapRects RootInlineBox::lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 
index fef7ced..901bcff 100644 (file)
@@ -183,7 +183,7 @@ public:
 private:
     void setHasEllipsisBox(bool hasEllipsisBox) { m_hasEllipsisBoxOrHyphen = hasEllipsisBox; }
     
-    LayoutUnit lineGridSnapAdjustment(LayoutUnit delta = 0) const;
+    LayoutUnit lineSnapAdjustment(LayoutUnit delta = 0) const;
 
     int beforeAnnotationsAdjustment() const;
 
index 08bfbf9..e81ac03 100644 (file)
@@ -466,7 +466,7 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
             || rareInheritedData->textEmphasisCustomMark != other->rareInheritedData->textEmphasisCustomMark
             || rareInheritedData->m_lineBoxContain != other->rareInheritedData->m_lineBoxContain
             || rareInheritedData->m_lineGrid != other->rareInheritedData->m_lineGrid
-            || rareInheritedData->m_lineGridSnap != other->rareInheritedData->m_lineGridSnap)
+            || rareInheritedData->m_lineSnap != other->rareInheritedData->m_lineSnap)
             return StyleDifferenceLayout;
 
         if (!rareInheritedData->shadowDataEquivalent(*other->rareInheritedData.get()))
index 74fae1d..560ee1c 100644 (file)
@@ -903,7 +903,7 @@ public:
     RegionOverflow regionOverflow() const { return static_cast<RegionOverflow>(rareNonInheritedData->m_regionOverflow); }
 
     const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid; }
-    LineGridSnap lineGridSnap() const { return static_cast<LineGridSnap>(rareInheritedData->m_lineGridSnap); }
+    LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData->m_lineSnap); }
 
     WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedData->m_wrapFlow); }
     WrapThrough wrapThrough() const { return static_cast<WrapThrough>(rareNonInheritedData->m_wrapThrough); }
@@ -1302,7 +1302,7 @@ public:
     // End CSS3 Setters
 
     void setLineGrid(const AtomicString& lineGrid) { SET_VAR(rareInheritedData, m_lineGrid, lineGrid); }
-    void setLineGridSnap(LineGridSnap lineGridSnap) { SET_VAR(rareInheritedData, m_lineGridSnap, lineGridSnap); }
+    void setLineSnap(LineSnap lineSnap) { SET_VAR(rareInheritedData, m_lineSnap, lineSnap); }
 
     void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInheritedData, m_flowThread, flowThread); }
     void setRegionThread(const AtomicString& regionThread) { SET_VAR(rareNonInheritedData, m_regionThread, regionThread); }
@@ -1631,7 +1631,7 @@ public:
 #endif
 
     static const AtomicString& initialLineGrid() { return nullAtom; }
-    static LineGridSnap initialLineGridSnap() { return LineGridSnapNone; }
+    static LineSnap initialLineSnap() { return LineSnapNone; }
 
     static const AtomicString& initialFlowThread() { return nullAtom; }
     static const AtomicString& initialRegionThread() { return nullAtom; }
index 0ce3d88..77ff257 100644 (file)
@@ -454,7 +454,7 @@ enum RegionOverflow { AutoRegionOverflow, BreakRegionOverflow };
 
 enum ColumnAxis { HorizontalColumnAxis, VerticalColumnAxis, AutoColumnAxis };
 
-enum LineGridSnap { LineGridSnapNone, LineGridSnapBaseline, LineGridSnapContain };
+enum LineSnap { LineSnapNone, LineSnapBaseline, LineSnapContain };
 
 enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowLeft, WrapFlowRight, WrapFlowMaximum, WrapFlowClear };
 
index 9dda82d..6085601 100644 (file)
@@ -53,7 +53,7 @@ StyleRareInheritedData::StyleRareInheritedData()
     , textEmphasisPosition(TextEmphasisPositionOver)
     , m_lineBoxContain(RenderStyle::initialLineBoxContain())
     , m_imageRendering(RenderStyle::initialImageRendering())
-    , m_lineGridSnap(RenderStyle::initialLineGridSnap())
+    , m_lineSnap(RenderStyle::initialLineSnap())
     , hyphenationLimitBefore(-1)
     , hyphenationLimitAfter(-1)
     , hyphenationLimitLines(-1)
@@ -97,7 +97,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
     , textEmphasisPosition(o.textEmphasisPosition)
     , m_lineBoxContain(o.m_lineBoxContain)
     , m_imageRendering(o.m_imageRendering)
-    , m_lineGridSnap(o.m_lineGridSnap)
+    , m_lineSnap(o.m_lineSnap)
     , hyphenationString(o.hyphenationString)
     , hyphenationLimitBefore(o.hyphenationLimitBefore)
     , hyphenationLimitAfter(o.hyphenationLimitAfter)
@@ -168,7 +168,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
         && QuotesData::equal(quotes.get(), o.quotes.get())
         && m_lineGrid == o.m_lineGrid
         && m_imageRendering == o.m_imageRendering
-        && m_lineGridSnap == o.m_lineGridSnap;
+        && m_lineSnap == o.m_lineSnap;
 }
 
 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
index fd57969..0721f06 100644 (file)
@@ -91,7 +91,7 @@ public:
     unsigned m_lineBoxContain: 7; // LineBoxContain
     // CSS Image Values Level 3
     unsigned m_imageRendering : 2; // EImageRendering
-    unsigned m_lineGridSnap : 2; // LineGridSnap
+    unsigned m_lineSnap : 2; // LineSnap
 
     AtomicString hyphenationString;
     short hyphenationLimitBefore;