aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove extra spaces in function calls and declarationsDaan Sprenkels2016-10-311-1/+1
|
* Move core pseudo-element handling to ThreadSafeLayoutElement.Bobby Holley2016-10-281-13/+11
|
* Eliminate untraversed node types from LayoutNodeType.Bobby Holley2016-10-271-12/+0
| | | | MozReview-Commit-ID: 926ReI1BSsf
* layout: Minor style cleanup.Patrick Walton2016-10-261-7/+14
|
* layout: Use the new `style_for_anonymous_box()` function for thePatrick Walton2016-10-261-2/+3
| | | | anonymous text child of `<input>`.
* layout: Remove the old anonymous table object generation code.Patrick Walton2016-10-261-84/+0
|
* layout: Rewrite the anonymous table object generation code.Patrick Walton2016-10-261-67/+261
| | | | | | | | | | | This patch introduces a "legalizer", which encapsulates all the anonymous flow generation logic in one place. The legalizer knows how to, for example, place adjacent blocks with `display: table-cell` in the same table row. Improves etsy.com. Closes #13782.
* layout: Refactor `Flow::from_fragment`-style constructors to bePatrick Walton2016-10-261-3/+4
| | | | consistent.
* Make list-style-image use UrlOrNone.Cameron McCormack2016-10-161-4/+4
| | | | MozReview-Commit-ID: 6E82Tq5nrfC
* layout: Rewrite Servo's `vertical-align` support to match CSS 2.1 §Patrick Walton2016-10-111-8/+3
| | | | | | | | | | | | | | | | | 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
* Move children_to_process to layout.Bobby Holley2016-10-081-1/+1
| | | | | | | | | | | We don't need this for Gecko, and it's hard to implement in that case because there's nowhere obvious to put it (we don't plan to create TSDs for non-dirty nodes, and non-dirty nodes can have dirty children which require the children_to_process atomic). There are various solutions here, but punting is the easiest. We'll need to rethink this if/when we need to do a bottom-up traversal for Gecko.
* add SVG fragment (SpecificFragmentInfo::Svg)Alexandrov Sergey2016-10-071-2/+7
|
* Rename PrivateStyleData to PersistentStyleData and use AtomicRefCell instead ↵Bobby Holley2016-10-021-3/+3
| | | | | | | | of RefCell as a container. This allows us to eliminate the unsafe borrows. \o/ MozReview-Commit-ID: 29hpGaWUFQz
* Stop using Ref::map for selected_style and resolved_style.Bobby Holley2016-10-021-10/+10
| | | | | | Same concept as the previous patch. MozReview-Commit-ID: RFC8s7qQPM
* Stop using Ref::map for style().Bobby Holley2016-10-021-12/+12
| | | | | | | | | | It's not possible to implement a Ref::map equivalent method on AtomicRefCell while having AtomicRefCell implemented on top of RwArc. We could potentially reimplement AtomicRefCell to be more like RefCell and add a Ref::map equivalent method, but I (and pcwalton) think we should try just cloning a few extra Arcs at these callsites instead. MozReview-Commit-ID: 6H8vAWguO3z
* Style input-text pseudo with user-agent CSSJonathan Schuster2016-09-211-1/+3
|
* Reorder `use` statementsUK9922016-09-091-6/+6
|
* Auto merge of #13012 - servo:shared-layout-context, r=noxbors-servo2016-08-241-4/+4
|\ | | | | | | | | | | | | | | Stop creating a LayoutContext in build_display_list_for_subtree. <!-- 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/13012) <!-- Reviewable:end -->
| * Pass SharedLayoutContext to ImageFragmentInfo::new.Ms2ger2016-08-231-3/+3
| |
| * Pass SharedStyleContext to CanvasFragmentInfo::new.Ms2ger2016-08-231-1/+1
| |
* | set HAS_NEWLY_CONSTRUCTED_FLOW flag for reconstructed flow'less inline elementAlexandrov Sergey2016-08-231-71/+81
|/
* do not reset pseudo elements styleAlexandrov Sergey2016-08-111-2/+10
|
* layout: Fix servo layout to take into account possibly unstyled child nodes ↵Emilio Cobos Álvarez2016-08-101-0/+8
| | | | in the display: none case.
* Remove some type aliases that are now just re-exports.Simon Sapin2016-07-201-1/+1
|
* Remove the ComputedValue traits and style_struct_traitsSimon Sapin2016-07-201-1/+1
|
* Auto merge of #11930 - nox:die-util-die, r=SimonSapinbors-servo2016-06-291-3/+2
|\ | | | | | | | | | | | | | | Remove some util stuff <!-- 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/11930) <!-- Reviewable:end -->
| * Move util::linked_list to layoutAnthony Ramine2016-06-291-3/+2
| |
* | Clean up unnecessary code noiseMichael Howell2016-06-281-1/+1
|/
* Move is_image_data to script_layout_interface.Ms2ger2016-06-201-2/+1
|
* Move LayoutNode and related traits to script_layout_interface.Ms2ger2016-06-201-2/+2
|
* Introduce LayoutNodeType and LayoutElementType enums.Ms2ger2016-06-201-47/+32
|
* Introduce a ThreadSafeLayoutNodeHelpers trait for methods to stay in layout.Ms2ger2016-06-201-1/+2
|
* Introduce a script_layout_interface crate and move RestyleDamage to it.Ms2ger2016-06-201-1/+1
|
* Small performance improvementMaciej Skrzypkowski2016-06-161-2/+1
| | | | node.selection() is not used text_content is equal to TextContent::GeneratedContent(content_items)
* Make layout only depend on script::layout_interface.Ms2ger2016-06-071-3/+3
|
* Remove empty lines following braces.Josh Matthews2016-05-271-1/+0
|
* Report use statements that use {} with only one entryCullen Rhodes2016-05-271-2/+2
|
* Stop generating flows under display: none.Matt Brubeck2016-05-251-9/+10
| | | | Because this is a bottom-up traversal it can generates flows and throw them away. To prevent that, this cascades an internal `-servo-under-display-none` property and then checks that during flow construction. Fixes #1536.
* Removed unused importsPer Lundberg2016-05-151-2/+2
| | | | This fixes #11185.
* layout: Minor whitespace cleanup.Patrick Walton2016-05-041-2/+3
|
* layout: Make the hypothetical box for `display: inline-block` withPatrick Walton2016-05-041-6/+6
| | | | `position: absolute` inline per CSS 2.1 § 10.3.7.
* layout: Don't force to overwrite display for pseudo-elements.Emilio Cobos Álvarez2016-04-291-5/+7
|
* layout: Stop storing PrecomputedStyleData in LayoutNodeEmilio Cobos Álvarez2016-04-291-62/+77
| | | | Use the SharedStyleContext instead.
* Do not render the contents of block-level replaced elements.Michael Howell2016-04-221-13/+15
| | | | Fixes #10733
* Don't strip out all empty fragmentsMatt Brubeck2016-04-161-0/+1
| | | | | | | | | | Empty fragments may need to be layed out to draw borders, padding/background, and insertion points. (Fragments that consist of discardable whitespace and control characters, on the other hand, can still be discarded.) This ends up preserving some useless empty fragments. It's possible we could avoid this by storing some sort of flag on "important" empty fragments, so we can discard the rest.
* Generate a fragment for an empty elements with borders or paddingMatt Brubeck2016-04-161-2/+41
|
* Fix meld_with_next_inline_fragment and add meld_with_prev_inline_fragmentMatt Brubeck2016-04-161-22/+1
| | | | | | | | | | | Factor out a new `meld_with_prev_inline_fragment` method that mirrors the existing `meld_with_next_inline_fragment`. This also fixes a bug in `meld_with_next` that was already fixed in the `meld_with_prev` by @notriddle in #10419. The bug is that it was traversing the inline context nodes in the wrong order. It should start at the outermost enclosing node, since the fragments might be at different nesting levels under some common ancestor.
* layout: Make absolutely-positioned blocks not generate {ib} splits.Patrick Walton2016-04-151-13/+14
| | | | | | Improves YouTube. Closes #10642.
* Remove an unnecessary Arc::cloneMatt Brubeck2016-04-061-1/+1
|
* Whitespace stripping should not result in a dangling, open border.Michael Howell2016-04-051-7/+7
|