This method provides the needed information to evaluate media queries.
Every feature in Media Queries Level 4 is present, either as code or as
a FIXME: https://www.w3.org/TR/mediaqueries-4/#media-descriptor-table
There's a draft Level 5 which I have ignored for now.
Some are unimplemented for now since we do not have access to the
requested information. Some require StyleValue types that we do not yet
support. Many are hard-coded for now since we do not (and may never)
support monochrome or text-only displays for Browser.
Since we don't support IDL typedefs or unions yet, the responsibility
of verifying the type of the argument is temporarily moved from the
generated Wrapper to the implementation.
We now fire "pageshow" events at the appropriate time during document
loading (done by the parser.)
Note that there are no corresponding "pagehide" events yet.
Since we don't have a direct connection to WindowServer, this is slighly
more naive implementation than what we were doing for single-process
mode.
Basically, there's a global RequestAnimationFrameDriver object that
has a 16ms single-shot timer. Whenever someone registers for a RAF
callback, we start the timer (if needed).
This is not ideal, but it's better than nothing. :^)
This namespace will be used for all interfaces defined in the URL
specification, like URL and URLSearchParams.
This has the unfortunate side-effect of requiring us to use the fully
qualified AK::URL name whenever we want to refer to the AK class, so
this commit also fixes all such references.
This just returns an empty CSSStyleDeclaration for now. The real thing
needs to be a live object that provides a view onto the computed style
of a given element. This is far from that, but it's something. :^)
Let's err on the side of caution and use a WeakPtr instead of a
DOM::Document&. Even if the object lifetimes involved here should be
well-defined, they are fairly complicated.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
Since Web::Bindings::WindowObject inherits from JS::GlobalObject, it
cannot also inherit from Web::Bindings::EventTargetWrapper.
However, that's not actually necessary. Instead, we simply set the
Window object's prototype to the EventTargetPrototype, and add a little
extra branch in the impl_from() function that turns the JS "this" value
into a DOM::EventTarget*.
With this, you can now call window.addEventListener()! Very cool :^)
Fixes#4758.