Commit graph

91 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
7b7a364f71 Bug 1322317: Fix CalcStyleDifference assumptions and PeekStyleContext semantics. r=heycam
For the reasoning for this change, please see the related bugs and:

http://logs.glob.uno/?c=mozilla%23layout&s=22+Feb+2017&e=22+Feb+2017#c27236

Mainly, before this change, there was nothing forcing style structs computed in
a style context to remain computed for the new style context after a call to
CalcStyleDifference. This can make us skip change hints when a style change
doesn't force to recompute one of these structs.

MozReview-Commit-ID: FoWbLjt97Uu
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 27772fc67b3c241ca4cef580112c949ad506b167
2017-02-21 16:56:43 +01:00
Hiroyuki Ikezoe
9a0f973f38 Bug 1340340 - Stop mutating nsRefreshDriver during parallel traversal. r=heycam
MozReview-Commit-ID: D5VYPWXm5jO

--HG--
extra : rebase_source : 2cee4c4ec1e3a9d2fa94a4b20d568cc20bfadb49
2017-02-20 14:37:13 +09:00
Boris Zbarsky
566ca43b49 Bug 1324661 another followup: just simplify the chnagehint thing for now, with a followup filed. r=bholley
MozReview-Commit-ID: G9IvoODSOch
2017-02-17 17:50:24 -05:00
Boris Zbarsky
54baf750e7 Bug 1324661 followup: check our child hint before trying to append it. r=bholley
MozReview-Commit-ID: 3FIBludwV7j
2017-02-17 16:36:12 -05:00
Boris Zbarsky
96054e12cc Bug 1324661 part 1. When recreating style contexts for elements in stylo, use the right frame (not the primary frame!) for tables. r=bholley,emilio
For a table, the primary frame is the table wrapper anonymous box.  That
anonymous box inherits style from its _child_ table frame, which is the frame that
has the actual style for the element.  So we want to use the stylo-computed
style for the table frame, and then compute an updated style for the table
wrapper too, because some things (like absolute positioning) are done for the
table wrapper anonymous box, not the table frame.
2017-02-17 14:52:39 -05:00
Cameron McCormack
b063ce2515 Bug 1297899 - Part 8: Move Content{Inserted,Appended} up to RestyleManager. r=bholley
MozReview-Commit-ID: G2XyuyxhzOz

--HG--
extra : rebase_source : 28e1674562348bf92c2c55e1f5947a1c67666e22
2017-02-13 11:21:33 +08:00
Cameron McCormack
68519d4f84 Bug 1297899 - Part 7: Move PostRestyleEventForLazyConstruction up to RestyleManager. r=bholley
MozReview-Commit-ID: 8M5wgCJp6PT

--HG--
extra : rebase_source : 1a2b7d19bcb4d71107143fa3d437ccbf62f84060
2017-02-13 11:21:33 +08:00
Cameron McCormack
980ec770c6 Bug 1297899 - Part 4: Store concrete restyle manager type on RestyleManager. r=bholley
MozReview-Commit-ID: AmsNPqPVm8c

--HG--
extra : rebase_source : a30ae1028a9f4b7b63e8386e7182230d6c2e8b60
2017-02-13 11:21:32 +08:00
Cameron McCormack
eddea92878 Bug 1297899 - Part 3: Rename RestyleManager to GeckoRestyleManager and RestyleManagerBase to RestyleManager. r=bholley
MozReview-Commit-ID: fFTZKwmGJm

--HG--
extra : rebase_source : 42b99c8a9c5616999abae2d195d16547f1fbc80f
2017-02-13 11:21:32 +08:00
Shing Lyu
89b57b3fb1 Bug 1329919 - Skip repaint frame hint if there is no frame. r=heycam
MozReview-Commit-ID: F46VpEBJqvU

--HG--
extra : rebase_source : 809f9012a16246a119385ed40bd8fb97705a7fba
2017-02-03 10:37:08 +08:00
Cameron McCormack
06977a5d92 Bug 1338763 - stylo: Bump restyle generation only when we do restyle things. r=bholley
MozReview-Commit-ID: 1f3l7L0hfJp

--HG--
extra : rebase_source : 8933aef7f58f06fdd3e45e2a60a7c50664977e59
2017-02-11 16:50:02 +08:00
Cameron McCormack
41cbd56383 Bug 1331294 - Part 6: Remove RestyleManager::HasPendingRestyles and Servo_Element_ShouldTraverse. r=bholley
MozReview-Commit-ID: 2ST5i7M4QZ4
2017-02-10 10:42:30 +08:00
Cameron McCormack
115c6f2cf4 Bug 1331294 - Part 5: Make ServoRestyleManager::ProcessPendingRestyles use StyleDocument()'s return value to determine whether to return early. r=bholley
MozReview-Commit-ID: Hbk0vuQMhJs
2017-02-10 10:42:30 +08:00
Cameron McCormack
f1909b16b0 Bug 1331294 - Part 3: Make ServoRestyleManager::PostRestyleEvent not check HasPendingRestyles() before returning early. r=bholley
If there are pending restyles, and we were called with zero change and restyle
hints, then we're still not going to do any extra work.  So we may as
well return early after only checking the hints.

MozReview-Commit-ID: ACCGtDZcOJ0
2017-02-10 10:42:30 +08:00
Emilio Cobos Álvarez
067250e70a Bug 1337248: remove bogus assertion in presence of explicit change hints. r=bholley
When any explicit change hint appears to trigger, for example, a repaint,  this
assertion is no longer true, and we should indeed avoid recreating the style
context unnecessarily for that element.

MozReview-Commit-ID: Ln7lBPZW0kp
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-07 21:01:01 +01:00
Emilio Cobos Álvarez
51e9294d5f Bug 1335987: stylo: Don't use the change hint to decide whether to recreate style contexts. r=bholley
MozReview-Commit-ID: 11Yyq8UE3LP
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-02-03 22:03:34 +01:00
Hiroyuki Ikezoe
5e33af310e Bug 1328787 - Part 13: Call nsAnimationManager.UpdateAnimations(). r=heycam
MozReview-Commit-ID: CcA3dJaxuYY
2017-01-29 12:59:00 +09:00
Boris Chiou
8a0ed49b88 Bug 1324691 - Part 3: Support AnimationsWithDestroyedFrame for ServoRestyleManager. r=heycam
MozReview-Commit-ID: 4cQ6PoieLLG

--HG--
extra : rebase_source : 6f0ca88a379ca9ce73488ae0b68b2b8a43469509
2017-01-27 12:45:46 +08:00
Boris Chiou
f338c9e47d Bug 1317209 - Part 5: Trigger composeStyle if there is an animation. r=heycam
1. Add one new FFI, Gecko_GetAnimationRule, which will try
   to update the animation rule and retrieve a ServoAnimationRule
   from EffectSet.
2. Add GetServoAnimationRule, which calls Animation::ComposeStyle and updates
   mElementsToRestyle.
3. There is no eRestyle_{CSSAnimations|CSSTransitions}, so we use
   eRestyle_Self and eRestyle_Subtree for stylo.

MozReview-Commit-ID: 9RpJurPSFMk

--HG--
extra : rebase_source : 6f1246b73a920aee86faeeaccc42b7f51ed2a6c8
2017-01-24 15:27:56 +08:00
Emilio Cobos Álvarez
1aed15b692 Bug 1331213: Bootstrap a Gecko-side Device, and track it's dirtiness manually in the per-doc data. r=heycam
The setup is quite different to Servo-land, so add a comment about the different
setup.

Also, check viewport rules when flushing stylesheets. I believe that the
previous behavior is plain wrong, though I haven't taken the time to come up
with a test case.

In any case, it doesn't hurt any of both back-ends.

MozReview-Commit-ID: 46gtTkesOsr
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:20:03 +01:00
Emilio Cobos Álvarez
7a40386fed Bug 1330874: Preserve neutral style changes for stylo. r=heycam
Since we use the presence of a change hint to determine whether we should
recreate a style context, we can't just strip them out on CalcStyleDifference.

