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

226 Коммитов

Автор SHA1 Сообщение Дата
Manish Goregaokar f1f5fc7cf5 Bug 1403808 - Move mFrameRefCount to GeckoStyleContext; r=emilio
MozReview-Commit-ID: 3ZlvXVlgR6i

--HG--
extra : rebase_source : bbebcfd58f6423c966ca9e0dad1adbed31895c84
2017-09-27 20:22:52 -07: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
Boris Zbarsky b1ca90d55d Bug 1388625 part 4. Add a concept of wrapper anon boxes to nsCSSAnonBoxes. r=heycam
MozReview-Commit-ID: 39i5eHlrrON

--HG--
extra : rebase_source : 7529aa53036b9c338c121f10572768ccfabc812a
2017-08-11 00:07:12 -04:00
Emilio Cobos Álvarez 3cb89210c5 Bug 1368290: Cache anon box styles in ServoStyleContext. r=bholley
MozReview-Commit-ID: CaaL9hB3G7p
2017-08-04 23:37:17 +02:00
Emilio Cobos Álvarez 938400aeaa Bug 1385896: Move nsStyleContext::mParent to GeckoStyleContext. r=heycam
Unfortunately this means that we lose the NS_STYLE_INHERIT_BIT optimization to
avoid posting changes if we had not requested the struct. In practice, I'm not
sure this optimization matters much, though, and we already compare all the
structs anyway.

We _could_ keep a weak parent pointer from the text style if needed, given we're
going to keep alive the text style at least until the parent style context goes
away, so should be safe, but I don't think the extra churn is worth it, to be
honest. Happy to do so as part of bug 1368290 if you think it's worth it.

MozReview-Commit-ID: ka6tNwf4Ke

--HG--
extra : rebase_source : dd6e98cf5743a8dd2e959ca09ed9a17e52b201e9
2017-07-31 16:21:40 +02:00
Emilio Cobos Álvarez 1a47c01765 Bug 1384542: Move GetParent and IsLinkContext to GeckoStyleContext. r=heycam
MozReview-Commit-ID: C19yGcphixX
2017-07-31 14:32:59 +02:00
Emilio Cobos Álvarez 570c7fcbc6 Bug 1384114: Move mRefCnt, Destroy() and HasSingleReference() to GeckoStyleContext. r=bholley
MozReview-Commit-ID: 5XzFYcohl3m

--HG--
extra : rebase_source : e26c5c93fe66d5023ff3a7924cd8538cfcba8727
2017-07-25 15:45:59 +02:00
Emilio Cobos Álvarez 2b7de51623 Bug 1381844: Be more explicit about the kind of style context we handle all the time. r=bholley
MozReview-Commit-ID: E0mdkhU3XBz
2017-07-22 18:02:57 +02:00
Manish Goregaokar 08c6de8178 Bug 1382017 part 4 Gecko piece - Rename ServoComputedValues -> ServoComputedData; r=heycam
ServoComputedValues is confusing because ComputedValues is actually
ServoStyleContext on the C++ side.

MozReview-Commit-ID: IQNVdfREAMt
2017-07-20 21:44:02 -07:00
Manish Goregaokar 26f3a98f78 Bug 1382017 part 4 Gecko piece - Remove usage of ServoComputedValues from most Gecko code; r=xidorn
MozReview-Commit-ID: 2NB4DgxMrL3
2017-07-20 17:27:05 -07:00
Cameron McCormack aa95f86b98 Bug 1380133 - Part 7: De-templatize CalcStyleDifference(Internal). r=emilio
MozReview-Commit-ID: 8c1E1gbwaHz
---
 layout/style/nsStyleContext.cpp | 23 +++++------------------
 layout/style/nsStyleContext.h   |  7 -------
 2 files changed, 5 insertions(+), 25 deletions(-)

--HG--
extra : rebase_source : 0280187becf0f35bc7c5ceb272babd6e0adbb3ff
2017-07-21 11:42:44 +08:00
Cameron McCormack 962f773bc4 Bug 1380133 - Part 5: Call CalcStyleDifference with ServoStyleContexts instead of a FakeStyleContext wrapping a ServoComputedValues. r=emilio
MozReview-Commit-ID: 6JhMas1EiM7
---
 layout/style/ServoBindings.cpp  | 21 ++++++++++-----
 layout/style/ServoBindings.h    |  3 ++-
 layout/style/nsStyleContext.cpp | 58 +++++++++++++++++++++--------------------
 layout/style/nsStyleContext.h   | 29 ++++++++++++++-------
 4 files changed, 65 insertions(+), 46 deletions(-)

