Age | Commit message (Collapse) | Author |
|
|
|
Origin is defined in the HTML Standard, and therefore belongs into the
HTML directory and namespace in LibWeb.
https://html.spec.whatwg.org/multipage/origin.html#origin
|
|
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
|
|
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
|
|
This protects it from GC.
|
|
The main thing that is missing is validating certain pieces of data
against XML productions in well-formed mode, but nothing uses
well-formed mode right now.
Required by Closure Library for sanitising HTML.
https://github.com/google/closure-library/blob/e687b3d8ab014787b9f10b08b3f597b637392480/closure/goog/html/sanitizer/safedomtreeprocessor.js#L117
|
|
This patch adds the document type concept to documents and sets it in
various places.
|
|
|
|
|
|
All Scripts have an associated settings object.
https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
|
|
|
|
Previously we forwarded all event handler attributes to Window from
these two elements, however, we are only supposed to forward blur,
error, focus, load, resize and scroll.
|
|
This allows HTMLCanvasElement and CRC2D to share their lifetime, as JS
allows them to arbitrarily access them at any time and CRC2D.canvas
expects a non-null return value.
|
|
|
|
Used by Google seemingly almost all around account sign in and
management. The modern sign in page has this near the beginning:
```html
<base href="https://accounts.google.com">
```
All of the XHRs performed by sign in are relative URLs to this
base URL. Previously we ignored this and did it relative to the
current URL, causing the XHRs to 404 and sign in to fall apart.
I presume they do this because you can access the sign in page
from multiple endpoints, such as `/ServiceLogin` and
`/o/oauth2/auth/identifier`
|
|
|
|
|
|
Accessing last() if there are no elements makes WebContent crash :^)
|
|
|
|
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.
|
|
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.
|
|
Using a Vector<Value> is unsafe as GC cannot see the stored values.
This is then vended to outside users of ConsoleClient, e.g. LibWeb and
WebContent, which is then outside of LibJS's control.
An example issue is if the client stores it for later use and forgets
to visit the stored values, meaning they can be destroyed at any time.
We can save the client from this by vending a MarkedVector<Value> to
them.
|
|
|
|
- Don't add multiple numbers to nested steps, just the innermost one
(as rendered in the HTML document)
- "Otherwise" comments go before the else, not after it
- "FIXME:" goes before step number, not between it and the comment text
- Always add a period between number and comment text
The majority of these were introduced in #13756, but some unrelated ones
have been updated as well.
|
|
|
|
I don't know how much this will actually help compile times, but it's
something!
|
|
|
|
|
|
The goal here is to move the parser-internal classes into this namespace
so they can have more convenient names without causing collisions. The
Parser itself won't collide, and would be more convenient to just
remain `CSS::Parser`, but having a namespace and a class with the same
name makes C++ unhappy.
|
|
|
|
With this change, it will correctly return the width/height when the
image element has an assigned width/height attribute.
|
|
|
|
|
|
If the transform is a simple translation, we don't need to run the big
and slow transform rasterizer.
|
|
Previously we forced all image elements to be inline-level. Now they can
participate in block layout if they prefer. :^)
|
|
If we don't do this, we may be returning stale values.
|
|
This is primarily required by Google Maps Street View, but the map view
works without this.
|
|
|
|
|
|
|
|
When a favicon has been loaded, trigger a favicon update on
document level. Of all the link tags in the header, the last
favicon that is load should be shown.
When the favicon could not be loaded, load the next icon in reverse tree
order.
|
|
|
|
|
|
If the source has a bitmap, we should indeed use the bitmap's size
instead of always using the source's own size.
|
|
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!
|
|
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.
|
|
|
|
|
|
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.
|
|
This could lead to a crash when spamming reload on a page with a
<script> element.
|