This adds the elements `formaction`, `data`, `ping`, `poster`.
We can't really add a test for the `<object data>`, since we never
allow `<object>` elements in the first place and we don't allow
settings exceptions for temporarily allowed elements.
Same for `poster` elements, since it's only used in media elements
and those are either all allowed or none.
Differential Revision: https://phabricator.services.mozilla.com/D78638
This adds the elements `formaction`, `data`, `ping`, `poster`.
We can't really add a test for the `<object data>`, since we never
allow `<object>` elements in the first place and we don't allow
settings exceptions for temporarily allowed elements.
Same for `poster` elements, since it's only used in media elements
and those are either all allowed or none.
Differential Revision: https://phabricator.services.mozilla.com/D78638
- Add enum AllowImportRules to CSS parsing.
- `replaceSync()` will skip over @import rules and continue parsing.
- `replace()` will skip over @import rules and continue parsing.
- `insertRule()` will throw a syntax error on @import rules.
- Modify WPT test cases to reflect these changes.
Differential Revision: https://phabricator.services.mozilla.com/D61882
--HG--
extra : moz-landing-system : lando
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
For the async caller, pretty much everything can be extracted out of the loader
/ loadData.
For the sync callers, we need to be a bit more careful because ReparseSheet
tries to get its line number on its own.
I changed the compat mode passed to the reparse stuff to be the document's one
in this case, but that seems a bug fix.
MozReview-Commit-ID: 2wi5HPRAlPi
The various AtomsTables in nsTreeSanitizer only contain static atoms. Knowing
this, we can optimize things:
- They can contain raw nsStaticAtom pointers instead of refcounted nsAtom
pointers.
- When looking up, we can/must first check if the atom we are looking for is
static. If not, we know it can't be in the table. This is done by the new
Contains() method.
This change also lets us add more `const` to various places that interact with
the tables.
MozReview-Commit-ID: EFxWN2GU78L
--HG--
extra : rebase_source : f2a0bdbb4c5179dd396476263e6a6b57adb13360
This is much shorter than nsTHashtable<nsRefPtrHashKey<nsAtom>>, which is
repeated often.
MozReview-Commit-ID: 85MR0PQ6klI
--HG--
extra : rebase_source : b9d157b2deb68f4d9aee94bdcff6737caf4336ba
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.
MozReview-Commit-ID: 7DQGlgh1tgJ
It seems silly to have a tiny utils class with a single function in its own
module. This patch moves it into nsStaticAtom.h/nsAtomTable.cpp. It also
renames nsAtomListUtils as nsStaticAtomUtils. Finally, it uses templates to
remove the need for the `aCount` parameter at callsites.
MozReview-Commit-ID: DvJVoZFv89c
--HG--
extra : rebase_source : 1f1dd27d56e46c71c30c10102ac6132a721e23d1
Most of the noise is from the fact that clang-format on parser/html/*.{h,cpp}
reformatted all sorts of stuff. Not running it caused lots of format changes
from the generator... I guess we changed the format rules since the last time
this got run?
MozReview-Commit-ID: IA2G87zUIKN
In each case, the atom had an obvious name and a weird name. Where possible, I
kept the obvious name and commented out the weird name, viz:
- `mixed` over `_mixed` for "mixed"
- `el` over `el_` for "el"
- `other` over `other_` for "other"
- `remote` over `Remote` for "remote"
But for several of them I didn't do that, because the weird name is used
within the HTML5 parser -- which is a huge pain to modify because it involves
code generated by code from another repo -- so I kept the weird name and
commented out the obvious name, viz:
- `list_` over `list` for "list"
- `svgSwitch` over `_switch` for "switch"
- `set_` over `set` for "set"
MozReview-Commit-ID: Jp3CpdWXNDm
--HG--
extra : rebase_source : 421ce5316772f1951488307e81f2ceee696d363d