1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

LibWeb: Make painting order more spec-compliant

Now our painting order inside stacking contexts is closer to the
algorithm specified by CSS 2.1 (see section 9.9 and Appendix E)
This commit is contained in:
Egor Ananyin 2021-05-07 19:03:25 +03:00 committed by Andreas Kling
parent 33af7075e7
commit d2b6148787
8 changed files with 89 additions and 43 deletions

View file

@ -56,18 +56,7 @@ void InitialContainingBlockBox::paint_document_background(PaintContext& context)
void InitialContainingBlockBox::paint_all_phases(PaintContext& context)
{
paint_document_background(context);
paint(context, PaintPhase::Background);
paint(context, PaintPhase::Border);
paint(context, PaintPhase::Foreground);
if (context.has_focus())
paint(context, PaintPhase::FocusOutline);
paint(context, PaintPhase::Overlay);
}
void InitialContainingBlockBox::paint(PaintContext& context, PaintPhase phase)
{
stacking_context()->paint(context, phase);
stacking_context()->paint(context);
}
HitTestResult InitialContainingBlockBox::hit_test(const Gfx::IntPoint& position, HitTestType type) const