[Webkit-unassigned] [Bug 258725] New: Stop resolving border's current color to some hardcoded value
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 30 06:31:12 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=258725
Bug ID: 258725
Summary: Stop resolving border's current color to some
hardcoded value
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: vitaly at igalia.com
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 = [&] {
switch (colorProperty) {
case CSSPropertyBorderLeftColor:
return borderLeftStyle();
case CSSPropertyBorderRightColor:
return borderRightStyle();
case CSSPropertyBorderTopColor:
return borderTopStyle();
case CSSPropertyBorderBottomColor:
return borderBottomStyle();
default:
return BorderStyle::None;
}
}();
if (!visitedLink && (borderStyle == BorderStyle::Inset || borderStyle == BorderStyle::Outset || borderStyle == BorderStyle::Ridge || borderStyle == BorderStyle::Groove))
return { SRGBA<uint8_t> { 238, 238, 238 } };
return visitedLink ? visitedLinkColor() : color();
}
```
I can't think of any good reason for doing this.
The result can be unexpected for web developers.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230630/29e6012e/attachment-0001.htm>
More information about the webkit-unassigned
mailing list