mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-06-28 12:10:28 +00:00
Move ComputedProperties and CascadedProperties out of the GC. They no longer contain strong references to GC-managed data. Keep computed styles alive from DOM elements and animation updates with RefPtr. Pass style into layout constructors by reference, since layout only copies the values it needs while building nodes. Use GC::Weak for cascade source links, so entries no longer keep the style declaration or shadow root alive.
21 lines
509 B
C++
21 lines
509 B
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/DOM/Element.h>
|
|
#include <LibWeb/Layout/BlockContainer.h>
|
|
#include <LibWeb/Layout/InlineFormattingContext.h>
|
|
#include <LibWeb/Layout/ReplacedBox.h>
|
|
|
|
namespace Web::Layout {
|
|
|
|
ReplacedBox::ReplacedBox(DOM::Document& document, GC::Ptr<DOM::Element> element, CSS::ComputedProperties const& style)
|
|
: Box(document, element, style)
|
|
{
|
|
}
|
|
|
|
ReplacedBox::~ReplacedBox() = default;
|
|
|
|
}
|