Ignore:
Timestamp:
Dec 13, 2016, 2:15:13 PM (8 years ago)
Author:
[email protected]
Message:

[CSS Parser] Eliminate SVGPaint and SVGColor
https://bugs.webkit.org/show_bug.cgi?id=165819

Reviewed by Dean Jackson.

Source/WebCore:

Remove SVGColor and SVGPaint CSS values from the tree. The new parser
already stopped making these values when parsing, so all that's left
is to make sure computed style doesn't use these values either.

We are the only browser engine to support these CSS values, they see no use
on the Web, and they're already gone at the parsing level, so it's time
to remove these interfaces from our tree.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::toJSNewlyCreated):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):

  • css/CSSValue.h:

(WebCore::CSSValue::isSubtypeExposedToCSSOM):
(WebCore::CSSValue::isSVGColor): Deleted.
(WebCore::CSSValue::isSVGPaint): Deleted.

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertSVGColor):

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueFill):
(WebCore::StyleBuilderCustom::applyValueStroke):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::fillPaintType):
(WebCore::RenderStyle::setFillPaintColor):
(WebCore::RenderStyle::strokePaintType):
(WebCore::RenderStyle::setStrokePaintColor):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialFillPaintType):
(WebCore::SVGRenderStyle::initialStrokePaintType):
(WebCore::SVGRenderStyle::setFillPaint):
(WebCore::SVGRenderStyle::setStrokePaint):
(WebCore::SVGRenderStyle::fillPaintType):
(WebCore::SVGRenderStyle::strokePaintType):
(WebCore::SVGRenderStyle::visitedLinkFillPaintType):
(WebCore::SVGRenderStyle::visitedLinkStrokePaintType):
(WebCore::SVGRenderStyle::hasStroke):
(WebCore::SVGRenderStyle::hasFill):

  • rendering/style/SVGRenderStyleDefs.h:
  • rendering/svg/RenderSVGResource.cpp:

(WebCore::requestPaintingResource):

  • rendering/svg/SVGResources.cpp:

(WebCore::paintingResourceFromSVGPaint):

  • svg/SVGAllInOne.cpp:
  • svg/SVGAnimatedColor.cpp:

(WebCore::SVGAnimatedColorAnimator::constructFromString):
(WebCore::parseColorFromString):
(WebCore::SVGAnimatedColorAnimator::calculateDistance):

  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::setValueAsString):

  • svg/SVGAnimatedType.h:
  • svg/SVGColor.cpp: Removed.
  • svg/SVGColor.h: Removed.
  • svg/SVGColor.idl: Removed.
  • svg/SVGFEDiffuseLightingElement.cpp:
  • svg/SVGFESpecularLightingElement.cpp:
  • svg/SVGPaint.cpp: Removed.
  • svg/SVGPaint.h: Removed.
  • svg/SVGPaint.idl: Removed.

LayoutTests:

  • fast/dom/Window/resources/window-properties.js:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • svg/animations/additive-type-by-animation-expected.txt:
  • svg/animations/animate-color-calcMode-discrete-expected.txt:
  • svg/animations/animate-color-fill-currentColor-expected.txt:
  • svg/animations/animate-color-fill-from-by-expected.txt:
  • svg/animations/animate-color-transparent-expected.txt:
  • svg/animations/animate-currentColor-expected.txt:
  • svg/animations/animate-dynamic-update-attributeName-expected.txt:
  • svg/animations/animate-elem-03-t-drt-expected.txt:
  • svg/animations/animate-inherit-css-property-expected.txt:
  • svg/animations/attributeTypes-expected.txt:
  • svg/animations/resources/SVGAnimationTestCase.js:

(expectColor):

  • svg/animations/script-tests/animate-color-fill-currentColor.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/animate-color-fill-from-by.js:

(sample1):
(sample2):
(sample3):

  • svg/css/getComputedStyle-basic-expected.txt:
  • svg/css/rect-system-color-expected.txt:
  • svg/css/rect-system-color.xhtml:
  • svg/custom/global-constructors-expected.txt:
  • svg/custom/js-svg-constructors-expected.txt:
  • svg/custom/js-svg-constructors.svg:
  • svg/custom/script-tests/global-constructors.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSValue.cpp

    r209666 r209777  
    6262#include "CSSValueList.h"
    6363#include "CSSVariableReferenceValue.h"
    64 #include "SVGColor.h"
    65 #include "SVGPaint.h"
    6664#include "WebKitCSSTransformValue.h"
    6765
     
    229227        case ImageSetClass:
    230228            return compareCSSValues<CSSImageSetValue>(*this, other);
    231         case SVGColorClass:
    232             return compareCSSValues<SVGColor>(*this, other);
    233         case SVGPaintClass:
    234             return compareCSSValues<SVGPaint>(*this, other);
    235229#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
    236230        case AnimationTriggerScrollClass:
     
    337331    case ImageSetClass:
    338332        return downcast<CSSImageSetValue>(*this).customCSSText();
    339     case SVGColorClass:
    340         return downcast<SVGColor>(*this).customCSSText();
    341     case SVGPaintClass:
    342         return downcast<SVGPaint>(*this).customCSSText();
    343333#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
    344334    case AnimationTriggerScrollClass:
     
    476466    case FilterImageClass:
    477467        delete downcast<CSSFilterImageValue>(this);
    478         return;
    479     case SVGColorClass:
    480         delete downcast<SVGColor>(this);
    481         return;
    482     case SVGPaintClass:
    483         delete downcast<SVGPaint>(this);
    484468        return;
    485469#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
     
    521505    case ImageSetClass:
    522506        return downcast<CSSImageSetValue>(*this).cloneForCSSOM();
    523     case SVGColorClass:
    524         return downcast<SVGColor>(*this).cloneForCSSOM();
    525     case SVGPaintClass:
    526         return downcast<SVGPaint>(*this).cloneForCSSOM();
    527507    default:
    528508        ASSERT(!isSubtypeExposedToCSSOM());
Note: See TracChangeset for help on using the changeset viewer.