mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibWeb: Move painting logic from Layout::Viewport to ViewportPaintable
This commit is contained in:
parent
c01c4b41e2
commit
8bb275f2ea
9 changed files with 54 additions and 48 deletions
|
@ -46,6 +46,7 @@
|
|||
#include <LibWeb/Layout/Viewport.h>
|
||||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/Painting/StackingContext.h>
|
||||
#include <LibWeb/Painting/ViewportPaintable.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
|
@ -834,9 +835,9 @@ RefPtr<StyleValue const> ResolvedCSSStyleDeclaration::style_value_for_property(L
|
|||
return IdentifierStyleValue::create(ValueID::None);
|
||||
|
||||
// The transform matrix is held by the StackingContext, so we need to make sure we have one first.
|
||||
auto const* viewport = layout_node.document().layout_node();
|
||||
auto const* viewport = layout_node.document().paintable_box();
|
||||
VERIFY(viewport);
|
||||
const_cast<Layout::Viewport&>(*viewport).build_stacking_context_tree_if_needed();
|
||||
const_cast<Painting::ViewportPaintable&>(verify_cast<Painting::ViewportPaintable>(*viewport)).build_stacking_context_tree_if_needed();
|
||||
|
||||
VERIFY(layout_node.paintable());
|
||||
auto const& paintable_box = verify_cast<Painting::PaintableBox const>(layout_node.paintable());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue