Commit Graph

615 Commits

Author SHA1 Message Date
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
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
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
Botond Ballo
90d0b0ff5a Bug 1384719 - Fix -Wnull-conversion warning in nsStyleContext::CalcStyleDifference(). r=heycam
MozReview-Commit-ID: FBYcQ2fbIFo

--HG--
extra : rebase_source : 7ef60d0fd895eb1604aa11b1c41f7b21586d637d
2017-07-26 16:53:25 -04: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
Cameron McCormack
23bf7c8332 Bug 1382964 - Part 3: Add assertion to help heap write analysis. r=xidorn
MozReview-Commit-ID: Lfa5Cijgqzp

--HG--
extra : rebase_source : 0af1079a7129a396baced1c0c1ed488165fba1df
2017-07-23 09:11:37 +08: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
336a333bf0 Bug 1380133 - Part 6: Remove FakeStyleContext. r=emilio
MozReview-Commit-ID: EDPXdzmE37Y
---
 layout/style/nsStyleContext.cpp | 31 -------------------------------
 1 file changed, 31 deletions(-)

--HG--
extra : rebase_source : 55e3be75bb4325de6431e636ef815bc870bcad94
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
Cameron McCormack
350253019b Bug 1380133 - Part 4: Make CalcStyleDifferenceInternal not cache any new structs on ServoStyleContexts when in a traversal. r=emilio
MozReview-Commit-ID: Eu4MvdQUBor
---
 layout/generic/nsFrame.cpp      |  8 ++++++++
 layout/style/nsStyleContext.cpp | 11 +++++++----
 layout/tables/nsTableFrame.cpp  |  8 ++++++++
 3 files changed, 23 insertions(+), 4 deletions(-)

--HG--
extra : rebase_source : b77d33b5823eca4a57e568881c00959ddecf9089
2017-07-21 11:42:43 +08:00
Sebastian Hengst
8400ef0636 Backed out changeset cc720d72d024 (bug 1380133) 2017-07-20 15:40:06 +02:00
Sebastian Hengst
d67d0384af Backed out changeset 9a84b6988af9 (bug 1380133) 2017-07-20 15:39:58 +02:00
Sebastian Hengst
6b93a5693c Backed out changeset cf561cad85f1 (bug 1380133) 2017-07-20 15:39:53 +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
810528b92c Bug 1380133 - Part 6: Remove FakeStyleContext. r=emilio
MozReview-Commit-ID: EDPXdzmE37Y

--HG--
extra : rebase_source : 56c2651a2e961e2555452008b59bb50037625bd7
2017-07-19 17:51:12 +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
Cameron McCormack
a5c91255ab Bug 1380133 - Part 4: Make CalcStyleDifferenceInternal not cache any new structs on ServoStyleContexts when in a traversal. r=emilio
MozReview-Commit-ID: Eu4MvdQUBor

--HG--
extra : rebase_source : c98706cec1788662a09cb1d99bcd3893658261a9
2017-07-19 15:11:09 +08: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
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
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
Cameron McCormack
2a1c9069d0 Bug 1380224 - Part 1: Check custom properties for differences in Servo-backed style contexts. r=emilio
MozReview-Commit-ID: IVyiTNxPDT9

--HG--
extra : rebase_source : 3047eb79f4602510251b3453362ffb683f9b818c
2017-07-13 16:49:14 +08: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
Emilio Cobos Álvarez
eaa4d32db8 Bug 1373018: followup: Fix indentation in nsStyleContext::Destroy. r=whitespace-only
DONTBUILD

MozReview-Commit-ID: AHOAL9rutnu
2017-06-26 15:34:36 -07:00
Nicholas Nethercote
58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10: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
Xidorn Quan
45ebf973e4 Bug 1372549 part 2 - Avoid return reframe / reflow for list-style-{type,position} if display is not list-item. r=heycam
MozReview-Commit-ID: LugfFRIu3MS

--HG--
extra : rebase_source : 897c2c77de513a59164d428e348a27cf284f792d
2017-06-13 20:49:33 +10:00
Xidorn Quan
ff978ee1d7 Bug 1372549 part 1 - Slightly simplify DO_STRUCT_DIFFERENCE macro usage. r=heycam
MozReview-Commit-ID: BXHHoXOcsEP

--HG--
extra : rebase_source : f3cab00d2b34d549a1a8f05abd1a6dd940055f51
2017-06-13 20:48:37 +10:00
L. David Baron
53383e2d5c Bug 1369260 - Remove use of MOZ_ASSERT_IF in layout. r=heycam
As I've said before, as module owner I prefer that MOZ_ASSERT_IF not be
used in the module because I consider it to be unreadable.  However, a
few uses have crept in, and this patch removes them.

I consider it to be unreadable because the name looks like a name that
uses smalltalk-ish naming conventions, i.e., with a part of the name
corresponding to each parameter, in order.  However, the parameters are
in the order opposite the name.

This was written primarily with the vim commands:
:%s/MOZ_ASSERT_IF(\([^,]*\),/MOZ_ASSERT(!\1 ||/
:wn
followed by manual cleanup for indentation and removal of !!.

MozReview-Commit-ID: G6rLbOn7k8d
2017-06-06 22:27:17 -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
Cameron McCormack
99c15e1ebe Bug 1289868 - Part 2: stylo: Compare all structs in CalcStyleDifference so that Servo can accurately determine whether to stop traversal. r=emilio
MozReview-Commit-ID: I0WK2gDsMMu

--HG--
extra : rebase_source : 204b8206ef8e924cc8a3992874538a68417768f0
2017-05-19 17:39:14 +08:00