mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb: Implement BarProp properties for Window
This commit is contained in:
parent
ad634897b8
commit
b66e7ac1ba
Notes:
github-actions[bot]
2025-03-29 02:36:35 +00:00
Author: https://github.com/Totto16
Commit: b66e7ac1ba
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3810
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/tcl3 ✅
13 changed files with 201 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <LibWeb/Bindings/WindowGlobalMixin.h>
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/BarProp.h>
|
||||
#include <LibWeb/HTML/CrossOrigin/CrossOriginPropertyDescriptorMap.h>
|
||||
#include <LibWeb/HTML/GlobalEventHandlers.h>
|
||||
#include <LibWeb/HTML/MimeType.h>
|
||||
|
@ -173,6 +174,15 @@ public:
|
|||
void focus();
|
||||
void blur();
|
||||
|
||||
// For historical reasons, the Window interface had some properties that represented the visibility of certain web browser interface elements.
|
||||
// For privacy and interoperability reasons, those properties now return values that represent whether the Window's browsing context's is popup property is true or false.
|
||||
GC::Ref<BarProp const> locationbar();
|
||||
GC::Ref<BarProp const> menubar();
|
||||
GC::Ref<BarProp const> personalbar();
|
||||
GC::Ref<BarProp const> scrollbars();
|
||||
GC::Ref<BarProp const> statusbar();
|
||||
GC::Ref<BarProp const> toolbar();
|
||||
|
||||
GC::Ref<WindowProxy> frames() const;
|
||||
u32 length();
|
||||
GC::Ptr<WindowProxy const> top() const;
|
||||
|
@ -332,6 +342,13 @@ private:
|
|||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-status
|
||||
// When the Window object is created, the attribute must be set to the empty string. It does not do anything else.
|
||||
String m_status;
|
||||
|
||||
GC::Ptr<BarProp const> m_locationbar;
|
||||
GC::Ptr<BarProp const> m_menubar;
|
||||
GC::Ptr<BarProp const> m_personalbar;
|
||||
GC::Ptr<BarProp const> m_scrollbars;
|
||||
GC::Ptr<BarProp const> m_statusbar;
|
||||
GC::Ptr<BarProp const> m_toolbar;
|
||||
};
|
||||
|
||||
void run_animation_frame_callbacks(DOM::Document&, double now);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue