aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/util.rs
Commit message (Collapse)AuthorAgeFilesLines
* Split layout code into a separate crate.Josh Matthews2014-06-281-164/+0
|
* Use bitflags! for RestyleDamageBrendan Zabarauskas2014-06-051-1/+2
|
* Upgrade Rust.Jack Moffitt2014-06-051-6/+6
|
* Update Rust.Ms2ger2014-05-221-1/+1
|
* Move the computed style to a new SharedLayoutData struct.Cameron Zwarich2014-05-091-5/+2
| | | | | | | | Implementing the CSSOM requires giving the script task access to the computed style for a node. Moving it into a new SharedLayoutData struct member of LayoutDataRef seems to be the best way to achieve this. This is the first step towards #1721.
* layout: Rewrite display list building to be parallel and to handlePatrick Walton2014-05-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | overflow correctly, and opportunistically lay out blocks in parallel even if floats are present. This commit fixes the `inline-height-test` in Acid2 by implementing proper overflow as well as the inline "strut". (See CSS 2.1 § 10.8.1.) Acid2 was accidentally being rendered properly before because tables' descendant flows were not being laid out properly. Display list building is now parallel and is done by bubbling up display items and layers from parent to child. Speedups of around 60%-70% are observed on Wikipedia with a 4-core HyperThreaded Core i7. More optimizations are possible; this is just a start. To minimize the amount of data that needs to be bubbled up, as well as to make proper handling of `overflow: hidden` clipping easier, the `StackingContext` abstraction is now purely internal to the display list. That is, instead of placing items into a stacking context directly, display items are placed into display lists alongside a stacking level. When a stacking context is complete, it is flattened with the the `flatten` method, which shuffles the display items that make up the context into their proper order while handling clipping properly.
* layout: Re-enable parallel layout by removing all `RefCell` instancesPatrick Walton2014-05-021-112/+0
| | | | | | | | | | | | | from `Flow`s; in the process, remove `InlineInfo` in favor of the range-based design that was originally planned and halfway implemented. Now, the DOM tree structure for inline flows is reflected not by a series of arrays but instead by a flat list of ranges into the list of boxes. As part of this, the `border` and `padding` fields, which were incorrect in the case of inlines and necessitated separate `noncontent_inline_foo` methods, have been merged into a single `border_padding` field that is always guaranteed to be correct after width assignment, even for inlines.
* This batch of changes upgrades Servo to work with the Rust upgrade as ofLars Bergstrom2014-04-271-14/+14
| | | | | | April 10, 2014. The main changes are to privacy, to work around the issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the various API changes strewn throughout the libraries.
* Upgrade rust.Ms2ger2014-04-041-1/+1
|
* layout: Address review feedback.Patrick Walton2014-04-031-2/+2
|
* layout: Implement pseudo-elements.Hyun June Kim2014-04-031-27/+31
|
* Rust upgradesLars Bergstrom2014-03-181-5/+5
|
* Implement JSManaged for DOM objects.Josh Matthews2014-02-241-7/+13
|
* layout: Cache applicable-declarations-to-computed-values mappings.Patrick Walton2014-02-141-2/+4
| | | | | If the cache is hit, then we can only compute inherited properties. This is a WebKit optimization.
* layout: Stop storing intermediate applicable declarations inside layoutPatrick Walton2014-02-141-20/+1
| | | | | | data. 9% improvement in style recalc on the rainbow page.
* This is implement Hover Event. If over element, currently full reflow. after ↵HyunJune Kim2014-02-101-0/+8
| | | | PR, will make partial reflow.
* layout: Enforce that flow construction is thread-safe.Patrick Walton2014-01-311-1/+10
| | | | Closes #1584.
* auto merge of #1593 : pcwalton/servo/dom-leaf-set, r=metajackbors-servo2014-01-301-0/+5
|\ | | | | | | | | | | | | | | | | construction. This will be very slow until we have the concurrent hash table, but we might as well get it in. r? @metajack
| * layout: Introduce a DOM leaf set as a prerequisite for parallel flowPatrick Walton2014-01-291-0/+5
| | | | | | | | | | | | | | construction. This will be very slow until we have the concurrent hash table, but we might as well get it in.
* | layout: Small vector optimize CSS selector matchingPatrick Walton2014-01-301-6/+7
|/
* layout: Perform cascading in parallel.Patrick Walton2014-01-271-3/+6
| | | | Speeds up the cascade by 3x.
* script: Stop trusting pointers to DOM nodes that layout provides.Patrick Walton2014-01-141-7/+15
| | | | | | | Pointers to DOM nodes from layout could go stale if incremental reflow does not correctly destroy dead nodes. Therefore, we ask the JavaScript garbage collector to verify that each DOM node is indeed a valid pointer before calling event handlers on it, and fail otherwise.
* Upgrade to latest Rust.Jack Moffitt2014-01-121-24/+25
|
* CSS parsing/selector-matching for pseudo elementsJaeman Park2014-01-071-0/+12
|
* layout: Move the `LayoutNode` wrapper from script into layout.Patrick Walton2013-12-171-1/+2
|
* layout: Add a lifetime to `LayoutNode` to prevent layout from stuffingPatrick Walton2013-12-171-1/+1
| | | | them into evil places.
* script: Eliminate the phantom type in favor of just whitelisting methodsPatrick Walton2013-12-171-15/+14
| | | | | | | that layout can safely call. This is simpler. Currently, the set of methods is not safe, but I plan to lock it down more soon.
* script: Make trees less genericPatrick Walton2013-12-171-1/+0
|
* layout: Make `NodeRange` use `OpaqueNode` for memory safety.Patrick Walton2013-12-171-6/+15
| | | | | These were stored in inline flows. This was caught by my WIP changes to harden layout (yay for Rust!)
* layout: Replace `AbstractNode`s in layout with `OpaqueNode`, preventingPatrick Walton2013-12-161-0/+33
| | | | DOM access during reflow.
* layout: Reference count `ComputedValues` structures like Gecko does.Patrick Walton2013-12-121-1/+1
| | | | | This has no difference in CSS selector matching performance and results in a 31% speedup in constraint solving on the rainbow page.
* layout: Change `~Box` to `Box`.Patrick Walton2013-12-101-1/+1
| | | | 63% improvement in box building on the rainbow page.
* removing @ from flowtree. (but cloning boxes when creating a display list)Ryan Choi2013-12-101-1/+1
|
* layout: Remove `DisplayBoxes` to save memory and as one step toward anPatrick Walton2013-12-091-25/+0
| | | | `@`-free layout
* layout: Change `RenderBox` to an enum and shorten its name inPatrick Walton2013-12-051-4/+3
| | | | | | | | preparation for removing its `@`-ness. Also removes a few text copies that were taking place. This sure does remove a lot of code!
* modify to displaylist to tree & add clipingsh8281.kim2013-11-261-2/+6
|
* Rewrite flow construction to be incrementalizable and parallelizable.Patrick Walton2013-11-181-20/+40
| | | | | | | | | | | | This replaces flow construction with a strict bottom-up tree traversal, allowing for parallelism. Each step of the traversal creates a flow or a `ConstructionItem`, similar to how Gecko works. {ib} splits are handled by not creating `InlineFlow`s until the containing block is reached. This should be able to be incrementalized by storing the `Flow` from layout to layout, and performing fixups during flow construction and/or wiping containing blocks in a previous pass.
* Use `Any` for the layout data.Patrick Walton2013-11-081-2/+75
| | | | Breaks the dependency between `gfx` and `script`, which is nice.
* fmt! -> format!Keegan McAllister2013-10-311-8/+8
|
* Optimize reflow by changing enums to traits and inlining morePatrick Walton2013-10-281-14/+4
|
* Update to latest Rust.Jack Moffitt2013-10-211-1/+1
|
* For loops and misc changesKeegan McAllister2013-08-151-5/+5
|
* Convert our iterators to external iteratorsKeegan McAllister2013-08-151-16/+5
| | | | Except util/tree.rs (see next commit).
* Trait changes, and eliminate 'copy'Keegan McAllister2013-08-151-1/+1
|
* Update to latest Rust.Jack Moffitt2013-07-091-7/+7
|
* Create text runs during box buildingSeth Fowler2013-06-261-0/+134