aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/inline.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Add unsafe blocks to make_uniqueManish Goregaokar2015-06-141-3/+4
| | | | See #6376
* rust-geom API changesCorey Farwell2015-06-131-1/+1
| | | | https://github.com/servo/rust-geom/pull/81
* Auto merge of #6328 - mbrubeck:line-comment, r=pcwaltonbors-servo2015-06-101-1/+1
|\ | | | | | | | | | | | | | | r? @pcwalton <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6328) <!-- Reviewable:end -->
| * Fix indices in Line::range doc commentMatt Brubeck2015-06-101-1/+1
| |
* | Audit and reduce unstable usage in layoutManish Goregaokar2015-06-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons behind existing unstable features: alloc: - `make_unique()` - direct calls into `heap::allocate()`, etc - `boxed::into_raw()` (naming) collections: - `slice_chars()` (needs to prove its worth) core: - lots and lots of pointer manip - `raw` stuff std_misc: - Handle stuff - hasher stuff str_char: - CharRange
* compositing: Implement display ports and avoid creating display listsPatrick Walton2015-05-191-4/+10
| | | | | | for items outside it. This improves Servo's performance on large pages.
* layout: Support percentage widths in inline-blocks.Patrick Walton2015-05-191-1/+2
| | | | Improves Twitter.
* Use the correct writing mode for Floats fieldsMatt Brubeck2015-05-181-1/+2
| | | | Fixes #6113 (assertion failures caused by floats in mixed-direction pages).
* Skip empty fragments when justifying inline fragments.Kevin Butler2015-05-181-14/+11
| | | | Fixes #5856
* Remove an unused import.Ms2ger2015-05-141-1/+1
|
* layout: Minor whitespace and formatting cleanups.Patrick Walton2015-05-131-1/+2
|
* layout: Allow inline elements to be containing blocks forPatrick Walton2015-05-131-4/+118
| | | | | | | | | | absolutely-positioned elements. This also implements a little bit of the infrastructure needed to support for fragmentation via support for multiple positioned fragments in one flow. Improves Google.
* layout: Support block-direction margins for inline-blocks.Patrick Walton2015-05-111-3/+8
| | | | Improves linux.com.
* layout: Implement `<table width>` and `<center>`.Patrick Walton2015-05-111-1/+1
| | | | Improves Hacker News.
* layout: Support `vertical-align` for inline-blocks.Patrick Walton2015-05-081-5/+7
| | | | Improves Twitter.
* layout: Implement inline margins.Patrick Walton2015-05-071-14/+18
| | | | | | | | | Improves the Google SERPs. We mark `html/rendering/replaced-elements/images/space.html` as failing. This test tested whether `<img hspace>` and inline margins do the same thing. Since this was trivially the case before (since we implemented neither) and now is not, this test now fails.
* Rename Au methods with f32/f64 instead of frac32/frac/subpxSimon Sapin2015-05-051-1/+1
|
* Replace Au-related free functions in util::geometry with Au methods.Simon Sapin2015-05-051-6/+6
|
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-7/+5
|
* Various fixes to getClientBoundingRect()Glenn Watson2015-05-011-9/+21
| | | | | | | | | * Fix queries involving stacking contexts * The code was double accumulating stacking context origins. * Handle queries of inline elements. * The node addresses being compared were incorrect (CharacterData vs. Span) * Handle ScriptQuery reflows correctly. * The layout task was skipping the compute absolute positions traversal, so failed before window.onload.
* Fix text-align left/right in RTL layoutMatt Brubeck2015-04-291-5/+13
|
* Support `text-align: start` and `end`Matt Brubeck2015-04-291-2/+2
|
* Implement Clone for Copy types.Ms2ger2015-04-281-1/+1
|
* Address review commentsPatrick Walton2015-04-271-3/+4
|
* layout: Implement most of `border-collapse` per CSS 2.1 § 17.6.2.Patrick Walton2015-04-271-4/+4
| | | | | | | | | | | | | | | | Known issues: * Collapsed borders do not correctly affect the border-box of the table itself. * The content widths of all cells in a column and the content height of all cells in a row is the same in this patch, but not in Gecko and WebKit. * Corners are not painted well. The spec does not say what to do here. * Column spans are not handled well. The spec does not say what to do here either.
* Remove some as_slice calls.Ms2ger2015-04-241-1/+1
|
* Auto merge of #5805 - pcwalton:whitespace-effect-on-minimum-inline-sizes, ↵bors-servo2015-04-221-4/+41
|\ | | | | | | | | | | | | | | | | | | | | | | r=glennw Improves Amazon. r? @glennw <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5805) <!-- Reviewable:end -->
| * layout: Take the `white-space` property into account when computingPatrick Walton2015-04-221-4/+41
| | | | | | | | | | | | intrinsic sizes of inline flows. Improves Amazon.
* | Stop using the deprecated range function.Ms2ger2015-04-221-4/+4
|/
* layout: Use the same code path for computing static positions of regularPatrick Walton2015-04-141-6/+1
| | | | | | | | | | | | | | | | | | | | | | | flows and static positions of hypothetical boxes. Before this change, Servo used one code path that computed the position of flows with `position: static` or `position: relative` and another separate code path that computed the position of flows with `position: absolute` or `position: fixed`. The latter code attempted to duplicate the former code to determine the static position of hypothetical boxes, but this was both fragile and incorrect in the case of hypothetical boxes nested inside floats. In fact, it's impossible to determine the static position of an absolute flow relative to its containing block at inline-size assignment time, because that static position could depend on a float that cannot be placed until block-size assignment! This patch changes block layout to use the same code path for static positioning of regular flows and static positioning of absolute flows where applicable. This both simplifies the code and improves its efficiency, since it allows the `hypothetical_position` field and `static_block_offsets` data structure to be removed. Moreover, it improves correctness in the above case (which the new reftest checks). This allows the sidebar in Facebook Timeline to be positioned properly.
* Remove unneeded assert (code below handles it) and a warning. Fixes #5230.Glenn Watson2015-04-101-1/+0
|
* Auto merge of #5623 - pcwalton:nested-inline-vertical-align, r=glennwbors-servo2015-04-091-56/+102
|\ | | | | | | | | | | | | This allows things like `<sup><span>Foo</span></sup>` to work and improves Wikipedia. r? @glennw
| * layout: Lay out nested inline elements with different `vertical-align`Patrick Walton2015-04-091-56/+102
| | | | | | | | | | | | | | values properly in simple cases. This allows things like `<sup><span>Foo</span></sup>` to work and improves Wikipedia.
* | layout: During inline layout, make `place_between_floats` use the samePatrick Walton2015-04-091-17/+71
|/ | | | | | line height computation logic as final block size assignment. Improves Wikipedia.
* layout: Simplify and improve the correctness of whitespace stripping inPatrick Walton2015-04-081-173/+183
| | | | | | | | | text layout, and unify the inline layout paths for pre- and normally-formatted text. This fixes a lot of "jumpiness" and removes the `new_line_pos` stuff. Closes #2260.
* Use usize for indices into InlineFragments.Ms2ger2015-04-021-3/+3
|
* Use isize for FragmentIndex.Ms2ger2015-04-021-3/+3
|
* Use isize/usize in range.Ms2ger2015-03-281-5/+5
|
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-1/+1
|
* auto merge of #5268 : mbrubeck/servo/append, r=jdmbors-servo2015-03-181-2/+2
|\ | | | | | | The new `Vec::append` method is clearer and potentially faster.
| * Use `append` instead of `extend` where possibleMatt Brubeck2015-03-181-2/+2
| | | | | | | | The new `Vec::append` method is clearer and potentially faster.
* | Fixes positioning of inline blocks that generate stacking contexts.Glenn Watson2015-03-191-1/+1
|/
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-5/+5
|
* layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1Patrick Walton2015-03-091-4/+17
| | | | | | | | | | | | | | § 12.3-12.5. Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases.
* Keep track of the containing block writing mode.Matt Brubeck2015-03-091-0/+6
| | | | | This is necessary for correctly converting `relative_containing_block_size` to physical coordinates.
* Layout fixes for RTL child flows in LTR parentsMatt Brubeck2015-03-091-0/+2
| | | | | | | | | ...and vice-versa. This is not a complete fix for all mixed-direction layout cases, but it fixes enough problems to make some simple test cases pass, like tha attached reftest. There are FIXME comments for many of the remaining issues. In particular, this does not yet handle RTL layout of fixed/absolute elements.
* Get rid of servo_utilDan Fox2015-03-051-4/+4
|
* Revert "layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1"Simon Sapin2015-03-031-18/+4
| | | | This reverts commit 30fd28d1077fbb3f47140f6ab1252c0d24f44d23.
* auto merge of #5067 : servo/servo/counters, r=SimonSapinbors-servo2015-03-031-4/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases. Moved from #4544, because Critic. Fixes #4544.
| * layout: Implement ordered lists, CSS counters, and `quotes` per CSS 2.1Patrick Walton2015-03-031-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | § 12.3-12.5. Only simple alphabetic and numeric counter styles are supported. (This is most of them though.) Although this PR adds a sequential pass to layout, I verified that on pages that contain a reasonable number of ordered lists (Reddit `/r/rust`), the time spent in generated content resolution is dwarfed by the time spent in the parallelizable parts of layout. So I don't expect this to negatively affect our parallelism expect perhaps in pathological cases.