IsInNativeAnonymousSubtree and IsRootOfNativeAnonymousSubtree are
exposed in nsINode, so we don't need to make sure to call them on
nsIContent objects.
Depends on D76681
Differential Revision: https://phabricator.services.mozilla.com/D76682
In favor of the NativeAnonymous versions which they forward to.
Done automatically with:
rg -l 'IsInAnonymousSubtree' | xargs sed -i 's/IsInAnonymousSubtree/IsInNativeAnonymousSubtree/g'
And removing the function definitions afterwards.
Differential Revision: https://phabricator.services.mozilla.com/D76681
This also requires changing the EffectCompositor to allow animations in print
and print preview, and setting up a document timeline for the cloned document
Differential Revision: https://phabricator.services.mozilla.com/D69069
In particular, improve the error message for replaceChild when the two arguments get switched.
Differential Revision: https://phabricator.services.mozilla.com/D66640
--HG--
extra : moz-landing-system : lando
Window space is not a sensible space for CSS points, as returned by
getBoxQuads, since the CSS points are relative to window origin and not the
layout origin. This new method is useful in paired calling patterns, where
the returned quads are further translated by the position of the document
node relative to the window origin. Later parts of this patch demonstrate
this calling pattern in a test.
Differential Revision: https://phabricator.services.mozilla.com/D52788
--HG--
extra : moz-landing-system : lando
- Ensure that adopted styles are applied correctly to ShadowRoot
- Ensure that adopted styles are applied correctly to Document
- Add new WPT test cases to ensure the ordering of the styles.
Differential Revision: https://phabricator.services.mozilla.com/D60083
--HG--
extra : moz-landing-system : lando
We don't need to transfer all properties after adopt. Collecting all the nodes
with properties during adopt was needed because there used to be clone and adopt
user-data callbacks, see https://bugzilla.mozilla.org/show_bug.cgi?id=347524.
This ensures that NodeInfoChanged and similar callbacks can tweak node
properties, which is needed for bug 1542784.
Also simplify surrounding code. As far as I can tell we should always have
different documents if we get a NodeInfoManager object.
Differential Revision: https://phabricator.services.mozilla.com/D62439
--HG--
extra : moz-landing-system : lando
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55442
--HG--
extra : moz-landing-system : lando
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55442
--HG--
extra : moz-landing-system : lando
We no longer have multiple kinds of anonymous subtrees, so we can get back one
node bit.
Differential Revision: https://phabricator.services.mozilla.com/D53344
--HG--
extra : moz-landing-system : lando
Shadow DOM is handled above.
And do some minor drive-by cleanups. Unclear why we have both this and the
RangeUtils version.
Depends on D53194
Differential Revision: https://phabricator.services.mozilla.com/D53195
--HG--
extra : moz-landing-system : lando
And make ShadowRoot.contains() and checking nodes from different shadow trees
faster.
Differential Revision: https://phabricator.services.mozilla.com/D53037
--HG--
extra : moz-landing-system : lando
Now that XBL is gone, the only anonymous subtrees are NAC.
I'd prefer to defer the removal of IsInAnonymousSubtree if possible, as there's
a bunch of patches coming on top of this one :)
Differential Revision: https://phabricator.services.mozilla.com/D53033
--HG--
extra : moz-landing-system : lando
This was generated with:
```
rg -l -g '*.{cpp,h}' MOZ_XBL . | while read FILE ; do
echo $FILE
unifdef -m -UMOZ_XBL $FILE
done
```
After this, I manually removed the directive in nsContentUtils.cpp due to:
unifdef: ./dom/base/nsContentUtils.cpp: 4630: Unterminated string literal
unifdef: Output may be truncated
Differential Revision: https://phabricator.services.mozilla.com/D51337
--HG--
extra : moz-landing-system : lando
The remaining notification methods are moved in a separate commit. The
files are renamed to `MutationObservers.*` in a follow-up commit.
Depends on D51824
Differential Revision: https://phabricator.services.mozilla.com/D51825
--HG--
extra : moz-landing-system : lando
Makes `nsNodeUtils::CloneAndAdopt` temporarily public. Will be hidden
again in a follow-up commit.
Depends on D51820
Differential Revision: https://phabricator.services.mozilla.com/D51821
--HG--
extra : moz-landing-system : lando
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.
Depends on D45612
Differential Revision: https://phabricator.services.mozilla.com/D45613
--HG--
extra : moz-landing-system : lando