Commit Graph

616 Commits

Author SHA1 Message Date
Cameron McCormack
b8dd60db88 Bug 1407246 - Split out Variables struct difference calculation. r=emilio
MozReview-Commit-ID: CtWtG3zkD1D
2017-10-12 09:12:30 +08:00
Nicholas Nethercote
7dbfdaf890 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
2017-10-03 09:05:19 +11:00
Manish Goregaokar
358eed4e79 Bug 1403808 - Move mFrameRefCount to GeckoStyleContext; r=emilio
MozReview-Commit-ID: 3ZlvXVlgR6i
2017-09-27 20:22:52 -07:00
Emilio Cobos Álvarez
5ee4316fe2 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
2017-07-31 16:21:40 +02:00
Botond Ballo
90ca88501a Bug 1384719 - Fix -Wnull-conversion warning in nsStyleContext::CalcStyleDifference(). r=heycam
MozReview-Commit-ID: FBYcQ2fbIFo
2017-07-26 16:53:25 -04:00
Emilio Cobos Álvarez
ec5ed5b6e3 Bug 1384114: Move mRefCnt, Destroy() and HasSingleReference() to GeckoStyleContext. r=bholley
MozReview-Commit-ID: 5XzFYcohl3m
2017-07-25 15:45:59 +02:00
Cameron McCormack
73692fb008 Bug 1382964 - Part 3: Add assertion to help heap write analysis. r=xidorn
MozReview-Commit-ID: Lfa5Cijgqzp
2017-07-23 09:11:37 +08:00
Emilio Cobos Álvarez
4b6d7fc287 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
82f2e05017 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
80fec50c0b 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
b5d22e57da 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(-)
2017-07-21 11:42:44 +08:00
Cameron McCormack
b12b10f2da Bug 1380133 - Part 6: Remove FakeStyleContext. r=emilio
MozReview-Commit-ID: EDPXdzmE37Y
---
 layout/style/nsStyleContext.cpp | 31 -------------------------------
 1 file changed, 31 deletions(-)
2017-07-21 11:42:44 +08:00
Cameron McCormack
59cacb5e6c 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(-)
2017-07-21 11:42:44 +08:00
Cameron McCormack
bf30ce65e2 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(-)
2017-07-21 11:42:43 +08:00
Sebastian Hengst
3c1e966ccf Backed out changeset cc720d72d024 (bug 1380133) 2017-07-20 15:40:06 +02:00
Sebastian Hengst
bf2f642518 Backed out changeset 9a84b6988af9 (bug 1380133) 2017-07-20 15:39:58 +02:00
Sebastian Hengst
4b57c0dad8 Backed out changeset cf561cad85f1 (bug 1380133) 2017-07-20 15:39:53 +02:00
Sebastian Hengst
aa46604a88 Backed out changeset 1f1175528301 (bug 1380133) 2017-07-20 15:39:48 +02:00
Cameron McCormack
2b8537d512 Bug 1380133 - Part 7: De-templatize CalcStyleDifference(Internal). r=emilio
MozReview-Commit-ID: 8c1E1gbwaHz
2017-07-19 17:52:43 +08:00
Cameron McCormack
bd7952bbf2 Bug 1380133 - Part 6: Remove FakeStyleContext. r=emilio
MozReview-Commit-ID: EDPXdzmE37Y
2017-07-19 17:51:12 +08:00
Cameron McCormack
384be7ae12 Bug 1380133 - Part 5: Call CalcStyleDifference with ServoStyleContexts instead of a FakeStyleContext wrapping a ServoComputedValues. r=emilio
MozReview-Commit-ID: 6JhMas1EiM7
2017-07-19 17:50:35 +08:00
Cameron McCormack
2f25a9fd35 Bug 1380133 - Part 4: Make CalcStyleDifferenceInternal not cache any new structs on ServoStyleContexts when in a traversal. r=emilio
MozReview-Commit-ID: Eu4MvdQUBor
2017-07-19 15:11:09 +08:00
Manish Goregaokar
df853f68c9 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
0dcf16fa0c 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
63c907be23 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
86e90da5c3 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
a0cec6421f 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
8a1cfc27b5 Bug 1380224 - Part 1: Check custom properties for differences in Servo-backed style contexts. r=emilio
MozReview-Commit-ID: IVyiTNxPDT9
2017-07-13 16:49:14 +08:00
Jonathan Chan
dc2b831115 Bug 1375153 - Move nsStyleContext::mComputingStruct and AutoCheckDependency to GeckoStyleContext. r=manishearth
These are only used in Gecko mode.

MozReview-Commit-ID: DKQBwatbu62
2017-06-21 11:46:11 -07:00
Bobby Holley
b7f9b0d4cd Bug 1376655 - Move EnsureSameStructsCached to GeckoStyleContext. r=emilio 2017-06-28 10:08:37 -07:00
Bobby Holley
0bb4f2f9ec Bug 1376655 - Use ServoStyleContext in more places. r=emilio 2017-06-28 10:08:36 -07:00
Emilio Cobos Álvarez
e2357c0919 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
a58025002f 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.
2017-06-22 17:08:53 +10:00
Manish Goregaokar
18abf5ff15 Bug 1373018 - Part 11: stylo: Move cached style structs to GeckoStyleContext; r=bholley
MozReview-Commit-ID: 1LA8AJ3oNwF
2017-06-10 22:27:45 -07:00
Manish Goregaokar
533734efc7 Bug 1373018 - Part 10: stylo: Remove StyleSource; r=bholley
MozReview-Commit-ID: 4IcROeDNoBA
2017-06-10 22:27:45 -07:00
Manish Goregaokar
d8f0f89cc6 Bug 1373018 - Part 9: stylo: Make more things on nsStyleContext inlined; r=bholley
MozReview-Commit-ID: FYiOtmSK2oC
2017-06-10 22:27:45 -07:00
Manish Goregaokar
e8a3c268a8 Bug 1373018 - Part 8: stylo: Move nsStyleContext::SetStyle to GeckoStyleContext; r=bholley
MozReview-Commit-ID: ycXu95whnG
2017-06-10 22:27:45 -07:00
Manish Goregaokar
d6c7e909d2 Bug 1373018 - Part 7: stylo: Move nsStyleContext::mSource into subclasses; r=bholley
MozReview-Commit-ID: AspYUJ7lGqD
2017-06-10 22:27:45 -07:00
Manish Goregaokar
95549e672c Bug 1373018 - Part 6: stylo: Move most Gecko-specific methods into GeckoStyleContext; r=bholley
MozReview-Commit-ID: KzMAbuY8nll
2017-06-10 22:27:45 -07:00
Manish Goregaokar
a198b0c59f Bug 1373018 - Part 5: stylo: Move child/sibling pointers to GeckoStyleContext; r=bholley
MozReview-Commit-ID: Gay6RwpkNcu
2017-06-10 22:27:45 -07:00
Manish Goregaokar
7bcee25068 Bug 1373018 - Part 4: stylo: Rename eArenaObjectID_nsStyleContext to eArenaObjectID_GeckoStyleContext; r=bholley
MozReview-Commit-ID: 5oZwxG8r9Ty
2017-06-10 22:27:45 -07:00
Manish Goregaokar
37717ce635 Bug 1373018 - Part 3: stylo: Move mPresContext to ServoStyleContext; r=bholley
MozReview-Commit-ID: 2BmRpIjxEO8
2017-06-10 22:27:45 -07:00
Manish Goregaokar
4f2f5b1870 Bug 1373018 - Part 2: stylo: Add stylo conversion methods for nsStyleContext; stop using arena; r=bholley
MozReview-Commit-ID: CeIDP7idlmC
2017-06-10 22:27:45 -07:00
Manish Goregaokar
857b411aa5 Bug 1373018 - Part 1: stylo: Introduce ServoStyleContext and GeckoStyleContext subclasses; r=bholley
MozReview-Commit-ID: GY1GfkWMK0n
2017-06-10 22:27:45 -07:00
Xidorn Quan
a90da6fceb 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
2017-06-13 20:49:33 +10:00
Xidorn Quan
21218a376c Bug 1372549 part 1 - Slightly simplify DO_STRUCT_DIFFERENCE macro usage. r=heycam
MozReview-Commit-ID: BXHHoXOcsEP
2017-06-13 20:48:37 +10:00
L. David Baron
03d37750a7 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
feb0ddcc55 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
dc5d30b907 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
25219c9280 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