mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 00:51:51 +00:00
LibJS: Switch Agent [[CanBlock]] slot to a enum member
It turns out it was a mistake to make this a virtual since ServiceWorkerAgents are effectively the exact same as DedicatedWorkerAgents and SharedWorkerAgents just with [[CanBlock]] set to false.
This commit is contained in:
parent
7dd7e5b438
commit
5290ebfe19
Notes:
github-actions[bot]
2025-04-25 14:45:34 +00:00
Author: https://github.com/shannonbooth
Commit: 5290ebfe19
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4453
6 changed files with 31 additions and 9 deletions
|
@ -20,6 +20,8 @@ namespace Web::HTML {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#similar-origin-window-agent
|
||||
struct SimilarOriginWindowAgent : public Agent {
|
||||
static NonnullOwnPtr<SimilarOriginWindowAgent> create();
|
||||
|
||||
// https://dom.spec.whatwg.org/#mutation-observer-compound-microtask-queued-flag
|
||||
// Each similar-origin window agent has a mutation observer microtask queued (a boolean), which is initially false. [HTML]
|
||||
bool mutation_observer_microtask_queued { false };
|
||||
|
@ -41,8 +43,11 @@ struct SimilarOriginWindowAgent : public Agent {
|
|||
Vector<GC::Root<DOM::Element>>& current_element_queue() { return custom_element_reactions_stack.element_queue_stack.last(); }
|
||||
Vector<GC::Root<DOM::Element>> const& current_element_queue() const { return custom_element_reactions_stack.element_queue_stack.last(); }
|
||||
|
||||
// [[CanBlock]]
|
||||
virtual bool can_block() const override;
|
||||
private:
|
||||
explicit SimilarOriginWindowAgent(CanBlock can_block)
|
||||
: Agent(can_block)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
SimilarOriginWindowAgent& relevant_similar_origin_window_agent(JS::Object const&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue