New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibWeb: brave.com is now scrollable #24066
Conversation
Hello! One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the |
8b56d99
to
8a19d8a
Compare
Please, change the commit to reference the issue you intended to fix #24009 |
if (computed_values().overflow_y() == CSS::Overflow::Hidden || computed_values().overflow_x() == CSS::Overflow::Hidden) | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignoring scrolling if either of directions has "overflow: hidden" is wrong: vertical scrolling should not be ignored, if only horizontal direction has hidden overflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming you trying to fix:
<!doctype html><style>
* { font-size: 200px; }
main { overflow-x: hidden; }
</style>
<main>
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
let's have a look at paintable tree dump:
ViewportPaintable (Viewport<#document>) [0,0 1279x780] overflow: [0,0 1279x2086]
PaintableWithLines (BlockContainer<HTML>) [0,0 1279x2086]
PaintableWithLines (BlockContainer<BODY>) [8,8 1263x2070]
PaintableWithLines (BlockContainer<MAIN>) [8,8 1263x2070]
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
TextPaintable (TextNode<#text>)
the only paintable with scrollable overflow (named overflow in the dump) is viewport. <main>
does not have any. so <main>
is scrollable based on css overflow properties, because overflow_y is auto.
BUT it does not have any scrollable overflow. let's make is_user_scrollable()
to also look at rect returned by PaintableBox::scrollable_overflow_rect()
?
The problem this PR intended to address was fixed in #24228 |
The is_user_scrollable method in Box now ignores overflow: hidden. This makes websites like brave.com scrollable via the mouse wheel.