mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
49
Libraries/LibWeb/CSS/StyleSheet.cpp
Normal file
49
Libraries/LibWeb/CSS/StyleSheet.cpp
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2021, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/StyleSheetPrototype.h>
|
||||
#include <LibWeb/CSS/CSSStyleSheet.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
StyleSheet::StyleSheet(JS::Realm& realm, MediaList& media)
|
||||
: PlatformObject(realm)
|
||||
, m_media(media)
|
||||
{
|
||||
}
|
||||
|
||||
void StyleSheet::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_owner_node);
|
||||
visitor.visit(m_parent_style_sheet);
|
||||
visitor.visit(m_media);
|
||||
}
|
||||
|
||||
void StyleSheet::set_owner_node(DOM::Element* element)
|
||||
{
|
||||
m_owner_node = element;
|
||||
}
|
||||
|
||||
void StyleSheet::set_parent_css_style_sheet(CSSStyleSheet* parent)
|
||||
{
|
||||
m_parent_style_sheet = parent;
|
||||
}
|
||||
|
||||
// https://drafts.csswg.org/cssom/#dom-stylesheet-title
|
||||
Optional<String> StyleSheet::title_for_bindings() const
|
||||
{
|
||||
// The title attribute must return the title or null if title is the empty string.
|
||||
if (m_title.is_empty())
|
||||
return {};
|
||||
|
||||
return m_title;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue