mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Let's say that layout viewports are always scroll containers
This will allow us to have a shared code path for overflow calculation.
This commit is contained in:
parent
571c05bb47
commit
4ff52cebc4
Notes:
sideshowbarker
2024-07-17 18:06:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4ff52cebc4 Pull-request: https://github.com/SerenityOS/serenity/pull/19196
@ -47,6 +47,10 @@ static bool overflow_value_makes_box_a_scroll_container(CSS::Overflow overflow)
|
||||
// https://www.w3.org/TR/css-overflow-3/#scroll-container
|
||||
bool Box::is_scroll_container() const
|
||||
{
|
||||
// NOTE: This isn't in the spec, but we want the viewport to behave like a scroll container.
|
||||
if (is_viewport())
|
||||
return true;
|
||||
|
||||
return overflow_value_makes_box_a_scroll_container(computed_values().overflow_x())
|
||||
|| overflow_value_makes_box_a_scroll_container(computed_values().overflow_y());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user