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

92 Коммитов

Автор SHA1 Сообщение Дата
shindli 83d239ac83 Backed out changeset 603804d62ce8 (bug 1463116) for force-cargo-library-build bustage on a CLOSED TREE 2018-05-21 23:55:58 +03:00
Olli Pettay 622b10843f Bug 1463116 - Make mBindingParent strong, r=bz
--HG--
extra : rebase_source : 7013301bf68d2f35bde61072152f8819336c7b5a
2018-05-21 23:02:07 +03:00
Boris Zbarsky f7d68d6078 Bug 1387143 part 21. Remove nsISelection getters for anchor and focus points. r=mats
Instead of copying spec-duplicating comments from nsISelection.idl to
Selection.webidl, this just points the latter to the right spec.
2018-05-08 13:52:38 -04:00
Emilio Cobos Álvarez 5b2e86b4fb Bug 1455551: Move NS_IMPL_FROMNODE_HELPER and friends to nsINode.h. r=bz
MozReview-Commit-ID: 5PajqKEyFEW
2018-04-21 08:35:39 +02:00
Emilio Cobos Álvarez ac58b545f5 Bug 1454233: Ensure some casts and GetParentElement get inlined. r=bz
GetParentElement was using AsElement before being defined. This is only fine
because AsElement wasn't actually getting inlined in this case.

MozReview-Commit-ID: K41hSBEmIU0
2018-04-20 01:30:10 +02:00
Emilio Cobos Álvarez 9083c33e83 Bug 1453206: Fix IsInAnonymousSubtree to account for XBL in Shadow DOM. r=smaug
MozReview-Commit-ID: B2aYury8K7i
2018-04-14 11:59:06 +02:00
Andreea Pavel 4784e6b61b Backed out 2 changesets (bug 1453206) for crashtest failures on muliple files e.g. tests/reftest/tests/layout/base/crashtests/416107.xhtml on a CLOSED TREE
Backed out changeset 1844a120acda (bug 1453206)
Backed out changeset b12b7c5b8178 (bug 1453206)
2018-04-13 23:06:55 +03:00
Emilio Cobos Álvarez 1fe3a2d36a Bug 1453206: Fix IsInAnonymousSubtree to account for XBL in Shadow DOM. r=smaug
MozReview-Commit-ID: B2aYury8K7i
2018-04-13 21:05:48 +02:00
Emilio Cobos Álvarez 004145b9a3 Bug 1281745: Don't consider <xbl:children> in a shadow root without any binding active. r=smaug
MozReview-Commit-ID: GSewdIOpKIv
2018-04-13 20:53:11 +02:00
Boris Zbarsky 14f26fccf6 Bug 1449631 part 8. Remove nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: 5wQ2LYrjUxf
2018-04-05 13:42:41 -04:00
Boris Zbarsky c43dfe1ad8 Bug 1449404 part 5. Move the cycle collected refcount on content nodes up to nsIContent. r=smaug 2018-03-28 18:07:40 -04:00
Boris Zbarsky 0aa422913e Bug 1449404 part 4. Get rid of a few virtual nsIContent methods. r=mccr8
The HasTextForTranslation implementation was just moved, with the nodetype
check up front dropped because that's enforced statically now.
2018-03-28 18:01:47 -04:00
Boris Zbarsky 4370006c40 Bug 1449404 part 3. Get rid of nsIContent::AppendTextTo. r=mccr8 2018-03-28 18:01:47 -04:00
Boris Zbarsky cd4761ffdb Bug 1449404 part 2. Get rid of nsIContent::AppendText. r=mccr8 2018-03-28 18:01:46 -04:00
Boris Zbarsky 693169e324 Bug 1449404 part 1. Get rid of nsIContent::SetText. r=mccr8 2018-03-28 18:01:46 -04:00
Xidorn Quan 5e4279ed26 Bug 1449089 part 1 - Make :-moz-native-anonymous and :-moz-use-shadow-tree-root matches in Rust code. r=emilio
:-moz-native-anonymous can just use is_in_native_anonymous_subtree()
which is an existing function duplicating IsInNativeAnonymousSubtree().

IsRootOfUseElementShadowTree() in C++ code only has a single reference
from nsCSSPseudoClasses::MatchesElement() so we can just move it to the
Rust side. And actually Rust code has existing duplicate logic for
blocks_ancestor_combinators().

MozReview-Commit-ID: 8M1hHrYJT6Y

--HG--
extra : rebase_source : bf53ac7d8b15b0d1f7447a6056986d89b1cb4e57
2018-03-28 09:41:04 +11:00
Boris Zbarsky e6805c67dd Bug 1447098 part 3. Add some FromNode overloads for different arg types. r=mystor
Some condition functions are faster on subclasses of nsINode than on nsINode itself.
2018-03-21 17:39:04 -04:00
Boris Zbarsky 258352c8a8 Bug 1447098 part 2. Rename the NS_IMPL_FROMCONTENT macros to NS_IMPL_FROMNODE. r=mystor 2018-03-21 17:39:04 -04: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
Boris Zbarsky 0678b901b6 Bug 1446533 part 4. Remove nsIDOMCharacterData::SubstringData. r=mystor
FromContent will be renamed to FromNode in bug 1447098.

MozReview-Commit-ID: DhiN6mCOb34
2018-03-19 15:18:07 -04:00
Emilio Cobos Álvarez f0d07cb595 Bug 1443966: Add missing include for nsIContent::IsInChromeDocument. r=dholbert
Also mark the function properly as inline.

MozReview-Commit-ID: GJDVLsyfuLN

--HG--
extra : rebase_source : 8dd0b44fa4305dc55b8a0887b2e97453c4c2dfb6
2018-03-08 00:59:25 +01:00
Emilio Cobos Álvarez 577e15bc04 Bug 1443790: Cleanup non-overridden virtual nsIContent methods. r=smaug
Summary: They're never overridden, so no need to be virtual.

Reviewers: smaug

Bug #: 1443790

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

MozReview-Commit-ID: 8gnzLTXKqdB
2018-03-07 23:54:09 +01:00
Emilio Cobos Álvarez b26f7c3694 Bug 1440258: Flag doc level anonymous content instead of guessing. r=bholley
Poking at the frame tree has problems: If we poke in negative (using
eSkipNativeAnonymousContent), as we were doing, we mess up the case where we're
actually _not_ doc-level, and _not_ ::before or ::after. This can't happen for
content documents, but can happen for chrome (since nsDocElementBoxFrame
implements nsIAnonymousContentCreator).

If we poke in positive, as we used to, you get that right, but mess up the
root scrollbar case.

Instead, use a node property to mark doc level anon content. This is a case rare
enough that it seems worth to not steal a node bit.

To recap the failure:

 * The initial value of -moz-control-character-visiblity is different on beta
   and nightly.

 * XUL has a global rule setting -moz-control-character-visibility on the root,
   to a value so that it's the initial one on nightly, but the non-initial one
   on beta.

 * Changes to this property cause a reframe.

 * Reframes of a nsIAnonymousContentCreator anon content reframe the container.

 * We were failing to inherit correctly for the nsIAnonymousContentCreator
   content for the root XUL element on the initial styling, inheriting from the
   default computed values instead, since we failed to reach the root element's
   primary frame from GetFlattenedTreeParentForDocumentElementNAC ->
   AppendDocumentLevelNativeAnonymousContentTo, since the primary frame is set
   _after_ processing children.

   This seems somewhat risky to change, and inconsistent with any other stuff
   the frame constructor does, see bug 973390.

 * Given that, the next restyle of the root element, in this case caused due to
   the customizable UI, we _found_ the actual correct parent, recomputed the
   style, saw that -moz-control-character-visiblity had changed, and reframed.
   But we were reframing the whole window, not just the NAC, because of the
   fourth bullet point. Reframing the whole window caused us to lose the popup
   state (that's bug 1440506).

   Worse than that is the fact that given we reframe and reconstruct the
   anonymous countent again, we go back to the initial bogus state, just
   awaiting for the next restyle to reframe the whole window.

I wish there was a bullet-proof way to test it that isn't just counting reframes
and relying on which properties reframe or not, but due to the nature of
nsIAnonymousContentCreator's NAC, it's not possible in any easy way I can think
of.

MozReview-Commit-ID: IPYB5trsN8R
2018-02-23 20:31:52 +01:00
Nika Layzell c33284aec0 Bug 1293362 - Part 4: Generate runtime bindings for calling xpcom methods from rust, r=froydnj
MozReview-Commit-ID: K37KyHkKsSl
2018-01-23 17:27:26 -05:00
Jessica Jong bf1d5c0073 Bug 1429656 - Implement ShadowRoot.activeElement. r=smaug 2018-01-15 14:42:47 +08:00
Emilio Cobos Álvarez 1cda1ad876 Bug 1427511: Make GetFlattenedTreeParent more straight-forward. r=smaug
Now that accessing nsIContent slots is not a blob of virtual function calls, we
should be able to unify logic here, and speed up the not-so-rare case for
chrome, while keeping the usual case fast.

MozReview-Commit-ID: 87iY5Cbhx4T
2018-01-02 18:00:25 +01:00
Emilio Cobos Álvarez fd120385c7 Bug 1427001: Move SetXBLBinding and SetShadowRoot to Element. r=smaug
MozReview-Commit-ID: 6FL1HR2Isa
2017-12-31 13:45:58 +01:00
Emilio Cobos Álvarez 09c8911ffe Bug 1427001: Stop duplicating slots. r=smaug
MozReview-Commit-ID: Cq647BcOzbe
2017-12-31 13:45:52 +01:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Emilio Cobos Álvarez 87520df9da Bug 1426503: Remove DestInsertionPoints stuff. r=smaug
MozReview-Commit-ID: KtaEqZn9GH3

--HG--
extra : rebase_source : 54b76e2437cd3031d12973b7021ba740474f07e3
2017-12-20 22:08:15 +01:00
Emilio Cobos Álvarez 74b31155f7 Bug 1423167: Move most attribute-related methods from nsIContent to Element. r=bz
MozReview-Commit-ID: 6WXqNiODttD
2017-12-06 16:05:59 +01: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
Kris Maglione 96722433e6 Bug 1415352: Part 1d - Use correct subject principal in CSS environment when modifying attr declarations. r=bz
MozReview-Commit-ID: AnurVwl65fX

--HG--
extra : rebase_source : 05d3820aab2c86b010728b5d2882a7a2e75e0617
2017-11-05 13:23:49 -08:00
Emilio Cobos Álvarez afbfd8a07d Bug 1419330: Make GetXBLBinding not an unconditional virtual call. r=smaug
MozReview-Commit-ID: IJB4OHsFM5v

--HG--
extra : rebase_source : 1296fe33c94e13e6cc9506df1b8067880c4ad790
2017-11-21 10:27:49 +01:00
btian bd65dcd351 Bug 1411878 - Support Element.shadowRoot and Element.assignedSlot / TextNode.assignedSlot on closed shadow root r=mrbkap
MozReview-Commit-ID: DSiGN7h5ErY

--HG--
extra : rebase_source : 025d3100cff11849d503fd86a312cb405b6cb32f
2017-11-02 16:53:44 +08:00
Nicholas Nethercote 8ad99dd7fa Bug 1411893 - Introduce nsStaticAtom. r=emilio,froydnj.
It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)

MozReview-Commit-ID: 4Q6QHX5h44V

--HG--
extra : rebase_source : e4237f85b4821b684db0ef84d1f9c5e17cdee428
2017-10-27 10:31:13 +11:00
Emilio Cobos Álvarez 273bc65bb1 Bug 1410895: Make XBL slots hold the insertion point, not the XBL parent. r=bz
This is pretty much a straight-forward change except for a single thing, the
UpdateInsertionParent calls.

However, I cannot make any sense of them. They go through the inserted children
setting the insertion point, but then ClearInsertionPoints() is called.

ClearInsertionPoints calls XBLChildrenElement::ClearInsertedChildren, which sets
all the insertion points to null anyway.

Thus, I've removed that function completely.

MozReview-Commit-ID: 80daGQfLZrV

--HG--
extra : rebase_source : d52a37a60147ac11794c3cfe1aad5d202e9d2d9f
2017-10-23 15:52:08 +02:00
Jessica Jong 0d1588d9f7 Bug 1408341 - Implement assignedSlot on Element and Text. r=smaug 2017-10-19 14:31:36 +08:00
Kris Maglione 4275cd1039 Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz
In order to tailor certain security checks to the caller that is attempting to
load a particular piece of content, we need to be able to attach an
appropriate triggering principal to the corresponding requests. Since most
HTML content is loaded based on attribute values, that means capturing the
subject principal of the caller who sets those attributes, which means making
it available to AfterSetAttr hooks.

MozReview-Commit-ID: BMDL2Uepg0X

--HG--
extra : rebase_source : 25e438c243700a9368c393e40e3a6002d968d6c8
2017-10-09 14:33:38 -07:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Xidorn Quan e9accd246b Bug 1406277 - Completely remove xml:base for style attribute. r=bz
This commit removes:
* layout.css.style-attr-with-xml-base.disabled pref
* deprecation XMLBaseAttributeForStyleAttr
* code path for getting base URI of style attr considering xml:base

MozReview-Commit-ID: 1w96eqhHPab

--HG--
extra : rebase_source : 95e33da698ce0cfc9a44de8bc0d63c3fa4634644
2017-10-06 15:45:33 +11:00
Neerja Pancholi 62d822fcdd Bug 1381157 - Cache 'mContent->GetPrimaryFrame == this' with a flag on nsIFrame and replace these calls to GetPrimaryFrame. r=mats
MozReview-Commit-ID: 3VoxYlean52
2017-09-17 17:21:32 +02:00
Olli Pettay 4f57f848d4 Bug 1397904 - nsTextControlFrame::SetValueChanged is too QI heavy, r=baku
--HG--
extra : rebase_source : caeef7fcee84688f99ab8bb0802ce550f8c08d1d
2017-09-08 14:07:22 +01:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Bobby Holley 1cf62db957 Bug 1389681 - Move NoteDirty* to Element. r=emilio
MozReview-Commit-ID: KvKAEuYkssx
2017-08-12 10:12:28 -07:00
Bobby Holley 3e308bd38d Bug 1389385 - Rearrange dirty noting to operate on the element rather than the parent. r=emilio
This will allow us to scope restyle roots more tightly.

MozReview-Commit-ID: 2t2lp5sKBHH
2017-08-11 18:18:22 -07:00
Kyle Machulis d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Olli Pettay 21b0ca3bbf Bug 1378196, Make IsEventAttributeName non-virtual in common case, r=ehsan
--HG--
extra : rebase_source : 9daf46de13698348b7ab6b68f8da13ffb338c0a0
2017-07-04 23:54:30 +03:00