From be276cc8612281d7433f591dd8bc960ff759a8b2 Mon Sep 17 00:00:00 2001 From: John Reck Date: Wed, 18 Jan 2012 11:24:36 -0800 Subject: Remove ANDROID_CSS_RING Change-Id: I7395a5f17b0ccfe8dafcc97fa3ab8897676608e9 --- Source/WebCore/css/AndroidCSSPropertyNames.in | 11 +- Source/WebCore/css/CSSComputedStyleDeclaration.cpp | 35 ------ Source/WebCore/css/CSSMutableStyleDeclaration.cpp | 14 --- Source/WebCore/css/CSSParser.cpp | 30 ----- Source/WebCore/css/CSSStyleSelector.cpp | 132 --------------------- 5 files changed, 1 insertion(+), 221 deletions(-) (limited to 'Source/WebCore/css') diff --git a/Source/WebCore/css/AndroidCSSPropertyNames.in b/Source/WebCore/css/AndroidCSSPropertyNames.in index ef67d6b..be751da 100644 --- a/Source/WebCore/css/AndroidCSSPropertyNames.in +++ b/Source/WebCore/css/AndroidCSSPropertyNames.in @@ -21,14 +21,5 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # --webkit-ring --webkit-ring-fill-color --webkit-ring-inner-width --webkit-ring-outer-width --webkit-ring-outset --webkit-ring-pressed-inner-color --webkit-ring-pressed-outer-color --webkit-ring-radius --webkit-ring-selected-inner-color --webkit-ring-selected-outer-color + -webkit-tap-highlight-color diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp index 4c0571d..4922109 100644 --- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp @@ -291,18 +291,6 @@ static const int computedProperties[] = { CSSPropertyWebkitSvgShadow, CSSPropertyVectorEffect #endif -#ifdef ANDROID_CSS_RING - , - CSSPropertyWebkitRingFillColor, - CSSPropertyWebkitRingInnerWidth, - CSSPropertyWebkitRingOuterWidth, - CSSPropertyWebkitRingOutset, - CSSPropertyWebkitRingPressedInnerColor, - CSSPropertyWebkitRingPressedOuterColor, - CSSPropertyWebkitRingRadius, - CSSPropertyWebkitRingSelectedInnerColor, - CSSPropertyWebkitRingSelectedOuterColor -#endif #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR , CSSPropertyWebkitTapHighlightColor @@ -1818,29 +1806,6 @@ PassRefPtr CSSComputedStyleDeclaration::getPropertyCSSValue(int proper case CSSPropertyWebkitTransformOriginZ: case CSSPropertyWebkitTransition: break; -#ifdef ANDROID_CSS_RING - case CSSPropertyWebkitRing: - // shorthand property currently not supported see bug 13658 - break; - case CSSPropertyWebkitRingFillColor: - return primitiveValueCache->createColorValue(style->ringFillColor().rgb()); - case CSSPropertyWebkitRingInnerWidth: - return primitiveValueCache->createValue(style->ringInnerWidth()); - case CSSPropertyWebkitRingOuterWidth: - return primitiveValueCache->createValue(style->ringOuterWidth()); - case CSSPropertyWebkitRingOutset: - return primitiveValueCache->createValue(style->ringOutset()); - case CSSPropertyWebkitRingPressedInnerColor: - return primitiveValueCache->createColorValue(style->ringPressedInnerColor().rgb()); - case CSSPropertyWebkitRingPressedOuterColor: - return primitiveValueCache->createColorValue(style->ringPressedOuterColor().rgb()); - case CSSPropertyWebkitRingRadius: - return primitiveValueCache->createValue(style->ringRadius()); - case CSSPropertyWebkitRingSelectedInnerColor: - return primitiveValueCache->createColorValue(style->ringSelectedInnerColor().rgb()); - case CSSPropertyWebkitRingSelectedOuterColor: - return primitiveValueCache->createColorValue(style->ringSelectedOuterColor().rgb()); -#endif #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR case CSSPropertyWebkitTapHighlightColor: return primitiveValueCache->createColorValue(style->tapHighlightColor().rgb()); diff --git a/Source/WebCore/css/CSSMutableStyleDeclaration.cpp b/Source/WebCore/css/CSSMutableStyleDeclaration.cpp index ba3332d..ece418a 100644 --- a/Source/WebCore/css/CSSMutableStyleDeclaration.cpp +++ b/Source/WebCore/css/CSSMutableStyleDeclaration.cpp @@ -261,20 +261,6 @@ String CSSMutableStyleDeclaration::getPropertyValue(int propertyID) const return value->cssText(); } #endif -#ifdef ANDROID_CSS_RING - case CSSPropertyWebkitRing: { - const int properties[9] = { CSSPropertyWebkitRingFillColor, - CSSPropertyWebkitRingInnerWidth, - CSSPropertyWebkitRingOuterWidth, - CSSPropertyWebkitRingOutset, - CSSPropertyWebkitRingPressedInnerColor, - CSSPropertyWebkitRingPressedOuterColor, - CSSPropertyWebkitRingRadius, - CSSPropertyWebkitRingSelectedInnerColor, - CSSPropertyWebkitRingSelectedOuterColor }; - return getLayeredShorthandValue(properties, 9); - } -#endif } return String(); } diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp index 78b6b24..b78a6d0 100644 --- a/Source/WebCore/css/CSSParser.cpp +++ b/Source/WebCore/css/CSSParser.cpp @@ -2008,36 +2008,6 @@ bool CSSParser::parseValue(int propId, bool important) return parseLineBoxContain(important); break; -#ifdef ANDROID_CSS_RING - case CSSPropertyWebkitRing: - { - const int properties[9] = { CSSPropertyWebkitRingFillColor, - CSSPropertyWebkitRingInnerWidth, - CSSPropertyWebkitRingOuterWidth, - CSSPropertyWebkitRingOutset, - CSSPropertyWebkitRingPressedInnerColor, - CSSPropertyWebkitRingPressedOuterColor, - CSSPropertyWebkitRingRadius, - CSSPropertyWebkitRingSelectedInnerColor, - CSSPropertyWebkitRingSelectedOuterColor }; - return parseShorthand(propId, properties, 9, important); - } - case CSSPropertyWebkitRingFillColor: - case CSSPropertyWebkitRingPressedInnerColor: - case CSSPropertyWebkitRingPressedOuterColor: - case CSSPropertyWebkitRingSelectedInnerColor: - case CSSPropertyWebkitRingSelectedOuterColor: - parsedValue = parseColor(); - if (parsedValue) - m_valueList->next(); - break; - case CSSPropertyWebkitRingInnerWidth: - case CSSPropertyWebkitRingOuterWidth: - case CSSPropertyWebkitRingOutset: - case CSSPropertyWebkitRingRadius: - validPrimitive = validUnit(value, FLength | FNonNeg, m_strict); - break; -#endif #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR case CSSPropertyWebkitTapHighlightColor: parsedValue = parseColor(); diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp index b79f2dc..0b6fd35 100644 --- a/Source/WebCore/css/CSSStyleSelector.cpp +++ b/Source/WebCore/css/CSSStyleSelector.cpp @@ -6054,138 +6054,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) ASSERT_NOT_REACHED(); return; -#ifdef ANDROID_CSS_RING - case CSSPropertyWebkitRing: - if (valueType != CSSValue::CSS_INHERIT || !m_parentNode) return; - m_style->setRingFillColor(m_parentStyle->ringFillColor()); - m_style->setRingInnerWidth(m_parentStyle->ringInnerWidth()); - m_style->setRingOuterWidth(m_parentStyle->ringOuterWidth()); - m_style->setRingOutset(m_parentStyle->ringOutset()); - m_style->setRingPressedInnerColor(m_parentStyle->ringPressedInnerColor()); - m_style->setRingPressedOuterColor(m_parentStyle->ringPressedOuterColor()); - m_style->setRingRadius(m_parentStyle->ringRadius()); - m_style->setRingSelectedInnerColor(m_parentStyle->ringSelectedInnerColor()); - m_style->setRingSelectedOuterColor(m_parentStyle->ringSelectedOuterColor()); - return; - case CSSPropertyWebkitRingFillColor: { - HANDLE_INHERIT_AND_INITIAL(ringFillColor, RingFillColor); - if (!primitiveValue) - break; - Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite(); - m_style->setRingFillColor(col); - return; - } - case CSSPropertyWebkitRingInnerWidth: { - HANDLE_INHERIT_AND_INITIAL(ringInnerWidth, RingInnerWidth) - if (!primitiveValue) - break; - Length l; - int type = primitiveValue->primitiveType(); - if (CSSPrimitiveValue::isUnitTypeLength(type)) { - // width can be specified with fractional px - // scale by 16 here (and unscale in android_graphics) to keep - // 4 bits of fraction - RefPtr scaledValue = CSSPrimitiveValue::create( - primitiveValue->getFloatValue() * 16, - (CSSPrimitiveValue::UnitTypes) type); - l = Length(scaledValue->computeLengthIntForLength(style(), - m_rootElementStyle, zoomFactor), Fixed); - scaledValue.release(); - } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) - l = Length(primitiveValue->getDoubleValue(), Percent); - else - return; - m_style->setRingInnerWidth(l); - return; - } - case CSSPropertyWebkitRingOuterWidth: { - HANDLE_INHERIT_AND_INITIAL(ringOuterWidth, RingOuterWidth) - if (!primitiveValue) - break; - Length l; - int type = primitiveValue->primitiveType(); - if (CSSPrimitiveValue::isUnitTypeLength(type)) { - // width can be specified with fractional px - // scale by 16 here (and unscale in android_graphics) to keep - // 4 bits of fraction - RefPtr scaledValue = CSSPrimitiveValue::create( - primitiveValue->getFloatValue() * 16, - (CSSPrimitiveValue::UnitTypes) type); - l = Length(scaledValue->computeLengthIntForLength(style(), - m_rootElementStyle, zoomFactor), Fixed); - scaledValue.release(); - } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) - l = Length(primitiveValue->getDoubleValue(), Percent); - else - return; - m_style->setRingOuterWidth(l); - return; - } - case CSSPropertyWebkitRingOutset: { - HANDLE_INHERIT_AND_INITIAL(ringOutset, RingOutset) - if (!primitiveValue) - break; - Length l; - int type = primitiveValue->primitiveType(); - if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), - m_rootElementStyle, zoomFactor), Fixed); - else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) - l = Length(primitiveValue->getDoubleValue(), Percent); - else - return; - m_style->setRingOutset(l); - return; - } - case CSSPropertyWebkitRingPressedInnerColor: { - HANDLE_INHERIT_AND_INITIAL(ringPressedInnerColor, RingPressedInnerColor); - if (!primitiveValue) - break; - Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite(); - m_style->setRingPressedInnerColor(col); - return; - } - case CSSPropertyWebkitRingPressedOuterColor: { - HANDLE_INHERIT_AND_INITIAL(ringPressedOuterColor, RingPressedOuterColor); - if (!primitiveValue) - break; - Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite(); - m_style->setRingPressedOuterColor(col); - return; - } - case CSSPropertyWebkitRingRadius: { - HANDLE_INHERIT_AND_INITIAL(ringRadius, RingRadius) - if (!primitiveValue) - break; - Length l; - int type = primitiveValue->primitiveType(); - if (CSSPrimitiveValue::isUnitTypeLength(type)) - l = Length(primitiveValue->computeLengthIntForLength(style(), - m_rootElementStyle, zoomFactor), Fixed); - else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) - l = Length(primitiveValue->getDoubleValue(), Percent); - else - return; - m_style->setRingRadius(l); - return; - } - case CSSPropertyWebkitRingSelectedInnerColor: { - HANDLE_INHERIT_AND_INITIAL(ringSelectedInnerColor, RingSelectedInnerColor); - if (!primitiveValue) - break; - Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite(); - m_style->setRingSelectedInnerColor(col); - return; - } - case CSSPropertyWebkitRingSelectedOuterColor: { - HANDLE_INHERIT_AND_INITIAL(ringSelectedOuterColor, RingSelectedOuterColor); - if (!primitiveValue) - break; - Color col = getColorFromPrimitiveValue(primitiveValue).blendWithWhite(); - m_style->setRingSelectedOuterColor(col); - return; - } -#endif #ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR case CSSPropertyWebkitTapHighlightColor: { HANDLE_INHERIT_AND_INITIAL(tapHighlightColor, TapHighlightColor); -- cgit v1.1