aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/layout_task.rs
Commit message (Collapse)AuthorAgeFilesLines
* Split layout code into a separate crate.Josh Matthews2014-06-281-916/+0
|
* Upgrade to latest Rust.Manish Goregaokar2014-06-271-2/+2
|
* Rename |Profiler| as |TimeProfiler|.Nicholas Nethercote2014-06-261-16/+16
| | | | | And likewise for |ProfilerChan|, |profiler_chan|, and so on. This contrasts nicely with the newly added |MemoryProfiler|.
* Remove box from image cache task.Glenn Watson2014-06-231-2/+2
|
* Remove LocalImageCacheHandle hack and associated unsafe code.Glenn Watson2014-06-231-9/+3
|
* Separate "desktop" and "mobile" zoom calculations.Matt Brubeck2014-06-201-2/+6
| | | | | | | | This ensures that the layout viewport responds to each type of zoom correctly, and lays the ground for CSS Media Queries and CSS Device Adaption. Until we have proper touch support, mobile-style "pinch" zoom can be simulated by holding Ctrl while scrolling with a mousewheel or trackpad gesture.
* auto merge of #2624 : mbrubeck/servo/units, r=pcwaltonbors-servo2014-06-091-2/+2
|\ | | | | | | | | | | | | | | | | | | This fixes an issue where the CSS viewport was too large on high-DPI displays because it was set to the window size in device pixels, instead of px. This patch ensures that the window size is converted from device pixels to px before being passed to script/layout code. The Window trait now exposes the window size in both device pixels and density-independent screen coordinates, with clearer method names.
| * Outside of compositor, store window size in CSS pxMatt Brubeck2014-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | This fixes an issue where the CSS viewport was too large on high-DPI displays because it was set to the window size in device pixels, instead of px. This patch ensures that the window size is converted from device pixels to px before being passed to script/layout code. The Window trait now exposes the window size in both device pixels and density-independent screen coordinates, with clearer method names.
* | Remove PaddedUnsafeFlow.Tetsuharu OHZEKI2014-06-091-2/+2
|/
* Use bitflags! for RestyleDamageBrendan Zabarauskas2014-06-051-4/+4
|
* Upgrade Rust.Jack Moffitt2014-06-051-6/+4
|
* layout: Reference count flows, and forbid unsafe code in many places.Patrick Walton2014-06-031-19/+19
|
* auto merge of #2478 : SimonSapin/servo/style-getters, r=metajackbors-servo2014-05-281-2/+1
|\ | | | | | | This isolates layout code from upcoming refactoring in properties.rs.mako.
| * Make ComputedStyle fields private and add getters.Simon Sapin2014-05-231-2/+1
| | | | | | | | This isolates layout code from upcoming refactoring in properties.rs.mako.
* | Replace deprecated rev_iter() by iter().rev().Ms2ger2014-05-231-2/+2
|/
* Update Rust.Ms2ger2014-05-221-18/+18
|
* Keep initial values in a lazy static instead of passing a parameter around.Simon Sapin2014-05-161-7/+1
| | | | Thanks to @Kimundi for https://gist.github.com/Kimundi/8782487
* layout: Rewrite display list building to be parallel and to handlePatrick Walton2014-05-021-70/+94
| | | | | | | | | | | | | | | | | | | | | | | | | 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-15/+14
| | | | | | | | | | | | | 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.
* Replace Au::zero_* with generic methodsMatt Brubeck2014-05-021-1/+1
|
* Make get_content_boxes return Vec.Ms2ger2014-04-281-2/+2
|
* Make get_nodes_under_mouse return Vec.Ms2ger2014-04-281-2/+2
|
* Remove unused_mut warningManish Goregaokar2014-04-281-1/+1
|
* This batch of changes upgrades Servo to work with the Rust upgrade as ofLars Bergstrom2014-04-271-32/+38
| | | | | | 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-12/+12
|
* layout: Fix percentages in relatively positioned elementsPatrick Walton2014-04-031-3/+3
|
* layout: Address review feedback.Patrick Walton2014-04-031-4/+4
|
* layout: Support multiple boxes per node; don't store fixed/absolutePatrick Walton2014-04-031-3/+1
| | | | descendant links separately
* servo: Implement stacking contexts and allow multiple layers perPatrick Walton2014-04-031-64/+102
| | | | pipeline. This handles fixed positioning mostly correctly.
* Set a name for WorkQueue tasks (fixes #1830)Matt Brubeck2014-03-251-1/+1
|
* Revert "Set a name for WorkQueue tasks (fixes #1830)"Josh Matthews2014-03-221-1/+1
| | | | This reverts commit f1394e3ffcd5ce97f307a38237ca05b1808ad71f.
* Set a name for WorkQueue tasks (fixes #1830)Matt Brubeck2014-03-211-1/+1
|
* Rust upgradesLars Bergstrom2014-03-181-14/+14
|
* Implement mini-traversal for absolute flow assign-height.S Pradeep Kumar2014-03-031-2/+16
| | | | | | | | | | | | | | This only traverses absolute flows, nothing else. + Also, a separate mini-traversal for store overflow. + Store descendants with position 'absolute' and 'fixed' in BaseFlow. + Bubble up links to absolute and fixed descendants during Flow Construction. + Set Rawlink to the CB in absolute descendants. + store_overflow() now uses absolute descendants' overflows too. + Add reftests for 'absolute' and 'fixed' static y position. + Add reftests for overflow (they all fail now). + Put absolute flow display items under their CB's ClipDisplayItem. + Paint borders in Box_ before the actual box stuff (minor fix in lieu of paint-order).
* Implement `position: absolute` for non-replaced elements.S Pradeep Kumar2014-03-031-6/+9
| | | | | | | | | | | + Re-implement fixed positioning using the absolute positioning code. + Add reftests for absolute positioning and fixed positioning. + Refactor assign_widths in BlockFlow to isolate the calculation of widths and margins. + Pass down details of the Containing Block for absolute and fixed flows during layout. Use it to calculate the static position of absolute flows. + Defer calculation of absolute flow dimensions till we build the display list.
* Remove duplicated block of code.Ms2ger2014-02-251-10/+0
|
* layout: Create a font context in sequential modePatrick Walton2014-02-241-0/+10
|
* layout: Construct flows in parallel, without a leaf setPatrick Walton2014-02-241-66/+47
|
* layout: Combine assign-widths and assign-heights traversals.Patrick Walton2014-02-241-10/+2
| | | | 15% layout speedup on mobile Wikipedia.
* layout: Run assign-widths in parallel.Patrick Walton2014-02-241-19/+27
| | | | 5% layout speedup on mobile Wikipedia.
* auto merge of #1738 : saneyuki/servo/opt, r=kmcallisterbors-servo2014-02-241-1/+1
|\ | | | | | | I think gfx/opts.rs should be placed to more general place.
| * Move from gfx::opts to servo_util::opts.Tetsuharu OHZEKI2014-02-251-1/+1
| |
* | Implement JSManaged for DOM objects.Josh Matthews2014-02-241-11/+13
|/
* Shut down the profiler in headless compositing modePatrick Walton2014-02-201-1/+2
|
* Impl Basic support for object elementYoungmin Yoo2014-02-201-3/+4
|
* layout: Aggressively try to share styles with the last few nodes seen.Patrick Walton2014-02-141-0/+4
| | | | | | | This roughly implements the same cache found in Blink. 50% improvement on the rainbow page, but at the cost of reducing parallel gains down to nothing. I added a new page, `perf-rainbow-hard.html`, which disables the optimizations in both Blink and Servo.
* layout: Cache applicable-declarations-to-computed-values mappings.Patrick Walton2014-02-141-1/+4
| | | | | If the cache is hit, then we can only compute inherited properties. This is a WebKit optimization.
* layout: Implement basic style sharing.Patrick Walton2014-02-141-1/+9
| | | | | No improvement on the rainbow page, but necessary for some other optimizations we want to do.
* layout: Stop storing intermediate applicable declarations inside layoutPatrick Walton2014-02-141-1/+3
| | | | | | data. 9% improvement in style recalc on the rainbow page.
* Restore failure handlingKeegan McAllister2014-02-121-4/+9
| | | | | | | We probably leak some threads and resources, e.g. when the script task crashes and doesn't get a chance to send layout data back to layout to be deallocated. Not tested with iframes yet.