CSSFontStyleValue::isItalic seems a bit bogus.
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jul 2017 00:26:31 +0000 (00:26 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Jul 2017 00:26:31 +0000 (00:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174149

Reviewed by Tim Horton.

Source/WebCore:

Simple typo.

Test: editing/execCommand/italicizeByCharacter-normal.html

* css/CSSFontStyleValue.h:

LayoutTests:

* editing/execCommand/italicizeByCharacter-normal-expected.txt: Added.
* editing/execCommand/italicizeByCharacter-normal.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/editing/execCommand/italicizeByCharacter-normal-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/italicizeByCharacter-normal.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSFontStyleValue.h

index 6279c14..a03c493 100644 (file)
@@ -1,3 +1,13 @@
+2017-07-05  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        CSSFontStyleValue::isItalic seems a bit bogus.
+        https://bugs.webkit.org/show_bug.cgi?id=174149
+
+        Reviewed by Tim Horton.
+
+        * editing/execCommand/italicizeByCharacter-normal-expected.txt: Added.
+        * editing/execCommand/italicizeByCharacter-normal.html: Added.
+
 2017-07-05  Matt Lewis  <jlewis3@apple.com>
 
         Skipped webgl/1.0.2/conformance/glsl/misc/shader-with-non-reserved-words.html.
diff --git a/LayoutTests/editing/execCommand/italicizeByCharacter-normal-expected.txt b/LayoutTests/editing/execCommand/italicizeByCharacter-normal-expected.txt
new file mode 100644 (file)
index 0000000..7d914d1
--- /dev/null
@@ -0,0 +1,4 @@
+This tests italicizing the first character. The double quotation at the beginning must be italicized.
+
+"The quick brown fox jumps over the lazy dog" uses every letter in the english language.
+execItalicCommand: <span id="test"><i>"</i></span><span style="font-style: normal;">The quick brown fox jumps over the lazy dog" uses every letter in the english language. </span>
diff --git a/LayoutTests/editing/execCommand/italicizeByCharacter-normal.html b/LayoutTests/editing/execCommand/italicizeByCharacter-normal.html
new file mode 100644 (file)
index 0000000..f22af83
--- /dev/null
@@ -0,0 +1,38 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    padding: 12px; 
+    font-size: 24px; 
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    execExtendSelectionForwardByCharacterCommand();
+    italicCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+<p>This tests italicizing the first character.  The double quotation at the beginning must be italicized.</p>
+<div contenteditable id="root" class="editing">
+<span id="test" style="font-style: normal;">"The quick brown fox jumps over the lazy dog" uses every
+letter in the english language.
+</span>
+</div>
+
+<script>
+runDumpAsTextEditingTest();
+</script>
+
+</body>
+</html>
+
index dd15605..94fece7 100644 (file)
@@ -1,3 +1,16 @@
+2017-07-05  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        CSSFontStyleValue::isItalic seems a bit bogus.
+        https://bugs.webkit.org/show_bug.cgi?id=174149
+
+        Reviewed by Tim Horton.
+
+        Simple typo.
+
+        Test: editing/execCommand/italicizeByCharacter-normal.html
+
+        * css/CSSFontStyleValue.h:
+
 2017-07-05  Brady Eidson  <beidson@apple.com>
 
         Allow navigations in subframes to get a ShouldOpenExternalURLsPolicy of "ShouldAllow".
index c21bc29..c4a9356 100644 (file)
@@ -50,7 +50,7 @@ public:
     {
         if (!obliqueValue) {
             auto valueID = fontStyleValue->valueID();
-            return valueID == CSSValueItalic || CSSValueOblique;
+            return valueID == CSSValueItalic || valueID == CSSValueOblique;
         }
         return obliqueValue->value<float>(CSSPrimitiveValue::CSS_DEG) >= static_cast<float>(italicValue());
     }