summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
AgeCommit message (Collapse)Author
2021-09-17LibWeb: Persuade CSS Parser that idents like `currentcolor` are colorsSam Atkins
Shorthand properties were only checking for `ColorStyleValue`s, which excludes identifier colors. Now they accept them too, including the various `-libweb-foo` colors. :^)
2021-09-17LibWeb: Implement `currentcolor` special valueSam Atkins
The `currentcolor` identifier represents the current value of the `color` property. This is the default value for `border-color` and `text-decoration-color`, and is generally useful to have. :^)
2021-09-17LibWeb: Make StyleValue::to_color() take a Node instead of the DocumentSam Atkins
This is in preparation for the `currentcolor` value, which needs to know what Node it's on so it can check the `color`.
2021-09-17LibWeb: Don't request WebContent repaint while we have repaints pendingAndreas Kling
This prevents flickering by ensuring that WebContent is only ever painting into the back buffer bitmap. Without this change, it was possible for WebContent to paint into the front buffer bitmap.
2021-09-17LibWeb: Make a SharedBitmap struct for OOPWV bitmapsAndreas Kling
Instead of having separate members for "bitmap ID" and "bitmap", let's wrap them in a struct.
2021-09-17LibWeb: Skip rendering box-shadow blur if we don't have memory for itAndreas Kling
A slight loss in graphical fidelity is better than not rendering the page at all.
2021-09-17LibWeb: Make ComputedValues return larger items by const referenceAndreas Kling
2021-09-17LibWeb: Add the IdleDeadline interface from the RequestIdleCallback specAndreas Kling
2021-09-17LibWeb: Add HTML::Task::Source::IdleTaskAndreas Kling
This represents what the spec calls the "idle-task task source".
2021-09-16LibWeb: Flexbox: Add default value for AlignItemsTobias Christiansen
Previously there was no default value and wrapping broke when the container didn't have a align-items specified.
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-09-16LibWeb: Use explicit move to avoid unnecessary RefPtr ref / unrefBrian Gianforcaro
2021-09-16LibWeb: Use default instead of an empty constructor/destructorBrian Gianforcaro
Default implementations allow for more optimizations. See: https://pvs-studio.com/en/docs/warnings/v832/
2021-09-16LibWeb: Don't dump full data URLs in ResourceLoader loggingAndreas Kling
Some pages use *really* large data URLs. :^)
2021-09-16LibWeb: Add fast_is<HTMLTemplateElement>()Andreas Kling
This was showing up as hot in profiles, as the HTML parser calls it quite a lot.
2021-09-16LibWeb: Move Attribute into the DOM namespaceAndreas Kling
2021-09-15LibWeb: Avoid setting definite {width,height} when "auto" is specifiedTobias Christiansen
Auto is not specified at all.
2021-09-15LibWeb: Flexbox: Somewhat suppport "align-items"Tobias Christiansen
There probably are a lot of edge cases missing but this moves us forward at least a bit.
2021-09-15LibWeb: Flexbox: Make step 11 of the layout algorithm more align awareTobias Christiansen
2021-09-15LibWeb: Add proper parsing of the AlignItems propertyTobias Christiansen
This teaches all the relevant places about 'align-items'.
2021-09-15LibWeb: Support "c" and "C" curves in SVG <path> dataAndreas Kling
These instructions now generate cubic Bézier curves.
2021-09-15LibWeb: Remove unused SVGSVGElement::m_bitmapAndreas Kling
2021-09-15Meta: Use Lagom:: namespaced names for code generatorsAndrew Kaster
This will be required when we switch to a SuperBuild that has Lagom as a configure time dependency, but is a distinct enough change to be separate.
2021-09-15LibWeb: Make Layout::Node::paint() pure virtualAndreas Kling
In the past, the base class implementation of this was used to descend into subtrees and paint children. That is now taken care of by StackingContext::paint_descendants() instead, and nothing used this.
2021-09-15LibWeb: Avoid some redundant calls to Layout::Box::absolute_rect()Andreas Kling
Computing the absolute rect of a box requires walking the chain of containing blocks and apply any offsets encountered. This can be slow in deeply nested box trees, so let's at least avoid doing it multiple times when once is enough.
2021-09-15LibWeb: Remove unused NodeWithStyle::m_position fieldSam Atkins
2021-09-15LibWeb: Make flex-box ignore out-of-flow child boxesSam Atkins
Previously, out-of-flow children still took up space inside a flex-box container, leaving an odd gap. Now they don't! :^)
2021-09-15LibWeb: Implement "out-of-flow" property of Layout BoxSam Atkins
In some situations, a layout box should not participate in the standard layout process, for example when set to `position: absolute`.
2021-09-15LibWeb: Parse the <svg viewBox> attributeAndreas Kling
Just parse it into an SVG::ViewBox object for now, we don't actually use it for anything yet.
2021-09-15LibWeb: Add SVG::ViewBox to represent SVG view boxesAndreas Kling
This also comes with a simple little parsing helper. :^)
2021-09-15LibWeb: Add an SVG::AttributeNames namespaceAndreas Kling
There are a whole bunch of SVG attributes, and we shouldn't mix them in with the HTML attributes. This patch adds some of them to the new namespace, but there are more to be added. :^)
2021-09-15LibWeb: Speed up computed style calculationSam Atkins
Rather than destroying and rebuilding the entire document layout tree in every call to `ComputedCSSStyleDeclaration::property()`, we now just make sure that the layout tree exists. This speeds up the DOM Inspector significantly, from taking several seconds to select an element, to almost instant. :^)
2021-09-14LibWeb: Improvements to error handling in HTML foreign content parsingAndreas Kling
Follow the spec more closely when encountering an invalid start or end tag during foreign content parsing.
2021-09-14LibWeb: Flexbox: Avoid division by zeroTobias Christiansen
This is not a good thing, one should not divide by zero! :^)
2021-09-14LibWeb: Flexbox: Change the name of a variable to correspond to specTobias Christiansen
The spec used two different names for the same thing, and it was confusing to read the spec on the one side and have the other name in the code.
2021-09-14LibWeb: Flexbox: Resolve relative size of flex-items more correctlyTobias Christiansen
This is still very much not the right thing to do, but at least relatively sized flex-items get the right size.
2021-09-14LibWeb: Add several computed CSS styleskleines Filmröllchen
These are mostly combined styles such as background, as well as handling the Invalid and Custom property IDs (which both make no sense).
2021-09-14LibWeb: Add CombinedBoderRadiusStyleValue for CSS `border-radius`kleines Filmröllchen
This style value can hold all four border radii and format them into valid CSS for the `border-radius` property.
2021-09-14LibJS+LibWeb: Move script parse time logging from JS::Script to LibWebAndreas Kling
Let's only log HTML::ClassicScript parse times for now. Otherwise things will get excessively noisy in test-js and the test262 runner.
2021-09-14LibJS+LibWeb: Let JS::Script::parse() return a list of errors (on error)Andreas Kling
These are really supposed to be a list of SyntaxError objects, but for now we simply return all the Parser::Error objects we got from Parser.
2021-09-14LibWeb: Implement ParentNode.childrenLuke Wilde
Required by Web Platform Tests for the innerHTML/outerHTML tests.
2021-09-14LibWeb: Make the innerHTML setter spec compliantLuke Wilde
This adds innerHTML to ShadowRoot in the process.
2021-09-14LibWeb: Implement HTML fragment serialisation and use it in innerHTMLLuke Wilde
The previous implementation was about a half implementation and was tied to Element::innerHTML. This separates it and puts it into HTMLDocumentParser, as this is in the parsing section of the spec. This provides a near finished HTML fragment serialisation algorithm, bar namespaces in attributes and the `is` value.
2021-09-14LibWeb: Add the URL::{protocol, pathname, search, hash} attributesIdan Horowitz
2021-09-14LibWeb: Add the URL::host, URL::hostname & URL:port attributesIdan Horowitz
2021-09-14LibWeb: Add the URL::username, URL::password & URL::origin attributesIdan Horowitz
2021-09-14LibWeb: Add the URL::searchParams attributeIdan Horowitz
2021-09-14LibWeb: Add the URL::href attribute and URL::to_json methodIdan Horowitz
2021-09-14LibWeb: Add a bare implementation of the URL built-inIdan Horowitz
This only has the constructor implemented for now.
2021-09-14AK: Make URL::m_port an Optional<u16>, Expose raw port getterIdan Horowitz
Our current way of signalling a missing port with m_port == 0 was lacking, as 0 is a valid port number in URLs.