MozReview-Commit-ID: GLhbTc2W3d7
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-15 16:10:01 +01:00
Bobby Holley
38e55d8cfa Bug 1329854 - Handle suppressed frames in stylo incremental restyle. r=heycam 2017-01-12 17:32:40 -08:00
Bobby Holley
09ce7e77ed Bug 1325734 - Simplify ElementData and eliminate the concept of consuming styles. r=emilio 2017-01-09 11:50:16 -08:00
Boris Zbarsky
eebd58fd31 Bug 1298588 part 7, gecko piece. Stop using initial_values in general in Gecko glue code. r=bholley 2017-01-04 14:52:27 -05:00
Boris Zbarsky
9f8934b143 Bug 1298588 part 4, gecko piece. Recreate the default computed values for a document as needed. r=bholley 2017-01-04 14:52:27 -05:00
Bobby Holley
533ab579fc Bug 1324627 - Add a special, explicit path for lazy style resolution and use it for GetComputedStyle. r=heycam 2016-12-28 15:49:12 +08:00
Phil Ringnalda
afc1c72dd2 Backed out changeset 5986d8880ad1 (bug 1324627) for a variety of computed style failures
MozReview-Commit-ID: AMTshx423hQ
2016-12-27 21:34:45 -08:00
Bobby Holley
dccae432a9 Bug 1324627 - Add a special, explicit path for lazy style resolution and use it for GetComputedStyle. r=heycam
MozReview-Commit-ID: ECnoeHYkpT
2016-12-28 11:33:18 +08:00
Cameron McCormack
74a1f89b9b Bug 1324341 - Part 1: Convert eRestyle_Subtree into (eRestyle_Self | eRestyle_SomeDescendants), so Servo will actually restyle descendants. r=xidorn
MozReview-Commit-ID: AjfgRua4WcF
2016-12-19 14:30:09 +08:00
Cameron McCormack
a7c175e671 Bug 1321284 - Part 5: Process document level NAC when restyling. r=bholley
MozReview-Commit-ID: GigSrTHXXte

--HG--
extra : rebase_source : 30d6f5b3b32c921ae15e69b29a9cc3d5372ad8bc
2016-12-01 16:19:50 +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
Cameron McCormack
4406edcd3a Bug 1318238 - Clear all ServoNodeData during style set shutdown. r=bholley
MozReview-Commit-ID: 9MvBTAWeawC
2016-11-18 16:54:10 +08:00
Cameron McCormack
b3db3c2002 Bug 1316247 - stylo: Handle restyles generated during change hint processing sooner. r=emilio
MozReview-Commit-ID: HpgJ94ifJ7e
2016-11-09 14:25:28 +08:00
Cameron McCormack
ff10ad8bc2 Bug 1315889 - stylo: don't try to restyle elements that have been removed from the document. r=emilio
MozReview-Commit-ID: EiFS1KAKAj6
2016-11-08 16:24:34 +08:00
Cameron McCormack
1b5c96f9f7 Bug 1315894 - Clear dirty bits on entire subtree when stopping in RecreateStyleContexts due to no frame or ReconstructFrame hint. r=emilio
MozReview-Commit-ID: 5ch5gtOn0Zr
2016-11-09 14:25:58 +08:00
Phil Ringnalda
592b02e148 Merge m-c to m-i
MozReview-Commit-ID: 8cFOopE3aHd
2016-11-07 20:40:30 -08:00
Cameron McCormack
38fd958f01 Bug 1315851 - stylo: tweak temporary eRestyle_StyleAttribute handling. r=xidorn
MozReview-Commit-ID: Jgv5El6Kxdu
2016-11-08 10:39:30 +08:00
Cameron McCormack
6001074f5a Bug 1315632 - stylo: Leave old style on frames when nsChangeHint_ReconstructFrame was generated. r=emilio
MozReview-Commit-ID: 4rtsOwwZFkS

--HG--
extra : rebase_source : 4b3963a49cfecbd6b44e2a7599d912b63f9b5b7a
2016-11-07 18:15:32 +08:00
Xidorn Quan
67de44415a Bug 1294299 part 13 - Post restyle event with style attribute hint for style change. r=heycam
MozReview-Commit-ID: 8quLmF0xaxv

--HG--
extra : source : 756be1f6f24db58250575910149e3c63f2320615
2016-11-03 14:41:02 +11:00
Emilio Cobos Álvarez
4eff4ca3e9 Bug 1314161: stylo: Don't try to recreate style contexts for non-element and non-text nodes. r=bholley
Signed-off-by: Emilio Cobos Álvarez <ecoal95@gmail.com>

MozReview-Commit-ID: 4qvF2T7BR4h
2016-11-01 11:25:02 +01:00
Xidorn Quan
131121fc77 Bug 1311598 part 3 - Add include ServoBindings.h to files need it. r=heycam
MozReview-Commit-ID: 3fI0bt4p8Jd

--HG--
extra : rebase_source : 86fa88f15183d1503c92044afca3e86649ec2523
extra : source : 5acc7cffb73234e2664c31f8283fa8a50f0be1b5
2016-10-24 20:16:46 +11:00
Xidorn Quan
3c3f76a8e1 Bug 1309868 part 2 - Use const nsIContent pointer in some layout utils. r=heycam
MozReview-Commit-ID: 5GMave4FS48

--HG--
extra : source : 60d203eaa11b53f14a8c3736498f991d8e3615b1
2016-10-18 15:29:03 +11:00
Bobby Holley
6351b3ffb8 Bug 1304913 - Have Servo manage node data directly without FFI calls. r=Manishearth
MozReview-Commit-ID: H8f8VP18TbM
2016-09-23 15:58:48 -07:00
Manish Goregaokar
aad318e17a Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT

--HG--
extra : rebase_source : 232f90b8b107f7fb49f47a29a4e493660b8a7d87
2016-09-04 00:16:58 +05:30
Wes Kocher
ee92002ede Merge inbound to m-c a=merge 2016-09-02 13:17:30 -07:00
Emilio Cobos Álvarez
72d8d2b877 Bug 1296556: Recreate style contexts inside generated content. r=heycam
MozReview-Commit-ID: JvVyml8yCrO

--HG--
extra : rebase_source : fbfcca50d332155efb693e2130c7da4d241aa2b9
2016-08-20 00:17:04 -07:00
Bobby Holley
ff780d017f Bug 1299348 - Remove StylingStarted(). r=emilio
StylingStarted is a kind of nebulous and not-very-useful concept. The concept
that _is_ useful is whether the presshell has been initialized or not, but the
root element may not exist at that point.

So we need to make sure we that we can trigger the initial document style in both
presshell initialized _and_ ContentInserted, which has the nice effect of handling
root element reinsertions.

We also take the opportunity to make StyleDocument assert the existence of a root
element, and align the responsibility for clearing the dirty descendant bits between
document and non-document nodes.
2016-08-31 10:32:42 -07:00
Markus Stange
f2a777bbb5 Bug 1298205 - Fix ServoRestyleManager.cpp includes. r=heycam
MozReview-Commit-ID: IhXCuG7V7gL

--HG--
extra : rebase_source : 37a2401266ee6ae1942a2b5014a38cbfb3d6c9ab
2016-08-29 11:20:07 -04:00
Bobby Holley
0453dfa721 Bug 1292662 - Use accessors to unset stylo dirty bits. r=heycam
I often find myself wanting to hook them for logging etc, and this makes the
API symmetric with the setters.
2016-08-25 21:36:57 -07:00
Bobby Holley
95e95fe501 Bug 1292662 - Use StyleChildrenIterator in ServoRestyleManger and ServoStyleSet. r=heycam
Most importantly, this causes us to traverse NAC during style context fixup.
2016-08-25 21:36:51 -07:00