aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/traversal.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-3/+4
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-20/+20
|
* Reorder importsPyfisch2018-11-061-3/+3
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-7/+7
|
* Rustfmt layout cratePyfisch2018-09-011-23/+44
|
* style: Indent properly a couple more functions.Emilio Cobos Álvarez2018-02-241-7/+12
|
* Create own file for background calculations in layoutPyfisch2018-01-061-1/+1
| | | | | | | | | | Move display_list_builder.rs and webrender_helpers.rs along with the new file to components/layout/display_list/ Remove apparently unused IdType enum. Only variant used was OverflowClip. See #19676
* style: Remove TNode::set_can_be_fragmented and TNode::can_be_fragmented.Emilio Cobos Álvarez2018-01-041-1/+2
| | | | | Replace them instead by a computed value flag, the same way as the IS_IN_DISPLAY_NONE_SUBTREE flag works.
* Turn flow::base and friends into methodsMatt Brubeck2017-12-141-14/+14
|
* style: Remove unused argument in element_needs_traversal.Emilio Cobos Álvarez2017-11-171-2/+1
|
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-11/+11
|
* Wait as late as possible to assign ClipIdsMartin Robinson2017-10-241-4/+3
| | | | | | | | | This will allow Servo to create ClipScrollNodes later during display list construction, which will be necessary once rounded rectangles are removed from the LocalClip structure. Instead of keeping track of the ClipId of each ClipScrollNode, we keep track of its index in an array of ClipScrollNodes. This will allow us to access them without a hash lookup.
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-11/+11
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-11/+11
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Eliminate RestyleData entirely.Bobby Holley2017-09-121-1/+1
| | | | | | Without this change, the previous commit increases the size of ElementData. MozReview-Commit-ID: 87BZuXINiT9
* Eliminate the sequential/traversal parallel distinction in favor of a ↵Bobby Holley2017-08-251-8/+2
| | | | | | unified adaptive driver. MozReview-Commit-ID: ADVTNJntzmp
* order derivable traits listsClément DAVID2017-08-231-2/+2
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Allow CalculateStackingRelativePositions to short-circuitMatt Brubeck2017-08-081-11/+18
|
* Code organization: Move all generic traversal code to layout::traversalMatt Brubeck2017-08-081-2/+85
|
* Rename compute_absolute_position to compute_stacking_relative_positionMatt Brubeck2017-08-081-3/+3
|
* Fix fixed position items with parents with CSS clipsMartin Robinson2017-08-031-3/+4
| | | | | | | | | | In order to properly handle CSS clipping, we need to keep track of what the different kinds of clips that we have. On one hand, clipping due to overflow rules should respect the containing block hierarchy, while CSS clipping should respect the flow tree hierarchy. In order to represent the complexity of items that are scrolled via one clip/scroll frame and clipped by another we keep track of that status with a ClipAndScrollInfo.
* Pass a callback to recalc_style_at to avoid traversing children twice.Bobby Holley2017-07-151-5/+9
| | | | MozReview-Commit-ID: DIHXaVNzbFM
* script: Move the layout_wrapper outside of script.Emilio Cobos Álvarez2017-07-151-13/+2
| | | | | | | | This allows us to have ensure_data() and clear_data() functions on the TElement trait, instead of hacking around it adding methods in random traits. This also allows us to do some further cleanup, which I'd rather do in a followup.
* Rip out the generic abstractions around ThreadLocalStyleContext.Bobby Holley2017-07-051-18/+6
| | | | MozReview-Commit-ID: 5WTLuk323Ac
* Eliminate ScrollRootIdMartin Robinson2017-04-201-1/+1
| | | | | | | Just use WebRender's ClipId directly. This will allow us to create and use ReferenceFrames in the future, if we need to do that. It will also make it easier to have Servo responsible for creating the root scrolling area, which will allow removing some old hacks in the future.
* stylo: Store font metrics provider in thread local style contextManish Goregaokar2017-04-091-0/+1
|
* Do the sequential traversal breadth-first.Bobby Holley2017-04-091-1/+1
| | | | | | | | | | | | | While we're at it, we also eliminate the 'unknown' dom depth for the bloom filter. Computing depth has negligible cost relative to the amount of work we do setting up the bloom filter at a given depth. Doing it once per traversal should be totally fine. I originally separated the elimination of unknown dom depth from the traversal changes, but I got bloom filter crashes on the intermediate patch, presumably because I didn't properly fix the sequential traversal for this case. Given that the final state is green, I just decided to squash and move on.
* Replace RwLock<StyleRule> with Locked<StyleRule>Simon Sapin2017-03-191-12/+12
|
* Remove cached thread local context from LayoutContextPu Xingyu2017-02-081-19/+18
| | | | | Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
* style: Expose the traversal kind to the style system.Emilio Cobos Álvarez2017-01-241-2/+8
| | | | | | | This way we'll be able to take different paths for the sequential and parallel traversals in some concrete cases. This is a preliminar patch to fix bug 1332525.
* Rework the way scroll roots are collectedMartin Robinson2017-01-101-17/+6
| | | | | | | | | | | | Collect scroll roots during the collect_stacking_context phase instead of during display list construction. This will be useful in order to collect containing block scroll roots as well as to give scroll roots sequential ids in the future. This change also pulls stacking context children out of the StackingContext struct itself, which should reduce very slightly the memory used by the finished display list. This also simplifies the DisplayListBuilder because it no longer has to maintain a stack of ScrollRootIds and StackingContextIds and can instead just rely on the program stack.
* Bug 1325734 - Simplify ElementData and eliminate the concept of consuming ↵Bobby Holley2017-01-091-1/+0
| | | | styles. r=emilio
* Bug 1325734 - Parameterize the style traversal on TElement instead of TNode. ↵Bobby Holley2017-01-091-10/+10
| | | | | | r=emilio This works around the issue described in https://github.com/rust-lang/rust/issues/38917
* Bug 1325734 - Remove Servo Layout's dependency on the initial-ness of the ↵Bobby Holley2017-01-091-0/+3
| | | | style. r=emilio
* Switch to crates.io for atomic_refcell.Bobby Holley2017-01-031-1/+1
|
* Remove generation, remove filter pop, and add size tests.Bobby Holley2016-12-221-3/+1
|
* Hoist bloom filter into scoped TLS and simplify code.Bobby Holley2016-12-221-9/+6
|
* Stop using UnsafeNode in the StyleSharingCandidateCache.Bobby Holley2016-12-211-2/+2
|
* Introduce and use Scoped TLS.Bobby Holley2016-12-211-16/+15
| | | | | | | | | | | | | | | | It turns out that it's problematic to embed ThreadLocalStyleContext within LayoutContext, because parameterizing the former on TElement (which we do in the next patch) infects all the traversal stuff with the trait parameters, which we don't really want. In general, it probably makes sense to use separate scoped TLS types for the separate DOM and Flow tree passes, so we can add a different ScopedTLS type for the Flow pass if we ever need it. We also reorder the |scope| and |shared| parameters in parallel.rs, because it aligns more with the order in style/parallel.rs. I did this when I was adding a TLS parameter to all these functions, which I realized we don't need for now.
* Make the DomTraversalContext own the SharedStyleContext and share it ↵Bobby Holley2016-12-161-51/+49
| | | | | | | | | | immutably across the traversal. This allows us to get rid of a bunch of lifetimes and simplify a lot of code. It also lets us get rid of that nasty lifetime transmute, which is awesome. The situation with thread-local contexts is still suboptimal, but we fix that in subsequent patches.
* Removed util.Alan Jeffrey2016-12-141-1/+1
|
* Make Restyle tracking more granular.Bobby Holley2016-12-091-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | The primary idea of this patch is to ditch the rigid enum of Previous/Current styles, and replace it with a series of indicators for the various types of work that needs to be performed (expanding snapshots, rematching, recascading, and damage processing). This loses us a little bit of sanity checking (since the up-to-date-ness of our style is no longer baked into the type system), but gives us a lot more flexibility that we'll need going forward (especially when we separate matching from cascading). We also eliminate get_styling_mode in favor of a method on the traversal. This patch does a few other things as ridealongs: * Temporarily eliminates the handling for transfering ownership of styles to the frame. We'll need this again at some point, but for now it's causing too much complexity for a half-implemented feature. * Ditches TRestyleDamage, which is no longer necessary post-crate-merge, and is a constant source of compilation failures from either needing to be imported or being unnecessarily imported (which varies between gecko and servo). * Expands Snapshots for the traversal root, which was missing before. * Fixes up the skip_root stuff to avoid visiting the skipped root. * Unifies parallel traversal and avoids spawning for a single work item. * Adds an explicit pre_traverse step do any pre-processing and determine whether we need to traverse at all. MozReview-Commit-ID: IKhLAkAigXE
* style: Enable the bloom filter recovering.Emilio Cobos Álvarez2016-11-271-5/+3
|
* style: Introduce StyleBloomEmilio Cobos Álvarez2016-11-271-30/+8
| | | | | The idea is this will fix the bad behavior of the bloom filter in parallel traversal.
* Revert restyled_previous_sibling_element tracking, and separate child ↵Bobby Holley2016-11-241-3/+2
| | | | | | | | | | | | | | | preprocessing. I realized that I fixed this issue incorrectly when the test failed before. Our design document specifies that restyle hints must be expanded by the parent before traversing children, so that we can properly apply LaterSiblings restyle hints. This includes parents that do not themselves need processing (StylingMode::Traverse). So we need to preprocess children even in the case where we don't restyle the parent. On the flip side, we do in fact know whether a child needs processing before enqueuing it, so we can skip the conservative visit I added before. MozReview-Commit-ID: AEiRzdsN0h5
* Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.Bobby Holley2016-11-241-12/+12
| | | | MozReview-Commit-ID: 7wH5XcILVmX
* Rename selector_impl.rs to selector_parser.rsSimon Sapin2016-11-201-1/+1
| | | | This makes it consistent with an upcoming update of the selectors crate.
* Eliminate HAS_CHANGED in favor of explicit RestyleDamage.Bobby Holley2016-11-161-9/+6
|