Title: [256217] trunk/Source/WebCore
Revision
256217
Author
[email protected]
Date
2020-02-10 14:40:26 -0800 (Mon, 10 Feb 2020)

Log Message

REGRESSION (r246055): Data detected URLs are no longer blue
https://bugs.webkit.org/show_bug.cgi?id=207490
rdar://problem/58760796

Reviewed by Tim Horton.

This matches how the old code ended up working, since the old approach inlined the blue link color when
"shouldUseLightLinks" was false. This change allows the link style color to naturally apply as expected.
DD only uses light links when the category is "link" or "phone number" and not in the email signature.

* editing/cocoa/DataDetection.mm:
(WebCore::DataDetection::detectContentInRange): Only set color: currentColor when setting underline color.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (256216 => 256217)


--- trunk/Source/WebCore/ChangeLog	2020-02-10 22:39:13 UTC (rev 256216)
+++ trunk/Source/WebCore/ChangeLog	2020-02-10 22:40:26 UTC (rev 256217)
@@ -1,3 +1,18 @@
+2020-02-10  Timothy Hatcher  <[email protected]>
+
+        REGRESSION (r246055): Data detected URLs are no longer blue
+        https://bugs.webkit.org/show_bug.cgi?id=207490
+        rdar://problem/58760796
+
+        Reviewed by Tim Horton.
+
+        This matches how the old code ended up working, since the old approach inlined the blue link color when
+        "shouldUseLightLinks" was false. This change allows the link style color to naturally apply as expected.
+        DD only uses light links when the category is "link" or "phone number" and not in the email signature.
+
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::DataDetection::detectContentInRange): Only set color: currentColor when setting underline color.
+
 2020-02-10  James Howard  <[email protected]>
 
         Standard gamepad mapping for GameControllerGamepads

Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (256216 => 256217)


--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2020-02-10 22:39:13 UTC (rev 256216)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2020-02-10 22:40:26 UTC (rev 256217)
@@ -612,7 +612,6 @@
             Ref<HTMLAnchorElement> anchorElement = HTMLAnchorElement::create(document);
             anchorElement->setHref(correspondingURL);
             anchorElement->setDir("ltr");
-            anchorElement->setInlineStyleProperty(CSSPropertyColor, CSSValueCurrentcolor);
 
             if (shouldUseLightLinks) {
                 document.updateStyleIfNeeded();
@@ -630,6 +629,7 @@
                         double overrideAlphaMultiplier = 0.38;
                         auto underlineColor = Color(makeRGBAFromHSLA(hue, saturation, overrideLightness, overrideAlphaMultiplier * textColor.alphaAsFloat()));
 
+                        anchorElement->setInlineStyleProperty(CSSPropertyColor, CSSValueCurrentcolor);
                         anchorElement->setInlineStyleProperty(CSSPropertyTextDecorationColor, underlineColor.cssText());
                     }
                 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to