[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

hyatt at apple.com hyatt at apple.com
Wed Dec 22 13:53:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5ac5fbac3012c026be41ed692260ce3de973e00c
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 28 21:16:50 2010 +0000

    Right now we have two properties named margin-top-collapse and margin-after-collapse.  They are proprietary and only used by Safari RSS.
    
    Reviewed by Sam Weinig.
    
    I am adding margin-before-collapse and margin-after-collapse and just aliasing the old properties to the new ones.
    This way we have some names that are directionally independent.
    
    Note that these properties aren't like other directional properties.  They are about what to do with the before side and after side of
    your block's margins when collapsing with adjacent blocks.  The meaning of before/after depend on the block-flow directionality
    of the containing block.
    
    Computed style tests all changed and the remove-shorthand.html test covers manipulation of the shorthand.
    
    WebCore:
    
    * css/CSSComputedStyleDeclaration.cpp:
    (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
    * css/CSSParser.cpp:
    (WebCore::CSSParser::parseValue):
    * css/CSSPropertyLonghand.cpp:
    (WebCore::initShorthandMap):
    * css/CSSPropertyNames.in:
    * css/CSSStyleSelector.cpp:
    (WebCore::CSSStyleSelector::applyProperty):
    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::MarginInfo::MarginInfo):
    (WebCore::RenderBlock::isSelfCollapsingBlock):
    (WebCore::RenderBlock::collapseMargins):
    (WebCore::RenderBlock::layoutBlockChild):
    * rendering/style/RenderStyle.cpp:
    (WebCore::RenderStyle::diff):
    * rendering/style/RenderStyle.h:
    (WebCore::InheritedFlags::marginBeforeCollapse):
    (WebCore::InheritedFlags::marginAfterCollapse):
    (WebCore::InheritedFlags::setMarginBeforeCollapse):
    (WebCore::InheritedFlags::setMarginAfterCollapse):
    (WebCore::InheritedFlags::initialMarginBeforeCollapse):
    (WebCore::InheritedFlags::initialMarginAfterCollapse):
    * rendering/style/StyleRareNonInheritedData.cpp:
    (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
    (WebCore::StyleRareNonInheritedData::operator==):
    * rendering/style/StyleRareNonInheritedData.h:
    
    LayoutTests:
    
    * fast/css/remove-shorthand-expected.txt:
    * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
    * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
    * svg/css/getComputedStyle-basic-expected.txt:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 01820d6..9aae902 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-28  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Right now we have two properties named margin-top-collapse and margin-after-collapse.  They are proprietary and only used by Safari RSS.
+
+        I am adding margin-before-collapse and margin-after-collapse and just aliasing the old properties to the new ones.
+        This way we have some names that are directionally independent.
+
+        Note that these properties aren't like other directional properties.  They are about what to do with the before side and after side of
+        your block's margins when collapsing with adjacent blocks.  The meaning of before/after depend on the block-flow directionality
+        of the containing block.
+
+        Computed style tests all changed and the remove-shorthand.html test covers manipulation of the shorthand.
+
+        * fast/css/remove-shorthand-expected.txt:
+        * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
+        * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * svg/css/getComputedStyle-basic-expected.txt:
+
 2010-09-28  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Gustavo Noronha Silva.
diff --git a/LayoutTests/fast/css/remove-shorthand-expected.txt b/LayoutTests/fast/css/remove-shorthand-expected.txt
index 26abc37..19a9e9b 100644
--- a/LayoutTests/fast/css/remove-shorthand-expected.txt
+++ b/LayoutTests/fast/css/remove-shorthand-expected.txt
@@ -19,7 +19,7 @@ Removing -webkit-columns removes -webkit-column-width, -webkit-column-count.
 Removing -webkit-column-rule removes -webkit-column-rule-width, -webkit-column-rule-style, -webkit-column-rule-color.
 Removing list-style removes list-style-type, list-style-position, list-style-image.
 Removing margin removes margin-top, margin-right, margin-bottom, margin-left.
-Removing -webkit-margin-collapse removes -webkit-margin-top-collapse, -webkit-margin-bottom-collapse.
+Removing -webkit-margin-collapse removes -webkit-margin-before-collapse, -webkit-margin-after-collapse.
 Removing -webkit-marquee removes -webkit-marquee-direction, -webkit-marquee-increment, -webkit-marquee-repetition, -webkit-marquee-style, -webkit-marquee-speed.
 Removing -webkit-mask removes -webkit-mask-image, -webkit-mask-repeat-x, -webkit-mask-repeat-y, -webkit-mask-attachment, -webkit-mask-position-x, -webkit-mask-position-y, -webkit-mask-origin, -webkit-mask-clip.
 Removing -webkit-mask-position removes -webkit-mask-position-x, -webkit-mask-position-y.
diff --git a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
index c642012..27ac2ff 100644
--- a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
+++ b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-expected.txt
@@ -139,8 +139,8 @@ zoom: 1;
 -webkit-highlight: none;
 -webkit-line-break: normal;
 -webkit-line-clamp: none;
--webkit-margin-bottom-collapse: collapse;
--webkit-margin-top-collapse: collapse;
+-webkit-margin-before-collapse: collapse;
+-webkit-margin-after-collapse: collapse;
 -webkit-marquee-direction: auto;
 -webkit-marquee-increment: 6px;
 -webkit-marquee-repetition: infinite;
diff --git a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
index 1f742b8..67bdc27 100644
--- a/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
+++ b/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
@@ -138,8 +138,8 @@ Computed style of an element whose parent's 'display' value is 'none':
     -webkit-highlight: none
     -webkit-line-break: normal
     -webkit-line-clamp: none
-    -webkit-margin-bottom-collapse: collapse
-    -webkit-margin-top-collapse: collapse
+    -webkit-margin-before-collapse: collapse
+    -webkit-margin-after-collapse: collapse
     -webkit-marquee-direction: auto
     -webkit-marquee-increment: 6px
     -webkit-marquee-repetition: infinite
diff --git a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
index 757db21..4ea73ad 100644
--- a/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
+++ b/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
@@ -276,10 +276,10 @@ rect: style.getPropertyValue(-webkit-line-break) : normal
 rect: style.getPropertyCSSValue(-webkit-line-break) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-line-clamp) : none
 rect: style.getPropertyCSSValue(-webkit-line-clamp) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-margin-bottom-collapse) : collapse
