mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
LibWeb: Implement Document/BrowsingContext hookup according to spec
We now implement the browsing context's "set active document" algorithm from the spec, as well as the "discard" algorithm for browsing contexts and documents.
This commit is contained in:
parent
ab8432783e
commit
92deba7197
9 changed files with 189 additions and 70 deletions
|
@ -47,7 +47,7 @@ public:
|
|||
DOM::Document const* active_document() const;
|
||||
DOM::Document* active_document();
|
||||
|
||||
void set_active_document(DOM::Document*);
|
||||
void set_active_document(JS::NonnullGCPtr<DOM::Document>);
|
||||
|
||||
HTML::Window* active_window();
|
||||
HTML::Window const* active_window() const;
|
||||
|
@ -165,6 +165,9 @@ public:
|
|||
VisibilityState system_visibility_state() const;
|
||||
void set_system_visibility_state(VisibilityState);
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#a-browsing-context-is-discarded
|
||||
void discard();
|
||||
|
||||
private:
|
||||
explicit BrowsingContext(Page&, HTML::BrowsingContextContainer*);
|
||||
|
||||
|
@ -195,7 +198,7 @@ private:
|
|||
Optional<HTML::Origin> m_creator_origin;
|
||||
|
||||
WeakPtr<HTML::BrowsingContextContainer> m_container;
|
||||
JS::Handle<DOM::Document> m_active_document;
|
||||
JS::Handle<HTML::Window> m_active_window;
|
||||
Gfx::IntSize m_size;
|
||||
Gfx::IntPoint m_viewport_scroll_offset;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue