aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/traversal.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* style: Remove conditional imports in traversal.rsEmilio Cobos Álvarez2017-10-011-3/+4
|
* style: Lazily tweak the traversal root to account for sibling invalidations.Emilio Cobos Álvarez2017-09-261-21/+40
| | | | | | | Bug: 1403078 Reviewed-by: heycam MozReview-Commit-ID: Ij3nMOKu5FO Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Make sure to not run any style invalidation in an unstyled children ↵Emilio Cobos Álvarez2017-09-231-0/+6
| | | | | | | | only traversal. Bug: 1402472 Reviewed-by: bholley MozReview-Commit-ID: IFPA7LJpvsZ
* style: Massage the resolver code so it's cleaner and prevents the problem.Emilio Cobos Álvarez2017-09-181-4/+4
| | | | | This way all the borrows stay in the sharing code, and prevents an extra borrow on a cache hit, which is not a big deal but nice.
* Undo #18497 in the MatchAndCascade case.Bobby Holley2017-09-151-6/+23
| | | | | | | | | | | It's easy to construct examples where not inserting in those cases causes performance to get worse (for example, any long list of siblings that match the same selectors while having some non-effectual differences in LocalName/Class/Id/etc). And the LRU nature of the cache already does the right thing of pruning non-useful entries. Fixing this causes several hundred more sharing hits on wikipedia. MozReview-Commit-ID: L7W8vcMnHaq
* style: Move the check into insert_if_possible.Emilio Cobos Álvarez2017-09-141-16/+12
|
* style: Don't cache styles that got a cache hit.Emilio Cobos Álvarez2017-09-141-9/+12
| | | | | This avoids doing wasted work, at least in the recascade case, and pretty likely in the other as well.
* Share styles during recascades.Bobby Holley2017-09-131-10/+24
| | | | MozReview-Commit-ID: AFTwtzi4P93
* Add some wrapper types to propagate styles out of style resolver.Bobby Holley2017-09-131-6/+5
| | | | | | We'll use these next to propagate information about style reuse to the ElementDataFlags. MozReview-Commit-ID: Dya6vgzydpL
* Return the element rather than styles from the style sharing cache.Bobby Holley2017-09-131-2/+3
| | | | | | This gives us more flexibility, and doesn't cost us anything. MozReview-Commit-ID: CuvOEcLA3My
* Eliminate RestyleData entirely.Bobby Holley2017-09-121-7/+7
| | | | | | Without this change, the previous commit increases the size of ElementData. MozReview-Commit-ID: 87BZuXINiT9
* Hoist flags out of RestyleData.Bobby Holley2017-09-121-7/+7
| | | | MozReview-Commit-ID: 8emE83lykh3
* Avoid memmoving ValidationData more than necessary.Bobby Holley2017-09-111-1/+1
| | | | MozReview-Commit-ID: 70w3bZ2FU0W
* Encapsulate the sharing cache backend better.Bobby Holley2017-09-111-4/+2
| | | | MozReview-Commit-ID: 2x9BIhmwH83
* Shorten the naming around the style sharing cache.Bobby Holley2017-09-111-2/+2
| | | | MozReview-Commit-ID: EcVQDLoxwFP
* style: Stop the cascade when only reset structs change.Emilio Cobos Álvarez2017-09-061-20/+36
| | | | | | | Bug: 1395227 Reviewed-by: heycam MozReview-Commit-ID: JCZJl2fmtJ9 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* style: Remove the for reconstruction traversals.Emilio Cobos Álvarez2017-09-011-7/+1
| | | | | | | | | One less hack, a few more to go. Bug: 1374235 Reviewed-by: bholley MozReview-Commit-ID: 6katL1EGn2U Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Clean up bit clearing.Bobby Holley2017-08-261-6/+3
|
* Hook the recursive invalidation traversal up to the stack checker machinery.Emilio Cobos Álvarez2017-08-251-3/+7
| | | | MozReview-Commit-ID: 3tX3gHFTBT
* Eliminate the sequential/traversal parallel distinction in favor of a ↵Bobby Holley2017-08-251-25/+0
| | | | | | unified adaptive driver. MozReview-Commit-ID: ADVTNJntzmp
* style: Only store applicable ::before / ::after pseudo styles during the ↵Emilio Cobos Álvarez2017-08-251-10/+39
| | | | traversal.
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Track the restyle root and use it to do less work during the traversal.Bobby Holley2017-08-221-25/+45
| | | | MozReview-Commit-ID: A8O3JOpsv4E
* style: Inline a bunch of trivial stuff we're paying calls for in Geckolib.Emilio Cobos Álvarez2017-08-221-0/+2
|
* Avoid recursion in clear_descendant_data.Bobby Holley2017-08-151-17/+21
| | | | MozReview-Commit-ID: LeMhhcKoLr9
* Bonus fix: Be more robust about clearing descendants bits under display:none ↵Bobby Holley2017-08-151-17/+16
| | | | | | subtrees. MozReview-Commit-ID: 9KQVOpdEjwF
* Avoid leaving stale ANCESTOR_WAS_RECONSTRUCTED bits in the tree.Bobby Holley2017-08-151-3/+7
| | | | MozReview-Commit-ID: 76q5XxK2o2a
* Hoist StyleNew{Children,Subtree} into their own paths.Bobby Holley2017-08-111-56/+41
| | | | | | | | | | | | | 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
* Tidy up flags handling in recalc_style_at a bit.Bobby Holley2017-08-111-10/+10
| | | | MozReview-Commit-ID: 4BK0JfkgjdC
* Only clear the descendants bit for which we're traversing.Bobby Holley2017-08-111-21/+23
| | | | | | | Doing anything else is non-sensical, since we're not guaranteed to reach all of the bits from traversal Y when doing traversal X. MozReview-Commit-ID: FQliRxBan70
* Be more careful about the flags we clear for forgetful traversals.Bobby Holley2017-08-091-1/+1
| | | | MozReview-Commit-ID: ETDL8KsInAn
* Don't clear animation only dirty bit during style recalc (unless the element ↵Hiroyuki Ikezoe2017-08-081-3/+0
| | | | | | | | | | | | | | | | | is in a display:none subtree). After bug 1356141, the setup of animation-only dirty bit should have matched to normal dirty bit's one (Though they don't match in post traversal due to throttled animation flush). An unset_animation_only_dirty_descendants call removed in this patch cleared dirty bits which are needed for post traversal if there is a second animation-only traversal and if there is no need to restyle for the second animation-only traversal. The reftest in this patch fails without either this fix or the fix for bug 1367975. See [Gecko bug 1384435 comment 12](https://bugzilla.mozilla.org/show_bug.cgi?id=1384435#c12) for more detail what's going on at that time.
* Introduce a new flag and use it to be more permissive about cousin sharing.Bobby Holley2017-08-051-0/+3
| | | | MozReview-Commit-ID: BCJg0Ycsy6M
* Auto merge of #17972 - heycam:ignore-existing, r=bholleybors-servo2017-08-041-1/+3
|\ | | | | | | | | | | | | | | | | | | | | style: Allow styles to be computed ignoring existing element data. From https://bugzilla.mozilla.org/show_bug.cgi?id=1384824. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17972) <!-- Reviewable:end -->
| * style: Allow styles to be computed ignoring existing element data.Cameron McCormack2017-08-051-1/+3
| |
* | Speculatively evaluate paint functions during style.Alan Jeffrey2017-07-311-0/+48
|/
* Break TraversalFlags::ForReconstruct down into several independent pieces.Bobby Holley2017-07-271-23/+20
| | | | | | These will be useful in followup work. MozReview-Commit-ID: Dyp9R0PG36v
* Stop unconditionally traversing every element in the subtree on reconstruct ↵Bobby Holley2017-07-271-4/+0
| | | | | | | | | traversals. We already have a more-specific check further down in the file, which was added in the same revision. I think this one was erroneous. MozReview-Commit-ID: CnP0zCpBtnp
* Pass TraversalFlags from C++ into Rust.Bobby Holley2017-07-271-48/+10
| | | | MozReview-Commit-ID: EVUzgnL5coN
* style: Remove outdated comments.Emilio Cobos Álvarez2017-07-241-1/+0
|
* style: Remove (mostly) unused has_current_styles.Emilio Cobos Álvarez2017-07-241-1/+1
| | | | MozReview-Commit-ID: DV9HfvbUjBY
* style: Unify needs_traversal logic.Emilio Cobos Álvarez2017-07-191-42/+43
|
* style: Remove useless traversal checks.Emilio Cobos Álvarez2017-07-191-6/+2
| | | | The callee checks this.
* style: Cleanup most of the Inner mess.Emilio Cobos Álvarez2017-07-181-2/+2
| | | | MozReview-Commit-ID: Ieg2GJT0yUl
* Skip snapshot handling during animation-only restyle.Hiroyuki Ikezoe2017-07-181-3/+8
|
* Add has_current_styles_for_traversal().Hiroyuki Ikezoe2017-07-181-6/+5
| | | | | | | | In animation-only restyle, we just need to check the element has animation restyle hints or has recascade self which is a result of animation-only restyle for ancestors. has_current_styles() in Servo_ResolveStyle() is intentionally left there, it will be changed in a subsequent patch.
* stylo: Switch Gecko over to ServoStyleContextManish Goregaokar2017-07-171-2/+2
|
* stylo: Use ComputedValuesInner instead of ComputedValues when we don't need itManish Goregaokar2017-07-171-4/+4
|
* style: Fix a typo that makes us resolve styles for the whole spin to the root.Emilio Cobos Álvarez2017-07-161-1/+1
| | | | For undisplayed elements, at least.
* Pass a callback to recalc_style_at to avoid traversing children twice.Bobby Holley2017-07-151-159/+133
| | | | MozReview-Commit-ID: DIHXaVNzbFM