border-widths shouldn't be layout-dependent.
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Tracking
()
People
(Reporter: emilio, Assigned: emilio)
Details
Attachments
(1 obsolete file)
In the following test-case:
<!doctype html>
<div id="inline" style="display: table-row; border-top: 10px solid red">A</span>
<pre>
<script>
document.writeln(getComputedStyle(inline).borderTopWidth);
</script>
</pre>
We return zero but other engines just return 10px, which is the computed border.
https://drafts.csswg.org/cssom/#resolved-values doesn't list border widths, so we're on the wrong here I think.
Assignee | ||
Comment 1•5 years ago
|
||
They're not listed in https://drafts.csswg.org/cssom/#resolved-values.
This matches other engines as well.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
A few tests failed with this, because our used border-width for themed stuff like <button>
is theme-dependent. I could fix the tests by using appearance: none, but I think it's unfortunate so I'd like to come up with a better solution if any.
Updated•5 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
The test-case from comment 0 started returning 10px
in Firefox 70 (20190802215241) (Pushlog).
Emilio, do you think this bug was fixed by bug 1404140?
Assignee | ||
Comment 4•2 years ago
|
||
This particular case was fixed by bug 1404140. Appearance can still affect it tho, see this code: https://searchfox.org/mozilla-central/rev/8fd39dc89c68501a354446a8681ec8263d15e5aa/layout/style/nsComputedDOMStyle.cpp#2200
Description
•