-rect: style.getPropertyCSSValue(-webkit-margin-bottom-collapse) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-margin-top-collapse) : collapse
-rect: style.getPropertyCSSValue(-webkit-margin-top-collapse) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-margin-before-collapse) : collapse
+rect: style.getPropertyCSSValue(-webkit-margin-before-collapse) : [object CSSPrimitiveValue]
+rect: style.getPropertyValue(-webkit-margin-after-collapse) : collapse
+rect: style.getPropertyCSSValue(-webkit-margin-after-collapse) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-marquee-direction) : auto
 rect: style.getPropertyCSSValue(-webkit-marquee-direction) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-marquee-increment) : 6px
@@ -698,10 +698,10 @@ g: style.getPropertyValue(-webkit-line-break) : normal
 g: style.getPropertyCSSValue(-webkit-line-break) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-line-clamp) : none
 g: style.getPropertyCSSValue(-webkit-line-clamp) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-margin-bottom-collapse) : collapse
-g: style.getPropertyCSSValue(-webkit-margin-bottom-collapse) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-margin-top-collapse) : collapse
-g: style.getPropertyCSSValue(-webkit-margin-top-collapse) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-margin-before-collapse) : collapse
+g: style.getPropertyCSSValue(-webkit-margin-before-collapse) : [object CSSPrimitiveValue]
+g: style.getPropertyValue(-webkit-margin-after-collapse) : collapse
+g: style.getPropertyCSSValue(-webkit-margin-after-collapse) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-marquee-direction) : auto
 g: style.getPropertyCSSValue(-webkit-marquee-direction) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-marquee-increment) : 6px
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8806f7a..6cf1681 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,46 @@
+2010-09-28  David Hyatt  <hyatt at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Right now we have two properties named margin-top-collapse and margin-after-collapse.  They are proprietary and only used by Safari RSS.
+
+        I am adding margin-before-collapse and margin-after-collapse and just aliasing the old properties to the new ones.
+        This way we have some names that are directionally independent.
+
+        Note that these properties aren't like other directional properties.  They are about what to do with the before side and after side of
+        your block's margins when collapsing with adjacent blocks.  The meaning of before/after depend on the block-flow directionality
+        of the containing block.
+
+        Computed style tests all changed and the remove-shorthand.html test covers manipulation of the shorthand.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        * css/CSSPropertyLonghand.cpp:
+        (WebCore::initShorthandMap):
+        * css/CSSPropertyNames.in:
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::MarginInfo::MarginInfo):
+        (WebCore::RenderBlock::isSelfCollapsingBlock):
+        (WebCore::RenderBlock::collapseMargins):
+        (WebCore::RenderBlock::layoutBlockChild):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::diff):
+        * rendering/style/RenderStyle.h:
+        (WebCore::InheritedFlags::marginBeforeCollapse):
+        (WebCore::InheritedFlags::marginAfterCollapse):
+        (WebCore::InheritedFlags::setMarginBeforeCollapse):
+        (WebCore::InheritedFlags::setMarginAfterCollapse):
+        (WebCore::InheritedFlags::initialMarginBeforeCollapse):
+        (WebCore::InheritedFlags::initialMarginAfterCollapse):
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator==):
+        * rendering/style/StyleRareNonInheritedData.h:
+
 2010-09-28  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Gustavo Noronha Silva.
