aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/inline.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Move arc_ptr_eq to style.Ms2ger2016-07-111-3/+3
|
* layout: text: Don't consider the ↵Emilio Cobos Álvarez2016-07-101-3/+5
| | | | | | | | | | | | | REQUIRES_LINE_BREAK_AFTERWARD_IF_WRAPPING_ON_NEWLINES if the fragment can wrap text. This was making us fall in a loop where the start split was empty, but we didn't ignore it because the current fragment had this flag, but then we treated it differently depending on the white_space property. Not totally sure this is the proper fix, but it makes sense to me. In case it is: Fixes #12369.
* Move util::print_tree to gfx_traitsAnthony Ramine2016-07-041-1/+1
|
* Pass SharedStyleContext to assign_inline_sizes.Ms2ger2016-06-221-1/+2
|
* Store SharedStyleContext in AbsoluteAssignBSizesTraversal.Ms2ger2016-06-221-1/+2
|
* Remove REPAINT damage in Fragment::build_display_listMatt Brubeck2016-06-201-6/+2
| | | | | | Previously, the code that called this function was responsible for this. Some code paths neglected to do it. This moves the damage removal to one central location.
* Move LayoutNode and related traits to script_layout_interface.Ms2ger2016-06-201-1/+1
|
* Introduce a script_layout_interface crate and move RestyleDamage to it.Ms2ger2016-06-201-1/+2
|
* Image with height defined in % resizes properlyDarin Minamoto2016-06-151-1/+2
|
* script: Keep the DOM-side viewport up to date when scrolling happens inPatrick Walton2016-05-311-1/+2
| | | | | | | | | | | | | | | WebRender. This happens asynchronously, just as it does in non-WebRender mode. This functionality is a prerequisite for doing proper display-list-based hit testing in WebRender, since it moves the scroll offsets into Servo (and, specifically, into the script thread, enabling iframe event forwarding) instead of keeping them private to WebRender. Requires servo/webrender_traits#55 and servo/webrender#277. Partially addresses #11108.
* Report use statements that use {} with only one entryCullen Rhodes2016-05-271-2/+2
|
* Make `text-align: justify` incremental layout safeUlf Nilsson2016-05-101-22/+8
|
* Remove redundant code in whitespace strippingMatt Brubeck2016-05-051-18/+3
| | | | | | LineBreaker calls Fragment::strip_trailing_whitespace_if_necessary and then recalculates the fragment's inline size. But this isn't necessary because strip_trailing_whitespace_if_necessary already recalculates the size.
* layout: Consider vertical alignment of fragments during line breaking.Patrick Walton2016-05-041-273/+151
| | | | | | | This makes the line breaker determine the final block positions of each line rather than doing it in a separate pass afterward. Not only does this simplify the code, it makes `vertical-align` and float placement interact properly.
* layout: Check flow descendants of inline block fragments to find theirPatrick Walton2016-05-041-1/+18
| | | | baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
* layout: Don't pretend inline fragment sizes are zero when placing themPatrick Walton2016-05-041-1/+1
| | | | between floats.
* Upgrade to bitflags 0.6.0 and selectors 0.5.6Matt Brubeck2016-04-301-1/+1
| | | | | Types generated by `bitflags!` are now private by default. This PR marks them `pub` where necessary.
* Auto merge of #10320 - malayaleecoder:master, r=KiChjangbors-servo2016-04-091-3/+3
|\ | | | | | | | | | | | | | | | | | | | | Rename imm_child_iter() and child_iter(). Fixes #10286 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10320) <!-- Reviewable:end -->
| * Rename imm_child_iter() and child_iter(). Fixes #10286malayaleecoder2016-04-091-3/+3
| |
* | Remove unused argument to adjust_clipping_region_for_childrenMatt Brubeck2016-04-071-2/+1
| |
* | Auto merge of #10407 - mauricioc:issue10403, r=bholleybors-servo2016-04-071-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move some CSS properties to match Gecko's representation Fixes #10403. Animation had an extra transition-delay property, which was also moved to Box. Let me know if I should squash the commits. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10407) <!-- Reviewable:end -->
| * | Move CSS text-overflow property from InheritedText to TextMauricio Collares2016-04-051-1/+1
| |/
* / Whitespace stripping should not result in a dangling, open border.Michael Howell2016-04-051-0/+2
|/
* layout: Propagate selected_style to InlineFragmentNodeInfoEmilio Cobos Álvarez2016-03-301-0/+1
|
* Renamed TComputedValues to ComputedValuesPer Lundberg2016-03-291-1/+1
| | | | This is a followup to #10210, and a continuation of #10185.
* Auto merge of #10210 - perlun:rename-computedvalues-to-servocomputedvalues, ↵bors-servo2016-03-291-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | r=SimonSapin ComputedValues is now ServoComputedValues This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10210) <!-- Reviewable:end -->
| * ComputedValues is now ServoComputedValuesPer Lundberg2016-03-271-4/+4
| | | | | | | | This is the first part of #10185. More to follow. I have built this locally with both servo and geckolib without errors; let's see if it succeeds on all platforms as well.
* | Restore stripped whitespace before reflowing text fragmentsMatt Brubeck2016-03-281-0/+3
|/ | | | Fixes #10200.
* Auto merge of #10176 - mbrubeck:selection-range, r=pcwaltonbors-servo2016-03-261-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Highlight selected text in input fields Fixes #9993. This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground. r? @pcwalton <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10176) <!-- Reviewable:end -->
| * Convert ScannedTextFragment fields into bitflagsMatt Brubeck2016-03-241-1/+1
| |
| * Highlight selected text in input fieldsMatt Brubeck2016-03-241-0/+1
| | | | | | | | | | Fixes #9993. This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.
* | Parameterize the rest of the style system on TNode.Bobby Holley2016-03-241-1/+1
|/
* Auto merge of #9969 - mbrubeck:quotes-036, r=pcwaltonbors-servo2016-03-121-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't re-resolve already-resolved generated content This fixes #7846, a failure in the "quotes-036.htm" test. Servo lays out this test correctly in its initial layout, but then messes it up in any relayout (whether it's an incremental or full layout). The problem is that the ResolveGeneratedContent traversal is not safe to run more than once on the same flow. It mutates some GeneratedContent fragments into ScannedText fragments, but leaves others unmodified (in particular, those that generate empty content). The next time layout runs, these remaining GeneratedContent fragments are processed *again* but with an incorrect correct quote nesting level (because some of the surrounding GeneratedContent fragments are gone). This patch ensures that each GeneratedContent fragment is resolved only once. r? @pcwalton <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9969) <!-- Reviewable:end -->
| * Don't re-resolve already-resolved generated contentMatt Brubeck2016-03-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes #7846, a failure in the "quotes-036.htm" test. Servo lays out this test correctly in its initial layout, but then messes it up in any relayout (whether it's an incremental or full layout). The problem is that the ResolveGeneratedContent traversal is not safe to run more than once on the same flow. It mutates some GeneratedContent fragments into ScannedText fragments, but leaves others unmodified (in particular, those that generate empty content). The next time layout runs, these remaining GeneratedContent fragments are processed *again* but with an incorrect correct quote nesting level (because some of the surrounding GeneratedContent fragments are gone). This patch ensures that each GeneratedContent fragment is resolved only once.
* | Fix work list order after split_line_at_last_known_good_positionMatt Brubeck2016-03-111-16/+14
|/ | | | | | | | | | | This fixes a bug in line splitting caused by the following actions when `LineBreaker::split_line_at_last_known_good_position` is called: 1. Push some number of previous fragments onto the front of the work list. 2. Push the current fragment back onto the front work list. This resulted in the work list being out of order. The correct order is action 2 followed by action 1. Fixes #9830.
* gfx: Stop cloning clipping regions so much.Patrick Walton2016-03-031-3/+4
| | | | Clipping regions can contain vectors and so can be expensive to copy.
* gfx: Box stacking contexts to minimize `memmove` traffic.Patrick Walton2016-03-031-1/+1
| | | | | | `memmove` was showing up high in the profile when concatenating and shorting display lists. This change drastically reduces the `memmove` cost in exchange for some minor additional allocation cost.
* Flatten display list structureMartin Robinson2016-03-011-3/+11
| | | | | | | | | | | | | | | | | | | | | | | Instead of producing a tree of stacking contexts, display list generation now produces a flat list of display items and a tree of stacking contexts. This will eventually allow display list construction to produce and modify WebRender vertex buffers directly, removing the overhead of display list conversion. This change also moves layerization of the display list to the paint thread, since it isn't currently useful for WebRender. To accomplish this, display list generation now takes three passes of the flow tree: 1. Calculation of absolute positions. 2. Collection of a tree of stacking contexts. 3. Creation of a list of display items. After collection of display items, they are sorted based upon the index of their parent stacking contexts and their position in CSS 2.1 Appendeix E stacking order. This is a big change, but it actually simplifies display list generation.
* Move util::range into its own crateJonathan Schuster2016-02-251-1/+1
|
* Auto merge of #9668 - glennw:inline-accuracy, r=pcwaltonbors-servo2016-02-181-2/+7
|\ | | | | | | | | | | | | | | | | | | Ensure when calculating font metrics that the total line height matches requested line height. This fixes rounding accuracy issues that could result in layout producing results off by a small number of Au. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9668) <!-- Reviewable:end -->
| * Ensure when calculating font metrics that the total line height matches ↵Glenn Watson2016-02-181-2/+7
| | | | | | | | | | | | requested line height. This fixes rounding accuracy issues that could result in layout producing results off by a small number of Au.
* | Move util::logical_geometry to styleAnthony Ramine2016-02-181-1/+1
|/
* layout: Separate out overflow-for-scrolling from overflow-for-paint.Patrick Walton2016-02-031-6/+6
| | | | Closes #9484.
* More aggressively remove Fragment RestyleDamageMartin Robinson2015-12-231-2/+11
| | | | | | | Now clean up damage on all fragments that belong to a Flow. This ensures that damage does not re-propagate up to the parent Flow from the Fragments. It also means that the flow tree dump should show a more accurate picture of the state of the flow tree.
* Replaced ZERO_RECT with Rect::zero()Alexander Mankuta2015-12-031-2/+1
|
* Improve readability of flow tree dumpMartin Robinson2015-11-231-15/+12
| | | | | | | Use the PrintTree utility to improve the readability of flow tree dumps. Blocks and fragments are now split over two dump levels, because otherwise they are impenetrable. Also start printing the restyle damage of fragments.
* Extend whitespace::T with additional helper methodsKeith Yeung2015-11-201-3/+3
|
* Remove dead code from layout.Ms2ger2015-11-181-10/+0
|
* Change overflow calculation to be calculated after compute_absolute_position.Glenn Watson2015-11-031-8/+1
| | | | | | Also include absolutely positioned elements in the overflow rect calculation. Fixes #7797.
* Implement calc expressions for more value typesDavid Zbarsky2015-11-011-3/+4
|