This change fixes selector matching for non-HTML elements that have
mixed-case names — such as the SVG foreignObject element.
Otherwise, without this change, attempting to use a selector to match
such an element — e.g., document.querySelector("foreignObject") — fails.
If there are no :defined pseudo-class selectors anywhere in the
document, we don't have to invalidate style at all when an element's
custom element state changes.
The goal here is to ensure we check for audio backends in a way that
makes sense. On macOS, let's just always use Audio Unit (and thus avoid
any checks for Pulse, to reduce needless/confusing build log noise). We
will also only use the Qt audio backend if no other backend was found,
rather than only checking for Pulse.
Rather than conditionalizing creating an audio plugin, just let the
audio backend factory return an error on its own. If an audio plugin
is not found, we will get a similar error to what is removed here.
Instead of having to duplicate the audio stream backend conditions, just
define PlaybackStream::create in each audio backend implementation file.
We provide a weak definition in PlaybackStream.cpp as the fallback.
This adds a thin wrapper to LibCrypto for generating cryptographically
secure random values and replaces current usages of PRNG within
LibCrypto as well.
Many times, attribute mutation doesn't necessitate a full style
invalidation on the element. However, the conditions are pretty
elaborate, so this first version has a lot of false positives.
We only need to invalidate style when any of these things apply:
1. The change may affect the match state of a selector somewhere.
2. The change may affect presentational hints applied to the element.
For (1) in this first version, we have a fixed list of attribute names
that may affect selectors. We also collect all names referenced by
attribute selectors anywhere in the document.
For (2), we add a new Element::is_presentational_hint() virtual that
tells us whether a given attribute name is a presentational hint.
This drastically reduces style work on many websites. As an example,
https://cnn.com/ is once again browseable.
There's one failing due to the constructor object not having the name
"Global" vs "WebAssembly.Global". This also doesn't include the
tentative test for the type property.
Some WPT tests expect that if you go out of your way to
Object.getOwnPropertyDescriptor on an interface object and extract
the setter out of it, that they throw when called with no arguments.
When the `style` attribute changes, we only need to update style on the
element itself (unless there are [style] attribute selectors somewhere).
Descendants of the element don't need a full style update, a simple
inheritance propagation is enough.
We can now mark an element as needing an "inherited style update" rather
than a full "style update". This effectively means that the next style
update will visit the element and pull all of its inherited properties
from the relevant ancestor element.
This is now used for descendants of elements with animated style.
Becuase we're using dynamic libraries, our configuration is
classified as a "community triplet". To not confuse vcpkg
maintainers when developers create bug reports, name them
properly. This means that the default triplet detection is now
kind of useless, so we have to invent our own for these triplets.
This required multiple changes:
- Make hashes non-copiable because they contain a heap allocated pointer
- Reference classes via `NonnullOwnPtr` only (they are non-copiable)
- Drop all existing hashes implementations
- Use the `OpenSSLHashFunction` base class to implement the same hashes
I was not able to come up with a way to divide this commit into multiple
without increasing the amount of changes.
Nothing breaks with this commit!
The previous VERIFY statement incorrectly asserted that the
interception state was not "committed" or "scrolled". Updated
the condition to ensure the interception state is either
"committed" or "scrolled" as intended.
if (size <= 1)
return;
This means that size is at the very minimum 2,
and pivot_point at the very minimum equals 1 as size / 2;
The condition if (pivot_point) can never be false.