mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +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
|
@ -128,6 +128,12 @@ void Window::visit_edges(JS::Cell::Visitor& visitor)
|
|||
visitor.visit(m_pdf_viewer_plugin_objects);
|
||||
visitor.visit(m_pdf_viewer_mime_type_objects);
|
||||
visitor.visit(m_close_watcher_manager);
|
||||
visitor.visit(m_locationbar);
|
||||
visitor.visit(m_menubar);
|
||||
visitor.visit(m_personalbar);
|
||||
visitor.visit(m_scrollbars);
|
||||
visitor.visit(m_statusbar);
|
||||
visitor.visit(m_toolbar);
|
||||
}
|
||||
|
||||
void Window::finalize()
|
||||
|
@ -920,6 +926,60 @@ void Window::blur()
|
|||
// The blur() method steps are to do nothing.
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-locationbar
|
||||
GC::Ref<BarProp const> Window::locationbar()
|
||||
{
|
||||
if (!m_locationbar)
|
||||
m_locationbar = BarProp::create(realm());
|
||||
|
||||
return *m_locationbar;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-menubar
|
||||
GC::Ref<BarProp const> Window::menubar()
|
||||
{
|
||||
if (!m_menubar)
|
||||
m_menubar = BarProp::create(realm());
|
||||
|
||||
return *m_menubar;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-personalbar
|
||||
GC::Ref<BarProp const> Window::personalbar()
|
||||
{
|
||||
if (!m_personalbar)
|
||||
m_personalbar = BarProp::create(realm());
|
||||
|
||||
return *m_personalbar;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-scrollbars
|
||||
GC::Ref<BarProp const> Window::scrollbars()
|
||||
{
|
||||
if (!m_scrollbars)
|
||||
m_scrollbars = BarProp::create(realm());
|
||||
|
||||
return *m_scrollbars;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-statusbar
|
||||
GC::Ref<BarProp const> Window::statusbar()
|
||||
{
|
||||
if (!m_statusbar)
|
||||
m_statusbar = BarProp::create(realm());
|
||||
|
||||
return *m_statusbar;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-toolbar
|
||||
GC::Ref<BarProp const> Window::toolbar()
|
||||
{
|
||||
if (!m_toolbar)
|
||||
m_toolbar = BarProp::create(realm());
|
||||
|
||||
return *m_toolbar;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#dom-frames
|
||||
GC::Ref<WindowProxy> Window::frames() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue