Title: [207757] trunk
Revision
207757
Author
hy...@apple.com
Date
2016-10-24 07:39:40 -0700 (Mon, 24 Oct 2016)

Log Message

[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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (207756 => 207757)


--- trunk/LayoutTests/ChangeLog	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/LayoutTests/ChangeLog	2016-10-24 14:39:40 UTC (rev 207757)
@@ -1,3 +1,16 @@
+2016-10-24  Dave Hyatt  <hy...@apple.com>
+
+        [CSS Parser] Unprefix -webkit-writing-mode
+        https://bugs.webkit.org/show_bug.cgi?id=163870
+
+        Reviewed by Zalan Bujtas.
+
+        * 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:
+
 2016-10-24  Youenn Fablet  <you...@apple.com>
 
         svg/as-image/svg-image-with-data-uri-use-data-uri.svg is flaky after r207754

Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (207756 => 207757)


--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt	2016-10-24 14:39:40 UTC (rev 207757)
@@ -217,7 +217,6 @@
 -webkit-user-drag: auto;
 -webkit-user-modify: read-only;
 -webkit-user-select: text;
--webkit-writing-mode: horizontal-tb;
 clip-path: none;
 clip-rule: nonzero;
 mask: none;
@@ -250,7 +249,7 @@
 dominant-baseline: auto;
 kerning: 0;
 text-anchor: start;
-writing-mode: lr-tb;
+writing-mode: horizontal-tb;
 glyph-orientation-horizontal: 0deg;
 glyph-orientation-vertical: auto;
 -webkit-svg-shadow: none;

Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (207756 => 207757)


--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt	2016-10-24 14:39:40 UTC (rev 207757)
@@ -216,7 +216,6 @@
 -webkit-user-drag: auto
 -webkit-user-modify: read-only
 -webkit-user-select: text
--webkit-writing-mode: horizontal-tb
 clip-path: none
 clip-rule: nonzero
 mask: none
@@ -249,7 +248,7 @@
 dominant-baseline: auto
 kerning: 0
 text-anchor: start
-writing-mode: lr-tb
+writing-mode: horizontal-tb
 glyph-orientation-horizontal: 0deg
 glyph-orientation-vertical: auto
 -webkit-svg-shadow: none

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-06-b-expected.txt (207756 => 207757)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-06-b-expected.txt	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-align-06-b-expected.txt	2016-10-24 14:39:40 UTC (rev 207757)
@@ -12,7 +12,7 @@
             RenderSVGInlineText {#text} at (0,0) size 17x68
               chunk 1 (vertical) text run 1 at (-10.40,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (-10.40,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 17x34
+            RenderSVGTSpan {tspan} at (0,0) size 34x17
               RenderSVGInlineText {#text} at (7,67) size 17x34
                 chunk 1 (vertical) text run 1 at (-3.40,67.03) startOffset 0 endOffset 1 height 33.52: "7"
             RenderSVGInlineText {#text} at (0,100) size 15x68
@@ -22,7 +22,7 @@
             RenderSVGInlineText {#text} at (25,0) size 17x68
               chunk 1 (vertical) text run 1 at (69.60,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (69.60,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 27x135
+            RenderSVGTSpan {tspan} at (0,0) size 135x27
               RenderSVGInlineText {#text} at (0,67) size 27x135
                 chunk 1 (vertical) text run 1 at (48.60,67.03) startOffset 0 endOffset 1 height 33.52: "-"
                 chunk 1 (vertical) text run 2 at (48.60,100.55) startOffset 1 endOffset 2 height 33.52: "7"
@@ -35,12 +35,12 @@
             RenderSVGInlineText {#text} at (16,0) size 17x68
               chunk 1 (vertical) text run 1 at (169.60,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (169.60,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 17x101
+            RenderSVGTSpan {tspan} at (0,0) size 101x17
               RenderSVGInlineText {#text} at (0,67) size 17x101
                 chunk 1 (vertical) text run 1 at (152.84,67.03) startOffset 0 endOffset 1 height 33.52: "s"
                 chunk 1 (vertical) text run 2 at (152.84,100.55) startOffset 1 endOffset 2 height 33.52: "u"
                 chunk 1 (vertical) text run 3 at (152.84,134.06) startOffset 2 endOffset 3 height 33.52: "b"
-            RenderSVGTSpan {tspan} at (0,0) size 16x35
+            RenderSVGTSpan {tspan} at (0,0) size 35x16
               RenderSVGInlineText {#text} at (17,167) size 15x34
                 chunk 1 (vertical) text run 1 at (169.60,167.58) startOffset 0 endOffset 1 height 33.52: "x"
             RenderSVGInlineText {#text} at (20,201) size 9x34
@@ -49,7 +49,7 @@
             RenderSVGInlineText {#text} at (0,0) size 17x68
               chunk 1 (vertical) text run 1 at (249.60,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (249.60,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 18x168
+            RenderSVGTSpan {tspan} at (0,0) size 169x17
               RenderSVGInlineText {#text} at (16,67) size 17x168
                 chunk 1 (vertical) text run 1 at (266.36,67.03) startOffset 0 endOffset 1 height 33.52: "s"
                 chunk 1 (vertical) text run 2 at (266.36,100.55) startOffset 1 endOffset 2 height 33.52: "u"
@@ -56,7 +56,7 @@
                 chunk 1 (vertical) text run 3 at (266.36,134.06) startOffset 2 endOffset 3 height 33.52: "p"
                 chunk 1 (vertical) text run 4 at (266.36,167.58) startOffset 3 endOffset 4 height 33.52: "e"
                 chunk 1 (vertical) text run 5 at (266.36,201.09) startOffset 4 endOffset 5 height 33.52: "r"
-            RenderSVGTSpan {tspan} at (0,0) size 16x35
+            RenderSVGTSpan {tspan} at (0,0) size 35x16
               RenderSVGInlineText {#text} at (0,234) size 15x34
                 chunk 1 (vertical) text run 1 at (249.60,234.61) startOffset 0 endOffset 1 height 33.52: "x"
             RenderSVGInlineText {#text} at (4,268) size 9x34

Modified: trunk/LayoutTests/platform/mac/svg/text/text-align-06-b-expected.txt (207756 => 207757)


--- trunk/LayoutTests/platform/mac/svg/text/text-align-06-b-expected.txt	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/LayoutTests/platform/mac/svg/text/text-align-06-b-expected.txt	2016-10-24 14:39:40 UTC (rev 207757)
@@ -12,7 +12,7 @@
             RenderSVGInlineText {#text} at (0,0) size 17x68
               chunk 1 (vertical) text run 1 at (-10.40,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (-10.40,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 17x34
+            RenderSVGTSpan {tspan} at (0,0) size 34x17
               RenderSVGInlineText {#text} at (7,67) size 17x34
                 chunk 1 (vertical) text run 1 at (-3.40,67.03) startOffset 0 endOffset 1 height 33.52: "7"
             RenderSVGInlineText {#text} at (0,100) size 15x68
@@ -22,7 +22,7 @@
             RenderSVGInlineText {#text} at (25,0) size 17x68
               chunk 1 (vertical) text run 1 at (69.60,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (69.60,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 27x135
+            RenderSVGTSpan {tspan} at (0,0) size 135x27
               RenderSVGInlineText {#text} at (0,67) size 27x135
                 chunk 1 (vertical) text run 1 at (48.60,67.03) startOffset 0 endOffset 1 height 33.52: "-"
                 chunk 1 (vertical) text run 2 at (48.60,100.55) startOffset 1 endOffset 2 height 33.52: "7"
@@ -35,12 +35,12 @@
             RenderSVGInlineText {#text} at (16,0) size 17x68
               chunk 1 (vertical) text run 1 at (169.60,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (169.60,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 17x101
+            RenderSVGTSpan {tspan} at (0,0) size 101x17
               RenderSVGInlineText {#text} at (0,67) size 17x101
                 chunk 1 (vertical) text run 1 at (152.84,67.03) startOffset 0 endOffset 1 height 33.52: "s"
                 chunk 1 (vertical) text run 2 at (152.84,100.55) startOffset 1 endOffset 2 height 33.52: "u"
                 chunk 1 (vertical) text run 3 at (152.84,134.06) startOffset 2 endOffset 3 height 33.52: "b"
-            RenderSVGTSpan {tspan} at (0,0) size 16x35
+            RenderSVGTSpan {tspan} at (0,0) size 35x16
               RenderSVGInlineText {#text} at (17,167) size 15x34
                 chunk 1 (vertical) text run 1 at (169.60,167.58) startOffset 0 endOffset 1 height 33.52: "x"
             RenderSVGInlineText {#text} at (20,201) size 9x34
@@ -49,7 +49,7 @@
             RenderSVGInlineText {#text} at (0,0) size 17x68
               chunk 1 (vertical) text run 1 at (249.60,0.00) startOffset 0 endOffset 1 height 33.52: "t"
               chunk 1 (vertical) text run 2 at (249.60,33.52) startOffset 1 endOffset 2 height 33.52: "e"
-            RenderSVGTSpan {tspan} at (0,0) size 18x168
+            RenderSVGTSpan {tspan} at (0,0) size 169x17
               RenderSVGInlineText {#text} at (16,67) size 17x168
                 chunk 1 (vertical) text run 1 at (266.36,67.03) startOffset 0 endOffset 1 height 33.52: "s"
                 chunk 1 (vertical) text run 2 at (266.36,100.55) startOffset 1 endOffset 2 height 33.52: "u"
@@ -56,7 +56,7 @@
                 chunk 1 (vertical) text run 3 at (266.36,134.06) startOffset 2 endOffset 3 height 33.52: "p"
                 chunk 1 (vertical) text run 4 at (266.36,167.58) startOffset 3 endOffset 4 height 33.52: "e"
                 chunk 1 (vertical) text run 5 at (266.36,201.09) startOffset 4 endOffset 5 height 33.52: "r"
-            RenderSVGTSpan {tspan} at (0,0) size 16x35
+            RenderSVGTSpan {tspan} at (0,0) size 35x16
               RenderSVGInlineText {#text} at (0,234) size 15x34
                 chunk 1 (vertical) text run 1 at (249.60,234.61) startOffset 0 endOffset 1 height 33.52: "x"
             RenderSVGInlineText {#text} at (4,268) size 9x34

Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (207756 => 207757)


--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt	2016-10-24 14:39:40 UTC (rev 207757)
@@ -432,8 +432,6 @@
 rect: style.getPropertyCSSValue(-webkit-user-modify) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(-webkit-user-select) : text
 rect: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
-rect: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(clip-path) : none
 rect: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(clip-rule) : nonzero
@@ -498,7 +496,7 @@
 rect: style.getPropertyCSSValue(kerning) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(text-anchor) : start
 rect: style.getPropertyCSSValue(text-anchor) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(writing-mode) : lr-tb
+rect: style.getPropertyValue(writing-mode) : horizontal-tb
 rect: style.getPropertyCSSValue(writing-mode) : [object CSSPrimitiveValue]
 rect: style.getPropertyValue(glyph-orientation-horizontal) : 0deg
 rect: style.getPropertyCSSValue(glyph-orientation-horizontal) : [object CSSPrimitiveValue]
@@ -942,8 +940,6 @@
 g: style.getPropertyCSSValue(-webkit-user-modify) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(-webkit-user-select) : text
 g: style.getPropertyCSSValue(-webkit-user-select) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-writing-mode) : horizontal-tb
-g: style.getPropertyCSSValue(-webkit-writing-mode) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(clip-path) : none
 g: style.getPropertyCSSValue(clip-path) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(clip-rule) : nonzero
@@ -1008,7 +1004,7 @@
 g: style.getPropertyCSSValue(kerning) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(text-anchor) : start
 g: style.getPropertyCSSValue(text-anchor) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(writing-mode) : lr-tb
+g: style.getPropertyValue(writing-mode) : horizontal-tb
 g: style.getPropertyCSSValue(writing-mode) : [object CSSPrimitiveValue]
 g: style.getPropertyValue(glyph-orientation-horizontal) : 0deg
 g: style.getPropertyCSSValue(glyph-orientation-horizontal) : [object CSSPrimitiveValue]

Modified: trunk/Source/WebCore/ChangeLog (207756 => 207757)


--- trunk/Source/WebCore/ChangeLog	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/ChangeLog	2016-10-24 14:39:40 UTC (rev 207757)
@@ -1,3 +1,87 @@
+2016-10-24  Dave Hyatt  <hy...@apple.com>
+
+        [CSS Parser] Unprefix -webkit-writing-mode
+        https://bugs.webkit.org/show_bug.cgi?id=163870
+
+        Reviewed by Zalan Bujtas.
+
+        * 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.
+
 2016-10-23  Antti Koivisto  <an...@apple.com>
 
         Avoid unnecessary full style resolution in getComputedStyle for non-inherited properties

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (207756 => 207757)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -407,7 +407,6 @@
     CSSPropertyWebkitUserDrag,
     CSSPropertyWebkitUserModify,
     CSSPropertyWebkitUserSelect,
-    CSSPropertyWebkitWritingMode,
 #if ENABLE(CSS_REGIONS)
     CSSPropertyWebkitFlowInto,
     CSSPropertyWebkitFlowFrom,
@@ -3684,7 +3683,7 @@
             return CSSPrimitiveValue::create(style->lineSnap());
         case CSSPropertyWebkitLineAlign:
             return CSSPrimitiveValue::create(style->lineAlign());
-        case CSSPropertyWebkitWritingMode:
+        case CSSPropertyWritingMode:
             return cssValuePool.createValue(style->writingMode());
         case CSSPropertyWebkitTextCombine:
             return cssValuePool.createValue(style->textCombine());
@@ -3985,7 +3984,6 @@
         case CSSPropertyKerning:
         case CSSPropertyTextAnchor:
         case CSSPropertyVectorEffect:
-        case CSSPropertyWritingMode:
         case CSSPropertyWebkitSvgShadow:
             return svgPropertyValue(propertyID, DoNotUpdateLayout);
         case CSSPropertyCustom:

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (207756 => 207757)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2016-10-24 14:39:40 UTC (rev 207757)
@@ -3242,8 +3242,13 @@
 
     switch (m_value.valueID) {
     case CSSValueHorizontalTb:
+    case CSSValueLrTb:
+    case CSSValueRl:
+    case CSSValueRlTb:
         return TopToBottomWritingMode;
     case CSSValueVerticalRl:
+    case CSSValueTb:
+    case CSSValueTbRl:
         return RightToLeftWritingMode;
     case CSSValueVerticalLr:
         return LeftToRightWritingMode;
@@ -4887,57 +4892,6 @@
     return TA_START;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(SVGWritingMode e)
-    : CSSValue(PrimitiveClass)
-{
-    m_primitiveUnitType = CSS_VALUE_ID;
-    switch (e) {
-    case WM_LRTB:
-        m_value.valueID = CSSValueLrTb;
-        break;
-    case WM_LR:
-        m_value.valueID = CSSValueLr;
-        break;
-    case WM_RLTB:
-        m_value.valueID = CSSValueRlTb;
-        break;
-    case WM_RL:
-        m_value.valueID = CSSValueRl;
-        break;
-    case WM_TBRL:
-        m_value.valueID = CSSValueTbRl;
-        break;
-    case WM_TB:
-        m_value.valueID = CSSValueTb;
-        break;
-    }
-}
-
-template<> inline CSSPrimitiveValue::operator SVGWritingMode() const
-{
-    ASSERT(isValueID());
-
-    switch (m_value.valueID) {
-    case CSSValueLrTb:
-        return WM_LRTB;
-    case CSSValueLr:
-        return WM_LR;
-    case CSSValueRlTb:
-        return WM_RLTB;
-    case CSSValueRl:
-        return WM_RL;
-    case CSSValueTbRl:
-        return WM_TBRL;
-    case CSSValueTb:
-        return WM_TB;
-    default:
-        break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return WM_LRTB;
-}
-
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(const Color& color)
     : CSSValue(PrimitiveClass)
 {

Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (207756 => 207757)


--- trunk/Source/WebCore/css/CSSPropertyNames.in	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in	2016-10-24 14:39:40 UTC (rev 207757)
@@ -123,8 +123,9 @@
 #if defined(ENABLE_TEXT_AUTOSIZING) && ENABLE_TEXT_AUTOSIZING
 -webkit-text-size-adjust [Inherited, Custom=Value]
 #endif
--webkit-writing-mode [Inherited, Custom=Value]
--epub-writing-mode = -webkit-writing-mode
+writing-mode [Inherited, Custom=Value]
+-webkit-writing-mode = writing-mode
+-epub-writing-mode = writing-mode
 -webkit-text-zoom [Inherited, Custom=Value]
 zoom [Custom=All]
 font-synthesis [Inherited, FontProperty, Converter=FontSynthesis]
@@ -368,7 +369,6 @@
 -epub-word-break = word-break
 word-spacing [Inherited, ConditionalConverter=WordSpacing]
 word-wrap [Inherited=EOverflowWrap, NameForMethods=OverflowWrap]
-writing-mode [Inherited, SVG]
 x [Initial=initialZeroLength, Converter=Length]
 y [Initial=initialZeroLength, Converter=Length]
 z-index [AutoFunctions]

Modified: trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (207756 => 207757)


--- trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -149,8 +149,6 @@
             return CSSPrimitiveValue::create(svgStyle.dominantBaseline());
         case CSSPropertyTextAnchor:
             return CSSPrimitiveValue::create(svgStyle.textAnchor());
-        case CSSPropertyWritingMode:
-            return CSSPrimitiveValue::create(svgStyle.writingMode());
         case CSSPropertyClipPath:
             if (!svgStyle.clipperResource().isEmpty())
                 return CSSPrimitiveValue::create(svgStyle.clipperResource(), CSSPrimitiveValue::CSS_URI);

Modified: trunk/Source/WebCore/css/StyleBuilderCustom.h (207756 => 207757)


--- trunk/Source/WebCore/css/StyleBuilderCustom.h	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/StyleBuilderCustom.h	2016-10-24 14:39:40 UTC (rev 207757)
@@ -133,7 +133,7 @@
     static void applyValueWebkitTextSizeAdjust(StyleResolver&, CSSValue&);
 #endif
     static void applyValueWebkitTextZoom(StyleResolver&, CSSValue&);
-    static void applyValueWebkitWritingMode(StyleResolver&, CSSValue&);
+    static void applyValueWritingMode(StyleResolver&, CSSValue&);
     static void applyValueAlt(StyleResolver&, CSSValue&);
 #if ENABLE(CSS_SCROLL_SNAP)
     static void applyInitialWebkitScrollSnapPointsX(StyleResolver&);
@@ -705,12 +705,12 @@
     styleResolver.setFontDescription(fontDescription);
 }
 
-inline void StyleBuilderCustom::applyValueWebkitWritingMode(StyleResolver& styleResolver, CSSValue& value)
+inline void StyleBuilderCustom::applyValueWritingMode(StyleResolver& styleResolver, CSSValue& value)
 {
     styleResolver.setWritingMode(downcast<CSSPrimitiveValue>(value));
     styleResolver.style()->setHasExplicitlySetWritingMode(true);
 }
-
+    
 inline void StyleBuilderCustom::applyValueWebkitTextOrientation(StyleResolver& styleResolver, CSSValue& value)
 {
     styleResolver.setTextOrientation(downcast<CSSPrimitiveValue>(value));
@@ -1177,8 +1177,43 @@
 inline void StyleBuilderCustom::applyValueFill(StyleResolver& styleResolver, CSSValue& value)
 {
     SVGRenderStyle& svgStyle = styleResolver.style()->accessSVGStyle();
-    SVGPaint& svgPaint = downcast<SVGPaint>(value);
-    svgStyle.setFillPaint(svgPaint.paintType(), StyleBuilderConverter::convertSVGColor(styleResolver, svgPaint), svgPaint.uri(), styleResolver.applyPropertyToRegularStyle(), styleResolver.applyPropertyToVisitedLinkStyle());
+    
+    // FIXME-NEWPARSER: SVGPaint as a back-end CSSValue is bad, since it's bypassing
+    // the style resolver's colorFromPrimitiveValue code. It's also not necessary, since it's
+    // not even how we store things in the front end.
+    // Remove this block of code when the new parser is turned on.
+    if (value.isSVGPaint()) {
+        auto& svgPaint = downcast<SVGPaint>(value);
+        svgStyle.setFillPaint(svgPaint.paintType(), StyleBuilderConverter::convertSVGColor(styleResolver, svgPaint), svgPaint.uri(), styleResolver.applyPropertyToRegularStyle(), styleResolver.applyPropertyToVisitedLinkStyle());
+        return;
+    }
+    
+    const CSSPrimitiveValue* localValue = value.isPrimitiveValue() ? &downcast<CSSPrimitiveValue>(value) : nullptr;
+    String url;
+    if (value.isValueList()) {
+        const CSSValueList& list = downcast<CSSValueList>(value);
+        url = ""
+        localValue = downcast<CSSPrimitiveValue>(list.item(1));
+    }
+    
+    if (!localValue)
+        return;
+    
+    Color color;
+    SVGPaint::SVGPaintType paintType = SVGPaint::SVG_PAINTTYPE_RGBCOLOR;
+    if (localValue->isURI()) {
+        paintType = SVGPaint::SVG_PAINTTYPE_URI;
+        url = ""
+    } else if (localValue->isValueID() && localValue->valueID() == CSSValueNone)
+        paintType = url.isEmpty() ? SVGPaint::SVG_PAINTTYPE_NONE : SVGPaint::SVG_PAINTTYPE_URI_NONE;
+    else if (localValue->isValueID() && localValue->valueID() == CSSValueCurrentcolor) {
+        color = styleResolver.style()->color();
+        paintType = url.isEmpty() ? SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR :SVGPaint:: SVG_PAINTTYPE_URI_CURRENTCOLOR;
+    } else {
+        color = styleResolver.colorFromPrimitiveValue(*localValue);
+        paintType = url.isEmpty() ? SVGPaint::SVG_PAINTTYPE_RGBCOLOR : SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR;
+    }
+    svgStyle.setFillPaint(paintType, color, url, styleResolver.applyPropertyToRegularStyle(), styleResolver.applyPropertyToVisitedLinkStyle());
 }
 
 inline void StyleBuilderCustom::applyInitialStroke(StyleResolver& styleResolver)
@@ -1197,8 +1232,43 @@
 inline void StyleBuilderCustom::applyValueStroke(StyleResolver& styleResolver, CSSValue& value)
 {
     SVGRenderStyle& svgStyle = styleResolver.style()->accessSVGStyle();
-    auto& svgPaint = downcast<SVGPaint>(value);
-    svgStyle.setStrokePaint(svgPaint.paintType(), StyleBuilderConverter::convertSVGColor(styleResolver, svgPaint), svgPaint.uri(), styleResolver.applyPropertyToRegularStyle(), styleResolver.applyPropertyToVisitedLinkStyle());
+    
+    // FIXME-NEWPARSER: SVGPaint as a back-end CSSValue is bad, since it's bypassing
+    // the style resolver's colorFromPrimitiveValue code. It's also not necessary, since it's
+    // not even how we store things in the front end.
+    // Remove this block of code when the new parser is turned on.
+    if (value.isSVGPaint()) {
+        auto& svgPaint = downcast<SVGPaint>(value);
+        svgStyle.setStrokePaint(svgPaint.paintType(), StyleBuilderConverter::convertSVGColor(styleResolver, svgPaint), svgPaint.uri(), styleResolver.applyPropertyToRegularStyle(), styleResolver.applyPropertyToVisitedLinkStyle());
+        return;
+    }
+    
+    const CSSPrimitiveValue* localValue = value.isPrimitiveValue() ? &downcast<CSSPrimitiveValue>(value) : nullptr;
+    String url;
+    if (value.isValueList()) {
+        const CSSValueList& list = downcast<CSSValueList>(value);
+        url = ""
+        localValue = downcast<CSSPrimitiveValue>(list.item(1));
+    }
+    
+    if (!localValue)
+        return;
+    
+    Color color;
+    SVGPaint::SVGPaintType paintType = SVGPaint::SVG_PAINTTYPE_RGBCOLOR;
+    if (localValue->isURI()) {
+        paintType = SVGPaint::SVG_PAINTTYPE_URI;
+        url = ""
+    } else if (localValue->isValueID() && localValue->valueID() == CSSValueNone)
+        paintType = url.isEmpty() ? SVGPaint::SVG_PAINTTYPE_NONE : SVGPaint::SVG_PAINTTYPE_URI_NONE;
+    else if (localValue->isValueID() && localValue->valueID() == CSSValueCurrentcolor) {
+        color = styleResolver.style()->color();
+        paintType = url.isEmpty() ? SVGPaint::SVG_PAINTTYPE_CURRENTCOLOR :SVGPaint:: SVG_PAINTTYPE_URI_CURRENTCOLOR;
+    } else {
+        color = styleResolver.colorFromPrimitiveValue(*localValue);
+        paintType = url.isEmpty() ? SVGPaint::SVG_PAINTTYPE_RGBCOLOR : SVGPaint::SVG_PAINTTYPE_URI_RGBCOLOR;
+    }
+    svgStyle.setStrokePaint(paintType, color, url, styleResolver.applyPropertyToRegularStyle(), styleResolver.applyPropertyToVisitedLinkStyle());
 }
 
 inline void StyleBuilderCustom::applyInitialWebkitSvgShadow(StyleResolver& styleResolver)

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (207756 => 207757)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -1292,7 +1292,7 @@
     direction = style.direction();
     writingMode = style.writingMode();
 
-    bool hadImportantWebkitWritingMode = false;
+    bool hadImportantWritingMode = false;
     bool hadImportantDirection = false;
 
     for (const auto& matchedProperties : matchResult.matchedProperties()) {
@@ -1301,10 +1301,10 @@
             if (!property.value()->isPrimitiveValue())
                 continue;
             switch (property.id()) {
-            case CSSPropertyWebkitWritingMode:
-                if (!hadImportantWebkitWritingMode || property.isImportant()) {
+            case CSSPropertyWritingMode:
+                if (!hadImportantWritingMode || property.isImportant()) {
                     writingMode = downcast<CSSPrimitiveValue>(*property.value());
-                    hadImportantWebkitWritingMode = property.isImportant();
+                    hadImportantWritingMode = property.isImportant();
                 }
                 break;
             case CSSPropertyDirection:

Modified: trunk/Source/WebCore/css/parser/CSSParser.cpp (207756 => 207757)


--- trunk/Source/WebCore/css/parser/CSSParser.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/parser/CSSParser.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -1013,10 +1013,6 @@
             return true;
         }
         break;
-    case CSSPropertyWebkitWritingMode:
-        if (valueID >= CSSValueHorizontalTb && valueID <= CSSValueHorizontalBt)
-            return true;
-        break;
     case CSSPropertyWhiteSpace: // normal | pre | nowrap | inherit
         if (valueID == CSSValueNormal || valueID == CSSValuePre || valueID == CSSValuePreWrap || valueID == CSSValuePreLine || valueID == CSSValueNowrap)
             return true;
@@ -1127,7 +1123,9 @@
             return true;
         break;
     case CSSPropertyWritingMode:
-        if (valueID == CSSValueLrTb || valueID == CSSValueRlTb || valueID == CSSValueTbRl || valueID == CSSValueLr || valueID == CSSValueRl || valueID == CSSValueTb)
+        if ((valueID >= CSSValueHorizontalTb && valueID <= CSSValueHorizontalBt)
+            || valueID == CSSValueLrTb || valueID == CSSValueRlTb || valueID == CSSValueTbRl
+            || valueID == CSSValueLr || valueID == CSSValueRl || valueID == CSSValueTb)
             return true;
         break;
     default:

Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (207756 => 207757)


--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -741,11 +741,10 @@
         return valueID == CSSValueReadOnly || valueID == CSSValueReadWrite || valueID == CSSValueReadWritePlaintextOnly;
     case CSSPropertyWebkitUserSelect: // auto | none | text | all
         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueText || valueID == CSSValueAll;
-    case CSSPropertyWebkitWritingMode:
-        return valueID >= CSSValueHorizontalTb && valueID <= CSSValueHorizontalBt;
     case CSSPropertyWritingMode:
-        return valueID == CSSValueHorizontalTb
-            || valueID == CSSValueVerticalRl || valueID == CSSValueVerticalLr
+        // Note that horizontal-bt is not supported by the unprefixed version of
+        // the property, only by the -webkit- version.
+        return (valueID >= CSSValueHorizontalTb && valueID <= CSSValueHorizontalBt)
             || valueID == CSSValueLrTb || valueID == CSSValueRlTb || valueID == CSSValueTbRl
             || valueID == CSSValueLr || valueID == CSSValueRl || valueID == CSSValueTb;
     case CSSPropertyWhiteSpace: // normal | pre | nowrap
@@ -877,7 +876,6 @@
     case CSSPropertyWebkitUserDrag:
     case CSSPropertyWebkitUserModify:
     case CSSPropertyWebkitUserSelect:
-    case CSSPropertyWebkitWritingMode:
     case CSSPropertyWhiteSpace:
     case CSSPropertyWordBreak:
     case CSSPropertyWordWrap:

Modified: trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp (207756 => 207757)


--- trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/html/track/TextTrackCueGeneric.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -140,7 +140,7 @@
 
     if (cue->backgroundColor().isValid())
         setInlineStyleProperty(CSSPropertyBackgroundColor, cue->backgroundColor().serialized());
-    setInlineStyleProperty(CSSPropertyWebkitWritingMode, cue->getCSSWritingMode(), false);
+    setInlineStyleProperty(CSSPropertyWritingMode, cue->getCSSWritingMode(), false);
     setInlineStyleProperty(CSSPropertyWhiteSpace, CSSValuePreWrap);
 }
 

Modified: trunk/Source/WebCore/html/track/VTTCue.cpp (207756 => 207757)


--- trunk/Source/WebCore/html/track/VTTCue.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/html/track/VTTCue.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -158,7 +158,7 @@
     setInlineStyleProperty(CSSPropertyDirection, m_cue.getCSSWritingDirection());
 
     // the 'writing-mode' property must be set to writing-mode
-    setInlineStyleProperty(CSSPropertyWebkitWritingMode, m_cue.getCSSWritingMode(), false);
+    setInlineStyleProperty(CSSPropertyWritingMode, m_cue.getCSSWritingMode(), false);
 
     std::pair<float, float> position = m_cue.getCSSPosition();
 

Modified: trunk/Source/WebCore/rendering/RenderLineBreak.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/RenderLineBreak.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/RenderLineBreak.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -264,7 +264,7 @@
 
     bool isFixed = false;
     IntRect absRect = localToAbsoluteQuad(FloatRect(rect), UseTransforms, &isFixed).enclosingBoundingBox();
-    bool boxIsHorizontal = !box->isSVGInlineTextBox() ? box->isHorizontal() : !style().svgStyle().isVerticalWritingMode();
+    bool boxIsHorizontal = !box->isSVGInlineTextBox() ? box->isHorizontal() : !style().isVerticalWritingMode();
     // If the containing block is an inline element, we want to check the inlineBoxWrapper orientation
     // to determine the orientation of the block. In this case we also use the inlineBoxWrapper to
     // determine if the element is the last on the line.

Modified: trunk/Source/WebCore/rendering/RenderText.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/RenderText.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/RenderText.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -384,7 +384,7 @@
 
         bool isFixed = false;
         IntRect absRect = localToAbsoluteQuad(FloatRect(rect), UseTransforms, &isFixed).enclosingBoundingBox();
-        bool boxIsHorizontal = !box->isSVGInlineTextBox() ? box->isHorizontal() : !style().svgStyle().isVerticalWritingMode();
+        bool boxIsHorizontal = !box->isSVGInlineTextBox() ? box->isHorizontal() : !style().isVerticalWritingMode();
         // If the containing block is an inline element, we want to check the inlineBoxWrapper orientation
         // to determine the orientation of the block. In this case we also use the inlineBoxWrapper to
         // determine if the element is the last on the line.

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (207756 => 207757)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2016-10-24 14:39:40 UTC (rev 207757)
@@ -1161,6 +1161,7 @@
 
     WritingMode writingMode() const { return static_cast<WritingMode>(inherited_flags.m_writingMode); }
     bool isHorizontalWritingMode() const { return WebCore::isHorizontalWritingMode(writingMode()); }
+    bool isVerticalWritingMode() const { return WebCore::isVerticalWritingMode(writingMode()); }
     bool isFlippedLinesWritingMode() const { return WebCore::isFlippedLinesWritingMode(writingMode()); }
     bool isFlippedBlocksWritingMode() const { return WebCore::isFlippedWritingMode(writingMode()); }
 

Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -206,7 +206,6 @@
 
     // All text related properties influence layout.
     if (svg_inherited_flags._textAnchor != other->svg_inherited_flags._textAnchor
-        || svg_inherited_flags._writingMode != other->svg_inherited_flags._writingMode
         || svg_inherited_flags._glyphOrientationHorizontal != other->svg_inherited_flags._glyphOrientationHorizontal
         || svg_inherited_flags._glyphOrientationVertical != other->svg_inherited_flags._glyphOrientationVertical
         || svg_noninherited_flags.f._alignmentBaseline != other->svg_noninherited_flags.f._alignmentBaseline

Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyle.h (207756 => 207757)


--- trunk/Source/WebCore/rendering/style/SVGRenderStyle.h	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyle.h	2016-10-24 14:39:40 UTC (rev 207757)
@@ -70,7 +70,6 @@
     static LineJoin initialJoinStyle() { return MiterJoin; }
     static EShapeRendering initialShapeRendering() { return SR_AUTO; }
     static ETextAnchor initialTextAnchor() { return TA_START; }
-    static SVGWritingMode initialWritingMode() { return WM_LRTB; }
     static EGlyphOrientation initialGlyphOrientationHorizontal() { return GO_0DEG; }
     static EGlyphOrientation initialGlyphOrientationVertical() { return GO_AUTO; }
     static float initialFillOpacity() { return 1; }
@@ -126,7 +125,6 @@
     void setJoinStyle(LineJoin val) { svg_inherited_flags._joinStyle = val; }
     void setShapeRendering(EShapeRendering val) { svg_inherited_flags._shapeRendering = val; }
     void setTextAnchor(ETextAnchor val) { svg_inherited_flags._textAnchor = val; }
-    void setWritingMode(SVGWritingMode val) { svg_inherited_flags._writingMode = val; }
     void setGlyphOrientationHorizontal(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationHorizontal = val; }
     void setGlyphOrientationVertical(EGlyphOrientation val) { svg_inherited_flags._glyphOrientationVertical = val; }
     void setMaskType(EMaskType val) { svg_noninherited_flags.f.maskType = val; }
@@ -334,7 +332,6 @@
     LineJoin joinStyle() const { return (LineJoin) svg_inherited_flags._joinStyle; }
     EShapeRendering shapeRendering() const { return (EShapeRendering) svg_inherited_flags._shapeRendering; }
     ETextAnchor textAnchor() const { return (ETextAnchor) svg_inherited_flags._textAnchor; }
-    SVGWritingMode writingMode() const { return (SVGWritingMode) svg_inherited_flags._writingMode; }
     EGlyphOrientation glyphOrientationHorizontal() const { return (EGlyphOrientation) svg_inherited_flags._glyphOrientationHorizontal; }
     EGlyphOrientation glyphOrientationVertical() const { return (EGlyphOrientation) svg_inherited_flags._glyphOrientationVertical; }
     float fillOpacity() const { return fill->opacity; }
@@ -387,7 +384,6 @@
     bool hasStroke() const { return strokePaintType() != SVGPaint::SVG_PAINTTYPE_NONE; }
     bool hasVisibleStroke() const { return hasStroke() && !strokeWidth().isZero(); }
     bool hasFill() const { return fillPaintType() != SVGPaint::SVG_PAINTTYPE_NONE; }
-    bool isVerticalWritingMode() const { return writingMode() == WM_TBRL || writingMode() == WM_TB; }
     bool isolatesBlending() const { return hasMasker() || shadow(); }
 
 protected:
@@ -404,7 +400,6 @@
                 && (_textAnchor == other._textAnchor)
                 && (_colorInterpolation == other._colorInterpolation)
                 && (_colorInterpolationFilters == other._colorInterpolationFilters)
-                && (_writingMode == other._writingMode)
                 && (_glyphOrientationHorizontal == other._glyphOrientationHorizontal)
                 && (_glyphOrientationVertical == other._glyphOrientationVertical)
                 && (paintOrder == other.paintOrder);
@@ -424,7 +419,6 @@
         unsigned _textAnchor : 2; // ETextAnchor
         unsigned _colorInterpolation : 2; // EColorInterpolation
         unsigned _colorInterpolationFilters : 2; // EColorInterpolation
-        unsigned _writingMode : 3; // SVGWritingMode
         unsigned _glyphOrientationHorizontal : 3; // EGlyphOrientation
         unsigned _glyphOrientationVertical : 3; // EGlyphOrientation
         unsigned paintOrder : 3; // PaintOrder
@@ -481,7 +475,6 @@
         svg_inherited_flags._joinStyle = initialJoinStyle();
         svg_inherited_flags._colorInterpolation = initialColorInterpolation();
         svg_inherited_flags._colorInterpolationFilters = initialColorInterpolationFilters();
-        svg_inherited_flags._writingMode = initialWritingMode();
         svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientationHorizontal();
         svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationVertical();
         svg_inherited_flags.paintOrder = initialPaintOrder();

Modified: trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h (207756 => 207757)


--- trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/style/SVGRenderStyleDefs.h	2016-10-24 14:39:40 UTC (rev 207757)
@@ -57,10 +57,6 @@
         SR_AUTO, SR_OPTIMIZESPEED, SR_CRISPEDGES, SR_GEOMETRICPRECISION
     };
 
-    enum SVGWritingMode {
-        WM_LRTB, WM_LR, WM_RLTB, WM_RL, WM_TBRL, WM_TB
-    };
-
     enum EGlyphOrientation {
         GO_0DEG, GO_90DEG, GO_180DEG, GO_270DEG, GO_AUTO
     };

Modified: trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGInlineText.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -240,6 +240,11 @@
     // FIXME: We need to better handle the case when we compute very small fonts below (below 1pt).
     fontDescription.setComputedSize(Style::computedFontSizeFromSpecifiedSizeForSVGInlineText(fontDescription.computedSize(), fontDescription.isAbsoluteSize(), scalingFactor, renderer.document()));
 
+    // SVG controls its own glyph orientation, so don't allow writing-mode
+    // to affect it.
+    if (fontDescription.orientation() != FontOrientation::Horizontal)
+        fontDescription.setOrientation(FontOrientation::Horizontal);
+
     scaledFont = FontCascade(fontDescription, 0, 0);
     scaledFont.update(&renderer.document().fontSelector());
 }

Modified: trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -323,7 +323,7 @@
         // FIXME: Remove this hack, once the new text layout engine is completly landed. We want to preserve the old layout test results for now.
         ts << "chunk 1 ";
         ETextAnchor anchor = svgStyle.textAnchor();
-        bool isVerticalText = svgStyle.isVerticalWritingMode();
+        bool isVerticalText = textBox->renderer().style().isVerticalWritingMode();
         if (anchor == TA_MIDDLE) {
             ts << "(middle anchor";
             if (isVerticalText)

Modified: trunk/Source/WebCore/rendering/svg/SVGTextChunk.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/svg/SVGTextChunk.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/svg/SVGTextChunk.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -37,7 +37,7 @@
     if (!style.isLeftToRightDirection())
         m_chunkStyle |= SVGTextChunk::RightToLeftText;
 
-    if (svgStyle.isVerticalWritingMode())
+    if (style.isVerticalWritingMode())
         m_chunkStyle |= SVGTextChunk::VerticalText;
     
     switch (svgStyle.textAnchor()) {

Modified: trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -220,7 +220,7 @@
     const RenderStyle& style = text.style();
 
     textBox.clearTextFragments();
-    m_isVerticalText = style.svgStyle().isVerticalWritingMode();
+    m_isVerticalText = style.isVerticalWritingMode();
     layoutTextOnLineOrPath(textBox, text, style);
 
     if (m_inPathLayout) {

Modified: trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp (207756 => 207757)


--- trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp	2016-10-24 11:50:29 UTC (rev 207756)
+++ trunk/Source/WebCore/rendering/svg/SVGTextQuery.cpp	2016-10-24 14:39:40 UTC (rev 207757)
@@ -115,7 +115,7 @@
         queryData->textBox = m_textBoxes.at(textBoxPosition);
         queryData->textRenderer = &queryData->textBox->renderer();
 
-        queryData->isVerticalText = queryData->textRenderer->style().svgStyle().isVerticalWritingMode();
+        queryData->isVerticalText = queryData->textRenderer->style().isVerticalWritingMode();
         const Vector<SVGTextFragment>& fragments = queryData->textBox->textFragments();
     
         // Loop over all text fragments in this text box, firing a callback for each.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to