mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Don't claim that inline layout nodes can contain abspos elements
Some checks are pending
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
We assume elsewhere that any abspos element's containing block must be some kind of Layout::Box, so let's enforce that when deciding if a box can be such a container. This fixes a bad downcast on https://serpapi.com/
This commit is contained in:
parent
ea33bdc975
commit
3e1ee37c6a
Notes:
github-actions[bot]
2025-06-07 22:47:52 +00:00
Author: https://github.com/awesomekling
Commit: 3e1ee37c6a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4777
3 changed files with 31 additions and 0 deletions
|
@ -76,6 +76,9 @@ bool Node::is_out_of_flow(FormattingContext const& formatting_context) const
|
|||
|
||||
bool Node::can_contain_boxes_with_position_absolute() const
|
||||
{
|
||||
if (!is<Box>(*this))
|
||||
return false;
|
||||
|
||||
if (computed_values().position() != CSS::Positioning::Static)
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue