summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
AgeCommit message (Collapse)Author
2022-04-07LibWeb: Fix logic mistake in CRC2D's default_source_size()Andreas Kling
If the source has a bitmap, we should indeed use the bitmap's size instead of always using the source's own size.
2022-04-07LibWeb: Support CRC2D.drawImage() with affine transformAndreas Kling
Previously, we only remapped the destination rect through the context's affine transform, but didn't actually paint through it. This patch fixes that by implementing a very inefficient algorithm for rasterizing a transformed bitmap. When the context has a plain identity transform, we bypass this algorithm in favor of calling Gfx::Painter directly as we did before. This makes the player character in "Biolab Disaster" able to turn left!
2022-04-07LibWeb: Ignore non-painting layout nodes when hit testingAndreas Kling
We currently have to check this because the paint tree hangs from the layout tree and has no independent means of traversal.
2022-04-07LibWeb: Ignore non-painting layout nodes when building stacking contextsAndreas Kling
2022-04-06LibWeb: Make BrowsingContext ask PageClient when it wants to be scrolledAndreas Kling
BrowsingContext shouldn't be scrolling itself, instead it has to update the layout (to ensure that we have current document metrics, and then ask the PageClient nicely to scroll it. This fixes an issue where BrowsingContext sometimes believed itself to be scrolled, but OOPWV had a different idea.
2022-04-06LibWeb+Browser: Remove Web::WebViewHooks classAndreas Kling
This was a mixin class that allowed sharing a set of hooks between InProcessWebView and OutOfProcessWebView. Now that there is only OOPWV, we don't need the mixin.
2022-04-06LibWeb: Remove the InProcessWebView widgetAndreas Kling
Let's simplify our offering by only having the OutOfProcessWebView.
2022-04-06LibWeb: Remove unused HTML::parse_html_document()Andreas Kling
2022-04-06LibWeb: Use FrameLoader::load_html() when loading error pagesAndreas Kling
Use our existing helper function for parsing a HTML string and opening it as the main content of the attached browsing context.
2022-04-06LibWeb: Rename compute_intrinsic_height() => calculate_auto_height()Andreas Kling
Change "compute" to "calculate" to make clearer that this is unrelated to the CSS "computed height" concept. Change "intrinsic" to "auto" to make clearer that this is not the same as the intrinsic min-content and max-content sizing calculations.
2022-04-06LibWeb: Remove incorrect comment from FFC flex item cross sizingAndreas Kling
2022-04-06LibWeb: Determine intrinsic flex container size from content-sizeAndreas Kling
When running the min-content and max-content sizing algorithms and the target box creates a flex formatting context, we don't need to measure its children. FFC has already assigned the content_width and content_height values, so we just need to pick those up from the container's formatting state.
2022-04-06LibWeb: Add basic constructor/prototype to exotic objectsIgor Pissolati
2022-04-06LibWeb: Implement basic intrinsic sizing algorithms for flex containersAndreas Kling
This patch adds support for MinContent and MaxContent layout to FFC. This means that an FFC can now calculate intrinsic sizes for the flex container, to be used by the parent formatting context. There are some FIXME's as usual, but this already works on basic things.
2022-04-05LibWeb: Add XMLHttpRequest::open() overloadKenneth Myhra
This adds the XMLHttpRequest::open(String, String, bool, String, String) overload. The following FIXMEs has been implemented: - If method is not a method, then throw a "SyntaxError" DOMException. - If the username argument is not null, set the username given parsedURL and username. - If the password argument is not null, set the password given parsedURL and password. - Set this’s synchronous flag if async is false; otherwise unset this’s synchronous flag. Spec comments has also been updated.
2022-04-04LibWeb: Make default text-decoration-thickness a fraction of font heightKarol Kosek
Previously the default was always 1px, which didn't look great on higher font sizes. This changes the default thickness to one-tenth to the font height. The one-tenth part was chosen arbitrarily, but I think it does the job pretty well. :^)
2022-04-04LibWeb: Use correct global object in legacy factoriesIgor Pissolati
2022-04-04LibWeb: Add legacy Option factory functionIgor Pissolati
2022-04-04LibWeb: Add spec comments to ImageConstructor::construct()Igor Pissolati
2022-04-04AK: Return Optional<T&> from HashMap<..., T>::get()Ali Mohammad Pur
This avoids a useless copy of the value, as most of the users (except one) actually just need a reference to the value.
2022-04-04LibWeb: Bring BorderRadiusStyleValue::to_string() closer to specIgor Pissolati
2022-04-03LibWeb: Include all row-groups in column width calculationsSimon Wanner
This was noticeable for example on fonts.serenityos.net, where the thead and tfoot would not get the same column widths as the tbody.
2022-04-03LibWeb: Handle failed browsing context creation in HTMLObjectElementSimon Wanner
If the document is not attached to a browsing context we can't create a new nested browsing context. This can happen when the resource load for the <object> finishes after the user navigated away from the current document, for example by reloading ACID 3 while it's running.
2022-04-03LibWeb: Make resolved styles handle calculated length-percentagesSimon Wanner
This could lead to a crash when inspecting for example the <body> on holidaycss.js.org, because it has `width: calc(100% - 1em)`
2022-04-03LibWeb: Add a null-check for page() in ESO::is_scripting_enabled()Simon Wanner
This could lead to a crash when spamming reload on a page with a <script> element.
2022-04-03LibWeb: Don't break text lines if white-space: nowrapEnver Balalic
If white-space is nowrap then we don't want to break a text_node into multiple line boxes. This fixes the width calculation in the min-content case for white-space: nowrap elements. Before this the min-width would be the width of the biggest line box.
2022-04-03Userland: Remove a few gratuitous IPC namespace qualifiersValtteri Koskivuori
Spotted this while trying to search for specific IPC encode/decode implementations. Now they are all the same, so searching is easier.
2022-04-03Browser+LibWeb+WebContent: Add ability to inspect local storageValtteri Koskivuori
The storage inspector now has a new tab for local storage. The next step would be to persist local storage and receive real-time notifications for changes to update the table view.
2022-04-03LibWeb: Fix computing_width of a block when LayoutMode::MaxContentEnver Balalic
We had an issue with computing a width of a block in MaxContent mode because we would set the width of the containing block to infinity which would make everything in the try_compute_width block infinity as well. This adds a special case for width = 'auto' when width_of_containing_block is infinity and removes the width of containing block from the equation entirely.
2022-04-03LibWeb: Not dispatching page_did_click_link event breaks page refreshRob Ryan
The WebView url wouldn't update so reload in Tab would still use the previous URL before any left click navigation. I am unsure if there was any good reason not to dispatch the event when there are no modifiers.
2022-04-02LibWeb: Add the requestIdleCallback/cancelIdleCallback APISimon Wanner
2022-04-02LibWeb: Implement the infrastructure necessary for requestIdleCallbackSimon Wanner
This includes a bug fix for the event loop processing steps which has not been merged yet: https://github.com/whatwg/html/pull/7768
2022-04-02LibWeb: Expose IdleDeadline on the window objectSimon Wanner
2022-04-02LibWeb: Implement flex reverse layoutsEnver Balalic
This builds on the work done by implementing the flex order CSS property and implements flex reverse layouts by just reversing the order and the items within each order bucket.
2022-04-02LibWeb: Implement the flex order CSS propertyEnver Balalic
Adds support for the flex order property and a test page for it on the browser welcome page.
2022-04-02Meta+LibWeb: Port PropertyID.h/cpp generators to invoke_generator()Sam Atkins
2022-04-02Meta+LibWeb: Port ValueID.h/cpp generators to invoke_generator()Sam Atkins
2022-04-02Meta+LibWeb: Port MediaFeatureID.h/cpp generators to invoke_generator()Sam Atkins
2022-04-02LibWeb: Use the specification defined types in IntersectionObserverInitIdan Horowitz
2022-04-02LibWeb: Add the ResizeObserverBoxOptions IDL enumIdan Horowitz
2022-04-02LibWeb: Use OnErrorEventHandler in WorkerGlobalScope IDLIdan Horowitz
2022-04-02LibWeb: Add the GlobalEventHandlers IDL mixinIdan Horowitz
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-03-31LibWeb: Flex fix minimum main size in min/max violations calculationEnver Balalic
While calculating the minimum size for main min/max size violations we were flooring the min size to 0 if the item doesn't have a min main size. Instead of that determine the intrinsic min main size of that element. This fixes the flex: 80% 0 4/1/0 test case in the flex.html test page. This case was missed in a previous commit that added the determine_min_main_size_of_child function
2022-03-31LibWeb: Add 'is scripting enabled' concept to EnvironmentSettingsObjectLinus Groh
This is now the source of truth for 'user enabled/disabled scripting', but it has to ask the window's page, which actually stores the setting. Also use this new functionality in two places where it was previously marked as a FIXME.
2022-03-31LibWeb: Remove Document::is_scripting_enabled() and use Node'sLinus Groh
There's no need to have a custom is_scripting_enabled() for the Document class, as it (indirectly) inherits from Node. Also, let's not hardcode false here :^)
2022-03-31LibWeb: Add the HTMLOrSVGElement IDL interface mixinIdan Horowitz
2022-03-31LibWeb: Use a callback function in ResizeObserver IDLIdan Horowitz
2022-03-31LibWeb: Use a callback function in IntersectionObserver IDLIdan Horowitz
2022-03-31LibWeb: Replace ad-hoc EventHandler type with callback function typedefIdan Horowitz