You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!DOCTYPE html><html><head><style>.outer{border:solid 1px}.inner{display:inline-block}</style></head><body><spanclass="outer"><spanclass="inner">text</span>
next
</span></body></html>
I think this code is supposed to draw the border when building the display list for span#outer, but is incorrectly using node.style from the child node, rather than self.style.
Are you sure about that? As a reminder, <span style="border:red"><span style="border:black">TEST</span></span> is expected to work, too, even though there will only be one fragment (inline elements don't generate flows, and fragments are never nested). I'm pretty sure that's what the inline_contexts.nodes list is for.
I pretty much understand what the problem is: the inner block flow isn't drawing a border, because there's nothing that would make it do so, and the fragment isn't drawing a border because it's not a primary fragment.
If I remove the is_primary_fragment conditional, it draws the rest of the border... sort of. It's offset wrong, probably for the same reason (if you look closely) that the text is already off the baseline.
Activity
mbrubeck commentedon Apr 4, 2016
I think this code is supposed to draw the border when building the display list for
span#outer, but is incorrectly usingnode.stylefrom the child node, rather thanself.style.notriddle commentedon Apr 4, 2016
Are you sure about that? As a reminder,
<span style="border:red"><span style="border:black">TEST</span></span>is expected to work, too, even though there will only be one fragment (inline elements don't generate flows, and fragments are never nested). I'm pretty sure that's what theinline_contexts.nodeslist is for.mbrubeck commentedon Apr 4, 2016
Oh yes, I misunderstood what that code was doing.
notriddle commentedon Apr 4, 2016
I pretty much understand what the problem is: the inner block flow isn't drawing a border, because there's nothing that would make it do so, and the fragment isn't drawing a border because it's not a primary fragment.
If I remove the
is_primary_fragmentconditional, it draws the rest of the border... sort of. It's offset wrong, probably for the same reason (if you look closely) that the text is already off the baseline.Auto merge of #10419 - notriddle:whitespace_border, r=mbrubeck
nox commentedon Sep 30, 2017
This is still true.
Loirooriol commentedon Dec 12, 2024
Fixed in layout 2020