mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 11:48:06 +00:00
LibWeb/DOM: Move pseudo-element scroll offsets into PseudoElement
This commit is contained in:
parent
2c7310553a
commit
f98312d022
Notes:
github-actions[bot]
2025-06-19 11:36:37 +00:00
Author: https://github.com/AtkinsSJ
Commit: f98312d022
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5132
Reviewed-by: https://github.com/tcl3
4 changed files with 33 additions and 19 deletions
|
@ -373,13 +373,8 @@ public:
|
|||
void unregister_intersection_observer(Badge<IntersectionObserver::IntersectionObserver>, GC::Ref<IntersectionObserver::IntersectionObserver>);
|
||||
IntersectionObserver::IntersectionObserverRegistration& get_intersection_observer_registration(Badge<DOM::Document>, IntersectionObserver::IntersectionObserver const&);
|
||||
|
||||
enum class ScrollOffsetFor {
|
||||
Self,
|
||||
PseudoBefore,
|
||||
PseudoAfter
|
||||
};
|
||||
CSSPixelPoint scroll_offset(ScrollOffsetFor type) const { return m_scroll_offset[to_underlying(type)]; }
|
||||
void set_scroll_offset(ScrollOffsetFor type, CSSPixelPoint offset) { m_scroll_offset[to_underlying(type)] = offset; }
|
||||
CSSPixelPoint scroll_offset(Optional<CSS::PseudoElement> type) const;
|
||||
void set_scroll_offset(Optional<CSS::PseudoElement> type, CSSPixelPoint offset);
|
||||
|
||||
enum class TranslationMode {
|
||||
TranslateEnabled,
|
||||
|
@ -595,7 +590,7 @@ private:
|
|||
// Element objects have an internal [[RegisteredIntersectionObservers]] slot, which is initialized to an empty list.
|
||||
OwnPtr<Vector<IntersectionObserver::IntersectionObserverRegistration>> m_registered_intersection_observers;
|
||||
|
||||
Array<CSSPixelPoint, 3> m_scroll_offset;
|
||||
CSSPixelPoint m_scroll_offset;
|
||||
|
||||
bool m_in_top_layer : 1 { false };
|
||||
bool m_rendered_in_top_layer : 1 { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue