aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/sequential.rs
Commit message (Collapse)AuthorAgeFilesLines
* Make BaseFlow::stacking_relative_position a vector.Nicolas Silva2017-06-141-1/+1
|
* Bump euclid to 0.14.Nicolas Silva2017-06-141-6/+6
|
* Fix #6799: set stacking_context_position correctly onEloy Coto2017-05-301-10/+17
| | | | fragment_border_iterator
* FMTEloy Coto2017-05-251-21/+30
|
* Force reflow in the sequential fallback of block format contextPu Xingyu2017-04-231-5/+14
| | | | | | When reflowing a block format context during the inorder traversal, propagate restyle damage manually to its children since they were already reflowed.
* Remove cached thread local context from LayoutContextPu Xingyu2017-02-081-9/+6
| | | | | Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
* Rework the way scroll roots are collectedMartin Robinson2017-01-101-4/+2
| | | | | | | | | | | | 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.
* Introduce and use Scoped TLS.Bobby Holley2016-12-211-5/+3
| | | | | | | | | | | | | | | | 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-6/+7
| | | | | | | | | | 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
|
* Stop using associated types for the concrete TRestyleDamage implementation.Bobby Holley2016-11-071-1/+1
| | | | MozReview-Commit-ID: LfaZFCVlIb1
* Fold some DisplayList methods into DisplayListBuildStateMartin Robinson2016-11-021-11/+9
| | | | | | | This makes the API used to build display lists quite a bit simpler and reduces the amount of auxiliary data structures that need to be passed around. It is also important preparation work for separating scrolling areas from stacking contexts.
* Use a new id type for tracking scrolling areasMartin Robinson2016-10-301-1/+2
| | | | | | This is a step in disassociating scrolling areas from stacking contexts. Now scroll areas are defined by unique ids, which means that in the future stacking context will be able to contain more than one.
* Simplify stacking context collectionMartin Robinson2016-09-271-4/+1
| | | | | | | | | | Simplify the way that stacking contexts are collected. Instead of passing the StackingContextId down the tree, pass the parent StackingContext itself. This will allow future patches to get more information about the parent stacking context (such as location). Also remove the return value of collect_stacking_contexts, which was unused.
* layout: Add a `REPOSITION` restyle damage type.Patrick Walton2016-09-261-2/+1
| | | | | | Separating out `REPOSITION` from `REPAINT` allows us to compute stacking-context-relative positions without rebuilding the display list. This saves a lot of time when responding to script-to-layout queries.
* Reorder `use` statementsUK9922016-09-091-2/+2
|
* Pass a &mut Flow to build_display_list_for_subtree.Ms2ger2016-08-251-5/+3
|
* Pass a &mut Flow to traverse_flow_tree_preorder.Ms2ger2016-08-251-3/+1
|
* Pass a &mut Flow to resolve_generated_content.Ms2ger2016-08-251-2/+2
|
* Pass a &mut Flow to iterate_through_flow_tree_fragment_border_boxes.Ms2ger2016-08-251-2/+2
|
* Stop creating a LayoutContext in build_display_list_for_subtree.Ms2ger2016-08-241-3/+2
|
* Pass SharedLayoutContext to DisplayListBuildState::new.Ms2ger2016-08-231-1/+1
|
* layout: Make the stacking context take into account the children transform ↵Emilio Cobos Álvarez2016-08-161-1/+3
| | | | | | | when calculating overflow areas. This only works for simple translations and similar, but I want Patrick to validate my approach.
* Store SharedStyleContext in AssignISizes.Ms2ger2016-06-221-1/+2
|
* Introduce a script_layout_interface crate and move RestyleDamage to it.Ms2ger2016-06-201-1/+1
|
* Correct the signature of flow_ref::deref_mut.Ms2ger2016-06-061-1/+1
| | | | This also fixes Undefined Behavior in build_display_list_for_subtree.
* Removed unused importsPer Lundberg2016-05-151-5/+1
| | | | This fixes #11185.
* Merge DisplayListEntry into DisplayItemMartin Robinson2016-04-221-2/+2
| | | | | | | We don't really need two levels of abstraction for every element in the DisplayList. This simplifies the complexity of the data structure in preparation for providing documentation and properly handling scrolling roots.
* Do not propagate floats in or out of absolutely positioned flows.Michael Howell2016-04-151-4/+10
| | | | Fixes #10625
* Rename imm_child_iter() and child_iter(). Fixes #10286malayaleecoder2016-04-091-4/+4
|
* layout: Rewrite the block formatting context/float inline-sizePatrick Walton2016-03-251-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | speculation code. The old code tried to do the speculation as a single bottom-up pass after intrinsic inline-size calculation, which was unable to handle cases like this: <div> <div style="float: left">Foo</div> </div> <div> <div style="overflow: hidden">Bar</div> </div> No single bottom-up pass could possibly handle this case, because the inline-size of the float flowing out of the "Foo" block could never make it down to the "Bar" block, where it is needed for speculation. On the pages I tried, this regresses layout performance by 1%-2%. I first noticed this breaking some pages, like the Google SERPs, several months ago.
* layout: Move overflow calculation to be a separate, sequential,Patrick Walton2016-03-181-0/+16
| | | | | | | | | | | | bottom-up pass. Right now, the only reason that overflow calculation works is that we rely on script inducing extra reflows that are sent for display. This was preventing #10021 from landing. This change regresses layout performance by about 1% in my tests. Fixes #7797 properly.
* Removed overflow references on AssignBSizesAndStoreOverflow codeDavid Bonet2016-03-171-3/+3
|
* layout: Switch display list building from bottom-up to top-down.Patrick Walton2016-03-031-3/+10
| | | | This eliminates a lot of allocations and O(n^2) behavior.
* Flatten display list structureMartin Robinson2016-03-011-20/+7
| | | | | | | | | | | | | | | | | | | | | | | Instead of producing a tree of stacking contexts, display list generation now produces a flat list of display items and a tree of stacking contexts. This will eventually allow display list construction to produce and modify WebRender vertex buffers directly, removing the overhead of display list conversion. This change also moves layerization of the display list to the paint thread, since it isn't currently useful for WebRender. To accomplish this, display list generation now takes three passes of the flow tree: 1. Calculation of absolute positions. 2. Collection of a tree of stacking contexts. 3. Creation of a list of display items. After collection of display items, they are sorted based upon the index of their parent stacking contexts and their position in CSS 2.1 Appendeix E stacking order. This is a big change, but it actually simplifies display list generation.
* Bonus Fix - Rename traverse_dom_preorder to traverse_dom.Bobby Holley2016-01-061-1/+1
| | | | | The incorrect naming here was bugging me - the dom traversal has both pre- and post-order processing steps.
* Hoist the style parts of sequential.rs into style/.Bobby Holley2016-01-061-18/+1
|
* Make sequential traversal operate on TNode instead of LayoutNode.Bobby Holley2016-01-061-3/+3
| | | | | | I forgot to do this along with the parallel case. Ideally I'd merge this patch into that one, but then I'd need to rebase it over the LayoutContext patch, which would be a pain.
* Hoist the style parts of traversal.rs into style/.Bobby Holley2016-01-061-3/+2
|
* Remove the dependency of parallel DOM traversal and style calculation on ↵Bobby Holley2016-01-061-16/+11
| | | | LayoutContext.
* Refactor parallel dom traversal to be agnostic to the processing steps ↵Bobby Holley2016-01-041-19/+13
| | | | themselves.
* Replaced ZERO_POINT with Point2D::zero()Alexander Mankuta2015-12-031-2/+1
|
* Generalize the rest of layout to operate on generic Layout*.Bobby Holley2015-11-281-6/+10
| | | | | | | 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 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-3/+3
|
* 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.
* Change overflow calculation to be calculated after compute_absolute_position.Glenn Watson2015-11-031-2/+0
| | | | | | 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-3/+9
| | | | SharedLayoutContext.
* Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+2
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+3
|