From b1b86e4656ade7ec7449188c5656053ac00d42e8 Mon Sep 17 00:00:00 2001 From: Rafael Weinstein Date: Mon, 1 Dec 2014 12:01:31 -0800 Subject: [PATCH] Remove webkit-print-color-adjust R=ojan@chromium.org Review URL: https://codereview.chromium.org/762473003 --- .../core/css/CSSComputedStyleDeclaration.cpp | 3 -- engine/core/css/CSSPrimitiveValueMappings.h | 31 ------------------- engine/core/css/CSSProperties.in | 1 - engine/core/css/CSSValueKeywords.in | 4 --- engine/core/css/parser/BisonCSSParser-in.cpp | 3 -- engine/core/rendering/style/RenderStyle.cpp | 1 - engine/core/rendering/style/RenderStyle.h | 7 ----- .../rendering/style/RenderStyleConstants.h | 6 ---- 8 files changed, 56 deletions(-) diff --git a/engine/core/css/CSSComputedStyleDeclaration.cpp b/engine/core/css/CSSComputedStyleDeclaration.cpp index 44ec491ce64..dc0b55ce0f6 100644 --- a/engine/core/css/CSSComputedStyleDeclaration.cpp +++ b/engine/core/css/CSSComputedStyleDeclaration.cpp @@ -247,7 +247,6 @@ static const CSSPropertyID staticComputableProperties[] = { CSSPropertyWebkitPerspective, CSSPropertyPerspectiveOrigin, CSSPropertyWebkitPerspectiveOrigin, - CSSPropertyWebkitPrintColorAdjust, CSSPropertyWebkitRtlOrdering, CSSPropertyWebkitTapHighlightColor, CSSPropertyWebkitTextDecorationsInEffect, @@ -1449,8 +1448,6 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert return cssValuePool().createValue(style->captionSide()); case CSSPropertyColor: return cssValuePool().createColorValue(m_allowVisitedStyle ? style->colorIncludingFallback(CSSPropertyColor).rgb() : style->color().rgb()); - case CSSPropertyWebkitPrintColorAdjust: - return cssValuePool().createValue(style->printColorAdjust()); case CSSPropertyTabSize: return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValue::CSS_NUMBER); case CSSPropertyCursor: { diff --git a/engine/core/css/CSSPrimitiveValueMappings.h b/engine/core/css/CSSPrimitiveValueMappings.h index f605d07e0c0..c5ddf956737 100644 --- a/engine/core/css/CSSPrimitiveValueMappings.h +++ b/engine/core/css/CSSPrimitiveValueMappings.h @@ -127,37 +127,6 @@ template<> inline CSSPrimitiveValue::operator ColumnFill() const return ColumnFillBalance; } -template<> inline CSSPrimitiveValue::CSSPrimitiveValue(PrintColorAdjust value) - : CSSValue(PrimitiveClass) -{ - m_primitiveUnitType = CSS_VALUE_ID; - switch (value) { - case PrintColorAdjustExact: - m_value.valueID = CSSValueExact; - break; - case PrintColorAdjustEconomy: - m_value.valueID = CSSValueEconomy; - break; - } -} - -template<> inline CSSPrimitiveValue::operator PrintColorAdjust() const -{ - ASSERT(isValueID()); - switch (m_value.valueID) { - case CSSValueEconomy: - return PrintColorAdjustEconomy; - case CSSValueExact: - return PrintColorAdjustExact; - default: - break; - } - - ASSERT_NOT_REACHED(); - return PrintColorAdjustEconomy; -} - - template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderStyle e) : CSSValue(PrimitiveClass) { diff --git a/engine/core/css/CSSProperties.in b/engine/core/css/CSSProperties.in index 35a2925abed..764716499a7 100644 --- a/engine/core/css/CSSProperties.in +++ b/engine/core/css/CSSProperties.in @@ -256,7 +256,6 @@ vertical-align animatable, custom_inherit, custom_value -webkit-perspective-origin custom_all -webkit-perspective-origin-x converter=convertLength -webkit-perspective-origin-y converter=convertLength --webkit-print-color-adjust inherited, type_name=PrintColorAdjust -webkit-rtl-ordering inherited, type_name=Order, setter=setRTLOrdering, initial=initialRTLOrdering -webkit-tap-highlight-color inherited, converter=convertColor -webkit-text-emphasis-color inherited, custom_all diff --git a/engine/core/css/CSSValueKeywords.in b/engine/core/css/CSSValueKeywords.in index 3840c8597f9..1bf7a0e42a9 100644 --- a/engine/core/css/CSSValueKeywords.in +++ b/engine/core/css/CSSValueKeywords.in @@ -639,10 +639,6 @@ optimizeSpeed optimizeLegibility geometricPrecision -// -webkit-color-adjust -economy -exact - // -webkit-text-emphasis-position over under diff --git a/engine/core/css/parser/BisonCSSParser-in.cpp b/engine/core/css/parser/BisonCSSParser-in.cpp index 6b696c0f156..e31ab84e7e8 100644 --- a/engine/core/css/parser/BisonCSSParser-in.cpp +++ b/engine/core/css/parser/BisonCSSParser-in.cpp @@ -463,8 +463,6 @@ bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueAntialiased || valueID == CSSValueSubpixelAntialiased; case CSSPropertyWebkitLineBreak: // auto | loose | normal | strict | after-white-space return valueID == CSSValueAuto || valueID == CSSValueLoose || valueID == CSSValueNormal || valueID == CSSValueStrict || valueID == CSSValueAfterWhiteSpace; - case CSSPropertyWebkitPrintColorAdjust: - return valueID == CSSValueExact || valueID == CSSValueEconomy; case CSSPropertyWebkitRtlOrdering: return valueID == CSSValueLogical || valueID == CSSValueVisual; case CSSPropertyWebkitTextEmphasisPosition: @@ -545,7 +543,6 @@ bool isKeywordPropertyID(CSSPropertyID propertyId) case CSSPropertyFontKerning: case CSSPropertyWebkitFontSmoothing: case CSSPropertyWebkitLineBreak: - case CSSPropertyWebkitPrintColorAdjust: case CSSPropertyWebkitRtlOrdering: case CSSPropertyWebkitTextEmphasisPosition: case CSSPropertyTransformStyle: diff --git a/engine/core/rendering/style/RenderStyle.cpp b/engine/core/rendering/style/RenderStyle.cpp index 67497590fa4..8f5f7253ea7 100644 --- a/engine/core/rendering/style/RenderStyle.cpp +++ b/engine/core/rendering/style/RenderStyle.cpp @@ -467,7 +467,6 @@ bool RenderStyle::diffNeedsPaintInvalidationLayer(const RenderStyle& other) cons bool RenderStyle::diffNeedsPaintInvalidationObject(const RenderStyle& other) const { if (inherited_flags._visibility != other.inherited_flags._visibility - || inherited_flags.m_printColorAdjust != other.inherited_flags.m_printColorAdjust || !surround->border.visuallyEqual(other.surround->border) || !m_background->visuallyEqual(*other.m_background)) return true; diff --git a/engine/core/rendering/style/RenderStyle.h b/engine/core/rendering/style/RenderStyle.h index baec57e5dc0..51f610abc0d 100644 --- a/engine/core/rendering/style/RenderStyle.h +++ b/engine/core/rendering/style/RenderStyle.h @@ -143,7 +143,6 @@ protected: && (_direction == other._direction) && (_white_space == other._white_space) && (m_rtlOrdering == other.m_rtlOrdering) - && (m_printColorAdjust == other.m_printColorAdjust) && (_pointerEvents == other._pointerEvents); } @@ -163,7 +162,6 @@ protected: // non CSS2 inherited unsigned m_rtlOrdering : 1; // Order - unsigned m_printColorAdjust : PrintColorAdjustBits; unsigned _pointerEvents : 4; // EPointerEvents } inherited_flags; @@ -250,7 +248,6 @@ protected: inherited_flags._direction = initialDirection(); inherited_flags._white_space = initialWhiteSpace(); inherited_flags.m_rtlOrdering = initialRTLOrdering(); - inherited_flags.m_printColorAdjust = initialPrintColorAdjust(); inherited_flags._pointerEvents = initialPointerEvents(); noninherited_flags.effectiveDisplay = noninherited_flags.originalDisplay = initialDisplay(); @@ -1023,9 +1020,6 @@ public: void setIsLink(bool b) { noninherited_flags.isLink = b; } - PrintColorAdjust printColorAdjust() const { return static_cast(inherited_flags.m_printColorAdjust); } - void setPrintColorAdjust(PrintColorAdjust value) { inherited_flags.m_printColorAdjust = value; } - bool hasAutoZIndex() const { return m_box->hasAutoZIndex(); } void setHasAutoZIndex() { SET_VAR(m_box, m_hasAutoZIndex, true); SET_VAR(m_box, m_zIndex, 0); } int zIndex() const { return m_box->zIndex(); } @@ -1325,7 +1319,6 @@ public: static float initialImageResolution() { return 1; } static StyleImage* initialBorderImageSource() { return 0; } static StyleImage* initialMaskBoxImageSource() { return 0; } - static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; } static TouchAction initialTouchAction() { return TouchActionAuto; } static TouchActionDelay initialTouchActionDelay() { return TouchActionDelayScript; } static ShadowList* initialBoxShadow() { return 0; } diff --git a/engine/core/rendering/style/RenderStyleConstants.h b/engine/core/rendering/style/RenderStyleConstants.h index a3aea96d759..be73df87ffc 100644 --- a/engine/core/rendering/style/RenderStyleConstants.h +++ b/engine/core/rendering/style/RenderStyleConstants.h @@ -37,12 +37,6 @@ enum StyleRecalcChange { ReattachNoRenderer }; -static const size_t PrintColorAdjustBits = 1; -enum PrintColorAdjust { - PrintColorAdjustEconomy, - PrintColorAdjustExact -}; - // Static pseudo styles. Dynamic ones are produced on the fly. enum PseudoId { // The order must be NOP ID, public IDs, and then internal IDs.