--HG--
extra : rebase_source : 88576e17cd3867acdf8862dab42fd4b1e73bc755
2017-07-21 11:42:44 +08:00
Sebastian Hengst d67d0384af Backed out changeset 9a84b6988af9 (bug 1380133) 2017-07-20 15:39:58 +02:00
Sebastian Hengst 4e48589974 Backed out changeset 1f1175528301 (bug 1380133) 2017-07-20 15:39:48 +02:00
Cameron McCormack 6026a97b45 Bug 1380133 - Part 7: De-templatize CalcStyleDifference(Internal). r=emilio
MozReview-Commit-ID: 8c1E1gbwaHz

--HG--
extra : rebase_source : f29c1d2168d1b0cec2f34a05f6f392cd76dde9e6
2017-07-19 17:52:43 +08:00
Cameron McCormack 7ac8c49b89 Bug 1380133 - Part 5: Call CalcStyleDifference with ServoStyleContexts instead of a FakeStyleContext wrapping a ServoComputedValues. r=emilio
MozReview-Commit-ID: 6JhMas1EiM7

--HG--
extra : rebase_source : 22d94de05a300bd3d696db94b6999821c0af0b11
2017-07-19 17:50:35 +08:00
Manish Goregaokar 853e9c4ad3 Bug 1341102 -Fix forward declaration in nsStyleContext.h; r=bustage
MozReview-Commit-ID: 9RBzxkc9wnA
2017-07-18 08:19:14 -07:00
Manish Goregaokar 27f49a8a16 Bug 1367904 - Part 17: stylo: Clean up GetContext, call it UpdateWithElementState; r=bholley
MozReview-Commit-ID: I23w5hFatk8
2017-07-17 21:01:33 -07:00
Manish Goregaokar 2508f1fac9 Bug 1367904 - Part 16: stylo: Stop using mStyleIfVisited in Servo; r=bholley
MozReview-Commit-ID: JxoMr6fz7lh
2017-07-17 21:01:23 -07:00
Manish Goregaokar cdb73416fd Bug 1367904 - Part 14: stylo: Remove FFI calls for fetching style structs from ServoComputedValues; r=bholley
MozReview-Commit-ID: 2HrVZl9HZu1
2017-07-17 21:01:10 -07:00
Manish Goregaokar 3597e8df2e Bug 1367904 - Part 13: stylo: Flatten ServoComputedValues into ServoStyleContext; r=bholley
This patch also removes the duplication of style contexts during the
restyle, because otherwise pointer equality of ServoComputedValues stops
holding (and we assert on that in a few places)

MozReview-Commit-ID: 7Evc1p8ZfM2
2017-07-17 21:01:02 -07:00
Manish Goregaokar d909c5cea0 Bug 1367904 - Part 11: stylo: Use ServoStyleContext in ServoStyleSet/ServoRestyleManager; r=bholley
MozReview-Commit-ID: JJOBixTSCZq
2017-07-17 21:00:54 -07:00
Manish Goregaokar f33beecc59 Bug 1367904 - Part 10: stylo: Switch Gecko over to ServoStyleContext; r=bholley
MozReview-Commit-ID: EmopKVjEzlz
2017-07-17 21:00:46 -07:00
Manish Goregaokar c2b070c584 Bug 1367904 - Part 5: stylo: Make GetBaseComputedValuesForElement return a style context; r=bholley
MozReview-Commit-ID: K5WpWc26xNZ
2017-07-17 21:00:32 -07:00
Jonathan Chan 9a920e6268 Bug 1375153 - Move nsStyleContext::mComputingStruct and AutoCheckDependency to GeckoStyleContext. r=manishearth
These are only used in Gecko mode.

MozReview-Commit-ID: DKQBwatbu62

--HG--
extra : rebase_source : 32fb108832e973bef04ef9c18d8ccc22059b58e4
2017-06-21 11:46:11 -07:00
Bobby Holley 834849b377 Bug 1376655 - Move EnsureSameStructsCached to GeckoStyleContext. r=emilio 2017-06-28 10:08:37 -07:00
Bobby Holley 5681b4713c Bug 1376655 - Use ServoStyleContext in more places. r=emilio 2017-06-28 10:08:36 -07:00
Manish Goregaokar 3125497283 Bug 1373018 - Part 11: stylo: Move cached style structs to GeckoStyleContext; r=bholley
MozReview-Commit-ID: 1LA8AJ3oNwF

--HG--
extra : rebase_source : e318c7c92973eb6daf9b9fb9b1dcd776e6788a95
2017-06-10 22:27:45 -07:00
Manish Goregaokar 3188b9bfd6 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA

--HG--
extra : rebase_source : e2f65c316be2c5640150eb5ff5628505ce446535
2017-06-10 22:27:45 -07:00
Manish Goregaokar abdbfa30c6 Bug 1373018 - Part 9: stylo: Make more things on nsStyleContext inlined; r=bholley
MozReview-Commit-ID: FYiOtmSK2oC

--HG--
extra : rebase_source : a543fc05b6a5b5bd3c143d87730c66a1f8743f16
2017-06-10 22:27:45 -07:00
Manish Goregaokar 02ab46c24d Bug 1373018 - Part 8: stylo: Move nsStyleContext::SetStyle to GeckoStyleContext; r=bholley
MozReview-Commit-ID: ycXu95whnG

--HG--
extra : rebase_source : 852051aa074cc8ed8f11f0d68c26fe4f0a6962b6
2017-06-10 22:27:45 -07:00
Manish Goregaokar 828745da04 Bug 1373018 - Part 7: stylo: Move nsStyleContext::mSource into subclasses; r=bholley
MozReview-Commit-ID: AspYUJ7lGqD

--HG--
extra : rebase_source : 1f8d368312bd8149f32efc31130f4bf6659064ed
2017-06-10 22:27:45 -07:00
Manish Goregaokar 092c404741 Bug 1373018 - Part 6: stylo: Move most Gecko-specific methods into GeckoStyleContext; r=bholley
MozReview-Commit-ID: KzMAbuY8nll

--HG--
extra : rebase_source : 7d96f19a4bfcc2e97b7df513df881fa88f27cd85
2017-06-10 22:27:45 -07:00
Manish Goregaokar 70773cfc42 Bug 1373018 - Part 5: stylo: Move child/sibling pointers to GeckoStyleContext; r=bholley
MozReview-Commit-ID: Gay6RwpkNcu

--HG--
extra : rebase_source : 57a7f22b3d830e2fdc47faa15ceafbe5020a5964
2017-06-10 22:27:45 -07:00
Manish Goregaokar 2991af8d79 Bug 1373018 - Part 4: stylo: Rename eArenaObjectID_nsStyleContext to eArenaObjectID_GeckoStyleContext; r=bholley
MozReview-Commit-ID: 5oZwxG8r9Ty

--HG--
extra : rebase_source : 32fdfe60a20b2d90f531df1999b3aee0e4c8a5c2
2017-06-10 22:27:45 -07:00
Manish Goregaokar 719eec238a Bug 1373018 - Part 3: stylo: Move mPresContext to ServoStyleContext; r=bholley
MozReview-Commit-ID: 2BmRpIjxEO8

--HG--
extra : rebase_source : 51b9d1cd0963d0d243a6e575eff3a7407ee27485
2017-06-10 22:27:45 -07:00
Manish Goregaokar 7fceedfbae Bug 1373018 - Part 2: stylo: Add stylo conversion methods for nsStyleContext; stop using arena; r=bholley
MozReview-Commit-ID: CeIDP7idlmC

--HG--
extra : rebase_source : 8e7ec95fd068e562d947fbc39e84cd8e60daa910
2017-06-10 22:27:45 -07:00
Manish Goregaokar 01dc13b311 Bug 1373018 - Part 1: stylo: Introduce ServoStyleContext and GeckoStyleContext subclasses; r=bholley
MozReview-Commit-ID: GY1GfkWMK0n

--HG--
extra : rebase_source : a631b068cf0d54f5105e3dfe411365157490cac5
2017-06-10 22:27:45 -07:00
J. Ryan Stinnett 3041171150 Bug 1328509 - Wire up visited values in ServoStyleSet::GetContext. r=emilio
Create an extra style context using the visited values (if they exist).  This
mirrors the logic Gecko performs in nsStyleSet::GetContext for visited support.

