Commit Graph

405 Commits

Author SHA1 Message Date
Ting-Yu Lin
06d158c02d Bug 1396700 - Remove ServoStyleSet::UpdateStyleSheet(). r=xidorn
This is no longer used.

MozReview-Commit-ID: G7cUcz9CKeQ
2017-09-01 17:12:58 +08:00
Ting-Yu Lin
8be84b02e9 Bug 1382078 Part 4 - Avoid unneeded restyle when XBL styleset is utilized by different PresContext. r=emilio
This fixed layout/style/test/test_media_queries_dynamic.html after Part 3 is added.

MozReview-Commit-ID: 7ZpSunCnkIc
2017-09-04 17:57:00 +08:00
Ting-Yu Lin
0ff1df05f0 Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio
MozReview-Commit-ID: EJp8EMyanBT
2017-09-02 15:25:45 +08:00
Sebastian Hengst
0740ac72b8 Backed out changeset b49d8d47c3f1 (bug 1382078) 2017-09-02 20:43:36 +02:00
Ting-Yu Lin
33901209b6 Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio
MozReview-Commit-ID: EJp8EMyanBT
2017-09-02 15:25:45 +08:00
Emilio Cobos Álvarez
3945d65e27 Bug 1395351: Use the parallel traversal flag more often. r=bholley
MozReview-Commit-ID: JF6i0HDniR2
2017-09-01 19:28:57 +02:00
Emilio Cobos Álvarez
b0d3910730 Bug 1395351: Assert the root element is styled in StyleDocument. r=bholley
MozReview-Commit-ID: 6KncJ5IqLbt
2017-09-01 19:31:45 +02:00
Emilio Cobos Álvarez
f5e5f14adc Bug 1374235: style: Remove the for reconstruction traversals. r=bholley
One less hack, a few more to go.

MozReview-Commit-ID: 6katL1EGn2U
2017-09-01 18:46:23 +02:00
Sebastian Hengst
298dd9aea9 Backed out changeset 35afffcb4182 (bug 1374235) for build bustage because it landed before its servo commit. r=backout 2017-09-01 14:07:47 +02:00
Emilio Cobos Álvarez
292a358f1c Bug 1374235: style: Remove the for reconstruction traversals. r=bholley
One less hack, a few more to go.

MozReview-Commit-ID: 6katL1EGn2U
2017-09-01 13:16:09 +02:00
Emilio Cobos Álvarez
1e0df9b436 Bug 1384232: Don't post restyles when loading XBL stylesheets. r=TYLin
MozReview-Commit-ID: 3MCz4vuJb9q
2017-08-31 22:59:11 +02:00
Emilio Cobos Álvarez
a291267a13 Bug 1384232: Let ServoStyleset know what its purpose is. r=TYLin
MozReview-Commit-ID: IwC6FcxhYMT
2017-08-31 22:50:24 +02:00
Brian Birtles
594134da1f Bug 1395452 - Call HasAnimationController() before GetAnimationController(); r=hiro
nsDocument::GetAnimationController() will lazily create an animation controller
which, in some call sites, is unnecessary.

This patch first calls HasAnimationController() and only calls
GetAnimationController() if it returns true. This avoids creating an animation
controller in situations where one is not necessarily required.

MozReview-Commit-ID: 4cdpLRvMVJU
2017-08-31 15:00:39 +09:00
Nicholas Nethercote
d79886e790 Bug 1394729 - Measure memory usage of Stylo's Rule Tree. r=heycam.
This patch splits up the existing "layout/style-sets" measurement into
"layout/gecko-style-sets", or "layout/servo-style-sets/stylist/rule-tree" and
"layout/servo-style-sets/other". (Additional things will be measured under
"layout/servo-style-sets/" later, such as cascade data.)

This requires introducing a new type, ServoStyleSetSizes, for transferring the
multiple measurements from Rust code to C++ code.

