Consider joining intersecting outlines of inlines that span multiple lines.
Categories
(Core :: Web Painting, enhancement, P3)
Tracking
()
People
(Reporter: emilio, Unassigned)
Details
(4 keywords, Whiteboard: [layout:backlog:quality])
Attachments
(1 file)
(deleted),
text/html
|
Details |
Consider the attached test-case.
In WebKit / Blink, it seems they join all the outline boxes first and then paint the outline path over it. Gecko paints a separate outline box for each inline, which causes overlap and so on.
I think WebKit's result is more desirable in this case. I don't know how easy this would be to implement though. Are there cases where the Gecko behavior would be preferable?
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
https://drafts.csswg.org/css-ui-4/#propdef-outline seems to allow WebKit's behavior:
Outlines may be non-rectangular. For example, if the element is broken across several lines, the outline should be an outline or minimum set of outlines that encloses all the element’s boxes.
Reporter | ||
Comment 2•5 years ago
|
||
I assume that per this comment by roc in 2006 this is just not yet implemented, lol
Reporter | ||
Comment 4•5 years ago
|
||
I was thinking of making an nsDisplayOutline just on the first continuation and make it responsible for drawing all the other outlines, but that seems that it may not play well with invalidation...
Matt, do we have a precedent for something like this?
Comment 5•5 years ago
|
||
We do display item merging by putting them together in one temporary item1. Based on the comment, it seems this was also meant to be used by nsDisplayOutline. Merging happens at the display list iteration level, in FlattenedDisplayListIterator2.
This code is very messy because it previously required mutating the display items, which we cannot do with retained display lists. There is also a second problem with retained display lists: the display item ordering can change during display list merging, which means that we cannot rely on items staying consecutive (it should still be the common case). As it is, the code only works for container based display items.
Maybe this "grouping of display items" is better done during display list building or display list merging rather than painting?
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
I was thinking of making an nsDisplayOutline just on the first continuation and make it responsible for drawing all the other outlines, but that seems that it may not play well with invalidation...
I think this might be a good approach if the invalidation does not break.
Comment 6•5 years ago
|
||
This is really a duplicate of bug 266122.
Reporter | ||
Comment 7•5 years ago
|
||
I guessed there should be a bug for this, but I searched for "join" instead of "encompass" / "connect"... Thanks David! :)
Description
•