Find in page for typographic quotes does not find low (German) quotes
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2018 01:19:51 +0000 (01:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jun 2018 01:19:51 +0000 (01:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187164
<rdar://problem/29612785>
Source/WebCore:

Patch by Olivia Barnett <obarnett@apple.com> on 2018-06-28
Reviewed by Tim Horton.

Added additional quote test to LayoutTests/fast/text/find-quotes.html.

Added functionality to replace German quotes when matching.

* editing/TextIterator.cpp:
(WebCore::foldQuoteMark):
(WebCore::foldQuoteMarks):

Source/WTF:

Patch by Olivia Barnett <obarnett@apple.com> on 2018-06-28
Reviewed by Tim Horton.

Added Unicode definitions for German quotation marks.

* wtf/unicode/CharacterNames.h:

LayoutTests:

Patch by Olivia Barnett <obarnett@apple.com> on 2018-06-28
Reviewed by Tim Horton.

Added additional test for German quotes.

* fast/text/find-quotes.html:

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

LayoutTests/ChangeLog
LayoutTests/fast/text/find-quotes.html
Source/WTF/ChangeLog
Source/WTF/wtf/unicode/CharacterNames.h
Source/WebCore/ChangeLog
Source/WebCore/editing/TextIterator.cpp

index c2d9c31..73fc6c7 100644 (file)
@@ -1,3 +1,15 @@
+2018-06-28  Olivia Barnett  <obarnett@apple.com>
+        
+        Find in page for typographic quotes does not find low (German) quotes
+        https://bugs.webkit.org/show_bug.cgi?id=187164
+        <rdar://problem/29612785>
+       
+        Reviewed by Tim Horton.
+
+        Added additional test for German quotes.
+
+        * fast/text/find-quotes.html:
+
 2018-06-28  Zalan Bujtas  <zalan@apple.com>
 
         [iOS] Unreviewed test gardening.
index 523c4a9..b9b5e04 100644 (file)
@@ -15,7 +15,9 @@
         var hebrewPunctuationGeresh = String.fromCharCode(0x05F3);
         var hebrewPunctuationGershayim = String.fromCharCode(0x05F4);
         var leftDoubleQuotationMark = String.fromCharCode(0x201C);
+        var leftLowDoubleQuotationMark = String.fromCharCode(0x201E);
         var leftSingleQuotationMark = String.fromCharCode(0x2018);
+        var leftLowSingleQuotationMark = String.fromCharCode(0x201A);
         var quotationMark = '"';
         var rightDoubleQuotationMark = String.fromCharCode(0x201D);
         var rightSingleQuotationMark = String.fromCharCode(0x2019);
@@ -49,8 +51,8 @@
             if (window.testRunner)
                 testRunner.dumpAsText();
 
-            var singleQuotes = [ "apostrophe", "hebrewPunctuationGeresh", "leftSingleQuotationMark", "rightSingleQuotationMark" ];
-            var doubleQuotes = [ "quotationMark", "hebrewPunctuationGershayim", "leftDoubleQuotationMark", "rightDoubleQuotationMark" ];
+            var singleQuotes = [ "apostrophe", "hebrewPunctuationGeresh", "leftSingleQuotationMark", "rightSingleQuotationMark", "leftLowSingleQuotationMark"];
+            var doubleQuotes = [ "quotationMark", "hebrewPunctuationGershayim", "leftDoubleQuotationMark", "rightDoubleQuotationMark", "leftLowDoubleQuotationMark"];
 
             for (var i = 0; i < singleQuotes.length; ++i) {
                 for (var j = 0; j < singleQuotes.length; ++j)
index 326ba6f..49752f3 100644 (file)
@@ -1,3 +1,15 @@
+2018-06-28  Olivia Barnett  <obarnett@apple.com>
+
+        Find in page for typographic quotes does not find low (German) quotes
+        https://bugs.webkit.org/show_bug.cgi?id=187164
+        <rdar://problem/29612785>
+
+        Reviewed by Tim Horton.
+
+        Added Unicode definitions for German quotation marks.
+
+        * wtf/unicode/CharacterNames.h:
+
 2018-06-27  Jonathan Bedard  <jbedard@apple.com>
 
         Enable WebKit iOS 12 build
index 1bdd060..eb18792 100644 (file)
@@ -60,7 +60,9 @@ const UChar ideographicComma = 0x3001;
 const UChar ideographicFullStop = 0x3002;
 const UChar ideographicSpace = 0x3000;
 const UChar leftDoubleQuotationMark = 0x201C;
+const UChar leftLowDoubleQuotationMark = 0x201E;
 const UChar leftSingleQuotationMark = 0x2018;
+const UChar leftLowSingleQuotationMark = 0x201A;
 const UChar leftToRightEmbed = 0x202A;
 const UChar leftToRightIsolate = 0x2066;
 const UChar leftToRightMark = 0x200E;
@@ -125,7 +127,9 @@ using WTF::Unicode::ideographicComma;
 using WTF::Unicode::ideographicFullStop;
 using WTF::Unicode::ideographicSpace;
 using WTF::Unicode::leftDoubleQuotationMark;
+using WTF::Unicode::leftLowDoubleQuotationMark;
 using WTF::Unicode::leftSingleQuotationMark;
+using WTF::Unicode::leftLowSingleQuotationMark;
 using WTF::Unicode::leftToRightEmbed;
 using WTF::Unicode::leftToRightIsolate;
 using WTF::Unicode::leftToRightMark;
index f96ddb8..d03835f 100644 (file)
@@ -1,3 +1,19 @@
+2018-06-28  Olivia Barnett  <obarnett@apple.com>
+
+        Find in page for typographic quotes does not find low (German) quotes
+        https://bugs.webkit.org/show_bug.cgi?id=187164
+        <rdar://problem/29612785>
+
+        Reviewed by Tim Horton.
+
+        Added additional quote test to LayoutTests/fast/text/find-quotes.html.
+
+        Added functionality to replace German quotes when matching.
+
+        * editing/TextIterator.cpp:
+        (WebCore::foldQuoteMark):
+        (WebCore::foldQuoteMarks):
+
 2018-06-28  Antti Koivisto  <antti@apple.com>
 
         REGRESSION (233281): fast/dom/location-new-window-no-crash.html and some other tests are timing out
index 4ade6f4..6650820 100644 (file)
@@ -1756,10 +1756,12 @@ static inline UChar foldQuoteMark(UChar c)
     switch (c) {
         case hebrewPunctuationGershayim:
         case leftDoubleQuotationMark:
+        case leftLowDoubleQuotationMark:
         case rightDoubleQuotationMark:
             return '"';
         case hebrewPunctuationGeresh:
         case leftSingleQuotationMark:
+        case leftLowSingleQuotationMark:
         case rightSingleQuotationMark:
             return '\'';
         default:
@@ -1775,7 +1777,9 @@ static inline String foldQuoteMarks(String string)
     string.replace(hebrewPunctuationGeresh, '\'');
     string.replace(hebrewPunctuationGershayim, '"');
     string.replace(leftDoubleQuotationMark, '"');
+    string.replace(leftLowDoubleQuotationMark, '"');
     string.replace(leftSingleQuotationMark, '\'');
+    string.replace(leftLowSingleQuotationMark, '\'');
     string.replace(rightDoubleQuotationMark, '"');
     string.replace(rightSingleQuotationMark, '\'');