MozReview-Commit-ID: EiJQXDgz8tX
2017-05-25 10:13:23 -05:00
Phil Ringnalda 30a91cb819 Backed out 6 changesets (bug 1328509) for Windows 7 failures in test_visited_reftests.html
Backed out changeset 8388d8c76fed (bug 1328509)
Backed out changeset 182a88607e08 (bug 1328509)
Backed out changeset 008efac7764b (bug 1328509)
Backed out changeset c2ce10b8bc37 (bug 1328509)
Backed out changeset 65bbc73c87aa (bug 1328509)
Backed out changeset e20d3d5170c2 (bug 1328509)

MozReview-Commit-ID: BSmqdFP1Zom
2017-05-24 22:12:53 -07:00
J. Ryan Stinnett 56b5ec82a0 Bug 1328509 - Wire up visited values in ServoStyleSet::GetContext. r=emilio
Create an extra style context using the visited values (if they exist).  This
mirrors the logic Gecko performs in nsStyleSet::GetContext for visited support.

MozReview-Commit-ID: EiJQXDgz8tX
2017-05-24 21:20:06 -05:00
Jonathan Kew fcf175b16a Bug 1365928 - patch 2 - Annotate style-struct getters with MOZ_NONNULL_RETURN for better optimization. r=mats 2017-05-22 19:00:19 +01:00
Cameron McCormack a34d0bbc9d Bug 1344914 - stylo: Stop pretending to handle style fixups on the C++ side. r=bz
MozReview-Commit-ID: FBM2NOlXIe5

--HG--
extra : rebase_source : b197089498e261a3abc7a50f4f06df92d7478d97
2017-04-25 12:52:51 +08:00
Emilio Cobos Álvarez 90236f99ab Bug 1360508: Allow fixups on text styles to be reflected. rpending=heycam a=orange
MozReview-Commit-ID: Eh6shYiv4RC
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-04-28 20:19:03 +02:00
Ting-Yu Lin b71ec494d5 Bug 1322570 Part 1 - Add MOZ_ASSERT in nsStyleContext::GetParent() to disallow usage by stylo. r=bz
Also, add GetParentAllowServo() to whitelist the usage in servo-backed style
system in subsequent parts so that we could revisit them later.

MozReview-Commit-ID: JthU18Ftx02

--HG--
extra : rebase_source : b8840adcc4959f96cd429db65584f3e83c09c597
2017-03-20 14:11:06 +08:00
Carsten "Tomcat" Book 97f79397b6 Merge mozilla-central to mozilla-inbound 2017-03-21 12:07:49 +01:00
Cameron McCormack cf56de72b5 Bug 1302054 - Part 2: Remove no longer useful nsStyleContext::CalcDifference optimization that handles the same-rule-node case. r=dbaron
nsStyleContext::CalcDifference had an optimization where, when we knew
that the old and new style context have the same rule node, we knew that
the only change hints that would need to be handled are those in the
"not handled for descendants" category, generated due to explicit
'inherit' values on reset properties.  This was because any changes due
to differences in inherited properties should only have generated
"handled for descendants" change hints (and thus would already have been
handled on an ancestor).

Before bug 931668, this let us avoid calling CalcDifference on structs
that only would have generated hints that we knew we already would have
handled.  However, after bug 931668, we compare all structs anyway so
that we can set the aEqualStructs outparam, so we don't gain anything
from this optimization.  We can still return these change hints we know
will not need to be handled, and rely on ElementRestyler::CaptureChange
to filter them out.

MozReview-Commit-ID: Ld1s2Js0i6r
2017-03-21 16:33:05 +08:00
Cameron McCormack 5131fe23a2 Bug 1302054 - Part 1: Avoid computing style differences when we just want to ensure structs are cached on the new context. r=dbaron
MozReview-Commit-ID: DLhHcCD4GQS
2017-03-21 16:33:05 +08:00
Bobby Holley 7b43e374c0 Bug 1348602 - Assert main thread when setting style bits. r=emilio
We also assert against the Servo traversal because we don't currently test the
parallel traversal on CI (though we will soon).

MozReview-Commit-ID: 9GRNizE44Oi
2017-03-20 15:31:14 -07: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