aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/traversal.rs
Commit message (Collapse)AuthorAgeFilesLines
* Generalize the rest of layout to operate on generic Layout*.Bobby Holley2015-11-281-27/+33
| | | | | | | There wasn't a good way to split this up, unfortunately. With this change, the only remaining usage of the Servo-specific structures is in layout_task, where the root node is received from the script task. \o/
* Rename ThreadSafeLayoutFoo to ServoThreadSafeLayoutFoo and ↵Bobby Holley2015-11-211-6/+6
| | | | TThreadSafeLayoutFoo to ThreadSafeLayoutFoo.
* Hoist exported ThreadSafeLayoutFoo functionality into traits.Bobby Holley2015-11-211-1/+1
|
* Auto merge of #8628 - mrobinson:damage-bits, r=pcwaltonbors-servo2015-11-211-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up restyle damage after it no longer applies BUBBLE_ISIZES and REPAINT can become "stuck" on in the default Servo configuration once they are activated. This is solved by removing these damage bits after they no longer apply. There isn't a good way to test this, other than noting that it doesn't break any existing CSS tests. This will become more important in the future as the REPAINT bit is used to implement display list patching. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8628) <!-- Reviewable:end -->
| * Clean up restyle damage after it no longer appliesMartin Robinson2015-11-201-1/+2
| | | | | | | | | | | | | | | | | | BUBBLE_ISIZES and REPAINT can become "stuck" on in the default Servo configuration once they are activated. This is solved by removing these damage bits after they no longer apply. There isn't a good way to test this, other than noting that it doesn't break any existing CSS tests. This will become more important in the future as the REPAINT bit is used to implement display list patching.
* | Rename Layout*Trait to Layout*.Bobby Holley2015-11-181-1/+1
| | | | | | | | | | The next step will be to remote the Servo-specificity of the layout code we want to share by making it operate generically on Layout*.
* | Prefix concrete types with 'Servo'.Bobby Holley2015-11-181-7/+7
| |
* | Hoist exported wrapper functionality into a family of traits.Bobby Holley2015-11-181-1/+1
|/ | | | | All the existing code still uses the concrete implementations, so this shouldn't impact the generated code at all.
* Wrap SharedLayoutContext::stylist in a wrapper to make it Sync.Ms2ger2015-11-071-1/+1
|
* Change overflow calculation to be calculated after compute_absolute_position.Glenn Watson2015-11-031-2/+2
| | | | | | Also include absolutely positioned elements in the overflow rect calculation. Fixes #7797.
* Use the passed-in reflow root rather than the one stored in the ↵Ms2ger2015-10-261-8/+13
| | | | SharedLayoutContext.
* Remove HAS_DIRTY_SIBLINGS.Bobby Holley2015-10-211-1/+0
| | | | | | This isn't doing anything right now, and we're not even setting it properly in dirty_impl the |dirty_subtree(self)| was causing us to hit the skip case for step 3.
* Remove the boolean shareable flag in RecalcStyleForNode::process.Ms2ger2015-10-191-9/+11
|
* Remove the unused boolean in StyleSharingResult::CannotShare.Ms2ger2015-10-191-12/+18
|
* Define share_style_if_possible on LayoutElement.Ms2ger2015-10-191-3/+10
|
* Return the result from match_element rather than using an outparam.Ms2ger2015-10-191-4/+3
|
* Define match_node on LayoutElement as match_element.Ms2ger2015-10-191-6/+6
|
* Remove unused PostorderDomTraversal::should_pruneMatt Brubeck2015-10-011-7/+0
|
* Delete dead code.Eli Friedman2015-09-261-17/+0
| | | | | (#[cfg(debug)] is false in every normal servo configuration, and the code in question doesn't compile.)
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-2/+2
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-6/+4
| | | | This merges import blocks that were reported by tidy as unmerged.
* layout: Fix tidy failures.Patrick Walton2015-09-011-1/+1
|
* layout: Make overflow calculation take relative percentages intoPatrick Walton2015-08-311-2/+2
| | | | | | | | | | | | | | | | account. This necessitated changing overflow to be calculated by the parent flow if relatively positioned children are present. That is because the overflow regions cannot be calculated without knowing relative offsets, which themselves cannot be calculated without knowing the parent size (because of percentages). To accomplish this without sacrificing parallelism in the non-relative case, this patch splits overflow into "early" and "late" computation. Late overflow computation cannot be parallelized across children, while early overflow computation can. Makes the "Apple Music" text show up over the full-bleed promotional background on apple.com.
* sort all usesJohann Tuffe2015-08-201-3/+3
|
* Replace the StyledNode trait with inherent methods.Ms2ger2015-07-271-1/+0
|
* Update rust-selectorsSimon Sapin2015-07-231-9/+5
| | | | Update for https://github.com/servo/rust-selectors/pull/37
* Scope the allowed unsafe code in traversal.rs.Ms2ger2015-07-171-2/+2
|
* Move the traversal traits into the traversal module.Ms2ger2015-07-171-2/+27
|
* Remove LayoutChan from LayoutDataWrapperMichael Wu2015-07-041-1/+1
|
* Update rust-selectorsSimon Sapin2015-06-261-2/+2
|
* Make LOCAL_CONTEXT_KEY safe and non-leaky.Nicholas Nethercote2015-06-041-2/+2
| | | | | | | | | | | | | | | | `LOCAL_CONTEXT_KEY` is currently a `Cell<*mut LocalLayoutContext>`. The use of the raw pointer means that the `LocalLayoutContext` is not dropped when the thread dies; this leaks FreeType instances and probably other things. There are also some unsafe getter functions in `LayoutContext` (`font_context`, `applicable_declarations_cache` and `style_sharing_candidate_cache`) that @eddyb says involve undefined behaviour. This changeset changes `LOCAL_CONTEXT_KEY` to `RefCell<Option<Rc<LocalLayoutContext>>>`. This fixes the leak and also results in safe getters. (Fixes #6282.)
* Reduce max line length from 150 to 120 charactersCorey Farwell2015-05-241-1/+2
| | | | Part of https://github.com/servo/servo/issues/6041
* compositing: Implement display ports and avoid creating display listsPatrick Walton2015-05-191-1/+1
| | | | | | for items outside it. This improves Servo's performance on large pages.
* layout: Support inline incremental reflow, and stop reconstructing allPatrick Walton2015-05-191-1/+1
| | | | | | | flows when mousing over the document. This exposes more "jumpiness" on sites like Hacker News, but the bug that causes it was pre-existing.
* layout: Store overflow for flows impacted by floats.Patrick Walton2015-05-111-2/+1
| | | | | | | Makes qz.com visible. In order to work around a compiler bug involving Sized, this patch moves `store_overflow` to be a virtual method.
* Various fixes to getClientBoundingRect()Glenn Watson2015-05-011-1/+6
| | | | | | | | | * Fix queries involving stacking contexts * The code was double accumulating stacking context origins. * Handle queries of inline elements. * The node addresses being compared were incorrect (CharacterData vs. Span) * Handle ScriptQuery reflows correctly. * The layout task was skipping the compute absolute positions traversal, so failed before window.onload.
* Implement Clone for Copy types.Ms2ger2015-04-281-6/+6
|
* Stop using u/i suffixes in layout.Ms2ger2015-04-021-1/+1
|
* layout: Implement CSS transitions per CSS-TRANSITIONS § 2.Patrick Walton2015-03-311-1/+2
| | | | | | | | Transition events are not yet supported, and the only animatable properties are `top`, `right`, `bottom`, and `left`. However, all other features of transitions are supported. There are no automated tests at present because I'm not sure how best to test it, but three manual tests are included.
* Use u32 for generation numbers.Ms2ger2015-03-281-1/+1
|
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-1/+1
|
* layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1Patrick Walton2015-03-091-2/+4
| | | | | | | | | | | | | | § 12.3-12.5. Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases.
* auto merge of #5154 : luniv/servo/viewpoint-percent-lengths, r=SimonSapinbors-servo2015-03-051-1/+2
|\ | | | | | | Spec: http://dev.w3.org/csswg/css-values-3/#viewport-relative-lengths
| * Make the initial viewport size available to style::properties::cascadeJames Gilbertson2015-03-051-1/+2
| |
| * Revert "layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1"Simon Sapin2015-03-031-3/+2
| | | | | | | | This reverts commit 30fd28d1077fbb3f47140f6ab1252c0d24f44d23.
| * layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1Patrick Walton2015-03-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | § 12.3-12.5. Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases.
* | Get rid of servo_utilDan Fox2015-03-051-2/+2
|/
* Move selector matching to an external library, for use outside Servo.Simon Sapin2015-02-231-1/+1
|
* Update a comment about STYLE_BLOOM.Nicholas Nethercote2015-02-161-1/+1
|
* Avoid bloom filter churn.Nicholas Nethercote2015-02-151-4/+3
| | | | | | | | | | | | | When a cached bloom filter is found during traversal, there are two cases, both of which currently do unnecessary allocations. This patch avoids these allocations. In the process, it renders correct two previously-incorrect comments, and moves one of those comments into a better spot. While scrolling moderately fast all the way through the "Guardians of the Galaxy" Wikipedia page, this patch (a) avoids 1.2 million calls to `clone()` and (b) replaces 111,000 `BloomFilter::new()` calls with `clear()` calls.