summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp
AgeCommit message (Collapse)Author
2023-03-15LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtrMatthew Olsson
2023-01-29LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errorsTimothy Flynn
Note that as of this commit, there aren't any such throwers, and the call site in Heap::allocate will drop exceptions on the floor. This commit only serves to change the declaration of the overrides, make sure they return an empty value, and to propagate OOM errors frm their base initialize invocations.
2023-01-10LibWeb: Move setting of Web object prototypes to initialize()Timothy Flynn
This needs to happen before prototype/constructor intitialization can be made lazy. Otherwise, GC could run during the C++ constructor and try to collect the object currently being created.
2022-10-01LibWeb: Remove unecessary dependence on Window from CSS classesAndrew Kaster
These classes only needed Window to get at its realm. Pass a realm directly to construct CSS classes.
2022-09-25LibWeb: Move ExceptionOr from DOM/ to WebIDL/Linus Groh
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
2022-09-06LibWeb: Use cached_web_prototype() as much as possibleAndreas Kling
Unlike ensure_web_prototype<T>(), the cached version doesn't require the prototype type to be fully formed, so we can use it without including the FooPrototype.h header. It's also a bit less verbose. :^)
2022-09-06LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocatedAndreas Kling
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
2022-09-06LibWeb: Make CSSRule and all its subclasses GC-allocatedAndreas Kling
2022-09-06LibWeb: Make CSSRuleList GC-allocatedAndreas Kling
2022-05-11LibWeb: Implement CSSRule.parentRule and .parentStyleSheetSam Atkins
Both of these are supposed to be set when the CSSRule is created. The spec is silent on setting it when a CSSRule is added to a parent. So, this is a bit ad-hoc. The parent rule gets set whenever a rule is added to a new parent. The parent stylesheet gets set whenever the rule or one of its ancestors is added to a different stylesheet. There may be some nuance there that I'm missing, but I'm sure we'll find out quickly once we have WPT running!
2022-03-17Libraries: Use default constructors/destructors in LibWebLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2021-11-18LibWeb: Remove `for_first_not_loaded_import_rule()` :^)Sam Atkins
This was only used for making sure `@import` rules got loaded, and since they handle that themselves now, we can get rid of all this code!
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-10-15LibWeb: Add serialization code for CSS{Media,Supports}RuleSam Atkins
The `CSSMediaRule::serialized()` code is to spec. The `CSSSupportsRule::serialized()` code has no spec right now, but I'm fairly confident it will be almost identical to media's, so I copied that for now.
2021-10-08LibWeb: Make style-rule iteration aware of CSSMediaRuleSam Atkins
The logic is handled by `CSSGroupingRule` and `CSSConditionRule`, so `CSSMediaRule` only has to report if its condition matches. Right now, that condition is always false because we do not evaluate the media query.
2021-10-01LibWeb: Implement CSSRule and CSSStyleDeclaration serializationAndreas Kling
There are a handful of FIXME's here, but this seems generally good. Note that CSS *values* don't get serialized in a spec-compliant way since we currently rely on StyleValue::to_string() which is ad-hoc.
2021-09-29LibWeb: Make CSSRule and CSSRuleList available to JavaScript :^)Andreas Kling
This patch makes both of these classes inherit from RefCounted and Bindings::Wrappable, plus some minimal rejigging to allow us to keep using them internally while also exposing them to web content.
2021-09-29LibWeb: Add CSSGroupingRuleSam Atkins
This is an abstract base class for CSSRules that hold a CSSRuleList.