Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 19:34:48 +0000 (19:34 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2017 19:34:48 +0000 (19:34 +0000)
commite2f7618cbf8af68d198922cc16572be6378337f2
tree188152609ed27a41afd4b74dba0ce4aaa8c6994b
parent254a89c743b411b899be4d80181e64faaddfb282
Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
https://bugs.webkit.org/show_bug.cgi?id=168044
Source/WebCore:

rdar://problem/30165746

Reviewed by Simon Fraser.

This patch moves these styles out of svg, and sets the properties on video cues.

Tests: fast/css/parsing-paint-order.html
       fast/css/parsing-stroke-linecap.html
       fast/css/parsing-stroke-linejoin.html
       fast/css/parsing-stroke-width.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::paintOrder):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
(WebCore::paintOrder): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::isValidCueStyleProperty):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::paintTypesForPaintOrder):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setPaintOrder):
(WebCore::RenderStyle::paintOrder):
(WebCore::RenderStyle::initialPaintOrder):
(WebCore::RenderStyle::setCapStyle):
(WebCore::RenderStyle::capStyle):
(WebCore::RenderStyle::initialCapStyle):
(WebCore::RenderStyle::setJoinStyle):
(WebCore::RenderStyle::joinStyle):
(WebCore::RenderStyle::initialJoinStyle):
(WebCore::RenderStyle::strokeWidth):
(WebCore::RenderStyle::setStrokeWidth):
(WebCore::RenderStyle::hasVisibleStroke):
(WebCore::RenderStyle::setStrokeOpacity):
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
(WebCore::SVGRenderStyle::paintTypesForPaintOrder): Deleted.
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialBufferedRendering):
(WebCore::SVGRenderStyle::initialFillRule):
(WebCore::SVGRenderStyle::initialMaskType):
(WebCore::SVGRenderStyle::setBufferedRendering):
(WebCore::SVGRenderStyle::setFillRule):
(WebCore::SVGRenderStyle::setMaskType):
(WebCore::SVGRenderStyle::bufferedRendering):
(WebCore::SVGRenderStyle::fillRule):
(WebCore::SVGRenderStyle::strokeMiterLimit):
(WebCore::SVGRenderStyle::maskType):
(WebCore::SVGRenderStyle::hasStroke):
(WebCore::SVGRenderStyle::setBitDefaults):
(WebCore::SVGRenderStyle::InheritedFlags::operator==):
(WebCore::SVGRenderStyle::initialCapStyle): Deleted.
(WebCore::SVGRenderStyle::initialJoinStyle): Deleted.
(WebCore::SVGRenderStyle::initialPaintOrder): Deleted.
(WebCore::SVGRenderStyle::setCapStyle): Deleted.
(WebCore::SVGRenderStyle::setJoinStyle): Deleted.
(WebCore::SVGRenderStyle::setPaintOrder): Deleted.
(WebCore::SVGRenderStyle::capStyle): Deleted.
(WebCore::SVGRenderStyle::joinStyle): Deleted.
(WebCore::SVGRenderStyle::strokeWidth): Deleted.
(WebCore::SVGRenderStyle::paintOrder): Deleted.
(WebCore::SVGRenderStyle::hasVisibleStroke): Deleted.
(WebCore::SVGRenderStyle::setStrokeWidth): Deleted.
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleStrokeData::StyleStrokeData):
(WebCore::StyleStrokeData::operator==):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::strokeShape):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::strokeShape):
(WebCore::RenderSVGPath::shapeDependentStrokeContains):
(WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
(WebCore::RenderSVGPath::zeroLengthLinecapPath):
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::strokeShape):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeShape):
(WebCore::RenderSVGShape::fillStrokeMarkers):
(WebCore::RenderSVGShape::strokeWidth):
(WebCore::RenderSVGShape::hasSmoothStroke):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::paintDecoration):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):

LayoutTests:

Reviewed by Simon Fraser.

* fast/css/parsing-paint-order-expected.txt: Added.
* fast/css/parsing-paint-order.html: Added.
* fast/css/parsing-stroke-linecap-expected.txt: Added.
* fast/css/parsing-stroke-linecap.html: Added.
* fast/css/parsing-stroke-linejoin-expected.txt: Added.
* fast/css/parsing-stroke-linejoin.html: Added.
* fast/css/parsing-stroke-width-expected.txt: Added.
* fast/css/parsing-stroke-width.html: Added.
* media/track/track-css-stroke-cues-expected.txt:
* media/track/track-css-stroke-cues.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/parsing-paint-order-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/parsing-paint-order.html [new file with mode: 0644]
LayoutTests/fast/css/parsing-stroke-linecap-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/parsing-stroke-linecap.html [new file with mode: 0644]
LayoutTests/fast/css/parsing-stroke-linejoin-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/parsing-stroke-linejoin.html [new file with mode: 0644]
LayoutTests/fast/css/parsing-stroke-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/parsing-stroke-width.html [new file with mode: 0644]
LayoutTests/media/track/track-css-stroke-cues-expected.txt
LayoutTests/media/track/track-css-stroke-cues.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/SVGRenderStyle.cpp
Source/WebCore/rendering/style/SVGRenderStyle.h
Source/WebCore/rendering/style/SVGRenderStyleDefs.cpp
Source/WebCore/rendering/style/SVGRenderStyleDefs.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h
Source/WebCore/rendering/svg/RenderSVGEllipse.cpp
Source/WebCore/rendering/svg/RenderSVGPath.cpp
Source/WebCore/rendering/svg/RenderSVGRect.cpp
Source/WebCore/rendering/svg/RenderSVGShape.cpp
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.cpp
Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp