<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>258725</bug_id>
          
          <creation_ts>2023-06-30 06:31:12 -0700</creation_ts>
          <short_desc>Stop resolving border&apos;s current color to some hardcoded value</short_desc>
          <delta_ts>2024-09-18 22:40:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=261847</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>261847</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Vitaly Dyackhov">vitaly</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>dholbert</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1964465</commentid>
    <comment_count>0</comment_count>
    <who name="Vitaly Dyackhov">vitaly</who>
    <bug_when>2023-06-30 06:31:12 -0700</bug_when>
    <thetext>In `Color RenderStyle::colorResolvingCurrentColor(CSSPropertyID colorProperty, bool visitedLink) const` we currently return some hardcoded value for border colors:
```
auto result = unresolvedColorForProperty(colorProperty, visitedLink);

if (result.isCurrentColor()) {
    auto borderStyle = [&amp;] {
        switch (colorProperty) {
        case CSSPropertyBorderLeftColor:
            return borderLeftStyle();
        case CSSPropertyBorderRightColor:
            return borderRightStyle();
        case CSSPropertyBorderTopColor:
            return borderTopStyle();
        case CSSPropertyBorderBottomColor:
            return borderBottomStyle();
        default:
            return BorderStyle::None;
        }
    }();

    if (!visitedLink &amp;&amp; (borderStyle == BorderStyle::Inset || borderStyle == BorderStyle::Outset || borderStyle == BorderStyle::Ridge || borderStyle == BorderStyle::Groove))
        return { SRGBA&lt;uint8_t&gt; { 238, 238, 238 } };

    return visitedLink ? visitedLinkColor() : color();
}

```

I can&apos;t think of any good reason for doing this.

The result can be unexpected for web developers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964467</commentid>
    <comment_count>1</comment_count>
    <who name="Vitaly Dyackhov">vitaly</who>
    <bug_when>2023-06-30 06:35:45 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/15447</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1965543</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-07-07 06:32:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/111905474&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1966788</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-07-14 12:06:07 -0700</bug_when>
    <thetext>*** Bug 256528 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1967212</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-07-18 11:12:53 -0700</bug_when>
    <thetext>Committed 266134@main (0aa032e26bbd): &lt;https://commits.webkit.org/266134@main&gt;

Reviewed commits have been landed. Closing PR #15447 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1967226</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2023-07-18 13:26:32 -0700</bug_when>
    <thetext>Do we understand why this code was added in the first place?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978871</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2023-09-20 19:48:23 -0700</bug_when>
    <thetext>This caused https://bugs.webkit.org/show_bug.cgi?id=261847</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061351</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-09-18 22:40:28 -0700</bug_when>
    <thetext>*** Bug 195015 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>