mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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:
parent
33af7075e7
commit
d2b6148787
Notes:
sideshowbarker
2024-07-18 18:34:39 +09:00
Author: https://github.com/Cleverking2003
Commit: d2b6148787
Pull-request: https://github.com/SerenityOS/serenity/pull/6917
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gmta
8 changed files with 89 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue