From efcfcf63af55b27ca5b3bb49e176affac0f0fc71 Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Fri, 28 Nov 2014 06:56:08 -0800 Subject: [PATCH] Remove border-collapse R=ojan@chromium.org Review URL: https://codereview.chromium.org/768893002 --- .../core/css/CSSComputedStyleDeclaration.cpp | 5 --- engine/core/css/CSSPrimitiveValueMappings.h | 31 ------------------- engine/core/css/CSSProperties.in | 1 - engine/core/css/parser/BisonCSSParser-in.cpp | 3 -- engine/core/rendering/style/RenderStyle.h | 6 ---- .../rendering/style/RenderStyleConstants.h | 2 -- 6 files changed, 48 deletions(-) diff --git a/engine/core/css/CSSComputedStyleDeclaration.cpp b/engine/core/css/CSSComputedStyleDeclaration.cpp index 8578877addd..44ec491ce64 100644 --- a/engine/core/css/CSSComputedStyleDeclaration.cpp +++ b/engine/core/css/CSSComputedStyleDeclaration.cpp @@ -88,7 +88,6 @@ static const CSSPropertyID staticComputableProperties[] = { CSSPropertyBorderBottomRightRadius, CSSPropertyBorderBottomStyle, CSSPropertyBorderBottomWidth, - CSSPropertyBorderCollapse, CSSPropertyBorderImageOutset, CSSPropertyBorderImageRepeat, CSSPropertyBorderImageSlice, @@ -1399,10 +1398,6 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert list->append(pixelValueForLength(currLayer->yPosition(), *style)); return list.release(); } - case CSSPropertyBorderCollapse: - if (style->borderCollapse()) - return cssValuePool().createIdentifierValue(CSSValueCollapse); - return cssValuePool().createIdentifierValue(CSSValueSeparate); case CSSPropertyBorderSpacing: { RefPtr list = CSSValueList::createSpaceSeparated(); list->append(pixelValue(style->horizontalBorderSpacing(), *style)); diff --git a/engine/core/css/CSSPrimitiveValueMappings.h b/engine/core/css/CSSPrimitiveValueMappings.h index a9ca4abdc03..f605d07e0c0 100644 --- a/engine/core/css/CSSPrimitiveValueMappings.h +++ b/engine/core/css/CSSPrimitiveValueMappings.h @@ -3176,37 +3176,6 @@ template<> inline CSSPrimitiveValue::operator WindRule() const return RULE_NONZERO; } - -template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderCollapse e) - : CSSValue(PrimitiveClass) -{ - m_primitiveUnitType = CSS_VALUE_ID; - switch (e) { - case BSEPARATE: - m_value.valueID = CSSValueSeparate; - break; - case BCOLLAPSE: - m_value.valueID = CSSValueCollapse; - break; - } -} - -template<> inline CSSPrimitiveValue::operator EBorderCollapse() const -{ - ASSERT(isValueID()); - switch (m_value.valueID) { - case CSSValueSeparate: - return BSEPARATE; - case CSSValueCollapse: - return BCOLLAPSE; - default: - break; - } - - ASSERT_NOT_REACHED(); - return BSEPARATE; -} - template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering e) : CSSValue(PrimitiveClass) { diff --git a/engine/core/css/CSSProperties.in b/engine/core/css/CSSProperties.in index fdb3247c9f6..35a2925abed 100644 --- a/engine/core/css/CSSProperties.in +++ b/engine/core/css/CSSProperties.in @@ -117,7 +117,6 @@ border-bottom-left-radius animatable, initial=initialBorderRadius, converter=con border-bottom-right-radius animatable, initial=initialBorderRadius, converter=convertRadius border-bottom-style type_name=EBorderStyle, initial=initialBorderStyle border-bottom-width animatable, initial=initialBorderWidth, converter=convertLineWidth -border-collapse inherited border-image-outset animatable, custom_all border-image-repeat custom_all border-image-slice animatable, custom_all diff --git a/engine/core/css/parser/BisonCSSParser-in.cpp b/engine/core/css/parser/BisonCSSParser-in.cpp index a135acbc3e6..6b696c0f156 100644 --- a/engine/core/css/parser/BisonCSSParser-in.cpp +++ b/engine/core/css/parser/BisonCSSParser-in.cpp @@ -350,8 +350,6 @@ bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID case CSSPropertyBackgroundRepeatX: // repeat | no-repeat case CSSPropertyBackgroundRepeatY: // repeat | no-repeat return valueID == CSSValueRepeat || valueID == CSSValueNoRepeat; - case CSSPropertyBorderCollapse: // collapse | separate - return valueID == CSSValueCollapse || valueID == CSSValueSeparate; case CSSPropertyBorderTopStyle: // case CSSPropertyBorderRightStyle: // Defined as: none | hidden | dotted | dashed | case CSSPropertyBorderBottomStyle: // solid | double | groove | ridge | inset | outset @@ -500,7 +498,6 @@ bool isKeywordPropertyID(CSSPropertyID propertyId) case CSSPropertyBackgroundRepeatX: case CSSPropertyBackgroundRepeatY: case CSSPropertyBorderBottomStyle: - case CSSPropertyBorderCollapse: case CSSPropertyBorderLeftStyle: case CSSPropertyBorderRightStyle: case CSSPropertyBorderTopStyle: diff --git a/engine/core/rendering/style/RenderStyle.h b/engine/core/rendering/style/RenderStyle.h index 2ce933e371a..baec57e5dc0 100644 --- a/engine/core/rendering/style/RenderStyle.h +++ b/engine/core/rendering/style/RenderStyle.h @@ -142,7 +142,6 @@ protected: && (_cursor_style == other._cursor_style) && (_direction == other._direction) && (_white_space == other._white_space) - && (_border_collapse == other._border_collapse) && (m_rtlOrdering == other.m_rtlOrdering) && (m_printColorAdjust == other.m_printColorAdjust) && (_pointerEvents == other._pointerEvents); @@ -160,7 +159,6 @@ protected: unsigned _cursor_style : 6; // ECursor unsigned _direction : 1; // TextDirection unsigned _white_space : 3; // EWhiteSpace - unsigned _border_collapse : 1; // EBorderCollapse // 32 bits // non CSS2 inherited @@ -251,7 +249,6 @@ protected: inherited_flags._cursor_style = initialCursor(); inherited_flags._direction = initialDirection(); inherited_flags._white_space = initialWhiteSpace(); - inherited_flags._border_collapse = initialBorderCollapse(); inherited_flags.m_rtlOrdering = initialRTLOrdering(); inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); inherited_flags._pointerEvents = initialPointerEvents(); @@ -599,7 +596,6 @@ public: const BorderImageLengthBox& maskBoxImageWidth() const { return rareNonInheritedData->m_maskBoxImage.borderSlices(); } const BorderImageLengthBox& maskBoxImageOutset() const { return rareNonInheritedData->m_maskBoxImage.outset(); } - EBorderCollapse borderCollapse() const { return static_cast(inherited_flags._border_collapse); } short horizontalBorderSpacing() const; short verticalBorderSpacing() const; EEmptyCell emptyCells() const { return static_cast(inherited_flags._empty_cells); } @@ -993,7 +989,6 @@ public: void setMaskYPosition(const Length& length) { SET_VAR(rareNonInheritedData, m_mask.m_yPosition, length); } void setMaskSize(const LengthSize& s) { SET_VAR(rareNonInheritedData, m_mask.m_sizeLength, s); } - void setBorderCollapse(EBorderCollapse collapse) { inherited_flags._border_collapse = collapse; } void setHorizontalBorderSpacing(short); void setVerticalBorderSpacing(short); void setEmptyCells(EEmptyCell v) { inherited_flags._empty_cells = v; } @@ -1210,7 +1205,6 @@ public: bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || boxShadow() || hasFilter(); } // Initial values for all the properties - static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } static EBorderStyle initialBorderStyle() { return BNONE; } static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } diff --git a/engine/core/rendering/style/RenderStyleConstants.h b/engine/core/rendering/style/RenderStyleConstants.h index 5a8840b9ec2..a3aea96d759 100644 --- a/engine/core/rendering/style/RenderStyleConstants.h +++ b/engine/core/rendering/style/RenderStyleConstants.h @@ -59,8 +59,6 @@ enum PseudoId { enum ColumnFill { ColumnFillBalance, ColumnFillAuto }; -enum EBorderCollapse { BSEPARATE = 0, BCOLLAPSE = 1 }; - // These have been defined in the order of their precedence for border-collapsing. Do // not change this order! This order also must match the order in CSSValueKeywords.in. enum EBorderStyle { BNONE, BHIDDEN, INSET, GROOVE, OUTSET, RIDGE, DOTTED, DASHED, SOLID, DOUBLE };