Граф коммитов

347 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 0735ecafd8 Bug 1645382 - Remove unnecessary arguments from NS_OBSERVER_ARRAY_NOTIFY_* macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79485
2020-06-15 09:05:00 +00:00
Simon Giesecke 298981065e Bug 1645339 - Use range-based for with nsTObserverArray in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79484
2020-06-15 08:55:27 +00:00
Alex Vincent 3cb405965c Bug 1626015 - Implement ParentNode#ReplaceChildren. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75891
2020-05-28 00:58:24 +00:00
Razvan Maries f8a2bcc110 Backed out changeset 004abcb3322e (bug 1626015) for perma failures on idlharness.window.html. CLOSED TREE 2020-05-28 01:23:57 +03:00
Alexander J. Vincent e9ee229d54 Bug 1626015 - Implement ParentNode#ReplaceChildren. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75891
2020-05-27 18:44:13 +00:00
Emilio Cobos Álvarez 6989efb908 Bug 1640605 - Remove some now-unneeded casts / type-checks. r=edgar
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
2020-05-25 11:46:43 +00:00
Emilio Cobos Álvarez 89958b377a Bug 1640605 - Remove IsInAnonymousSubtree / IsRootOfAnonymousSubtree. r=edgar
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
2020-05-25 11:43:51 +00:00
Olli Pettay 9a394a854e Bug 1637712 - Consider to move *Ancestor* API to nsINode r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75169
2020-05-20 14:55:15 +00:00
Emily McDonough c161bb67d3 Bug 1564128 part 2 - Copy animations to static document clones r=emilio,hiro
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
2020-05-14 19:41:03 +00:00
Eric Rahm a7947848a0 Bug 1626448 - Remove nsAutoPtr usage from dom/base. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D69119

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:29 +00:00
Mirko Brodesser 8c66344a6d Bug 1623858: part 1) Rename `nsINode::IsSelectionDescendant` to `nsINode::IsMaybeSelected`. r=smaug
More accurate.

Differential Revision: https://phabricator.services.mozilla.com/D67599

--HG--
extra : moz-landing-system : lando
2020-03-20 14:27:39 +00:00
Sean Feng 33c417a9d0 Bug 1377999 - Set nsINode to use the customized new operator r=smaug
We customized the new operator to allow Dom Arena to be hooked
in.

Differential Revision: https://phabricator.services.mozilla.com/D62350

--HG--
extra : moz-landing-system : lando
2020-03-17 14:52:47 +00:00
Sean Feng ea28092183 Bug 1377999 - Handle cross docGroup node adoption by keeping arena alive r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D66662

--HG--
extra : moz-landing-system : lando
2020-03-17 14:52:45 +00:00
Sean Feng e6a1ddccf9 Bug 1377999 - Add the capability to do DOM node Arena allocation r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57698

--HG--
extra : moz-landing-system : lando
2020-03-17 14:52:37 +00:00
Boris Zbarsky 4417c6c9cc Bug 1622032. Improve some error messages in nsINode. r=nika
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
2020-03-13 03:50:04 +00:00
Nathan Froyd 8b675e62c9 Bug 1621313 - remove stray semicolon in nsINode.cpp; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D66238

--HG--
extra : moz-landing-system : lando
2020-03-10 15:18:19 +00:00
Brad Werth 4c4fadb3ed Bug 1593756 Part 1: Add a new method GetBoxQuadsFromWindowOrigin. r=emilio,hiro
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
2020-03-04 00:45:38 +00:00
Emilio Cobos Álvarez 6b4b7ae72c Bug 1617084 - Add some simple DOM ancestor iterators. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63594

--HG--
extra : moz-landing-system : lando
2020-03-02 11:36:42 +00:00
Erik Nordin 14304c1fdf Bug 1609288 - Apply styles from adopted stylesheets r=emilio
- 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
2020-02-15 01:16:46 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Emilio Cobos Álvarez 0c5c683162 Bug 1614654 - Simplify property handling during adoption. r=smaug
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
2020-02-11 16:38:18 +00:00
Emilio Cobos Álvarez 69c87f6cb2 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

Differential Revision: https://phabricator.services.mozilla.com/D61768

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez 86ca3370c2 Bug 1613349 - Rename nsINode::UnsetProperty to nsINode::TakeProperty. r=smaug
For consistency with the previous change for layout.

Depends on D61755

Differential Revision: https://phabricator.services.mozilla.com/D61756

--HG--
extra : moz-landing-system : lando
2020-02-05 22:26:20 +00:00
Boris Zbarsky b88d5ac5a8 Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267

--HG--
extra : moz-landing-system : lando
2020-02-03 20:19:11 +00:00
Mirko Brodesser 2abd6d5a82 Bug 1609662: part 16) Move `nsRange::IsNodeSelected` to `nsINode::IsSelected`. r=smaug
Make it const-correct too.

Differential Revision: https://phabricator.services.mozilla.com/D60643

--HG--
extra : moz-landing-system : lando
2020-01-27 09:25:00 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
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
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
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
2019-12-04 15:01:19 +00:00
Sylvestre Ledru 8d2f0d1b1f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D54686

--HG--
extra : moz-landing-system : lando
2019-11-26 14:35:02 +00:00
Emilio Cobos Álvarez ba2ffbed2e Bug 1597123 - Remove NODE_IS_ANONYMOUS_ROOT. r=smaug
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
2019-11-18 08:49:27 +00:00
Emilio Cobos Álvarez 7e683e7615 Bug 1596209 - Remove nsIContent::GetBindingParent. r=smaug
It's unused after all the previous patches.

Differential Revision: https://phabricator.services.mozilla.com/D53217

--HG--
extra : moz-landing-system : lando
2019-11-15 18:19:37 +00:00
Sebastian Hengst 9ad1a69782 Backed out changeset 0478d1bf6e32 (bug 1596209) on request from emilio. CLOSED TREE
--HG--
extra : rebase_source : 3c14fff8de93d231125ec8714aae98e51fbf6aeb
extra : amend_source : 5f1791c11b41593330cc8c94bdf67e1a0cf11fb1
2019-11-15 19:11:06 +01:00
Emilio Cobos Álvarez 5b84f966ac Bug 1596209 - Remove nsIContent::GetBindingParent. r=smaug
It's unused after all the previous patches.

Differential Revision: https://phabricator.services.mozilla.com/D53217

--HG--
extra : moz-landing-system : lando
2019-11-15 16:46:29 +00:00
Emilio Cobos Álvarez b518386f7f Bug 1596768 - Remove GetBindingParent usage in GetRootForContentSubtree. r=smaug
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
2019-11-15 16:53:19 +00:00
Emilio Cobos Álvarez b7eee11eab Bug 1596465 - Remove GetBindingParent() usage from nsINode::Contains. r=smaug
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
2019-11-15 12:32:37 +00:00
Emilio Cobos Álvarez f36874d798 Bug 1596445 - Add some supporting code to nsINode to deal with NAC and shadow DOM separately. r=bzbarsky
We'll use these to remove GetBindingParent.

Differential Revision: https://phabricator.services.mozilla.com/D53029

--HG--
extra : moz-landing-system : lando
2019-11-15 15:10:45 +00:00
Emilio Cobos Álvarez 479f01b95d Bug 1596455 - Simplify nsIContent::IsInAnonymousSubtree. r=bzbarsky
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
2019-11-14 23:09:03 +00:00
Emilio Cobos Álvarez 186586e54a Bug 1596391 - Remove NODE_MAY_BE_IN_BINDING_MNGR. r=smaug
Never set anymore.

Depends on D52993

Differential Revision: https://phabricator.services.mozilla.com/D52994

--HG--
extra : moz-landing-system : lando
2019-11-14 12:54:00 +00:00
Brian Grinstead f19f38776b Bug 1593119 - unifdef MOZ_XBL r=bzbarsky
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
2019-11-07 00:35:13 +00:00
Mirko Brodesser b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

Differential Revision: https://phabricator.services.mozilla.com/D51828

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Mirko Brodesser ba0285f534 Bug 1593222: part 9) Move non-animation notification methods from `nsNodeUtils` to `MutationObservers`. r=smaug
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
2019-11-05 21:32:53 +00:00
Mirko Brodesser 80f7994283 Bug 1593222: part 8) Move `nsNodeUtils::CloneAndAdopt` to `nsINode`. r=smaug
Depends on D51823

Differential Revision: https://phabricator.services.mozilla.com/D51824

--HG--
extra : moz-landing-system : lando
2019-11-05 21:13:45 +00:00
Mirko Brodesser 941b8066a4 Bug 1593222: part 7) Move `nsNodeUtils::Adopt` to `nsINode`. r=smaug
Depends on D51821

Differential Revision: https://phabricator.services.mozilla.com/D51823

--HG--
extra : moz-landing-system : lando
2019-11-05 20:53:00 +00:00
Mirko Brodesser a1dadb0aaf Bug 1593222: part 6) Move `nsINodeUtils::Clone` to `nsINode::Clone`. r=smaug
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
2019-11-05 20:43:53 +00:00
Mirko Brodesser 15a6b11b02 Bug 1593222: part 5) Merge `nsNodeUtils::CloneNodeImpl` into its only caller. r=smaug
Depends on D51609

Differential Revision: https://phabricator.services.mozilla.com/D51820

--HG--
extra : moz-landing-system : lando
2019-11-05 20:25:58 +00:00
Mirko Brodesser 673a4a18d6 Bug 1593222: part 4) Move `nsNodeUtils::LastRelease` to `nsINode`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D51609

--HG--
extra : moz-landing-system : lando
2019-11-05 14:06:13 +00:00
Mirko Brodesser 47bb9d8c1a Bug 1593222: part 3) Move `nsNodeUtils::GetFirstChildOfTemplateOrNode` to `nsINode`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D51608

--HG--
extra : moz-landing-system : lando
2019-11-05 14:06:05 +00:00
Brendan Dahl c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
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
2019-10-08 23:52:14 +00:00