Handle all writing-modes in downcast
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Feb 2018 17:52:34 +0000 (17:52 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Feb 2018 17:52:34 +0000 (17:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182949
<rdar://problem/37710687>

Reviewed by Myles Maxfield.

Source/WebCore:

It appears we forgot to handle the deprecated "lr"
writing-mode value.

Test: fast/writing-mode/svg-writing-modes.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator WritingMode const):

LayoutTests:

Test all the deprecated SVG writing modes.

* fast/writing-mode/svg-writing-modes-expected.html: Added.
* fast/writing-mode/svg-writing-modes.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228822 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/writing-mode/svg-writing-modes-expected.html [new file with mode: 0644]
LayoutTests/fast/writing-mode/svg-writing-modes.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h

index 5cc9439..d6f6262 100644 (file)
@@ -1,3 +1,16 @@
+2018-02-19  Dean Jackson  <dino@apple.com>
+
+        Handle all writing-modes in downcast
+        https://bugs.webkit.org/show_bug.cgi?id=182949
+        <rdar://problem/37710687>
+
+        Reviewed by Myles Maxfield.
+
+        Test all the deprecated SVG writing modes.
+
+        * fast/writing-mode/svg-writing-modes-expected.html: Added.
+        * fast/writing-mode/svg-writing-modes.html: Added.
+
 2018-02-20  Manuel Rego Casasnovas  <rego@igalia.com>
 
         [css3-text] Skip tests that need ENABLE_CSS3_TEXT
diff --git a/LayoutTests/fast/writing-mode/svg-writing-modes-expected.html b/LayoutTests/fast/writing-mode/svg-writing-modes-expected.html
new file mode 100644 (file)
index 0000000..b15ec69
--- /dev/null
@@ -0,0 +1,6 @@
+<div writing-mode="horizontal-tb">A B C</div>
+<div writing-mode="horizontal-tb">A B C</div>
+<div writing-mode="vertical-rl">A B C</div>
+<div writing-mode="horizontal-tb">A B C</div>
+<div writing-mode="horizontal-tb">A B C</div>
+<div writing-mode="vertical-lr">A B C</div>
diff --git a/LayoutTests/fast/writing-mode/svg-writing-modes.html b/LayoutTests/fast/writing-mode/svg-writing-modes.html
new file mode 100644 (file)
index 0000000..98b9ae6
--- /dev/null
@@ -0,0 +1,6 @@
+<div writing-mode="lr-tb">A B C</div>
+<div writing-mode="rl-tb">A B C</div>
+<div writing-mode="tb-rl">A B C</div>
+<div writing-mode="lr">A B C</div>
+<div writing-mode="rl">A B C</div>
+<div writing-mode="tb">A B C</div>
index 455ecd9..9100bed 100644 (file)
@@ -1,3 +1,19 @@
+2018-02-19  Dean Jackson  <dino@apple.com>
+
+        Handle all writing-modes in downcast
+        https://bugs.webkit.org/show_bug.cgi?id=182949
+        <rdar://problem/37710687>
+
+        Reviewed by Myles Maxfield.
+
+        It appears we forgot to handle the deprecated "lr"
+        writing-mode value.
+
+        Test: fast/writing-mode/svg-writing-modes.html
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::operator WritingMode const):
+
 2018-02-20  Zan Dobersek  <zdobersek@igalia.com>
 
         [Cairo] Drop target GraphicsContext usage in Cairo operations
index ff61400..15e1645 100644 (file)
@@ -3201,6 +3201,7 @@ template<> inline CSSPrimitiveValue::operator WritingMode() const
 
     switch (m_value.valueID) {
     case CSSValueHorizontalTb:
+    case CSSValueLr:
     case CSSValueLrTb:
     case CSSValueRl:
     case CSSValueRlTb: