1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:47:35 +00:00

LibWeb: Start implementing the Element scroll attributes

These are required for hit testing the document in Google Docs. If they
aren't defined, the Google Docs hit test code will add undefined to
certain values, causing them to turn into NaN. This causes NaNs to
propagate through their hit test code, which eventually makes it
infinitely loop.
This commit is contained in:
Luke Wilde 2022-11-05 15:10:13 +00:00 committed by Andreas Kling
parent 6b0152e150
commit a268026e4e
4 changed files with 264 additions and 0 deletions

View file

@ -159,6 +159,16 @@ public:
i32 tab_index() const;
void set_tab_index(i32 tab_index);
bool is_potentially_scrollable() const;
double scroll_top() const;
double scroll_left() const;
void set_scroll_top(double y);
void set_scroll_left(double x);
int scroll_width() const;
int scroll_height() const;
bool is_actually_disabled() const;
WebIDL::ExceptionOr<JS::GCPtr<Element>> insert_adjacent_element(String const& where, JS::NonnullGCPtr<Element> element);