aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/main/layout/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
* Split layout code into a separate crate.Josh Matthews2014-06-281-1078/+0
|
* Make move mutation out of compute_minimum_ascent_and_descentBrendan Zabarauskas2014-06-201-1/+3
|
* Upgrade Rust.Jack Moffitt2014-06-051-3/+3
|
* layout: Reference count flows, and forbid unsafe code in many places.Patrick Walton2014-06-031-118/+114
|
* Remove last methods from InlineFragmentMapBrendan Zabarauskas2014-06-021-2/+2
|
* Remove the need to destructure InlineFragmentsBrendan Zabarauskas2014-06-021-66/+5
| | | | We do this by moving InlineFragmentMap::fixup into InlineFragments
* Rename `box_.rs` to `fragment.rs`Brendan Zabarauskas2014-05-281-3/+3
|
* Rename functions, fields and adjust comments to use `fragment` instead of `box`Brendan Zabarauskas2014-05-281-137/+138
| | | | I tried to make sure to keep 'box' where it made sense, and alter comments so they still make sense.
* Convert usages of `Box` in type identifiers to `Fragment`Brendan Zabarauskas2014-05-281-109/+107
|
* Make ComputedStyle fields private and add getters.Simon Sapin2014-05-231-3/+3
| | | | This isolates layout code from upcoming refactoring in properties.rs.mako.
* Update Rust.Ms2ger2014-05-221-25/+26
|
* auto merge of #2411 : glennw/servo/issue-2335, r=pcwaltonbors-servo2014-05-221-3/+5
|\
| * Potential fix for #2335.Glenn Watson2014-05-221-3/+5
| |
* | Remove OptNewVector and use Vec instead.Simon Sapin2014-05-141-123/+57
| | | | | | | | | | | | Before we had Vec<T>, Option<~[T]> was used as an optimization of ~[T] to avoid allocating for empty vectors when that was the common case. Vec<T> itself does this optimization, so there is no need for this anymore.
* | Use fragment index type for referring to inline DOM fragmentsBrendan Zabarauskas2014-05-131-4/+4
|/
* Require Range<T> to have a signed integer TBrendan Zabarauskas2014-05-071-2/+2
| | | | This allows for generic +ve/-ve offsets
* Make range genericBrendan Zabarauskas2014-05-071-1/+1
|
* auto merge of #2337 : bjz/servo/smallvec, r=pcwaltonbors-servo2014-05-051-2/+1
|\ | | | | | | | | | | | | | | We can't replace the ones in the `style` crate because some functions expect generic `SmallVec`s. I also did some reorganisation of the `smallvec` macros. cc @pcwalton
| * Replace most of the SmallVec0 usages with std::vec::VecBrendan Zabarauskas2014-05-051-2/+1
| | | | | | | | We can't replace the ones in the `style` crate because some functions expect generic `SmallVec`s.
* | Remove OptVector.Ms2ger2014-05-051-63/+0
|/
* Convert Vec::new() to vec!()Matt Murphy2014-05-041-5/+5
|
* ~[] to Vec in main/layout/construct.rs and associated filesMatt Murphy2014-05-041-2/+54
|
* ~[] to std::vec::Vec in layoutMatt Murphy2014-05-041-8/+8
|
* Replace most ~"string"s with "string".to_owned().Ms2ger2014-05-041-1/+1
|
* Remove JS::get/get_mut to enforce sound rooting practices.Josh Matthews2014-05-031-3/+2
|
* layout: Rewrite display list building to be parallel and to handlePatrick Walton2014-05-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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-237/+202
| | | | | | | | | | | | | 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-12/+12
| | | | | | 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.
* fixup! Rename ElementType to PseudoElementType, to avoid confusion with ↵Simon Sapin2014-04-141-1/+1
| | | | ElementTypeId.
* Rename ElementType to PseudoElementType, to avoid confusion with ElementTypeId.Simon Sapin2014-04-141-3/+3
|
* auto merge of #2071 : hyunjunekim/servo/try, r=larsbergstrombors-servo2014-04-111-0/+3
|\ | | | | | | If <span> element has pseudo style, draw pseudo element.
| * inline pseudo elementhyunjunekim2014-04-091-0/+3
| |
* | fix visibility warnings in main crate (#2044)Manish Goregaokar2014-04-061-3/+3
|/
* Upgrade rust.Ms2ger2014-04-041-16/+16
|
* layout: Address review feedback.Patrick Walton2014-04-031-48/+57
|
* layout: Implement pseudo-elements.Hyun June Kim2014-04-031-105/+152
|
* layout: Support multiple boxes per node; don't store fixed/absolutePatrick Walton2014-04-031-62/+67
| | | | descendant links separately
* Support a part of anonymous table(step 1-1, 1-2, 2).Junyoung Cho2014-03-241-35/+82
| | | | | Not Covered: step 1-3, 1-4, 3-1, 3-2 *Spec: http://www.w3.org/TR/CSS21/tables.html#anonymous-boxes
* Construct table-related flow and calculate fixed layoutJunyoung Cho2014-03-241-27/+245
|
* auto merge of #1867 : saneyuki/servo/1828, r=pcwaltonbors-servo2014-03-201-2/+2
|\ | | | | | | Fix #1828
| * Change from TNode/TElement::with_element() to as_element().Tetsuharu OHZEKI2014-03-211-2/+2
| |
* | Split TCast::to into TCast::to_unchecked and TCast::to.Tetsuharu OHZEKI2014-03-201-1/+1
|/
* Rust upgradesLars Bergstrom2014-03-181-12/+12
|
* Implement `position: absolute` for replaced elements.S Pradeep Kumar2014-03-041-0/+11
| | | | Add reftests for replaced and nested absolute flows.
* Implement mini-traversal for absolute flow assign-height.S Pradeep Kumar2014-03-031-40/+94
| | | | | | | | | | | | | | 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-11/+11
| | | | | | | | | | | + 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.
* auto merge of #1781 : hgentry/servo/mozilla-servo, r=metajackbors-servo2014-02-281-2/+2
|\ | | | | | | | | Simple change. I hope I'm using github correctly; I'm not too familiar with the PR system. Fixes #1777.
| * Renamed HTMLIframeElementTypeId to HTMLIFrameElementTypeIdhgentry2014-02-271-2/+2
| |
* | layout: Rewrite the float context.Patrick Walton2014-02-261-5/+5
|/ | | | | | This rewrites the float context to avoid dynamic failures resulting from `.clone()` misuse. It also renames the float context to the simpler `Floats`. The new version is modeled on WebKit's `FloatingObjects`.
* layout: Construct flows in parallel, without a leaf setPatrick Walton2014-02-241-40/+41
|