MozReview-Commit-ID: FbmzpsjBpgI
2017-08-30 18:21:26 +10:00
Bobby Holley
d5613cdb36 Bug 1392863 - Clean up DoProcessPendingRestyles. r=emilio
MozReview-Commit-ID: 4JhWFNPVvGn
2017-08-26 12:28:25 -07:00
Nazım Can Altınova
5e5b68d3c7 Bug 1355721 - stylo: Implement font feature values lookup r=emilio,xidorn
MozReview-Commit-ID: 7wgQ1NCn7vL
2017-08-23 18:05:53 -07:00
Emilio Cobos Álvarez
0049e24b2c Bug 1387913: Make sure to update the stylist if needed on EnsureUniqueInnerOnCSSSheets. r=heycam
MozReview-Commit-ID: 3eKd78qMC1T
2017-08-22 20:36:14 +02:00
Gregory Szorc
336b6b8347 Backed out changesets b749fc196a50, 2791eac8d760 (bug 1355721) for build bustage
CLOSED TREE
2017-08-24 20:30:17 -07:00
Nazım Can Altınova
639d0c6171 Bug 1355721 - stylo: Implement font feature values lookup r=emilio,xidorn
MozReview-Commit-ID: 7wgQ1NCn7vL
2017-08-23 18:05:53 -07:00
Bobby Holley
cb7ab9b1ae Bug 1383332 - Track the restyle root and use it to do less work during the traversal. r=emilio
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 21:19:24 -07:00
Ting-Yu Lin
9f26d69b91 Bug 1388165 - Clear mPresContext after creating XBL styleset. r=xidorn
MozReview-Commit-ID: VBmKMTt8lc
2017-08-22 14:46:25 +08:00
Bobby Holley
f48b38fb09 Bug 1373343 - Skip the parallel traversal when the presshell isn't active. r=heycam
I've verified with the profiler that we use the parallel traversal for
loading a foreground tab, but not for a tab opened with ctrl-click.

MozReview-Commit-ID: 2SiVDlLLyah
2017-08-17 19:08:29 -07:00
J. Ryan Stinnett
dfccfa125a Bug 1390691 - Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: LY6z7lEKgOp
2017-08-15 17:10:13 -05:00
Emilio Cobos Álvarez
7f77180f1b Bug 1389871: stylo: only clear relevant origins when medium features change. r=heycam
MozReview-Commit-ID: 6ocZc1u1TbU
2017-08-14 10:37:19 +02:00
Cameron McCormack
df36bd6124 Bug 1382925 - Part 3: Pass in relevant origin when style sheet rules change and when author styles are toggled. r=emilio
MozReview-Commit-ID: EGEnUBAvVyX
2017-08-12 18:49:01 +08:00
Cameron McCormack
d8e490ca16 Bug 1382925 - Part 1: Make Servo_StyleSet_NoteStyleSheetsChanged take a set of origins to dirty. r=emilio
MozReview-Commit-ID: KY29REU78tH
2017-08-12 18:19:22 +08:00
Bobby Holley
2605a3860b Bug 1389681 - Move NoteDirty* to Element. r=emilio
MozReview-Commit-ID: KvKAEuYkssx
2017-08-12 10:12:28 -07:00
Hiroyuki Ikezoe
67fbc6ef1e Bug 1388031 - Cleanup code that was used for verifying styling results for throttled animation flush in post traversal. r=bholley
Now that we do process normal traversal even in the case of throttled animation
flush so that we don't need to do special handling for the case.

Note about the comment in has_current_styles():
the remaining animation hints is not caused by either this patch or the
previous patch in this patch series, it's been there in the first place, but
it should be fixed somehow later. See bug 1389675.

MozReview-Commit-ID: JojHufxNCiS
2017-08-11 20:34:08 -07:00
Hiroyuki Ikezoe
20b1e23fbf Bug 1388031 - Process normal traversal for throttled animation flush as well. r=bholley
MozReview-Commit-ID: BirD8BDMifp
2017-08-11 20:34:06 -07:00
Bobby Holley
93b47b160e Bug 1389347 - Make the parallel traversal an explicit flag instead of guessing from Servo. r=emilio
MozReview-Commit-ID: 83DgB1sZnCb
2017-08-11 15:55:14 -07:00
Bobby Holley
94a27c912a Bug 1389347 - Inline PrepareAndTraverseSubtree into StyleDocument. r=emilio
MozReview-Commit-ID: Kza0gGqvvmM
2017-08-11 15:55:13 -07:00
Bobby Holley
2a31dd00ff Bug 1389347 - Hoist StyleNew{Children,Subtree} into their own paths. r=emilio
The buggy animation handling isn't a regression, since currently we pass
UnstyledChildrenOnly in those cases, which blocks the animation traversal
in Servo_TraverseSubtree.

In general I really wanted to handle these two paths together. But there's
enough broken with the NewChildren path that I wanted to scope the buginess
as tightly as possible. And I really need to separate the handling here from
StyleDocument() to make the restyle root stuff work.

MozReview-Commit-ID: 9F0mcQl7AAX
2017-08-11 15:55:13 -07:00
Bobby Holley
0c71064d6c Bug 1389347 - Separate StyleSubtreeForReconstruct into its own path. r=emilio
This makes things a bit easier to follow, and sets the stage for eliminating
PrepareAndTraverseSubtree and making StyleDocument restyle-root-aware.

MozReview-Commit-ID: 40ORrqAuXni
2017-08-11 15:55:12 -07:00
Bobby Holley
027d7ae5ba Bug 1389347 - Hoist various bits of PrepareAndTraverse functionality into an RAII class. r=emilio
MozReview-Commit-ID: CPVnZjSwRpN
2017-08-11 15:55:12 -07:00
Hiroyuki Ikezoe
e85ec19021 Bug 1379516 - Mark animation timerline marker for stylo. r=birtles
MozReview-Commit-ID: GkPSXEk4xua
2017-08-11 08:44:11 +09:00
Emilio Cobos Álvarez
88284a5d55 Bug 1388234: Don't assert when calling out of band to ResolveInheritingAnonymousBoxStyle. r=heycam
MozReview-Commit-ID: FYctJRfLTK6
2017-08-08 14:54:13 +02:00
Bobby Holley
d3a8e82644 Bug 1388623 - Use our new traversal flags to avoid doing post-traversal clearing of restyle state. r=emilio
MozReview-Commit-ID: E4fqtsQtO9E
2017-08-09 12:12:28 -07:00
Bobby Holley
ad26d36122 Bug 1388623 - Move the document-root-cache-priming into PreTraverseSync. r=emilio
I added this before PreTraverseSync existed, but that's really where it belongs.

MozReview-Commit-ID: DZlcH70QbEt
2017-08-09 12:11:32 -07:00
Bobby Holley
7184417564 Bug 1388623 - Switch to PreTraverseSync for new-element styling. r=hiro
the PreTraverse stuff is all about ticking animations, which isn't something we
want to do when we're trying to get styles synchronously in the frame
constructor.

MozReview-Commit-ID: L6lw4ef4Jdk
2017-08-09 12:11:30 -07:00
Bobby Holley
0dcac6f0f3 Bug 1368291 - Style sharing for lazy pseudos. r=emilio
MozReview-Commit-ID: 9u8FzDXFZcX
2017-08-09 12:08:24 -07:00
Xidorn Quan
3916b3d630 Bug 1388319 - Mark ServoStyleSet dirty in its Init. r=emilio
MozReview-Commit-ID: 804KasIiS6E
2017-08-08 22:41:32 +10:00
Manish Goregaokar
91f4d493c1 Bug 1386915 - Add nsLookAndFeel::NativeInit() virtual call for initializing native-side state; r=jfkthame
MozReview-Commit-ID: 8XKSC1AOI0N
2017-08-06 15:41:08 -07:00
Cameron McCormack
3431e2f842 Bug 1384824 - Part 1: Lazily clear stale Servo element data from a document when its pres shell changes. r=bholley
MozReview-Commit-ID: 1c566PRqFpe
2017-08-04 19:26:04 +10:00
Cameron McCormack
517dd684bd Bug 1384824 - Part 0: Consolidate lazy style resolution entrypoints. r=bholley
MozReview-Commit-ID: HPdviA570N1
2017-08-04 19:26:03 +10:00
Emilio Cobos Álvarez
78a9114477 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
f09ce66dde Bug 1386602: Avoid recreating the stylist in RebuildAllStyleData. r=heycam
MozReview-Commit-ID: 31G9BLgqEmm
2017-08-03 18:10:06 +02:00
Boris Zbarsky
f87948be73 Bug 1324619 part 4. Add a Servo API for reparenting a given style. r=emilio
MozReview-Commit-ID: 2rqnMjMQKlJ
2017-07-28 21:20:41 -04:00
Boris Zbarsky
ab822a31fe Bug 1324619 part 3. Implement ReparentStyleContext in ServoRestyleManager, for ::first-line use. r=emilio
This doesn't actually implement style context reparenting in the style set yet; that part is next.

There is one behavior difference being introduced here compared to Gecko: we
don't reparent the first block piece of an {ib} (block-inside-inline) split
whose first inline piece is being reparented.  This is actually a correctness
fix.  In this testcase:

  <style>
    #target { color: green; }
    #target::first-line { color: red; }
  </style>
  <div id="target">
    <span>
      <div>This should be green</div>
    </span>
  </div>

Gecko makes the text red, while every other browser makes it green.

We're preserving Gecko's behavior for out-of-flows in first-line so far, but
arguably it's wrong per spec and doesn't match other browsers either.  We can
look into changing it later.

MozReview-Commit-ID: 5eC6G449Mlh
2017-07-28 21:11:18 -04:00
Bobby Holley
4d082c774a Bug 1384769 - Break TraversalFlags::ForReconstruct down into several independent pieces. r=emilio
These will be useful in followup work.

MozReview-Commit-ID: Dyp9R0PG36v
2017-07-27 17:49:44 -07:00
Bobby Holley
71e0babc3a Bug 1384769 - Get rid of the ForNewlyBoundElement mode. r=emilio
MozReview-Commit-ID: 1IRn2iaPnVc
2017-07-27 17:49:42 -07:00