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

61 Коммитов

Автор SHA1 Сообщение Дата
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
Brian Grinstead b96014d27c Bug 1596485 - Rename mXBLInvolved to mShadowDOMInvolved and XBLInvolved to ShadowDOMInvolved r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D59071

--HG--
extra : moz-landing-system : lando
2020-01-08 15:08:06 +00:00
Emilio Cobos Álvarez 802cb96d68 Bug 1596391 - Remove nsIContent::IsActiveChildrenElement. r=smaug
Always returns false.

Depends on D52991

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

--HG--
extra : moz-landing-system : lando
2019-11-14 12:55:25 +00:00
Emilio Cobos Álvarez 2a9602f682 Bug 1596391 - Remove lazy computation of FlattenedChildIterator::mXBLInvolved. r=smaug
XBL is gone, and thus we don't need to check for the children element anymore,
and computing it upfront becomes cheap.

Depends on D52990

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

--HG--
extra : moz-landing-system : lando
2019-11-14 12:52:00 +00:00
Brian Grinstead 8e592888cb Bug 1593119 - clang-format the files affected by the MOZ_XBL unifdef r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D52057

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:25 +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
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
Mats Palmgren 53f517142f Bug 205202 part 1 - [css-lists][css-pseudo] Add support for the ::marker pseudo element on list items. Alias :-moz-list-bullet/number to that in the parser. r=emilio 2019-03-24 23:13:53 +01:00
Edgar Chen 89cf3fb922 Bug 1518121 - Part 2: Update ExplicitChildIterator correctly when we are at the end of child list of a slot parent; r=smaug
The mIndexInInserted keeps pointing to the last assigned node of a slot parent
when we are at the end of child list. So when we calles GetPreviousChild when we
are at the end of child list, ExplicitChildIterator will skip last assigned node.

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

--HG--
extra : moz-landing-system : lando
2019-02-14 10:14:33 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
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.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez 63814207cb Bug 1516853 - Merge nsIDocument and nsDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D15498

--HG--
extra : moz-landing-system : lando
2018-12-31 14:10:19 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Timothy Guan-tin Chien 2b5881e46b Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-15 06:51:07 +00:00
Andreea Pavel d51566f085 Backed out 2 changesets (bug 1503019) for failing crashtests at dom/base/crashtests/1505811.html on a CLOSED TREE
Backed out changeset 06b12fd41ff1 (bug 1503019)
Backed out changeset 7b845eac9dd7 (bug 1503019)
2018-11-15 01:52:30 +02:00
Timothy Guan-tin Chien c0cc4f74e7 Bug 1503019 - Part I, Remove dom.webcomponents.shadowdom.enabled r=smaug
This patch removes the dom.webcomponents.shadowdom.enabled pref and all its
references, including the following functions:

* nsContentUtils::IsShadowDOMEnabled()
* nsIDocument::IsShadowDOMEnabled()
* nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aGlobal)
* nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
* nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)

This function is renamed and updated to nsDocument::IsCallerChromeOrAddon():

* nsDocument::IsShadowDOMEnabledAndCallerIsChromeOrAddon(JSContext* aCx, JSObject* aObject)

I didn't change the tests that load Shadow DOM tests in an iframe, in the interest of keeping hg annotation history.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 19:34:52 +00:00
Emilio Cobos Álvarez 14c2498ce3 Bug 1455891: Improve StyleChildrenIterator. r=smaug
Support move assignment, and export more AllChildrenIterator stuff.

Also add a static GetParent function that we'll use shortly.

MozReview-Commit-ID: 2KCxq29dyP
2018-07-06 04:47:31 +02:00
Emilio Cobos Álvarez 37a88d0520 Bug 1465572: Ensure <slot> disables whitespace optimizations. r=bz
The whitespace optimization code only knows about the light tree.

It's not a great idea to try to put flattened tree children of a slot through
there, since the children may not be assigned to the same slot, or to any slot
(in which case we crash).

We should probably rename XBLInvolved to ShadowDOMOrXBLInvolved too, I guess.
Note that the ShadowRoot case already sets the bit on Init().

MozReview-Commit-ID: 91lmE7OxlnA

--HG--
extra : rebase_source : ee87ae28d6065c7fd072afad61c16a59b6dce039
2018-06-02 09:35:19 +02:00
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Emilio Cobos Álvarez c3209ce172 Bug 1422653: Compute whether XBL is involved in ChildIterator lazily. r=mats
The only thing that cares about it is the frame constructor, it's a shame that
everyone else (in particular, the style system) needs to pay this extra walk
over the DOM.

MozReview-Commit-ID: F7S5zx9KMlp
2018-02-28 23:15:33 +01:00
Margareta Eliza Balazs 16aea1a321 Backed out changeset 283b2a4cb219 (bug 1422653) for bustage in /builds/worker/workspace/build/src/layout/base/nsCSSFrameConstructor.cpp:6840:26 on a CLOSED TREE 2018-02-28 12:25:31 +02:00
Emilio Cobos Álvarez d76e064ca7 Bug 1422653: Compute whether XBL is involved in ChildIterator lazily. r=mats
The only thing that cares about it is the frame constructor, it's a shame that
everyone else (in particular, the style system) needs to pay this extra walk
over the DOM.

MozReview-Commit-ID: F7S5zx9KMlp
2018-02-28 10:43:00 +01:00
Emilio Cobos Álvarez a38c782d93 Bug 1425759: Make ChildIterator handle Shadow DOM explicitly. r=smaug
I'll rename mIsXBLInvolved in a bit, since I plan to do more changes here in
bug 1422653.

MozReview-Commit-ID: JCeAgk2DoY4
2018-02-27 12:39:30 +01:00
Jessica Jong 4bee56a645 Bug 1428685 - Use dom.webcomponents.shadowdom.enabled pref for Shadow DOM. r=smaug
Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and
this pref is only used by Shadow DOM right now, so we should rename it to
"dom.webcomponents.shadowdom.enabled"

MozReview-Commit-ID: er1c7AsSSW
2018-01-16 17:16:30 +01:00
Emilio Cobos Álvarez 27c288f0e2 Bug 1426536: Remove nsContentUtils::IsContentInsertionPoint. r=smaug
We're not going to need it in Shadow DOM v1.

MozReview-Commit-ID: HOokTPlm2Wt

--HG--
extra : rebase_source : 2f746eafb9fa2b14cfe05233d67bf34b80105a44
2017-12-20 22:45:19 +01:00
Jessica Jong 7fe15d1a52 Bug 1422931 - Part 2: Make webcomponents preference per-doc. r=smaug
This is to fix the case where preference is restore to false when a testcase
ends, but nsDocument::DeleteShell is called afterwards. So, we make the
preference per-doc and set it when the document is created. The value does not
change for the lifetime of the document.
2017-12-09 11:25:14 +08:00
Jessica Jong b519c97d26 Bug 1422931 - Part 1: Fix crash with slot element. r=smaug 2017-12-09 11:24:58 +08:00
Narcis Beleuzu f0d93dda2c Backed out 2 changesets (bug 1422931) for crashtest failures on dom/base/crashtests/1419799.html r=backout on a CLOSED TREE
Backed out changeset 60d9744e3fc4 (bug 1422931)
Backed out changeset cf554d5d70cc (bug 1422931)
2017-12-08 18:27:56 +02:00
Jessica Jong 00fc818c22 Bug 1422931 - Part 2: Make webcomponents preference per-doc. r=smaug
This is to fix the case where preference is restore to false when a
testcas ends, but nsDocument::DeleteShell is called afterwards. So, we
make the preference per-doc and once it is enabled for a document, it
stays enabled.
2017-12-08 22:17:40 +08:00
Jessica Jong 491af03c03 Bug 1422931 - Part 1: Fix crash with slot element. r=smaug 2017-12-08 22:17:33 +08:00
Jessica Jong 306e4bafc3 Bug 1409975 - Part 2: Include slots in the flat tree. r=smaug,emilio
We should consider slot as a parent in ChildIterator: if slot's
`assignedNodes` is not empty, use `assignedNodes`, otherwise, use direct
children as fallback content.
Also, GetFlattenedTreeParentNodeInternal should be changed to use
`assignedSlot` instead of `DestInsertionPoints`.
2017-12-04 16:06:37 +08:00
Olli Pettay af3373dc1d Bug 1418002 - Remove HTMLContentElement, r=jessica 2017-11-30 10:57:15 +02:00
Emilio Cobos Álvarez 05a25ccc70 Bug 1413619: Fix insertion point computation when display: contents pseudos are involved. r=mats,bz
This is a significant rework of how do we compute the insertion point of a
node.

We handle pseudos in the same function instead of out of band, and also recurse
up when the parent has display: contents, which simplifies the code IMO.

MozReview-Commit-ID: 1rSfv1Tq5gO
2017-11-04 11:58:16 +01:00
Olli Pettay c80e124562 Bug 1396584 - Remove support for multiple ShadowRoots, r=mrbkap
--HG--
extra : rebase_source : 2bb600ed1ffd35c195617a7eb70d0ba847a46898
2017-09-25 18:09:26 +03:00
Emilio Cobos Álvarez 37df721a48 Bug 1397983: Synchronously bind/unbind XBL anonymous content from the bound content's Bind/UnbindFromTree. r=smaug
Doing it off a runnable makes the flattened tree inconsistent until that
runnable runs.

Also add an assert in frame construction that would've caught the first
only-unbind patch.

MozReview-Commit-ID: Hnua3aWSMHi

--HG--
extra : rebase_source : 2781e3b0a3f28b6b6a620902e7414dfe682fba51
2017-09-08 14:59:04 +02:00
Cameron McCormack e0c3937257 Bug 1372061 - Remove unused StyleChildrenIterator::IsNeeded. r=bholley
MozReview-Commit-ID: LH8xZMrcdO1

--HG--
extra : rebase_source : 5d2e6a729442f7a7b8ded5d8b976933b53780b69
2017-06-27 23:56:13 -07:00
Emilio Cobos Álvarez cbba1b6268 Bug 1371130: Move AllChildrenIterator::AppendNativeAnonymousChildren to nsContentUtils. r=heycam
MozReview-Commit-ID: E5kfdxEWTuf
2017-06-20 14:24:34 +02:00
Cameron McCormack 3f6d354226 Bug 1364361 - Part 2: Make AllChildIterator find NAC created by all of an element's anon boxes. r=bz,janx
MozReview-Commit-ID: IfTLBhhG1Ya

--HG--
extra : rebase_source : aa5c7136f3425def8efa221c7f3e63240ac6ad8e
2017-06-16 17:22:34 +08:00
Sebastian Hengst c21843350e Backed out changeset e9f7c901e132 (bug 1364361) 2017-06-16 11:18:27 +02:00
Cameron McCormack 68b572fafa Bug 1364361 - Part 2: Make AllChildIterator find NAC created by all of an element's anon boxes. r=bz,janx
MozReview-Commit-ID: IfTLBhhG1Ya

--HG--
extra : rebase_source : d9b7a4c6e0a7893dc1cd7b3337c32a4fd3bd0bff
2017-06-16 15:37:06 +08:00
Sebastian Hengst 43a1d3b898 Backed out changeset cffde1d0ebb4 (bug 1364361) 2017-06-16 09:27:14 +02:00
Cameron McCormack 03c31cc6ba Bug 1364361 - Part 2: Make AllChildIterator find NAC created by all of an element's anon boxes. r=bz,janx
MozReview-Commit-ID: IfTLBhhG1Ya

--HG--
extra : rebase_source : 7e8a1f91b3fb6c521b9cee2c9d8082a404a7b52f
2017-05-22 13:28:20 +08:00
Emilio Cobos Álvarez dbe1c3f9a9 Bug 1331047: Require a child iterator for elements with ::before and ::after pseudos. r=bholley
MozReview-Commit-ID: e1UTlnNn3X
2017-04-27 17:09:50 +02:00
Emilio Cobos Álvarez c11e3ca7bf Bug 1331047: Also traverse native anonymous content in the style system. r=bholley
MozReview-Commit-ID: 6wTqBAqTH69
2017-04-27 17:09:04 +02:00
Emilio Cobos Álvarez 6fe2b3e89d Bug 1355351: Simplify nsLayoutUtils callers, and make child iterators notice display: contents pseudos. r=heycam
This also happens to fix other bugs, like making display: contents pseudos
animatable, which weren't before.

MozReview-Commit-ID: LhwTPNbFvSZ

--HG--
extra : rebase_source : 785105b08d6bfa15ad257e61b769a263c6810ad0
2017-04-19 12:53:57 +02:00
Boris Zbarsky b537f110e2 Bug 1345362 part 3. Introduce CSSPseudoElementType::NonInheritingAnonBox to represent non-inheriting anon boxes. r=heycam
The idea is to be able to call the right function during style resolution time
without doing a linear walk via nsCSSAnonBoxes::IsNonInheritingAnonBox.

MozReview-Commit-ID: JKt33GggTjz

--HG--
extra : rebase_source : fcf477dcef8529c803bf97b1d3a16f8f4fcea39f
2017-03-08 23:41:04 -05:00
Cameron McCormack 382ed70f19 Bug 1321284 - Part 4: Factor out AllChildrenIterator's getting of document level NAC to a utility method. r=bholley
MozReview-Commit-ID: 862Yi82D2Ij

--HG--
extra : rebase_source : d612e27061ec3ccec3c30792127a53bb7010d30c
2016-12-03 09:37:00 +08:00
Cameron McCormack c7423798c3 Bug 1321284 - Part 1: Make StyleChildrenIterator skip NAC generated by root element primary frame ancestors. r=bholley
MozReview-Commit-ID: HICYWQgkE77

--HG--
extra : rebase_source : 7c5a533ada4eaa9839ca0497426f2c9c2a2d6c0b
2016-12-01 11:34:57 +08:00
Boris Zbarsky 23cc88e459 Bug 1319255 part 2. Stop doing casts to HTMLContentElement* simply based on tag. r=wchen 2016-11-22 22:41:51 -05:00
Boris Zbarsky 3e49872974 Bug 1319255 part 1. Stop doing casts to HTMLShadowElement* simply based on tag. r=wchen 2016-11-22 22:41:51 -05:00
Xidorn Quan 1cbd4cb699 Bug 1309868 part 1 - Use const nsIContent pointer in some DOM utils. r=bholley
MozReview-Commit-ID: H4g2VbWJUba

--HG--
extra : source : 77e67e5163ac9c450e18d4c4e5b690cee5d3f1a3
2016-10-18 15:29:03 +11:00