mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:17:34 +00:00
LibWeb: Rename StyleRule => CSSStyleRule
This matches the CSSOM specification.
This commit is contained in:
parent
3532e1788f
commit
0af4762662
11 changed files with 23 additions and 23 deletions
|
@ -24,17 +24,17 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/CSS/StyleRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleRule.h>
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
StyleRule::StyleRule(Vector<Selector>&& selectors, NonnullRefPtr<StyleDeclaration>&& declaration)
|
||||
CSSStyleRule::CSSStyleRule(Vector<Selector>&& selectors, NonnullRefPtr<StyleDeclaration>&& declaration)
|
||||
: m_selectors(move(selectors))
|
||||
, m_declaration(move(declaration))
|
||||
{
|
||||
}
|
||||
|
||||
StyleRule::~StyleRule()
|
||||
CSSStyleRule::~CSSStyleRule()
|
||||
{
|
||||
}
|
||||
|
|
@ -34,26 +34,26 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
class StyleRule : public CSSRule {
|
||||
AK_MAKE_NONCOPYABLE(StyleRule);
|
||||
AK_MAKE_NONMOVABLE(StyleRule);
|
||||
class CSSStyleRule : public CSSRule {
|
||||
AK_MAKE_NONCOPYABLE(CSSStyleRule);
|
||||
AK_MAKE_NONMOVABLE(CSSStyleRule);
|
||||
|
||||
public:
|
||||
static NonnullRefPtr<StyleRule> create(Vector<Selector>&& selectors, NonnullRefPtr<StyleDeclaration>&& declaration)
|
||||
static NonnullRefPtr<CSSStyleRule> create(Vector<Selector>&& selectors, NonnullRefPtr<StyleDeclaration>&& declaration)
|
||||
{
|
||||
return adopt(*new StyleRule(move(selectors), move(declaration)));
|
||||
return adopt(*new CSSStyleRule(move(selectors), move(declaration)));
|
||||
}
|
||||
|
||||
~StyleRule();
|
||||
~CSSStyleRule();
|
||||
|
||||
const Vector<Selector>& selectors() const { return m_selectors; }
|
||||
const StyleDeclaration& declaration() const { return m_declaration; }
|
||||
|
||||
virtual StringView class_name() const { return "StyleRule"; };
|
||||
virtual StringView class_name() const { return "CSSStyleRule"; };
|
||||
virtual Type type() const { return Type::Style; };
|
||||
|
||||
private:
|
||||
StyleRule(Vector<Selector>&&, NonnullRefPtr<StyleDeclaration>&&);
|
||||
CSSStyleRule(Vector<Selector>&&, NonnullRefPtr<StyleDeclaration>&&);
|
||||
|
||||
Vector<Selector> m_selectors;
|
||||
NonnullRefPtr<StyleDeclaration> m_declaration;
|
|
@ -27,9 +27,9 @@
|
|||
#include <AK/HashMap.h>
|
||||
#include <LibWeb/CSS/CSSImportRule.h>
|
||||
#include <LibWeb/CSS/CSSRule.h>
|
||||
#include <LibWeb/CSS/CSSStyleRule.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/CSS/PropertyID.h>
|
||||
#include <LibWeb/CSS/StyleRule.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <ctype.h>
|
||||
|
@ -809,7 +809,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
rules.append(CSS::StyleRule::create(move(current_rule.selectors), CSS::StyleDeclaration::create(move(current_rule.properties))));
|
||||
rules.append(CSS::CSSStyleRule::create(move(current_rule.selectors), CSS::StyleDeclaration::create(move(current_rule.properties))));
|
||||
}
|
||||
|
||||
Optional<String> parse_string()
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibWeb/CSS/CSSStyleRule.h>
|
||||
#include <LibWeb/CSS/StyleInvalidator.h>
|
||||
#include <LibWeb/CSS/StyleRule.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
*/
|
||||
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibWeb/CSS/CSSStyleRule.h>
|
||||
#include <LibWeb/CSS/Parser/CSSParser.h>
|
||||
#include <LibWeb/CSS/SelectorEngine.h>
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/CSS/StyleRule.h>
|
||||
#include <LibWeb/CSS/StyleSheet.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
namespace Web::CSS {
|
||||
|
||||
struct MatchingRule {
|
||||
RefPtr<StyleRule> rule;
|
||||
RefPtr<CSSStyleRule> rule;
|
||||
size_t style_sheet_index { 0 };
|
||||
size_t rule_index { 0 };
|
||||
size_t selector_index { 0 };
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
{
|
||||
for (auto& rule : m_rules)
|
||||
if (rule.type() == CSSRule::Type::Style) {
|
||||
callback(downcast<StyleRule>(rule));
|
||||
callback(downcast<CSSStyleRule>(rule));
|
||||
} else if (rule.type() == CSSRule::Type::Import) {
|
||||
const CSSImportRule& import_rule = downcast<CSSImportRule>(rule);
|
||||
if (import_rule.has_import_result())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue