This mainly uses forward declarations as appropriate for input element
related files. This reduces the number of targets being built when we
change HTMLInputElement.h from 430 to 44.
(cherry picked from commit 57e4fb0caebb0074a23bef70d7558ce5e8a5f357)
If we decide to fetch another linked resource, we don't care about the
earlier fetch and can safely abort it.
This fixes an issue on GitHub where we'd load the same style sheet
multiple times and invalidate style for the entire document every time
it finished fetching.
By aborting the ongoing fetch, no excess invalidation happens.
(cherry picked from commit 57e26ed6b9b2c0cf1e4f5ac3e85ca0c7f3647caa)
This fixes an issue where document.write() with only text input would
leave all the character data as unflushed text in the parser.
This fixes many of the WPT tests for document.write().
(cherry picked from commit a0ed12e839f14b3ac80caca0e18a09ca256fd99d)
Instead of trying to locate the relevant StyleSheetList on style element
removal from the DOM, we now simply keep a pointer to the list instead.
This fixes an issue where using attachShadow() on an element that had
a declarative shadow DOM would cause any style elements present to use
the wrong StyleSheetList when removing themselves from the tree.
(cherry picked from commit 8543b8ad6a4d96bd0c247052572b8c2abf3929a7)
This change moves the `crypto()` getter from `Window` to
`WorkerOrWindowGlobalScope`. This aligns our implementation with the
WebCrypto specification.
(cherry picked from commit 89b6cd3fb1b9a3058dbada9e12606950b466936a)
Previously `#keyword` was used in the macro, meaning all keywords
gained `""` around them
(cherry picked from commit d828d80b756468eb343aec074e7c9944d129437f)
This commit implements the setter for `location.search`, allowing
updates to the query string of the URL.
(cherry picked from commit 514a2a1757b10b9b4ff020237c84f70ba5a79c4b)
This allows us to use HeapFunction all of the way down, allowing us
to remove the Handle usage in after_session_callback for
create_new_child_navigable.
(cherry picked from commit fc83653f3c7a650229d2be3eef0f1738a9395db9)
...For the completion steps. This is quite nice, as we can simply
capture this in the heap function where it is used instead of
needing to establish a new root.
Note that with these changes, to represent 'an empty algorithm', we now
use a null HeapFunction and do not invoke the steps.
(cherry picked from commit b6d2ab23322ebc6d667276257220c401fe025617)
If given, the spec expects the input URL to be manipulated on the fly
as it is being parsed, and may ignore any errors thrown by the URL
parser.
Previously, we were not exactly following the specs assumption here
which resulted in us needed to make awkward copies of the URL in these
situations.
For most cases this is not an issue. But it does cause problems for
situations where URL parsing would result in a failure (which is
ignored by the caller), and the URL is _partially_ updated
while parsing.
Such a situation can occur when setting the host of an href alongside a
port number which is not valid. It is expected that this situation will
result in the host being updates - but not the port number.
Adjust the URL parser API so that it mutates the URL given (if any), and
adjust the callers accordingly.
Fixes two tests on https://wpt.live/url/url-setters-a-area.window.html
(cherry picked from commit ff71d8f2c97441bff5975c117a7e7c8820e33e44)
Rather than returning a relative URL, an absolutized URL is now
returned relative to the document base URL
(cherry picked from commit 48e5d28ec985aeaee565d06a625a0d664b6975d3)
This change also ensures that relative URLs are resolved relative to
the document's base URL.
(cherry picked from commit c25dda767eb43d1620602ccc2c955bc56ef1745b)
If the document is disconnected from the navigable by the time a favicon
decode completes successfully, we don't want to show the favicon for
whatever document is now loaded in the navigable.
Fix this by deferring getting the navigable until after the decode has
completed.
(cherry picked from commit 5606ce412e1d946dcd59a85ed50e429efdde863f)
This appears to have been a bug in the spec which was later corrected -
so to fix the crash we can simply remove this assertion.
Fixes: #868
(cherry picked from commit 07940a89cad5ecfa21c2d1d8e055941bdb097ef9)
This implements the `preload` reflected attribute. No actual preloading
is going on yet.
(cherry picked from commit fe933b2057eee8eb65d6e43a97b934bbe85d03bb)
`BrowsingContext::m_parent` has been removed from the spec,
and previously `m_parent` was always null.
`BrowsingContext::is_top_level` was already always returning
true before because of that, and the updated spec algorithm
causes assertions to fail.
This fixes the following example:
```html
<a href="about:blank" target="test">a
<iframe name="test">
```
clicking the link twice no longer causes it to open in a new tab.
(cherry picked from commit e6a668ad913f0755840954c188c255fc5fc66606)
None of HTML event loop processing steps are relevant for decoded SVGs,
so we can simply skip them while collecting documents for processing.
(cherry picked from commit c87214d79cf834ee9b7b4da65e902e5233c0a5cc)