[Webkit-unassigned] [Bug 195015] New: WebKit resolves its initial `border-color` to either currentColor or to rgb(238, 238, 238), depending on `border-style` (for td and th elements)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 25 13:38:01 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=195015

            Bug ID: 195015
           Summary: WebKit resolves its initial `border-color` to either
                    currentColor or to rgb(238,238,238), depending on
                    `border-style` (for td and th elements)
           Product: WebKit
           Version: Safari 12
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: dholbert at mozilla.com
                CC: bfulgham at webkit.org, simon.fraser at apple.com,
                    zalan at apple.com

Created attachment 362924

  --> https://bugs.webkit.org/attachment.cgi?id=362924&action=review

testcase 1

(This is a bug that Blink & WebKit have mostly in common -- blink version of the bug is at https://bugs.chromium.org/p/chromium/issues/detail?id=935708 )

STR:
 1. Load https://jsfiddle.net/Lhcswgp8/

EXPECTED RESULTS:
The borders should all have the same color (aside from some minor shading for inset/outset).  They should all be teal, via `color:teal` and via `border-color` having an initial value of `currentColor`.

ACTUAL RESULTS:
The inset/outset-styled borders are a grayish color instead. Specifically, they are rgb(238, 238, 238) as you can see if you inspect the cell in devtools and examine its computed `border-top-color` value.

So it seems WebKit has `border-color: $MAGIC`, where $MAGIC resolves to `currentColor` for some border-styles and to rgb(238, 238, 238) for other border-styles.

Chrome has a version of the same bug --though for Chrome, "$MAGIC" is just the "currentColor" keyword itself. (i.e. Chrome exhibits the bug even if I manually specify `border-color:currentColor`, unlike WebKit where the bug goes away if I do that.)


Note: technically the WHATWG spec requires that these elements have `border-color:gray` (which is rgb(128,128,128), but no engine (not even WebKit) does that.  For these td/th elements...
 - Firefox 65, Edge 18, and IE11 all use `border-color: currentColor` and produce the expected results.
 - Chrome 72 uses `border-color: currentColor` but then has some magic behavior which depends on the border-style.
 - WebKit (Safari 12) seems to have a magic default value for `border-color` which has magic behavior that either resolves to `currentColor`, or an extremely light shade of gray (with 238 in each color channel, rather than 128, as noted above).

So I've filed https://github.com/whatwg/html/issues/4391 to update the WHATWG spec to remove this rule that nobody follows.

-- 
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/20190225/b59fae75/attachment-0001.html>


More information about the webkit-unassigned mailing list