|
@@ -58,11 +58,13 @@
|
|
#include <LibWeb/HTML/HTMLTitleElement.h>
|
|
#include <LibWeb/HTML/HTMLTitleElement.h>
|
|
#include <LibWeb/HTML/Location.h>
|
|
#include <LibWeb/HTML/Location.h>
|
|
#include <LibWeb/HTML/MessageEvent.h>
|
|
#include <LibWeb/HTML/MessageEvent.h>
|
|
|
|
+#include <LibWeb/HTML/Navigable.h>
|
|
#include <LibWeb/HTML/NavigationParams.h>
|
|
#include <LibWeb/HTML/NavigationParams.h>
|
|
#include <LibWeb/HTML/Origin.h>
|
|
#include <LibWeb/HTML/Origin.h>
|
|
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
|
#include <LibWeb/HTML/Parser/HTMLParser.h>
|
|
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
|
|
#include <LibWeb/HTML/Scripting/ExceptionReporter.h>
|
|
#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>
|
|
#include <LibWeb/HTML/Scripting/WindowEnvironmentSettingsObject.h>
|
|
|
|
+#include <LibWeb/HTML/TraversableNavigable.h>
|
|
#include <LibWeb/HTML/Window.h>
|
|
#include <LibWeb/HTML/Window.h>
|
|
#include <LibWeb/HTML/WindowProxy.h>
|
|
#include <LibWeb/HTML/WindowProxy.h>
|
|
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
|
#include <LibWeb/HighResolutionTime/TimeOrigin.h>
|
|
@@ -2514,4 +2516,22 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Attr>> Document::create_attribute_ns(Deprec
|
|
return Attr::create(*this, extracted_qualified_name);
|
|
return Attr::create(*this, extracted_qualified_name);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// https://html.spec.whatwg.org/multipage/browsing-the-web.html#make-active
|
|
|
|
+void Document::make_active()
|
|
|
|
+{
|
|
|
|
+ // 1. Let window be document's relevant global object.
|
|
|
|
+ auto& window = verify_cast<HTML::Window>(HTML::relevant_global_object(*this));
|
|
|
|
+
|
|
|
|
+ // 2. Set document's browsing context's WindowProxy's [[Window]] internal slot value to window.
|
|
|
|
+ m_browsing_context->window_proxy()->set_window(window);
|
|
|
|
+
|
|
|
|
+ // 3. Set document's visibility state to document's node navigable's traversable navigable's system visibility state.
|
|
|
|
+ if (navigable()) {
|
|
|
|
+ m_visibility_state = navigable()->traversable_navigable()->system_visibility_state();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 4. Set window's relevant settings object's execution ready flag.
|
|
|
|
+ HTML::relevant_settings_object(window).execution_ready = true;
|
|
|
|
+}
|
|
|
|
+
|
|
}
|
|
}
|