mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-27 13:32:52 +00:00
LibWeb: Make Node::parent_element return GC::Ptr
This is useful for people like myself who run with debug mode to more reliably get stacktraces without spinning up a debugger.
This commit is contained in:
parent
a14481ee05
commit
3e17b1c9ae
Notes:
github-actions[bot]
2025-04-18 09:08:36 +00:00
Author: https://github.com/shannonbooth
Commit: 3e17b1c9ae
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4393
18 changed files with 48 additions and 54 deletions
|
@ -2280,7 +2280,7 @@ static BoxTypeTransformation required_box_type_transformation(ComputedProperties
|
|||
// FIXME: Containment in a ruby container inlinifies the box’s display type, as described in [CSS-RUBY-1].
|
||||
|
||||
// NOTE: If we're computing style for a pseudo-element, the effective parent will be the originating element itself, not its parent.
|
||||
auto const* parent = pseudo_element.has_value() ? &element : element.parent_element();
|
||||
auto parent = pseudo_element.has_value() ? GC::Ptr<DOM::Element const> { &element } : element.parent_element();
|
||||
|
||||
// A parent with a grid or flex display value blockifies the box’s display type. [CSS-GRID-1] [CSS-FLEXBOX-1]
|
||||
if (parent && parent->computed_properties()) {
|
||||
|
@ -2505,7 +2505,7 @@ RefPtr<CSSStyleValue const> StyleComputer::recascade_font_size_if_needed(
|
|||
Vector<DOM::Element&> ancestors;
|
||||
if (pseudo_element.has_value())
|
||||
ancestors.append(element);
|
||||
for (auto* ancestor = element.parent_element(); ancestor; ancestor = ancestor->parent_element())
|
||||
for (auto ancestor = element.parent_element(); ancestor; ancestor = ancestor->parent_element())
|
||||
ancestors.append(*ancestor);
|
||||
|
||||
NonnullRefPtr<CSSStyleValue const> new_font_size = CSS::LengthStyleValue::create(CSS::Length::make_px(default_monospace_font_size_in_px));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue