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

111 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione fc59c4280d Bug 1450688: Follow-up: Fix rebase bustage. r=bustage CLOSED TREE
MozReview-Commit-ID: Da7ZMvjVZFQ
2018-05-26 12:03:31 -07:00
Kris Maglione 1a52ecbef0 Bug 1450688 r=bz
MozReview-Commit-ID: 4KHNpxiziWd

--HG--
extra : rebase_source : a6f61c63b4a806bd099b63b3bcaa31e014163ad4
2018-05-15 16:01:36 -07:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Emilio Cobos Álvarez a1b2e5070a Bug 1455885: Inline and make document casts fatally assert. r=bz
For consistency with AsElement / AsContent / AsDocumentFragment, etc.

MozReview-Commit-ID: 8GSj8R9hLBe
2018-04-26 17:05:12 +02:00
Emilio Cobos Álvarez 943ee7be97 Bug 1454157: Tell layout about default content going away. r=smaug
Pretty much the same way we do for Shadow DOM.

There are a couple more places broken, but provided our fronted folks don't do
weird stuff nothing bad should happen, and the assertion that this allows me to
add should catch those if they do, so I'm punting on it for now.

MozReview-Commit-ID: Bgr41C4zGgn
2018-04-14 19:54:18 +02:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Adrian Wielgosik 2837c659de Bug 1170771 - Remove now-empty nsDOMClassInfo. r=bz
MozReview-Commit-ID: 7XsiPD1kTt9

--HG--
extra : rebase_source : 2935c0fe1a51083f37e113c3e0599760f40829e2
2018-04-05 14:20:44 +02:00
Emilio Cobos Álvarez f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Kris Maglione 83371fe0b5 Bug 1445551: Part 4 - Remove compartment-per-addon. r=mccr8
The compartment-per-addon code was added so that we could segregate at least
some of the code from system-privileged add-ons into tagged compartments, even
when it ran in browser windows. That allowed us to apply certain special
behavior to them, such as enabling e10s shims, and to track some performance
characteristics.

The only remaining chrome-privileged add-ons now are system add-ons controlled
by us, and the shim system and per-compartment performance metrics are gone,
it no longer serves a purpose.

MozReview-Commit-ID: Ap186bWAaqP

--HG--
extra : rebase_source : c5bf81b44dd42b7cebce2784b7dd98480b41b593
2018-03-13 19:43:30 -07:00
Emilio Cobos Álvarez d39c5388fc Bug 1436059: Make XBL / Shadow DOM use AuthorStyles. r=xidorn
It's just a struct aggregating stylesheets + CascadeData, with a quirks_mode
parameter because XBL sucks so bad.

MozReview-Commit-ID: 7q99tSNXo0K
2018-02-16 16:54:34 +01:00
Boris Zbarsky 478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Boris Zbarsky 439174ece2 Bug 1434399 part 14. Remove add/remove subtree bits from nsIXULDocument. r=mystor
MozReview-Commit-ID: 987df30BZHq
2018-01-31 14:49:28 -05:00
Cosmin Sabou 94617f91cf Backed out 19 changesets (bug 1434399) for build bustages on nsXULPopupManager.cpp on a CLOSED TREE
Backed out changeset 499f6dffd9cb (bug 1434399)
Backed out changeset 018290612415 (bug 1434399)
Backed out changeset f4c3179f8e59 (bug 1434399)
Backed out changeset f3ce2826b857 (bug 1434399)
Backed out changeset 6d2391af01dd (bug 1434399)
Backed out changeset dc98ed8c609a (bug 1434399)
Backed out changeset 8eaa395d6200 (bug 1434399)
Backed out changeset 19b18f4a53be (bug 1434399)
Backed out changeset 8ff378a6e96a (bug 1434399)
Backed out changeset 60fe73be1a26 (bug 1434399)
Backed out changeset faefb2751fdc (bug 1434399)
Backed out changeset 55cdf8b3a959 (bug 1434399)
Backed out changeset b578cc8efb92 (bug 1434399)
Backed out changeset 54cc4cb2fca1 (bug 1434399)
Backed out changeset f5343ef34d6c (bug 1434399)
Backed out changeset 8fb30e066cbd (bug 1434399)
Backed out changeset 21341b656b0f (bug 1434399)
Backed out changeset fab1f8b087a2 (bug 1434399)
Backed out changeset 55250a54852a (bug 1434399)
2018-01-31 22:45:26 +02:00
Boris Zbarsky 3ee8d239ea Bug 1434399 part 14. Remove add/remove subtree bits from nsIXULDocument. r=mystor
MozReview-Commit-ID: 987df30BZHq
2018-01-31 14:49:28 -05: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
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
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
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Jason Orendorff ddaf859c55 Bug 1363200 - JSAPI for realms: Change a few XPConnect methods to take Realm arguments instead of JSCompartments. r=mrbkap
This also introduces JS::GetObjectRealmOrNull, which returns an object's realm,
or null if the object is a cross-compartment wrapper. In the new order,
wrappers can't have realms, since they must be shared across all realms in a
compartment. We're introducing this new function early (even though it's
*currently* possible to assign a realm to wrappers) in order to see in
advance if the possibility of returning null will cause problems.
(It looks like it won't.)

--HG--
extra : rebase_source : e55ebbbc4edf2a18ce267198928246592060e339
extra : source : d6bfce1187aa13dbfab03f9566ff7b05b6705e70
2017-06-28 12:31:53 -07:00
Boris Zbarsky f23f66c56c Bug 1393806 part 1. Change nsNodeUtils cloning/adopting stuff to use an ErrorResult for errors. r=peterv
This will allow us to propagate out more informative errors in some cases.

MozReview-Commit-ID: 9FbzV5VRMqN
2017-09-13 13:34:55 -04: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
Emilio Cobos Álvarez 82a163baff Bug 1397983: Rename nsXBLBinding::{Install,Uninstall}AnonymousContent to {Bind,Unbind}AnonymousContent. r=smaug
MozReview-Commit-ID: LZCjwiNtMYZ

--HG--
extra : rebase_source : 2e5f2d65f876d34c8ad97af6530b79e82cf94a30
2017-09-11 13:11:01 +02:00
Jan de Mooij 3e1a11f41d Bug 1393790 part 1 - Remove JS_STUBGETTER and JS_STUBSETTER. r=jorendorff 2017-08-28 10:39:57 +02:00
Jan de Mooij a5de55dced Bug 1389510 part 3 - Remove getProperty/setProperty hooks from ClassOps. r=evilpie 2017-08-25 10:12:16 +02:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Xidorn Quan 96a6c473b5 Bug 1386865 part 1 - Have GetServoStyleSet return non-const ServoStyleSet. r=TYLin
MozReview-Commit-ID: IOlcThK3PAr

--HG--
extra : rebase_source : 6664f5f988ec0c2cdb5b21d61585da84131dc618
2017-08-03 16:58:23 +10:00
Cameron McCormack 4cfbfe320e Bug 1372061 - Add node flag recording whether we might have anonymous children. r=bholley
MozReview-Commit-ID: CMaxJ1JnuYJ

--HG--
extra : rebase_source : ac5651b0d42125fd2a4ff3f5ce03f7a6c6ab1fbb
2017-06-27 23:56:12 -07:00
Carsten "Tomcat" Book 5f51e5596e merge mozilla-inbound to mozilla-central a=merge 2017-06-23 11:28:19 +02:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Kirk Steuber e967f9a6c1 Bug 1375189 - Don't use aNodesWithProperties in nsNodeUtils::CloneAndAdopt if it is not needed r=bz
MozReview-Commit-ID: 9vu3HCQkDKf

--HG--
extra : rebase_source : eb6231c88732133ee6d90e621a5833b9be1e81ce
2017-06-21 11:55:04 -07:00
Jan de Mooij 83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Ting-Yu Lin 414fb7a11d Bug 1290276 Part 6 - Add FFI functions to allow various XBL data to be used from servo side. r=heycam
MozReview-Commit-ID: 9yG7xrXXuRn

--HG--
extra : rebase_source : 724c55fb8d424524e5408eead53d7b380197eff6
2017-06-05 14:00:27 +08:00
Tom Tromey f8ab4ddf02 Bug 1060419 - remove unneeded includes of prprf.h, r=froydnj
MozReview-Commit-ID: JifhpA3oOeH

--HG--
extra : rebase_source : 08460997dc3fd91f3065c718e17b41bb4acf8bae
2016-12-09 10:00:01 -10:00
Bobby Holley 6871a9416e Bug 1294572 - Drop Servo data in SetXBLInsertionParent, and call StyleNewSubtree after all bindings have been removed and applied. r=heycam
MozReview-Commit-ID: Iv7uyq4uQye
2016-12-14 10:14:46 -08:00
Phil Ringnalda 5297375b79 Backed out changeset 62ad968c5c5d (bug 1294572) for mass crashes in mozilla::dom::FragmentOrElement::SetXBLInsertionParent
CLOSED TREE

MozReview-Commit-ID: Fw9sxk3lnML
2016-12-13 22:15:48 -08:00
Bobby Holley 9cf9854ad6 Bug 1294572 - Drop Servo data in SetXBLInsertionParent, and call StyleNewSubtree after all bindings have been removed and applied. r=heycam
MozReview-Commit-ID: Iv7uyq4uQye
2016-12-13 21:32:56 -08:00
Bobby Holley 2207c01808 Bug 1322945 - Change skip_root to unstyled_children_only and use StyleNewChildren in more places. r=heycam
I noticed that our current behavior in ContentRangeInserted is incorrect. Unlike
ContentInserted (where this code lived originally), ContentRangeInserted takes a
start and end element. I'm not sure if we ever take that path for new content that
needs style, but it seemed sketchy. And generally, it seems nice to just always
style new content the same way (though we still need to style NAC by the subtree
root, since it hasn't been attached to the parent yet).

For situations where there is indeed only one unstyled child, the traversal
overhead should be neglible, since we special-case the single-element in
parallel.rs to avoid calling into rayon.

Being more explicit about what we want here also makes us more robust against
the other handful of callpaths that can take us into
nsCSSFrameConstructor::{ContentRangeInserted,ContentAppended}. Currently we
can call StyleNewSubtree on an already-styled element via RecreateFramesForContent,
which triggers an assertion in the servo traversal.

MozReview-Commit-ID: DqCGh90deHH
2016-12-12 18:39:33 -08:00
Bobby Holley f8c9d884fc Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal. r=emilio
MozReview-Commit-ID: 7wH5XcILVmX
2016-11-25 10:06:39 -08:00
cku 818c1c0974 Bug 1302779 - Part 1. Resolve a local fragment against the current document that relative URLs are resolved against. r=heycam
MozReview-Commit-ID: 2vJDnfzoPiC

--HG--
extra : rebase_source : 3c43bd335caa918ac32f3ba1979f822db5319b11
2016-09-20 14:13:13 +08:00
Bobby Holley 7d4ef4ac54 Bug 1292662 - Style XBL anonymous content after binding explicit children to insertion points. r=heycam
We're doing it too soon, which means that the subtree isn't fully set up.
2016-08-25 21:36:46 -07:00
Bobby Holley 263669837b Bug 1292279 - Clear up the semantics of our Servo traversal APIs. r=heycam 2016-08-25 21:34:31 -07:00
Jon Coppeard d1435a2a8c Bug 1296688 - Add JSCLASS_FOREGROUND_FINALIZE flag r=sfink r=smaug 2016-08-24 14:18:10 +01:00
Emilio Cobos Álvarez 11ac7c1d96 Bug 1288590: Rename nsAttrInfo to mozilla::dom::BorrowedAttrInfo. r=bholley
Unfortunately couldn't add all the debug checks that I'd want, since we can't
assert that is not safe to run script in quite a few places :(

MozReview-Commit-ID: 8m3Wm1WntZs
2016-07-27 11:18:33 -07:00
Emilio Cobos Álvarez 16ed085072 Bug 1288590: Use GetAttrInfoAt in nsXBLBinding.cpp. r=bholley
MozReview-Commit-ID: Bm29ogNHXwR
2016-07-27 11:18:33 -07:00
Bobby Holley 64639661c1 Bug 1289620 - Hook up initial styling. r=heycam
Aside from the parser-side hacks, this should subsume all the current scattered
logic in the stylo tree to handle initial styling.
2016-07-27 09:44:25 -07:00
Emilio Cobos Álvarez 1a49c35a07 Bug 1286445: stylo: Support restyles of non-pseudo content on state change. r=heycam
This includes, for example :hover.

Also removes the call to IsStyledByServo() in the document constructor, it's not
only unnecessary, but also we call UpdateStyleBackendType() too early.

MozReview-Commit-ID: 4YfCdmLoSxu
2016-07-16 16:22:12 -07:00
Cameron McCormack 45dfce2c7c Bug 1275452 - Part 3: Eagerly restyle XBL-provided anonymous content in stylo. r=bholley
--HG--
extra : rebase_source : 4da7aa1a6364581cc9970baa42401bc49d33fa68
2016-05-25 16:55:50 +10:00
Mike Conley 4e5e8f7b73 Bug 1166351 - Add an assertion to make sure that we use the correct cached XBL binding prototypes. r=bobbyholley+313730
MozReview-Commit-ID: 7MfslXmortQ

--HG--
extra : rebase_source : 478d19031d5820acf2eeb077d689159769318b2a
2016-04-29 14:54:12 -04:00