Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.
I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).
Differential Revision: https://phabricator.services.mozilla.com/D190450
Performance results pending, but this shouldn't hurt utf-8 atomization
at all, and it should also make utf-16 atomization potentially cheaper.
So sending for review under the assumption that perf numbers will look
good.
Differential Revision: https://phabricator.services.mozilla.com/D189021
Performance results pending, but this shouldn't hurt utf-8 atomization
at all, and it should also make utf-16 atomization potentially cheaper.
So sending for review under the assumption that perf numbers will look
good.
Differential Revision: https://phabricator.services.mozilla.com/D189021
While in the vicinity, add a missing define for IS_LITTLE_ENDIAN in
wasm, which in practice has no consequence because the code that depends
on it is not actually used in the wasm sandbox. And since that code is
not used, we also strip it.
Differential Revision: https://phabricator.services.mozilla.com/D187524
We are working on an alternative approach to improving OnStart/OnStop request timing, and so will remove this probe because it's no longer as relevant and the implementation touchs many classes and methods.
Differential Revision: https://phabricator.services.mozilla.com/D187233
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.
Differential Revision: https://phabricator.services.mozilla.com/D183483
This generalizes the previous "set single class from parser" fast-path to
also apply when there are multiple classes in the class attribute.
The main benefit is the cheaper cache lookup.
Another benefit is that this avoids a string copy (the same copy that the original
"set single class from parser" optimization avoided).
We now always atomize the full class attribute value before parsing it,
e.g. when somebody uses setAttribute. In the common case of a single class,
this atomization cost would have been paid anyway.
Before: https://share.firefox.dev/4576ulw
After: https://share.firefox.dev/3rNGBsH (though this is not the full story
because the atomization work is moved outside of nsHtml5TreeOperation::SetHTMLElementAttributes)
Differential Revision: https://phabricator.services.mozilla.com/D183813
Having it disabled is not web compatible, and there's no strong reason
to keep it, IMO.
If we want another pref to determine whether preloads are actually
triggered we can add it in the future.
Differential Revision: https://phabricator.services.mozilla.com/D186014
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.
Differential Revision: https://phabricator.services.mozilla.com/D183483
It's expensive to call `nsINode::IsAnyOfHTMLElements` with a lot of arguments
due to its recursive calls (in this case, called with 30 arguments).
Additionally, the unknown element check with `do_QueryObject` is also expensive.
Once we get an `nsHTMLTag`, we can use a `switch` statement.
Note that I realized `nsHTMLTag_small` is not defined only on Windows if
`nsHTMLTags.h` is included after `rpcndr.h` in the Windows SDK since there is
```
#define small char
```
In the header file. This patch includes the workaround for this issue.
Differential Revision: https://phabricator.services.mozilla.com/D184553
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
Right now, when binding to the tree we queue a runnable to update the
stylesheet, even though mEnableUpdates is false.
Even though the redundant update is nowadays always cached, it's just
wasted work, and the code is simpler without it.
This will be tested by bug 1771113, which is what made me look at this.
We need to tweak a bit the dispatch of applicable state change events
for DevTools, because for a case like:
div.attachShadow({ mode: "open" }).innerHTML = `<style>...</style>`;
Before we'd go through the stylesheet cache here due to the redundant
update:
https://searchfox.org/mozilla-central/rev/fb43eb3bdf5b51000bc7dfe3474cbe56ca2ab63c/layout/style/SharedStyleSheetCache.cpp#161-165
But now we won't, and the code in StyleSheet.cpp wasn't quite correct /
didn't dispatch the event.
Nobody listens to style-sheet-applicable-state-changed, so remove that
code while at it.
Differential Revision: https://phabricator.services.mozilla.com/D185559
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
Implemented the new <search> HTML element.
All WPT tests for it now pass (except one for iso-8859-8, not done generally).
A11y role uses just landmark as recommended instead of a new search role (for now).
Co-authored-by: Henri Sivonen <hsivonen@mozilla.com>
Differential Revision: https://phabricator.services.mozilla.com/D176967
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.
Differential Revision: https://phabricator.services.mozilla.com/D183483