aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/inline.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* | layout: Implement `overflow-x` and `overflow-y` per CSS-OVERFLOW § 3.Patrick Walton2015-03-031-3/+3
|/ | | | Fragmentation is not yet supported.
* layout: Add an option to visualize parallel layoutPatrick Walton2015-02-201-1/+2
|
* Upgrade to rustc ba2f13ef0 2015-02-04Simon Sapin2015-02-111-3/+3
|
* Fix 'inline-block' sizing issuesMatthew Rasmus2015-02-021-5/+8
| | | | Fixes #3624
* auto merge of #4757 : servo/servo/newnewnewcss, r=mbrubeckbors-servo2015-01-301-1/+1
|\ | | | | | | | | | | (Still off by default. Enable with `RUST_LOG=style`.) r? @mbrubeck
| * End the libstyle 'pub use' madness.Simon Sapin2015-01-301-1/+1
| |
* | layout: Fix warnings.Patrick Walton2015-01-301-3/+3
|/
* layout: Implement `text-align: justify` and `text-justify` perPatrick Walton2015-01-291-23/+127
| | | | | | | | | | | CSS-TEXT-3 § 7.3. `text-justify: distribute` is not supported. The behavior of `text-justify: none` does not seem to match what Firefox and Chrome do, but it seems to match the spec. Closes #213.
* layout: Implement `text-overflow: ellipsis` per CSS-UI-3 § 6.2.Patrick Walton2015-01-281-41/+72
| | | | Only the one-value syntax is supported for now.
* Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.Josh Matthews2015-01-281-22/+24
|
* Stop calling deref() and deref_mut() explicitly.Ms2ger2015-01-221-2/+2
|
* Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.Ms2ger2015-01-081-23/+23
|
* layout: Explicitly thread border box dimensions and relative offsetsPatrick Walton2015-01-041-72/+34
| | | | | | | | | | through display list building. The old `flow_origin` concept was ill-defined (sometimes the border box plus the flow origin, sometimes including horizontal margins and sometimes not, sometimes including relative position and sometimes not), leading to brittleness and test failures. This commit reworks the logic to always pass border box origins in during display list building.
* layout: Paint stacking contexts' overflow areas properly.Patrick Walton2015-01-041-4/+12
| | | | | This was making `box-shadow` not show up in many cases, in particular, but the effects were not limited to that.
* Fix obsolete format traits.Ms2ger2015-01-021-1/+1
| | | | They are to be removed from the language in the next rust upgrade.
* gfx: Clip the background properly when `border-radius` is used.Patrick Walton2014-12-221-5/+5
| | | | Improves Reddit, GitHub, etc.
* layout: Implement `clip` per CSS 2.1 § 11.1.2.Patrick Walton2014-12-181-2/+2
| | | | Only the recommended, comma-separated syntax is supported.
* Simplify util::range::RangeIndex to always require std::num::Int,Simon Sapin2014-12-181-1/+1
| | | | and fix remaining warnings.
* Remove usage of the deprecated std::num::Zero trait.Simon Sapin2014-12-181-4/+3
|
* Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.Ms2ger2014-12-171-18/+18
|
* layout: Make line breaking able to restart from any position.Patrick Walton2014-12-141-68/+88
| | | | | | | | | | This commit removes the "merge-fragments" pass from inline reflow, instead merging "on the fly". This ended up being simpler, as well as more fine grained. Additionally, this patch makes the line breaker no longer clone every fragment (!) This functionality will be used in the implementation of `text-overflow`.
* layout: Implement `overflow-wrap`/`word-wrap` per CSS-TEXT § 6.2.Patrick Walton2014-12-131-7/+6
| | | | | | | | | This property is used by approximately 55% of page loads. To implement the line breaking behavior, the "breaking strategy" has been cleaned up and abstracted. This should allow us to easily support other similar properties in the future, such as `text-overflow` and `word-break`.
* layout: Implement `text-indent` per CSS 2.1 § 16.1.Patrick Walton2014-12-121-21/+53
| | | | | | | | | | I had to use a somewhat unconventional method of computing text indentation (propagating from blocks down to inlines) because of the way containing blocks are handled in Servo. (As a side note, neither Gecko nor WebKit correctly handles percentages in `text-align`, at least incrementally -- i.e. when the percentages are relative to the viewport and the viewport is resized.)
* layout: Refactor inline layout a bit.Patrick Walton2014-12-121-198/+196
|
* Fix spelling mistakes in comments.Joseph Crail2014-12-111-2/+2
|
* Make all of LineBreaker privateMatt Brubeck2014-12-091-9/+9
|
* layout: Implement `opacity` per CSS-COLOR § 3.2.Patrick Walton2014-12-031-11/+10
| | | | | | | | | This adds the infrastructure necessary to support stacking contexts that are not containing blocks for absolutely-positioned elements. Our infrastructure did not support that before. This minor revamp actually ended up simplifying the logic around display list building and stacking-relative position computation for absolutely-positioned flows, which was nice.
* layout: Incrementalize reflow of block formatting contexts impacted byPatrick Walton2014-11-181-2/+2
| | | | | | | | floats, and make float placement idempotent. This moves float placement outside sequential block size computation. Improves the maze solver.
* layout: Eliminate the virtual `is_float()` in favor of the flow flagsPatrick Walton2014-11-181-1/+2
|
* Remove bitfield! macro in favour of bitflags!Claes 'Letharion' Gyllensvärd2014-11-181-1/+2
|
* gfx: Rewrite display list construction to make stacking-contexts morePatrick Walton2014-11-141-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | first-class. This implements the scheme described here: https://groups.google.com/forum/#!topic/mozilla.dev.servo/sZVPSfPVfkg This commit changes Servo to generate one display list per stacking context instead of one display list per layer. This is purely a refactoring; there are no functional changes. Performance is essentially the same as before. However, there should be numerous future benefits that this is intended to allow for: * It makes the code simpler to understand because the "new layer needed" vs. "no new layer needed" code paths are more consolidated. * It makes it easy to support CSS properties that did not fit into our previous flat display list model (without unconditionally layerizing them): o `opacity` should be easy to support because the stacking context provides the higher-level grouping of display items to which opacity is to be applied. o `transform` can be easily supported because the stacking context provides a place to stash the transformation matrix. This has the side benefit of nicely separating the transformation matrix from the clipping regions. * The `flatten` logic is now O(1) instead of O(n) and now only needs to be invoked for pseudo-stacking contexts (right now: just floats), instead of for every stacking context. * Layers are now a proper tree instead of a flat list as far as layout is concerned, bringing us closer to a production-quality compositing/layers framework. * This commit opens the door to incremental display list construction at the level of stacking contexts. Future performance improvements could come from optimizing allocation of display list items, and, of course, incremental display list construction.
* Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8aJack Moffitt2014-11-131-12/+12
|
* Have ContentBox(es)Queries consult the flow treeMartin Robinson2014-11-031-8/+13
| | | | | | | | | Instead of looking at the display tree, have ContentBox(es)Query consult the flow tree. This allow optimizing away parts of the display tree later. To do this we need to be more careful about how we send reflow requests, only querying the flow tree when possible. Fixes #3790.
* layout: Make incremental reflow more fine-grained by introducing "reflowPatrick Walton2014-10-311-0/+13
| | | | | | out-of-flow" and "reconstruct flow" damage bits. This is needed for good performance on the maze solver.
* layout: Promote absolute positioning, floatedness, and clearance intoPatrick Walton2014-10-281-4/+3
| | | | | | flags to avoid virtual calls. These were showing up really high in the maze solver profile.
* layout: Use the new `append_from` method to get rid of a bunch of movesPatrick Walton2014-10-281-4/+4
| | | | | | in display list construction. These were showing up in the profile.
* Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms.Glenn Watson2014-10-241-2/+2
|
* layout: Shrink fragments down from 448 bytes down to 128 bytes.Patrick Walton2014-10-231-15/+19
| | | | 16% performance improvement in layout (!)
* auto merge of #3771 : pcwalton/servo/display-list-building-cleanup, r=mrobinsonbors-servo2014-10-221-38/+44
|\ | | | | | | | | | | `layout::fragment` and `layout::block` were getting too big. r? @mrobinson
| * layout: Largely move display list building out to a separate file.Patrick Walton2014-10-221-38/+44
| | | | | | | | `layout::fragment` and `layout::block` were getting too big.
* | properly incrementally set block sizeClark Gaebel2014-10-211-2/+2
|/
* layout: Rewrite text and inline fragment handling during flowPatrick Walton2014-10-201-52/+0
| | | | | | | construction to avoid cloning and moving flows so much. Besides amounting to a 5%-10% win on a page with a lot of text, this simplifies and refactors the text layout code.
* Fixed the inline_element_border_a reftest with incremental layout turned on.Clark Gaebel2014-10-171-39/+20
|
* Fix image_dynamic_remove reftest with incremental layout turned outClark Gaebel2014-10-171-5/+29
| | | | | | | | This also adds some extra debugging infrastructure which I found useful tracking this bug down. A regression in the br reftests is also uncovered by this patch, which I'll work on fixing next. r? @pcwalton
* layout: Remove `FontStyle` in favor of using the font style structPatrick Walton2014-10-151-4/+4
| | | | | | directly, and optimize `get_layout_font_group()` to use a small vector. Seems to be a 38% layout win on a site I tested with a lot of text.
* Fix whitespace_pre with incremental reflow turned on.Clark Gaebel2014-10-151-12/+93
| | | | | | This implements fragment merging, in order to incrementally reflow linebroken text. This makes the `whitespace_pre.html` reftest pass with incremental reflow turned on with `-i`.
* Use the Deref traits for FlowRefs.Clark Gaebel2014-10-151-5/+5
| | | | | This patch switches FlowRefs to using the Deref and DerefMut traits, instead of the custom `get` and `get_mut` functions.
* layout: Rewrite intrinsic inline-size and automatic table layout toPatrick Walton2014-10-141-18/+9
| | | | | | | | | | | match L. David Baron's work-in-progress specification. http://dbaron.org/css/intrinsic/ Column spans are not yet supported. This effectively adds support for percentage widths, and it also fixes many bugs, improving the layout of Google and Wikipedia.
* layout: Introduce support for legacy presentational attributes to selectorPatrick Walton2014-10-141-2/+2
| | | | | | | | matching, and use it for `<input size>` and `<td width>`. This implements a general framework for legacy presentational attributes to the DOM and style calculation, so that adding more of them later will be straightforward.
* auto merge of #3654 : pcwalton/servo/clip-reform, r=mrobinsonbors-servo2014-10-141-12/+37
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We push down clipping areas during absolute position calculation. This makes display items into a flat list, improving cache locality. It dramatically simplifies the code all around. Because we need to push down clip rects even for absolutely-positioned children of non-absolutely-positioned flows, this patch alters the parallel traversal to compute absolute positions for absolutely-positioned children at the same time it computes absolute positions for other children. This doesn't seem to break anything either in theory (since the overall order remains correct) or in practice. It simplifies the parallel traversal code quite a bit. See the relevant Gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=615734 r? @mrobinson