summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
AgeCommit message (Collapse)Author
2022-06-14LibWeb: Bring border painting much closer to the spec/other browsersMacDue
This commit adds some much nicer border painting, which now supports: - Elliptical corners - Blending between different border thicknesses, with rounded corners - Anti-aliasing There are some little TODOs left to tackle: - Painting the corners with line styles other than solid - Blending between colors on the corners (see comments) The painting requires allocating a small bitmap, that only fits the corners (so in most cases this is very small). This bitmap is then cached so for all paints but the first there will be no further allocations.
2022-06-13LibWeb/WebGL: Implement WebGLRenderingContextBase.depthRange()Luke Wilde
2022-06-13LibWeb/WebGL: Implement WebGLRenderingContextBase.lineWidth()Luke Wilde
2022-06-13LibWeb/WebGL: Implement error handling and getError()Luke Wilde
2022-06-13LibWeb/WebGL: Add WebGLRenderingContextBase.isContextLost()Luke Wilde
2022-06-13LibWeb/WebGL: Add a bunch of simple forwarding functionsLuke Wilde
This collection of functions simply check if the context is still alive, then forward the call to the GL context.
2022-06-13LibWeb/WebGL: Add extensions APIs to WebGLRenderingContextBaseLuke Wilde
These currently return nothing, as we don't currently support any WebGL extensions.
2022-06-13LibWeb: Add ability to present LibGL framebuffer and add clearingLuke Wilde
2022-06-13LibWeb: Add the ability to retrieve a WebGL context from getContextLuke Wilde
2022-06-13LibWeb: Introduce the WebGL namespace and add WebGLContextEventLuke Wilde
2022-06-13LibWeb: Support elliptical background cornersMacDue
2022-06-13LibWeb: Add flag to normalize border radii to width onlyMacDue
This is needed to avoid issues (such as overlapping curves) for outline border radii, which do not currently support elliptical corners.
2022-06-13LibWeb: Keep both horizontal and vertical border radii till paintingMacDue
2022-06-11LibWeb: Hold a strong ref to old_rule in CSSRuleList::remove_a_css_ruleLuke Wilde
Using auto& when indexing an NNRPVector doesn't cause it to hold a strong reference and is instead just a plain old reference. If m_rules was the only storage holding a strong reference to old_rule, we would remove it in step 4 and subsequently UAF it in step 5.
2022-06-11LibWeb: Paint background border radius antialiasedMacDue
2022-06-10LibWeb: Print correct value types in ComponentValue debug stringKarol Kosek
Block and Function names were swapped.
2022-06-10LibWeb/CSS: Add :focus-within serialisationLuke Wilde
2022-06-10LibWeb/CSS: Add :nth-of-type and :nth-last-of-type serialisationLuke Wilde
2022-06-10LibWeb: Apply content filter to DNS prefetch and pre-connectLuke Wilde
Performing DNS prefetch or pre-connect on filtered URLs is wasteful, as we would block any actual use further down the line. A bunch of websites perform DNS prefetch and/or pre-connect to trackers as well, for example: ``` prefetch DNS for 'https://adserver-us.adtech.advertising.com/' prefetch DNS for 'https://secure.adnxs.com/' prefetch DNS for 'https://bidder.criteo.com/' prefetch DNS for 'https://static.criteo.net/' prefetch DNS for 'https://cdn.krxd.net/' prefetch DNS for 'https://widgets.outbrain.com/' prefetch DNS for 'https://images.outbrain.com/' prefetch DNS for 'https://log.outbrain.com/ prefetch DNS for 'https://amplifypixel.outbrain.com/' prefetch DNS for 'https://odb.outbrain.com/' prefetch DNS for 'https://js-sec.indexww.com/' prefetch DNS for 'https://as-sec.casalemedia.com/' prefetch DNS for 'https://as.casalemedia.com/' prefetch DNS for 'https://sofia.trustx.org/' prefetch DNS for 'https://c.amazon-adsystem.com/' prefetch DNS for 'https://s.amazon-adsystem.com/' prefetch DNS for 'https://aax.amazon-adsystem.com/' prefetch DNS for 'https://t.teads.tv/' prefetch DNS for 'https://beacon.krxd.net/' pre-connect to 'https://www.google-analytics.com/' pre-connect to 'https://www.googletagmanager.com/' ```
2022-06-06LibWeb: Use `long long` where it was replaced with `long`stelar7
2022-06-06LibWeb: Adjust implementation of `Document::create_event`stelar7
With this change, it no longer calls TODO() and crashes WebContent
2022-06-06LibWeb: Calculate floating elements width using min- and max-widthKarol Kosek
Previously, floating elements computed the width by only using the `width` property. Now, they will also use the `min-width` and `max-width` properties. :^) The new steps are from "10.4. Minimum and maximum widths: 'min-width' and 'max-width'" in the CSS 2 spec. Found it when looking at curl.se.
2022-06-05LibWeb: Dispatch mouse events to topmost element instead of hit targetkleines Filmröllchen
This improves our spec compliance by allowing the user to click non-element nodes (like text) and having the click be registered with the parent element (like a div or button). This makes Fandom's cookie accept button work if you click the text. Additionally, the events test page contains a test to check the target element, which would previously not exist when we fired the event at a non-element.
2022-06-05LibWeb: Paint list markers antialiasedMacDue
2022-06-03LibWeb: Reject invalid background-repeat values instead of crashingIdan Horowitz
2022-06-03LibWeb: Support DocumentFragments in Node.prototype.cloneNodeIdan Horowitz
In this case, "Do nothing" means do nothing *extra* aside from creating a new instance.
2022-06-03LibWeb: Fix Array OOBs in the HTMLTokenizerstelar7
Accessing last() if there are no elements makes WebContent crash :^)
2022-06-02LibWeb: Check recursively if CSS functions contain `var()` or `attr()`Karol Kosek
Previously, `var()` inside functions like `rgb()` wasn't resolved. This will set the background color for badges in the New category on https://ports.serenityos.net. :^)
2022-05-29LibWeb: Allow configuring the default error page pathDexesTTP
2022-05-29LibWeb: Allow configuring the default favicon pathDexesTTP
This is useful when using LibWeb in environments that aren't Serenity
2022-05-29Everywhere: Fix a bunch of typosLinus Groh
2022-05-21LibHTTP+LibWeb: Accept Brotli encoded responsesMichiel Visser
2022-05-15LibWeb: Abstract the LibProtocol ResourceLoader connectionDexesTTP
This is the final component that required LibProtocol as a dependency of LibWeb. With this, we can now remove the dependency, and LibWeb no longer requires IPC to work :^)
2022-05-15LibWeb: Abstract the LibProtocol WebSockets connectionDexesTTP
Much like the ImageDecoder change, this moves the underlying connection of the Web::WebSockets class from LibWeb to LibWebView, removing the need for LibProtocol in LibWeb for this specific use-case.
2022-05-15LibWeb: Abstract the image decoding via Web::ImageDecoding::DecoderDexesTTP
After this change, LibWeb now expects Web::ImageDecoding::Decoder to be pre-initialized with a concrete implementation before using the webpage. The previous implementation, based on the ImageDecoder service, has been provided directly through an adapter in LibWebClient, and is now used as the default value by WebContent.
2022-05-15LibWebView: Move StylePropertiesModel to LibWebViewDexesTTP
This patch has no functional changes.
2022-05-15LibWebView: Move DOMTreeModel to LibWebViewDexesTTP
This patch has no functional changes.
2022-05-15LibWebView: Move the DumpLayoutTree utility to LibWebViewDexesTTP
This patch has no functional changes.
2022-05-15LibWebView: Move OutOfProcessWebView to a new LibWebView libraryDexesTTP
Also moves WebContentClient and the references to the generated IPC descriptions, since they are all components of OutOfProcessWebView. This patch has no functional changes.
2022-05-13LibWeb: Add window.clientInformation propertyReimarPB
2022-05-13LibWeb: Don't treat any empty resources as errorsSam Atkins
HTML, CSS, JS and text files (among other things) can all legitimately be empty. Other types may be invalid, but that will be caught when trying to parse it as a document, so this check can safely be removed.
2022-05-13LibGUI+Userland: Make Dialog::ExecResult an enum classSam Atkins
2022-05-13LibWeb: Make about:blank load correctlySam Atkins
- Don't treat an empty `about:blank` resource as an error. - Give `about:` urls a content-type so `FrameLoader::parse_document()` won't reject them.
2022-05-13Meta: Move LibWeb's CMake generation script to its own fileDexesTTP
This patch has no functional changes, but prepares the CMake script to be able to handle LibWeb on Lagom.
2022-05-13LibWeb: Stop inactive requestAnimationFrame() callbacks from runningMacDue
Previously requestAnimationFrame() callbacks were registered with a static global RequestAnimationFrameDriver shared between all windows. This led to callbacks still running after navigating away from a page (This could be seen with the WASM GoL demo). This commit moves the RequestAnimationFrameDriver (now AnimationFrameCallbackDriver) to be a member of the HTML::Window object, then uses the 'active document' parameter of run_animation_frame_callbacks() to run only the active callbacks.
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-05-11LibWeb: Allow passing StringView to CSSRuleList::insert_a_css_rule()Sam Atkins
The spec is a little bizarre here. One caller of this (`CSSStyleSheet::insert_rule()`) wants to give it a parsed CSSRule, but the spec itself wants it to take a string. (As will be used by `CSSGroupingRule::insert_rule()`) Using a Variant isn't pretty but it's the best solution I've come to - having two overloads was worse, whether one called the other or they just duplicated the logic. This seems the least bad.
2022-05-11LibWeb: Implement `@supports` serializationSam Atkins
2022-05-11LibWeb: Add CSSSupportsRule wrapperSam Atkins
2022-05-11LibWeb: Add CSSMediaRule wrapperSam Atkins