mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibWeb: Paint InlineNode overlay in correct phase, skip pseudo-elements
We were painting this in the Foreground phase by mistake. Also, the `inspected_node() == dom_node()` check returns true for pseudo-elements (both values are nullptr) so I've added an extra check there. As noted, once pseudo-elements are inspectable we will need to revisit this.
This commit is contained in:
parent
b76ee0e30d
commit
5113128bc9
1 changed files with 3 additions and 1 deletions
|
@ -112,7 +112,9 @@ void InlineNode::paint(PaintContext& context, PaintPhase phase)
|
|||
});
|
||||
}
|
||||
|
||||
if (phase == PaintPhase::Foreground && document().inspected_node() == dom_node()) {
|
||||
// FIXME: We check for a non-null dom_node(), since pseudo-elements have a null one and were getting
|
||||
// highlighted incorrectly. A better solution will be needed if we want to inspect them too.
|
||||
if (phase == PaintPhase::Overlay && dom_node() && document().inspected_node() == dom_node()) {
|
||||
// FIXME: This paints a double-thick border between adjacent fragments, where ideally there
|
||||
// would be none. Once we implement non-rectangular outlines for the `outline` CSS
|
||||
// property, we can use that here instead.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue