[CSS Parser] Unprefix -webkit-writing-mode
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2016 14:39:40 +0000 (14:39 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Oct 2016 14:39:40 +0000 (14:39 +0000)
commit9d5c22de5ce666be49f896a101c65e95f792c5ba
tree36a1f2be1e715139740a22d926b766131445dbf1
parentc521ccfeeb96449c29dc7e1b41583c2ba6ccb64f
[CSS Parser] Unprefix -webkit-writing-mode
https://bugs.webkit.org/show_bug.cgi?id=163870

Reviewed by Zalan Bujtas.

Source/WebCore:

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
Change -webkit-writing mode to writing-mode.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator WritingMode):
(WebCore::CSSPrimitiveValue::operator SVGWritingMode): Deleted.
Eliminate the SVGWritingMode converters. Add support for the unique SVG-specific
values to the WritingMode converters.

* css/CSSPropertyNames.in:
Alias -webkit-writing-mode to writing-mode. Move writing-mode up to be
high priority like -webkit-writing mode was. Alias -epub-writing-mode to writing-mode
instead of to -webkit-writing-mode.

* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
Remove writing-mode from SVG computed style, since the base CSSComputedStyleDeclaration handles it.

* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWritingMode):
(WebCore::StyleBuilderCustom::applyValueWebkitWritingMode): Deleted.
Renamed applyValueWebkitWritingMode to applyValueWritingMode. Removed the SVG code, since
the underlying converter for WritingMode now handles those values.

* css/StyleResolver.cpp:
(WebCore::extractDirectionAndWritingMode):
Rename -webkit-writing-mode to writing-mode.

* css/parser/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
Eliminate -webkit-writing-mode and make sure writing-mode handles both the SVG values
and the normal values.

* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
Same deal here.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
Cue stuff was setting -webkit-writing-mode, so make it set writing-mode instead now.

* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::collectSelectionRects):
* rendering/RenderText.cpp:
(WebCore::RenderText::collectSelectionRects):
Switch the SVG-specific code here over to accessing the RenderStyle writing-mode and not
the SVG-specific one.

* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::isVerticalWritingMode):
Add a helper function for asking if something is vertical writing mode.

* rendering/style/SVGRenderStyle.cpp:
* rendering/style/SVGRenderStyle.h:
* rendering/style/SVGRenderStyleDefs.h:
(WebCore::SVGRenderStyle::diff):
Remove the SVG writing mode code.

* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
Make sure to force SVG font descriptions to be horizontal, since SVG controls
its own glyph orientation.

* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGInlineTextBox):
* rendering/svg/SVGTextChunk.cpp:
(WebCore::SVGTextChunk::SVGTextChunk):
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutInlineTextBox):
* rendering/svg/SVGTextQuery.cpp:
(WebCore::SVGTextQuery::executeQuery):
Changed to access the RenderStyle writing mode instead of the SVG-specific one.

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/text-align-06-b-expected.txt:
* platform/mac/svg/text/text-align-06-b-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-06-b-expected.txt
LayoutTests/platform/mac/svg/text/text-align-06-b-expected.txt
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/html/track/VTTCue.cpp
Source/WebCore/rendering/RenderLineBreak.cpp
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/SVGRenderStyle.cpp
Source/WebCore/rendering/style/SVGRenderStyle.h
Source/WebCore/rendering/style/SVGRenderStyleDefs.h
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp
Source/WebCore/rendering/svg/SVGTextChunk.cpp
Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp
Source/WebCore/rendering/svg/SVGTextQuery.cpp