aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/inline.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename compute_absolute_position to compute_stacking_relative_positionMatt Brubeck2017-08-081-1/+1
|
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-4/+4
| | | | | | The alias is left there temporarilly and will be removed completely in a later commit where also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still use the old alias).
* stylo: Use ComputedValuesInner instead of ComputedValues when we don't need itManish Goregaokar2017-07-171-6/+6
|
* Removed unsused importHugh Gallagher2017-07-131-1/+1
|
* layout: Stop in-order on children of InlineFlowPu Xingyu2017-07-131-13/+2
| | | | | | No need to do in-order traversal for children of InlineFlow, since they are either inline-block or absolutely positioned elements, which are guaranteed to be block formatting context.
* Replace remaining usage of deprecated Range::step_bySimon Sapin2017-07-051-5/+21
| | | | … which is being removed in https://github.com/rust-lang/rust/pull/43012
* remove various things now that Rust 1.17 is requiredNathan Froyd2017-06-231-1/+1
| | | | | std::ptr::eq and Arc::ptr_eq are now usuable, and we can replace a panic!() with abort().
* Make BaseFlow::stacking_relative_position a vector.Nicolas Silva2017-06-141-5/+5
|
* Bump euclid to 0.14.Nicolas Silva2017-06-141-3/+3
|
* Auto merge of #16999 - bzbarsky:fix-text-overflow-handling, r=Manishearthbors-servo2017-05-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix stylo's text-overflow handling to match gecko. A single value sets the text-overflow on the _end_ of the text, not both start and end. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16999) <!-- Reviewable:end -->
| * Fix stylo's text-overflow handling to match gecko.Boris Zbarsky2017-05-231-1/+1
| | | | | | | | A single value sets the text-overflow on the _end_ of the text, not both start and end.
* | [gfx] [layout] [style] Upgrade unicode-bidi to 0.3Behnam Esfahbod2017-05-221-12/+15
|/
* Update app_units to 0.4.1Manish Goregaokar2017-05-191-2/+2
|
* Fix up script and layout.Bobby Holley2017-05-021-5/+5
|
* layout: Merge inline nodes based on node address, not node style.Emilio Cobos Álvarez2017-03-111-1/+1
|
* layout: Reflow some code and comments in layout/inline.rsEmilio Cobos Álvarez2017-03-111-32/+53
|
* Remove cached thread local context from LayoutContextPu Xingyu2017-02-081-4/+3
| | | | | Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
* Auto merge of #14978 - shinglyu:inline-flex, r=notriddlebors-servo2017-01-221-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented display: inline-flex <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #14685 (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14978) <!-- Reviewable:end -->
| * Implemented display: inline-flexShing Lyu2017-01-231-0/+2
| |
* | Preserve the un-truncated version of fragmentsMichael Howell2017-01-121-15/+10
| | | | | | | | Fixes #14952
* | Do not replace an ellipsis when reflowing a lineMichael Howell2017-01-121-0/+11
| | | | | | | | The ellipsis should be replaced, if needed, when the text itself is reflowed.
* | Rework the way scroll roots are collectedMartin Robinson2017-01-101-6/+3
|/ | | | | | | | | | | | Collect scroll roots during the collect_stacking_context phase instead of during display list construction. This will be useful in order to collect containing block scroll roots as well as to give scroll roots sequential ids in the future. This change also pulls stacking context children out of the StackingContext struct itself, which should reduce very slightly the memory used by the finished display list. This also simplifies the DisplayListBuilder because it no longer has to maintain a stack of ScrollRootIds and StackingContextIds and can instead just rely on the program stack.
* layout: Remove get_font_arc in favor of clone_font.Emilio Cobos Álvarez2016-12-311-2/+2
| | | | Since they do the same.
* Make the DomTraversalContext own the SharedStyleContext and share it ↵Bobby Holley2016-12-161-1/+1
| | | | | | | | | | immutably across the traversal. This allows us to get rid of a bunch of lifetimes and simplify a lot of code. It also lets us get rid of that nasty lifetime transmute, which is awesome. The situation with thread-local contexts is still suboptimal, but we fix that in subsequent patches.
* Remove unused replaced size calculation methodsPu Xingyu2016-12-121-3/+1
| | | | | Remove some fields and methods from SpecificFragmentInfo and change some function signatures.
* implemented string-valued text-overflowNikhil Shagrithaya2016-11-101-13/+24
|
* Stop using associated types for the concrete TRestyleDamage implementation.Bobby Holley2016-11-071-2/+1
| | | | MozReview-Commit-ID: LfaZFCVlIb1
* Migrated -Z trace-layout to serde_jsonShing Lyu2016-11-071-6/+6
|
* Make `FlowRef` a newtypeMichael Howell2016-11-041-6/+6
| | | | | | | | | | | | | This creates a sharp distinction between `Arc<Flow>`s, which may be owned by anyone, and `FlowRef`s, which may only be owned by the traversal code. By checking the reference count, we ensure that a `Flow` cannot be pointed to by `Arc`s and `FlowRef`s simultaneously. This is not a complete fix for #6503, though it is a necessary start (enforcing the no-aliasing rule of `FlowRef::deref_mut` will require far more work). Fixes #14014
* Use a new id type for tracking scrolling areasMartin Robinson2016-10-301-2/+5
| | | | | | This is a step in disassociating scrolling areas from stacking contexts. Now scroll areas are defined by unique ids, which means that in the future stacking context will be able to contain more than one.
* Remove old rendering backend.Glenn Watson2016-10-181-6/+0
| | | | | | | | | | | | | | This removes paint threads, rust-layers dependency, and changes optional webrender types to be required. The use_webrender option has been removed, however I've left the "-w" command line option in place so that wpt runner can continue to pass that. Once it's removed from there we can also remove the -w option. Once this stage is complete, it should be fine to change the display list building code to generate webrender display lists directly and avoid the conversion step.
* layout: Rewrite clipping to be a two-phase process that takes physicalPatrick Walton2016-10-151-10/+12
| | | | | | | | | | | | | | | | | | border box positions and transforms into account. Clipping region computation now follows a simple process: (1) in the parent's coordinate system, parents store appropriate clipping regions into children; (2) each child moves its clipping region to its own coordinate system if necessary. Because clipping region computation is now based on stacking-relative border box positions and the `transform_rect` method, it can handle `position: relative` offsets and more types of transforms, such as scaling. Improves etsy.com. Closes #13753.
* layout: Rewrite Servo's `vertical-align` support to match CSS 2.1 §Patrick Walton2016-10-111-242/+193
| | | | | | | | | | | | | | | | | 10.8, and implement `vertical-align: middle` per CSS 2.1 § 10.8.1. `InlineMetrics` has been split into `InlineMetrics` for fragments and `LineMetrics` for lines. Both structures' fields have been renamed in order to more clearly delineate the difference between *space* and *content*. Vertical positioning of fragments has been reworked to take margins and borders into account only for replaced content. This patch fixes the `vertical_align_super_a.html` reftest. Servo now matches the rendering that Gecko and WebKit produce. Additionally, this includes a test for the popular inline-block centering technique described here: https://s.codepen.io/shshaw/fullpage/gEiDt?#Inline-Block
* layout: Place inline absolute hypothetical boxes properly during blockPatrick Walton2016-10-041-40/+96
| | | | | | | | fragment position assignment. Improves Rust documentation. Closes #13471.
* Auto merge of #13401 - notriddle:master, r=pcwaltonbors-servo2016-09-291-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement sequential fallback to float speculation This shouldn't impact any pages that are already rendering correctly, but it is a very naive implementation of this pass. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13284 and fix #13223 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13401) <!-- Reviewable:end -->
| * Implement sequential fallback to float speculationMichael Howell2016-09-271-1/+4
| | | | | | | | | | Fixes #13284 Fixes #13223
* | Auto merge of #13417 - mrobinson:simplify-stacking-context-collection, r=glennwbors-servo2016-09-291-6/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify stacking context collection <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Simplify the way that stacking contexts are collected. Instead of passing the StackingContextId down the tree, pass the parent StackingContext itself. This will allow future patches to get more information about the parent stacking context (such as location). Also remove the return value of collect_stacking_contexts, which was unused. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13417) <!-- Reviewable:end -->
| * | Simplify stacking context collectionMartin Robinson2016-09-271-6/+2
| |/ | | | | | | | | | | | | | | | | | | Simplify the way that stacking contexts are collected. Instead of passing the StackingContextId down the tree, pass the parent StackingContext itself. This will allow future patches to get more information about the parent stacking context (such as location). Also remove the return value of collect_stacking_contexts, which was unused.
* | Auto merge of #13470 - pcwalton:inline-absolute-hypothetical-baseline, ↵bors-servo2016-09-291-6/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | r=notriddle layout: Improve the interaction between baseline-offset-of-last-line-in-flow logic and inline absolute hypothetical boxes. See commits for details. These changes place the heart icon on Twitter in the right place. r? @notriddle <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13470) <!-- Reviewable:end -->
| * layout: Remove a stray newline.Patrick Walton2016-09-281-1/+0
| |
| * layout: Don't count lines that consist solely of hypothetical boxes whenPatrick Walton2016-09-281-5/+8
| | | | | | | | | | | | | | determining the baseline offset of the last line. Improves Twitter by placing the favorite icon in the right place vertically.
* | layout: Add a `REPOSITION` restyle damage type.Patrick Walton2016-09-261-2/+4
|/ | | | | | Separating out `REPOSITION` from `REPAINT` allows us to compute stacking-context-relative positions without rebuilding the display list. This saves a lot of time when responding to script-to-layout queries.
* Reorder `use` statementsUK9922016-09-091-5/+5
|
* Pass SharedLayoutContext to Flow::compute_absolute_position.Ms2ger2016-08-241-2/+2
|
* do not merge inline fragments if there is space in betweenAlexandrov Sergey2016-08-111-0/+4
|
* reset border_padding between, account for border_padding in border_box and ↵Alexandrov Sergey2016-08-081-1/+17
| | | | reset *_FRAGMENT_OF_ELEMENT flag for splitted fragments
* Remove some type aliases that are now just re-exports.Simon Sapin2016-07-201-2/+1
|
* Remove the ComputedValue traits and style_struct_traitsSimon Sapin2016-07-201-1/+1
|
* 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.