mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00
LibWeb: Don't class mousewheel as handled if scroll offset isn't updated
Before this change, you could only scroll the current hovered scroll container, even if it was at the beginning or end and thus having no effect. Now, if it doesn't update, it will not be classed as handled and will move onto the next scroll container.
This commit is contained in:
parent
38e224cd9f
commit
adeedabf54
Notes:
github-actions[bot]
2025-10-07 17:44:30 +00:00
Author: https://github.com/Lubrsi
Commit: adeedabf54
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6419
Reviewed-by: https://github.com/kalenikaliaksandr ✅
4 changed files with 22 additions and 16 deletions
|
@ -63,9 +63,14 @@ public:
|
|||
// Offset from the top left of the containing block's content edge.
|
||||
[[nodiscard]] CSSPixelPoint offset() const;
|
||||
|
||||
enum class ScrollHandled {
|
||||
No,
|
||||
Yes,
|
||||
};
|
||||
|
||||
CSSPixelPoint scroll_offset() const;
|
||||
void set_scroll_offset(CSSPixelPoint);
|
||||
void scroll_by(int delta_x, int delta_y);
|
||||
[[nodiscard]] ScrollHandled set_scroll_offset(CSSPixelPoint);
|
||||
[[nodiscard]] ScrollHandled scroll_by(int delta_x, int delta_y);
|
||||
|
||||
void set_offset(CSSPixelPoint);
|
||||
void set_offset(float x, float y) { set_offset({ x, y }); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue