Age | Commit message (Collapse) | Author |
|
DOM elements don't always have a corresponding layout node. This fixes a
crash soon after loading the Steam store.
|
|
|
|
Changed here:
https://github.com/whatwg/fetch/commit/018ac19838ade92324a1900113636a8bf98f3a1b
|
|
Instead of recomputing the state whenever someone asks for it, we now
cache it when the attribute is added/changed/removed.
Before this change, HTMLElement::is_editable() was 6.5% of CPU time
when furiously resizing Hacker News. After, it's less than 0.5%. :^)
|
|
The spec seems to neglect the potential nullity of an image's pending
request in various cases.
Let's protect against crashing and mark these cases with a FIXME about
figuring out whether they are really spec bugs or not.
|
|
|
|
This implements the substeps which concern HTMLMediaElement parents.
|
|
Rather than setting the src attribute on the HTMLMediaElement, websites
may append a list of HTMLSourceElement nodes to the media element. There
is a series of "try the next source" steps to attempt to fetch/load each
source until we find one that works.
|
|
|
|
We achieve this by adding a new Layout::ImageProvider class and having
both HTMLImageElement and HTMLObjectElement inherit from it.
The HTML spec is vague on how object image loading should work, which
is why this first pass is focusing on image elements.
|
|
This first pass is enough to get us:
- Image loading via fetch
- Source selection via srcset and sizes attributes
|
|
Also comes with a little extra CSS parser helper for parsing "sizes"
attributes in images.
|
|
|
|
This patch adds HTML::ImageRequest and HTML::DecodedImageData.
The latter had to use a different name than "ImageData", as there is
already an IDL-exposed ImageData class in HTML.
|
|
|
|
Note that this unfortunately requires the same workaround as <link>
elements to handle CORS cross-origin responses.
|
|
The completion callback currently only accepts a JavaScriptModuleScript.
The same callback will need to be used for ClassicScript scripts as well
so allow the callback to accept any Script type. The single existing
outside caller already stores the result as a Script.
|
|
|
|
This lets elements figure out if they're visible within the viewport or
not, so they take appropriate action.
Fixes the issues with animations not starting until the viewport was
resized or scrolled.
|
|
Some versions of clang will have an issue using a consteval function to
set the optional parameter's default value. For example, see:
https://stackoverflow.com/questions/68789984/immediate-function-as-default-function-argument-initializer-in-clang
This doesn't need to be a String anyways, so let's make it an enum.
|
|
Implements
https://html.spec.whatwg.org/multipage/browsing-the-web.html#finalize-a-cross-document-navigation
|
|
https://html.spec.whatwg.org/multipage/browsing-the-web.html#clear-the-forward-session-history
|
|
This is an oversized hammer for sure, but we have to make sure the
layout tree gets rebuilt in case the object representation changes.
Since "throw out the entire layout tree" is the finest tool we have
right now, it'll have to do.
This fixes an issue where the eyes on Acid2 would sometimes not show up
until the next layout invalidation occurred.
|
|
This required moving the CSS::StyleProperty destruct out of line.
|
|
This required moving HTML::ScrollOptions to its own header file.
|
|
This makes loading Google Groups quite a bit faster, as 20% of runtime
while loading was spent asking if DOM nodes are HTMLScriptElement.
|
|
"The official project language is American English […]."
https://github.com/SerenityOS/serenity/blob/5d2e9156239cd707a22ecea6c87d48e5fc1cbe84/CONTRIBUTING.md?plain=1#L30
Here's a short statistic of the occurrences of the word "behavio(u)r":
$ git grep -IPioh 'behaviou?r' | sort | uniq -c | sort -n
2 BEHAVIOR
24 Behaviour
32 behaviour
407 Behavior
992 behavior
Therefore, it is clear that "behaviour" (56 occurrences) should be
regarded a typo, and "behavior" (1401 occurrences) should be preferred.
Note that The occurrences in LibJS are intentionally NOT changed,
because there are taken verbatim from the specification. Hence:
$ git grep -IPioh 'behaviou?r' | sort | uniq -c | sort -n
2 BEHAVIOR
10 behaviour
24 Behaviour
407 Behavior
1014 behavior
|
|
|
|
Turns out we create a lot of these, mostly from places that don't return
ErrorOr. The yak stack grows.
|
|
This fixes another GC crash seen on https://shopify.com/
Found it by collecting garbage after every 500th heap allocation.
|
|
For example, when navigating to another page, this ensures any media
resource will not continue playing.
|
|
|
|
This allows them to mark JS modules, and fixes a crash seen on
https://shopify.com/
|
|
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#create-navigation-params-from-a-srcdoc-resource
This is supporting function for populating document in session history
entry.
This function populates navigation params response with HTML text
passed in document resource.
|
|
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#create-navigation-params-by-fetching
This is supporting function for population of document in a session
history entry.
This function populates response in navigation params by fetching url
in navigation params and handling redirects if required.
|
|
Implements:
https://html.spec.whatwg.org/multipage/browsing-the-web.html#attempt-to-populate-the-history-entry's-document
This is going to be a replacement for `FrameLoader::load()` after
switching to navigables.
Brief description of `populate_session_history_entry_document`:
- If navigation params have url with fetch scheme then DOM document
will be populated by fetching url and parsing response. This
is going to be a replacement for `FrameLoader::load(AK::URL&)`.
- If url in navigation params is abort:srcdoc then DOM document
will be populated by parsing HTML text passed in document resource.
This is going to be a replacement for `FrameLoader::load_html()`
|
|
|
|
|
|
|
|
|
|
ever_navigable_target_name -> navigable_target_name
|
|
|
|
|
|
|
|
The Display class already supported all specific values, and now they
will be parsed too. The display property now has a special type
DisplayStyleValue.
|
|
|
|
|
|
|
|
|
|
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-all-used-history-steps
|