summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/SVG/SVGGraphicsElement.h
AgeCommit message (Collapse)Author
2023-05-20LibWeb: Implement SVG opacity propertiesMacDue
This implements the stop-opacity, fill-opacity, and stroke-opacity properties (in CSS). This replaces the existing more ad-hoc fill-opacity attribute handling.
2023-05-08LibWeb: Don't include Layout/Node.h from DOM/Element.hAndreas Kling
This required moving the CSS::StyleProperty destruct out of line.
2023-04-28LibWeb: Resolve and paint SVG gradient fillsMacDue
This bit is mostly ad-hoc for now. This simply turns fill: url(#grad1) into document().get_element_by_id('grad1') then resolves the gradient. This seems to do the trick for most use cases, but this is not attempting to follow the spec yet to keep things simple.
2023-04-15LibWeb: Scale SVG stroke-width based on viewboxMacDue
This fixes the clipping of strokes in quite a few cases and now fixes the Gartic Phone logo :^) (Layout test updated but no visible changes there)
2023-04-12Everywhere: Fix a few typosNico Weber
Some even user-visible!
2023-04-12LibWeb: Parse the `transform` attribute when set on SVGGraphicsElementsMacDue
This uses the new attribute parser functionality, and then resolves the transform list into a single Gfx::AffineTransform. This also adds a .get_transform() function which resolves the final transform, by applying all parent transforms.
2023-04-12LibWeb: Parse and apply `fill-opacity` attribute to SVG pathsMacDue
This is needed to fix the rendering of the Street View directional controls (which have paths with various levels of opacity set by this attribute).
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-09-21LibWeb: Remove WRAPPER_HACK() macroLinus Groh
We no longer access Bindings::FooWrapper anywhere for a Foo platform object, so these can be removed :^)
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-02-19LibWeb: Move QualifiedName into the Web::DOM namespaceAndreas Kling
2022-01-24LibWeb: Treat SVG fill/stroke/stroke-width attributes as CSS propertiesSam Atkins
Rather than having separate systems for the attributes and their CSS equivalents, we can treat the attributes as presentational hints and convert them to CSS properties. This means they can be inherited, as they should. :^) As noted, the `fill` and `stroke` attributes do not fully match the `fill` and `stroke` properties. The CSS spec is still an early draft and not entirely helpful, so we can just pretend they are the same for now.
2021-09-16LibWeb: Add for CSS `fill/stroke/stroke-color` properties for SVGSam Atkins
In the spec, `fill` and `stroke` are supposed to be a shorthands for various properties. But since the spec is still a working draft, and neither Firefox or Chrome support the `fill-color` or `stroke-color` properties, we'll stick with `fill` and `stroke` as simple colors for now. Also, note that SVG expects things in "user units", and we are assuming that 1px = 1 user unit for now.
2021-04-23Userland: Use mattco@serenityos.org for my copyright headersMatthew Olsson
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-07LibWeb: Use move semantics for QualifiedName more oftenAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling