1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:47:35 +00:00

LibWeb: Use W3C urls for CSSOM spec links

https://www.w3.org/TR/cssom/ is the more permanent home of the CSSOM
specification's latest version, and is up to date with the draft spec.

Also, https://drafts.csswg.org/ has been down multiple times recently
which made looking things up a pain.
This commit is contained in:
Sam Atkins 2021-10-15 19:38:39 +01:00 committed by Linus Groh
parent df85832f32
commit e8d4236bbd
11 changed files with 25 additions and 25 deletions

View file

@ -19,7 +19,7 @@ CSSImportRule::~CSSImportRule()
{
}
// https://drafts.csswg.org/cssom/#serialize-a-css-rule
// https://www.w3.org/TR/cssom/#serialize-a-css-rule
String CSSImportRule::serialized() const
{
StringBuilder builder;

View file

@ -12,14 +12,14 @@ CSSRule::~CSSRule()
{
}
// https://drafts.csswg.org/cssom/#dom-cssrule-csstext
// https://www.w3.org/TR/cssom/#dom-cssrule-csstext
String CSSRule::css_text() const
{
// The cssText attribute must return a serialization of the CSS rule.
return serialized();
}
// https://drafts.csswg.org/cssom/#dom-cssrule-csstext
// https://www.w3.org/TR/cssom/#dom-cssrule-csstext
void CSSRule::set_css_text(StringView)
{
// On setting the cssText attribute must do nothing.

View file

@ -29,7 +29,7 @@ bool CSSRuleList::is_supported_property_index(u32 index) const
return index < m_rules.size();
}
// https://drafts.csswg.org/cssom/#insert-a-css-rule
// https://www.w3.org/TR/cssom/#insert-a-css-rule
DOM::ExceptionOr<unsigned> CSSRuleList::insert_a_css_rule(NonnullRefPtr<CSSRule> rule, u32 index)
{
// 1. Set length to the number of items in list.
@ -54,7 +54,7 @@ DOM::ExceptionOr<unsigned> CSSRuleList::insert_a_css_rule(NonnullRefPtr<CSSRule>
return index;
}
// https://drafts.csswg.org/cssom/#remove-a-css-rule
// https://www.w3.org/TR/cssom/#remove-a-css-rule
DOM::ExceptionOr<void> CSSRuleList::remove_a_css_rule(u32 index)
{
// 1. Set length to the number of items in list.

View file

@ -16,7 +16,7 @@
namespace Web::CSS {
// https://drafts.csswg.org/cssom/#the-cssrulelist-interface
// https://www.w3.org/TR/cssom/#the-cssrulelist-interface
class CSSRuleList
: public RefCounted<CSSRuleList>
, public Bindings::Wrappable {

View file

@ -124,7 +124,7 @@ void CSSStyleDeclaration::set_css_text(StringView)
TODO();
}
// https://drafts.csswg.org/cssom/#serialize-a-css-declaration
// https://www.w3.org/TR/cssom/#serialize-a-css-declaration
static String serialize_a_css_declaration(CSS::PropertyID property, String value, bool important)
{
StringBuilder builder;
@ -150,7 +150,7 @@ static String serialize_a_css_declaration(CSS::PropertyID property, String value
return builder.to_string();
}
// https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block
// https://www.w3.org/TR/cssom/#serialize-a-css-declaration-block
String PropertyOwningCSSStyleDeclaration::serialized() const
{
// 1. Let list be an empty array.

View file

@ -19,7 +19,7 @@ CSSStyleRule::~CSSStyleRule()
{
}
// https://drafts.csswg.org/cssom/#dom-cssstylerule-style
// https://www.w3.org/TR/cssom/#dom-cssstylerule-style
CSSStyleDeclaration* CSSStyleRule::style()
{
return m_declaration;
@ -89,7 +89,7 @@ static StringView to_string(Selector::SimpleSelector::PseudoClass::Type pseudo_c
static String serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const&);
// https://drafts.csswg.org/cssom/#serialize-a-simple-selector
// https://www.w3.org/TR/cssom/#serialize-a-simple-selector
static String serialize_a_simple_selector(Selector::SimpleSelector const& simple_selector)
{
StringBuilder builder;
@ -213,7 +213,7 @@ static String serialize_a_simple_selector(Selector::SimpleSelector const& simple
return builder.to_string();
}
// https://drafts.csswg.org/cssom/#serialize-a-selector
// https://www.w3.org/TR/cssom/#serialize-a-selector
static String serialize_a_selector(Selector const& selector)
{
StringBuilder builder;
@ -270,7 +270,7 @@ static String serialize_a_selector(Selector const& selector)
return builder.to_string();
}
// https://drafts.csswg.org/cssom/#serialize-a-group-of-selectors
// https://www.w3.org/TR/cssom/#serialize-a-group-of-selectors
static String serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const& selectors)
{
// To serialize a group of selectors serialize each selector in the group of selectors and then serialize a comma-separated list of these serializations.
@ -280,7 +280,7 @@ static String serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const
return builder.to_string();
}
// https://drafts.csswg.org/cssom/#serialize-a-css-rule
// https://www.w3.org/TR/cssom/#serialize-a-css-rule
String CSSStyleRule::serialized() const
{
StringBuilder builder;
@ -324,14 +324,14 @@ String CSSStyleRule::serialized() const
TODO();
}
// https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
// https://www.w3.org/TR/cssom/#dom-cssstylerule-selectortext
String CSSStyleRule::selector_text() const
{
// The selectorText attribute, on getting, must return the result of serializing the associated group of selectors.
return serialized();
}
// https://drafts.csswg.org/cssom/#dom-cssstylerule-selectortext
// https://www.w3.org/TR/cssom/#dom-cssstylerule-selectortext
void CSSStyleRule::set_selector_text(StringView selector_text)
{
// 1. Run the parse a group of selectors algorithm on the given value.

View file

@ -19,7 +19,7 @@ CSSStyleSheet::~CSSStyleSheet()
{
}
// https://drafts.csswg.org/cssom/#dom-cssstylesheet-insertrule
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule
DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned index)
{
// FIXME: 1. If the origin-clean flag is unset, throw a SecurityError exception.
@ -39,7 +39,7 @@ DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned
return m_rules->insert_a_css_rule(parsed_rule.release_nonnull(), index);
}
// https://drafts.csswg.org/cssom/#dom-cssstylesheet-deleterule
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-deleterule
DOM::ExceptionOr<void> CSSStyleSheet::delete_rule(unsigned index)
{
// FIXME: 1. If the origin-clean flag is unset, throw a SecurityError exception.
@ -50,7 +50,7 @@ DOM::ExceptionOr<void> CSSStyleSheet::delete_rule(unsigned index)
return m_rules->remove_a_css_rule(index);
}
// https://drafts.csswg.org/cssom/#dom-cssstylesheet-removerule
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-removerule
DOM::ExceptionOr<void> CSSStyleSheet::remove_rule(unsigned index)
{
// The removeRule(index) method must run the same steps as deleteRule().

View file

@ -737,7 +737,7 @@ bool ResolvedCSSStyleDeclaration::set_property(PropertyID, StringView)
String ResolvedCSSStyleDeclaration::serialized() const
{
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext
// https://www.w3.org/TR/cssom/#dom-cssstyledeclaration-csstext
// If the computed flag is set, then return the empty string.
// NOTE: ResolvedCSSStyleDeclaration is something you would only get from window.getComputedStyle(),

View file

@ -24,7 +24,7 @@ StyleSheetList::StyleSheetList(DOM::Document& document)
{
}
// https://drafts.csswg.org/cssom/#ref-for-dfn-supported-property-indices%E2%91%A1
// https://www.w3.org/TR/cssom/#ref-for-dfn-supported-property-indices%E2%91%A1
bool StyleSheetList::is_supported_property_index(u32 index) const
{
// The objects supported property indices are the numbers in the range zero to one less than the number of CSS style sheets represented by the collection.