diff --git a/WebCore/css/CSSComputedStyleDeclaration.cpp b/WebCore/css/CSSComputedStyleDeclaration.cpp
index 1333239..1cc7996 100644
--- a/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -192,8 +192,8 @@ static const int computedProperties[] = {
     CSSPropertyWebkitHighlight,
     CSSPropertyWebkitLineBreak,
     CSSPropertyWebkitLineClamp,
-    CSSPropertyWebkitMarginBottomCollapse,
-    CSSPropertyWebkitMarginTopCollapse,
+    CSSPropertyWebkitMarginBeforeCollapse,
+    CSSPropertyWebkitMarginAfterCollapse,
     CSSPropertyWebkitMarqueeDirection,
     CSSPropertyWebkitMarqueeIncrement,
     CSSPropertyWebkitMarqueeRepetition,
@@ -1362,10 +1362,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
         case CSSPropertyWebkitFontSizeDelta:
             // Not a real style property -- used by the editing engine -- so has no computed value.
             break;
-        case CSSPropertyWebkitMarginBottomCollapse:
-            return CSSPrimitiveValue::create(style->marginBottomCollapse());
-        case CSSPropertyWebkitMarginTopCollapse:
-            return CSSPrimitiveValue::create(style->marginTopCollapse());
+        case CSSPropertyWebkitMarginAfterCollapse:
+            return CSSPrimitiveValue::create(style->marginAfterCollapse());
+        case CSSPropertyWebkitMarginBeforeCollapse:
+            return CSSPrimitiveValue::create(style->marginBeforeCollapse());
         case CSSPropertyWebkitPerspective:
             if (!style->hasPerspective())
                 return CSSPrimitiveValue::createIdentifier(CSSValueNone);
diff --git a/WebCore/css/CSSParser.cpp b/WebCore/css/CSSParser.cpp
index 5479bdf..de4a991 100644
--- a/WebCore/css/CSSParser.cpp
+++ b/WebCore/css/CSSParser.cpp
@@ -1431,8 +1431,8 @@ bool CSSParser::parseValue(int propId, bool important)
         return false;
     }
     case CSSPropertyWebkitMarginCollapse: {
-        const int properties[2] = { CSSPropertyWebkitMarginTopCollapse,
-            CSSPropertyWebkitMarginBottomCollapse };
+        const int properties[2] = { CSSPropertyWebkitMarginBeforeCollapse,
+            CSSPropertyWebkitMarginAfterCollapse };
         if (num == 1) {
             ShorthandScope scope(this, CSSPropertyWebkitMarginCollapse);
             if (!parseValue(properties[0], important))
@@ -1449,6 +1449,8 @@ bool CSSParser::parseValue(int propId, bool important)
         }
         return false;
     }
+    case CSSPropertyWebkitMarginBeforeCollapse:
+    case CSSPropertyWebkitMarginAfterCollapse:
     case CSSPropertyWebkitMarginTopCollapse:
     case CSSPropertyWebkitMarginBottomCollapse:
         if (id == CSSValueCollapse || id == CSSValueSeparate || id == CSSValueDiscard)
diff --git a/WebCore/css/CSSPropertyLonghand.cpp b/WebCore/css/CSSPropertyLonghand.cpp
index a4b3325..acca036 100644
--- a/WebCore/css/CSSPropertyLonghand.cpp
+++ b/WebCore/css/CSSPropertyLonghand.cpp
@@ -98,7 +98,7 @@ static void initShorthandMap(ShorthandMap& shorthandMap)
     };
     SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSSPropertyMargin, marginProperties);
 
-    static const int marginCollapseProperties[] = { CSSPropertyWebkitMarginTopCollapse, CSSPropertyWebkitMarginBottomCollapse };
+    static const int marginCollapseProperties[] = { CSSPropertyWebkitMarginBeforeCollapse, CSSPropertyWebkitMarginAfterCollapse };
     SET_SHORTHAND_MAP_ENTRY(shorthandMap, CSSPropertyWebkitMarginCollapse, marginCollapseProperties);
 
     static const int marqueeProperties[] = {
diff --git a/WebCore/css/CSSPropertyNames.in b/WebCore/css/CSSPropertyNames.in
index addecca..8584e5f 100644
--- a/WebCore/css/CSSPropertyNames.in
+++ b/WebCore/css/CSSPropertyNames.in
@@ -232,13 +232,15 @@ z-index
 -webkit-line-clamp
 -webkit-logical-width
 -webkit-logical-height
+-webkit-margin-after-collapse
+-webkit-margin-before-collapse
 -webkit-margin-bottom-collapse
+-webkit-margin-top-collapse
 -webkit-margin-collapse
 -webkit-margin-after
 -webkit-margin-before
 -webkit-margin-end
 -webkit-margin-start
--webkit-margin-top-collapse
 -webkit-marquee
 -webkit-marquee-direction
 -webkit-marquee-increment
diff --git a/WebCore/css/CSSStyleSelector.cpp b/WebCore/css/CSSStyleSelector.cpp
index d0a3994..ae9d912 100644
--- a/WebCore/css/CSSStyleSelector.cpp
+++ b/WebCore/css/CSSStyleSelector.cpp
@@ -5158,21 +5158,23 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
     }
     case CSSPropertyWebkitMarginCollapse: {
         if (isInherit) {
-            m_style->setMarginTopCollapse(m_parentStyle->marginTopCollapse());
-            m_style->setMarginBottomCollapse(m_parentStyle->marginBottomCollapse());
+            m_style->setMarginBeforeCollapse(m_parentStyle->marginBeforeCollapse());
+            m_style->setMarginAfterCollapse(m_parentStyle->marginAfterCollapse());
         }
         else if (isInitial) {
-            m_style->setMarginTopCollapse(MCOLLAPSE);
-            m_style->setMarginBottomCollapse(MCOLLAPSE);
+            m_style->setMarginBeforeCollapse(MCOLLAPSE);
+            m_style->setMarginAfterCollapse(MCOLLAPSE);
         }
         return;
     }
 
+    case CSSPropertyWebkitMarginBeforeCollapse:
     case CSSPropertyWebkitMarginTopCollapse:
-        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginTopCollapse, MarginTopCollapse)
+        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginBeforeCollapse, MarginBeforeCollapse)
         return;
+    case CSSPropertyWebkitMarginAfterCollapse:
     case CSSPropertyWebkitMarginBottomCollapse:
-        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginBottomCollapse, MarginBottomCollapse)
+        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(marginAfterCollapse, MarginAfterCollapse)
         return;
     case CSSPropertyWebkitLineClamp: {
         HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp)
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index 7862e7b..d2731d7 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -92,17 +92,17 @@ RenderBlock::MarginInfo::MarginInfo(RenderBlock* block, int beforeBorderPadding,
         && !block->isFloating() && !block->isTableCell() && !block->hasOverflowClip() && !block->isInlineBlockOrInlineTable()
         && !block->isBlockFlowRoot();
 
-    m_canCollapseMarginBeforeWithChildren = m_canCollapseWithChildren && (beforeBorderPadding == 0) && block->style()->marginTopCollapse() != MSEPARATE;
+    m_canCollapseMarginBeforeWithChildren = m_canCollapseWithChildren && (beforeBorderPadding == 0) && block->style()->marginBeforeCollapse() != MSEPARATE;
 
     // If any height other than auto is specified in CSS, then we don't collapse our bottom
     // margins with our children's margins.  To do otherwise would be to risk odd visual
     // effects when the children overflow out of the parent block and yet still collapse
     // with it.  We also don't collapse if we have any bottom border/padding.
     m_canCollapseMarginAfterWithChildren = m_canCollapseWithChildren && (afterBorderPadding == 0) &&
-        (block->style()->logicalHeight().isAuto() && block->style()->logicalHeight().value() == 0) && block->style()->marginBottomCollapse() != MSEPARATE;
+        (block->style()->logicalHeight().isAuto() && block->style()->logicalHeight().value() == 0) && block->style()->marginAfterCollapse() != MSEPARATE;
     
-    m_quirkContainer = block->isTableCell() || block->isBody() || block->style()->marginTopCollapse() == MDISCARD || 
-        block->style()->marginBottomCollapse() == MDISCARD;
+    m_quirkContainer = block->isTableCell() || block->isBody() || block->style()->marginBeforeCollapse() == MDISCARD || 
+        block->style()->marginAfterCollapse() == MDISCARD;
 
     m_posMargin = m_canCollapseMarginBeforeWithChildren ? block->maxTopMargin(true) : 0;
     m_negMargin = m_canCollapseMarginAfterWithChildren ? block->maxTopMargin(false) : 0;
@@ -1022,7 +1022,7 @@ bool RenderBlock::isSelfCollapsingBlock() const
     if (height() > 0
         || isTable() || borderAndPaddingHeight()
         || style()->minHeight().isPositive()
-        || style()->marginTopCollapse() == MSEPARATE || style()->marginBottomCollapse() == MSEPARATE)
+        || style()->marginBeforeCollapse() == MSEPARATE || style()->marginAfterCollapse() == MSEPARATE)
         return false;
 
     bool hasAutoHeight = style()->height().isAuto();
@@ -1479,7 +1479,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
     
     // See if the top margin is quirky. We only care if this child has
     // margins that will collapse with us.
-    bool topQuirk = child->isTopMarginQuirk() || style()->marginTopCollapse() == MDISCARD;
+    bool topQuirk = child->isTopMarginQuirk() || style()->marginBeforeCollapse() == MDISCARD;
 
     if (marginInfo.canCollapseWithMarginBefore()) {
         // This child is collapsing with the top of the
@@ -1532,7 +1532,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
             ypos = height() + collapsedTopPos - collapsedTopNeg;
     }
     else {
-        if (child->style()->marginTopCollapse() == MSEPARATE) {
+        if (child->style()->marginBeforeCollapse() == MSEPARATE) {
             setLogicalHeight(height() + marginInfo.margin() + child->marginTop());
             ypos = height();
         }
@@ -1549,7 +1549,7 @@ int RenderBlock::collapseMargins(RenderBox* child, MarginInfo& marginInfo)
         marginInfo.setNegMargin(child->maxBottomMargin(false));
 
         if (marginInfo.margin())
-            marginInfo.setMarginAfterQuirk(child->isBottomMarginQuirk() || style()->marginBottomCollapse() == MDISCARD);
+            marginInfo.setMarginAfterQuirk(child->isBottomMarginQuirk() || style()->marginAfterCollapse() == MDISCARD);
     }
     
     // If margins would pull us past the top of the next page, then we need to pull back and pretend like the margins
@@ -1810,7 +1810,7 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, int
     child->computeBlockDirectionMargins(this);
 
     // Do not allow a collapse if the margin top collapse style is set to SEPARATE.
-    if (child->style()->marginTopCollapse() == MSEPARATE) {
+    if (child->style()->marginBeforeCollapse() == MSEPARATE) {
         marginInfo.setAtBeforeSideOfBlock(false);
         marginInfo.clearMargin();
     }
@@ -1934,7 +1934,7 @@ void RenderBlock::layoutBlockChild(RenderBox* child, MarginInfo& marginInfo, int
 
     // Update our height now that the child has been placed in the correct position.
     setLogicalHeight(height() + child->height());
-    if (child->style()->marginBottomCollapse() == MSEPARATE) {
+    if (child->style()->marginAfterCollapse() == MSEPARATE) {
         setLogicalHeight(height() + child->marginBottom());
         marginInfo.clearMargin();
     }
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index d1ad4bb..623a298 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -323,8 +323,8 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
 
     if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) {
         if (rareNonInheritedData->m_appearance != other->rareNonInheritedData->m_appearance ||
-            rareNonInheritedData->marginTopCollapse != other->rareNonInheritedData->marginTopCollapse ||
-            rareNonInheritedData->marginBottomCollapse != other->rareNonInheritedData->marginBottomCollapse ||
+            rareNonInheritedData->marginBeforeCollapse != other->rareNonInheritedData->marginBeforeCollapse ||
+            rareNonInheritedData->marginAfterCollapse != other->rareNonInheritedData->marginAfterCollapse ||
             rareNonInheritedData->lineClamp != other->rareNonInheritedData->lineClamp ||
             rareNonInheritedData->textOverflow != other->rareNonInheritedData->textOverflow)
             return StyleDifferenceLayout;
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index b9dc446..480fdb6 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -665,8 +665,8 @@ public:
     EUserDrag userDrag() const { return static_cast<EUserDrag>(rareNonInheritedData->userDrag); }
     EUserSelect userSelect() const { return static_cast<EUserSelect>(rareInheritedData->userSelect); }
     bool textOverflow() const { return rareNonInheritedData->textOverflow; }
-    EMarginCollapse marginTopCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginTopCollapse); }
-    EMarginCollapse marginBottomCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginBottomCollapse); }
+    EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginBeforeCollapse); }
+    EMarginCollapse marginAfterCollapse() const { return static_cast<EMarginCollapse>(rareNonInheritedData->marginAfterCollapse); }
     EWordBreak wordBreak() const { return static_cast<EWordBreak>(rareInheritedData->wordBreak); }
     EWordWrap wordWrap() const { return static_cast<EWordWrap>(rareInheritedData->wordWrap); }
     ENBSPMode nbspMode() const { return static_cast<ENBSPMode>(rareInheritedData->nbspMode); }
@@ -1005,8 +1005,8 @@ public:
     void setUserDrag(EUserDrag d) { SET_VAR(rareNonInheritedData, userDrag, d); }
     void setUserSelect(EUserSelect s) { SET_VAR(rareInheritedData, userSelect, s); }
     void setTextOverflow(bool b) { SET_VAR(rareNonInheritedData, textOverflow, b); }
-    void setMarginTopCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginTopCollapse, c); }
-    void setMarginBottomCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginBottomCollapse, c); }
+    void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginBeforeCollapse, c); }
+    void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(rareNonInheritedData, marginAfterCollapse, c); }
     void setWordBreak(EWordBreak b) { SET_VAR(rareInheritedData, wordBreak, b); }
     void setWordWrap(EWordWrap b) { SET_VAR(rareInheritedData, wordWrap, b); }
     void setNBSPMode(ENBSPMode b) { SET_VAR(rareInheritedData, nbspMode, b); }
@@ -1218,8 +1218,8 @@ public:
     static EUserDrag initialUserDrag() { return DRAG_AUTO; }
     static EUserSelect initialUserSelect() { return SELECT_TEXT; }
     static bool initialTextOverflow() { return false; }
-    static EMarginCollapse initialMarginTopCollapse() { return MCOLLAPSE; }
-    static EMarginCollapse initialMarginBottomCollapse() { return MCOLLAPSE; }
+    static EMarginCollapse initialMarginBeforeCollapse() { return MCOLLAPSE; }
+    static EMarginCollapse initialMarginAfterCollapse() { return MCOLLAPSE; }
     static EWordBreak initialWordBreak() { return NormalWordBreak; }
     static EWordWrap initialWordWrap() { return NormalWordWrap; }
     static ENBSPMode initialNBSPMode() { return NBNORMAL; }
diff --git a/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/WebCore/rendering/style/StyleRareNonInheritedData.cpp
index e293984..e0f7f7a 100644
--- a/WebCore/rendering/style/StyleRareNonInheritedData.cpp
+++ b/WebCore/rendering/style/StyleRareNonInheritedData.cpp
@@ -37,8 +37,8 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
     , m_counterDirectives(0)
     , userDrag(RenderStyle::initialUserDrag())
     , textOverflow(RenderStyle::initialTextOverflow())
-    , marginTopCollapse(MCOLLAPSE)
-    , marginBottomCollapse(MCOLLAPSE)
+    , marginBeforeCollapse(MCOLLAPSE)
+    , marginAfterCollapse(MCOLLAPSE)
     , matchNearestMailBlockquoteColor(RenderStyle::initialMatchNearestMailBlockquoteColor())
     , m_appearance(RenderStyle::initialAppearance())
     , m_borderFit(RenderStyle::initialBorderFit())
@@ -73,8 +73,8 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
     , m_counterDirectives(0)
     , userDrag(o.userDrag)
     , textOverflow(o.textOverflow)
-    , marginTopCollapse(o.marginTopCollapse)
-    , marginBottomCollapse(o.marginBottomCollapse)
+    , marginBeforeCollapse(o.marginBeforeCollapse)
+    , marginAfterCollapse(o.marginAfterCollapse)
     , matchNearestMailBlockquoteColor(o.matchNearestMailBlockquoteColor)
     , m_appearance(o.m_appearance)
     , m_borderFit(o.m_borderFit)
@@ -118,8 +118,8 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
         && m_counterDirectives == o.m_counterDirectives
         && userDrag == o.userDrag
         && textOverflow == o.textOverflow
-        && marginTopCollapse == o.marginTopCollapse
-        && marginBottomCollapse == o.marginBottomCollapse
+        && marginBeforeCollapse == o.marginBeforeCollapse
+        && marginAfterCollapse == o.marginAfterCollapse
         && matchNearestMailBlockquoteColor == o.matchNearestMailBlockquoteColor
         && m_appearance == o.m_appearance
         && m_borderFit == o.m_borderFit
diff --git a/WebCore/rendering/style/StyleRareNonInheritedData.h b/WebCore/rendering/style/StyleRareNonInheritedData.h
index 6003ea4..3f693f9 100644
--- a/WebCore/rendering/style/StyleRareNonInheritedData.h
+++ b/WebCore/rendering/style/StyleRareNonInheritedData.h
@@ -98,8 +98,8 @@ public:
 
     unsigned userDrag : 2; // EUserDrag
     bool textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
-    unsigned marginTopCollapse : 2; // EMarginCollapse
-    unsigned marginBottomCollapse : 2; // EMarginCollapse
+    unsigned marginBeforeCollapse : 2; // EMarginCollapse
+    unsigned marginAfterCollapse : 2; // EMarginCollapse
     unsigned matchNearestMailBlockquoteColor : 1; // EMatchNearestMailBlockquoteColor, FIXME: This property needs to be eliminated. It should never have been added.
     unsigned m_appearance : 6; // EAppearance
     unsigned m_borderFit : 1; // EBorderFit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list