Add needsPlainTextQuirk and send it to the UIProcess
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Sep 2016 23:11:49 +0000 (23:11 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Sep 2016 23:11:49 +0000 (23:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161996
-and corresponding-
rdar://problem/26013388

Rubber-stamped by Simon Fraser.

Quick clean-up.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::needsPlainTextQuirk):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp

index 2236288..c5fcb49 100644 (file)
@@ -5,6 +5,19 @@
         -and corresponding-
         rdar://problem/26013388
 
+        Rubber-stamped by Simon Fraser.
+
+        Quick clean-up.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::needsPlainTextQuirk):
+
+2016-09-14  Beth Dakin  <bdakin@apple.com>
+
+        Add needsPlainTextQuirk and send it to the UIProcess
+        https://bugs.webkit.org/show_bug.cgi?id=161996
+        -and corresponding-
+        rdar://problem/26013388
+
         Reviewed by Anders Carlsson.
 
         WebPageProxy should keep track of m_needsPlainTextQuirk.
index 1a02850..00b281e 100644 (file)
@@ -4816,8 +4816,6 @@ static bool needsPlainTextQuirk(bool needsQuirks, const URL& url)
         return false;
 
     String host = url.host();
-    String path = url.path();
-    String fragmentIdentifier = url.fragmentIdentifier();
 
     if (equalLettersIgnoringASCIICase(host, "twitter.com"))
         return true;
@@ -4825,7 +4823,8 @@ static bool needsPlainTextQuirk(bool needsQuirks, const URL& url)
     if (equalLettersIgnoringASCIICase(host, "onedrive.live.com"))
         return true;
 
-    if (equalLettersIgnoringASCIICase(host, "www.icloud.com") && (path.contains("notes") || fragmentIdentifier.contains("notes") || path.contains("/keynote/")))
+    String path = url.path();
+    if (equalLettersIgnoringASCIICase(host, "www.icloud.com") && (path.contains("notes") || url.fragmentIdentifier().contains("notes") || path.contains("/keynote/")))
         return true;
 
     if (equalLettersIgnoringASCIICase(host, "trix-editor.org"))