aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* layout: Propagate selected_style to InlineFragmentNodeInfoEmilio Cobos Álvarez2016-03-301-2/+2
|
* layout: Fix whitespace selected styleEmilio Cobos Álvarez2016-03-301-2/+2
|
* layout: prevent an extra arc clone for selected_styleEmilio Cobos Álvarez2016-03-301-2/+2
|
* Implement ::selection pseudo-elementEmilio Cobos Álvarez2016-03-301-1/+16
|
* Auto merge of #10277 - perlun:rename-tcomputedvalues-to-computedvalues, ↵bors-servo2016-03-301-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | r=SimonSapin Renamed TComputedValues to ComputedValues This is a followup to #10210, and a continuation of #10185. <!-- 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/10277) <!-- Reviewable:end -->
| * Renamed TComputedValues to ComputedValuesPer Lundberg2016-03-291-1/+1
| | | | | | | | This is a followup to #10210, and a continuation of #10185.
* | Auto merge of #10255 - mbrubeck:box-unscanned, r=pcwaltonbors-servo2016-03-301-7/+7
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | Reduce size of layout::fragment::Fragment struct This reduces the size of the SpecificFragmentInfo enum from 48 to 24. 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/10255) <!-- Reviewable:end -->
| * Unbox IframeFragmentInfo.Matt Brubeck2016-03-291-1/+1
| |
| * Put UnscannedTextFragmentInfo in a BoxMatt Brubeck2016-03-291-6/+6
| | | | | | | | This reduces the size of the SpecificFragmentInfo enum from 48 to 24.
* | 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.
* Auto merge of #10176 - mbrubeck:selection-range, r=pcwaltonbors-servo2016-03-261-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Highlight selected text in input fieldsMatt Brubeck2016-03-241-2/+2
| | | | | | | | | | 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
|/
* Get the fundamentals of the HTMLDetailsElement rendering stuff working.Michael Howell2016-03-191-1/+5
| | | | | | Still need to implement the style invalidation. Part of #9395
* Remove lifetimes from LayoutNode and friends.Bobby Holley2016-03-141-13/+11
|
* Inline ObjectElement::get_type_and_data into the consumers.Bobby Holley2016-03-141-12/+8
| | | | The usage here doesn't quite work without the lifetimes.
* Remove unused `fixed_descendants: AbsoluteDescendants`Simon Sapin2016-01-281-12/+2
| | | | … in `construct.rs` for multicol and table wrappers.
* Add Multicolumn support block fragmentation.Simon Sapin2016-01-281-10/+57
|
* Sequentialize assign_block_size for flows that can be fragmented.Simon Sapin2016-01-281-3/+9
| | | | Fragmentation will be intertwined with block size calculation.
* Disable incremental reflow for multicol and their descendants.Simon Sapin2016-01-271-0/+3
| | | | Fragmentation with dynamic updates is hard.
* Fix a bunch of clippy lintsJohannes Linke2016-01-021-12/+6
|
* Separate style+layout and layout-specific wrapper functionality.Bobby Holley2015-12-291-19/+14
| | | | | | | | | | | This patch does a number of things, unfortunately all at once: * Hoists a large subset of the layout wrapper functionality into the style system. * Merges TElementAttributes into the newly-created TElement. * Reorganizes LayoutData by style vs layout, and removes LayoutDataShared. * Simplifies the API for borrowing style/layout data. There's still more to do to make the style system usable standalone, but this is a good start.
* Generalize the rest of layout to operate on generic Layout*.Bobby Holley2015-11-281-38/+49
| | | | | | | There wasn't a good way to split this up, unfortunately. With this change, the only remaining usage of the Servo-specific structures is in layout_task, where the root node is received from the script task. \o/
* Add XMLDocument objectGuillaume Gomez2015-11-271-2/+2
|
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-1/+1
| | | | | | | | | | | Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock. Removed references to string_cache_plugin. Import atom! and ns! from string_cache. Replaced ns!("") by ns!(). Replaced ns!(XML) and co by ns!(xml) and co. Replaced atom!(foo) by atom!("foo"). Replaced Atom::from_slice by Atom::from. Replaced atom.as_slice() by &*atom.
* Rename ThreadSafeLayoutFoo to ServoThreadSafeLayoutFoo and ↵Bobby Holley2015-11-211-33/+33
| | | | TThreadSafeLayoutFoo to ThreadSafeLayoutFoo.
* Hoist exported ThreadSafeLayoutFoo functionality into traits.Bobby Holley2015-11-211-1/+1
|
* Clean up restyle damage after it no longer appliesMartin Robinson2015-11-201-2/+3
| | | | | | | | | BUBBLE_ISIZES and REPAINT can become "stuck" on in the default Servo configuration once they are activated. This is solved by removing these damage bits after they no longer apply. There isn't a good way to test this, other than noting that it doesn't break any existing CSS tests. This will become more important in the future as the REPAINT bit is used to implement display list patching.
* replace InheritTypes imports with inheritance importsrohan.prinja2015-10-301-2/+2
|
* Made block type pattern match less inclusiveDavid Raifaizen2015-10-271-1/+1
|
* Pass all the data layout needs from canvas elements at once.Ms2ger2015-10-261-1/+2
|
* Privatize FlowConstructionUtils.Ms2ger2015-10-261-5/+3
| | | | This makes it match the documentation.
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-4/+2
|
* Incremental layout: Don't try to repair text fragment stylesMatt Brubeck2015-10-011-4/+10
| | | | Fixes #7814.
* layout: Make the compositor rather than layout determine the position ofPatrick Walton2015-09-291-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | each iframe. The old code that attempted to do this during layout wasn't able to work for multiple reasons: it couldn't know where the iframe was going to be on the page (because of nested iframes), and at the time it was building the display list for a fragment it couldn't know where that fragment was going to be in page coordinates. This patch rewrites that code so that both the sizes and positions of iframes are determined by the compositor. Layout layerizes all iframes and marks the iframe layers with the appropriate pipeline and subpage IDs so that the compositor can place them correctly. This approach is similar in spirit to Gecko's `RefLayer` infrastructure. The logic that determines when it is time to take the screenshot for reftests has been significantly revamped to deal with this change in delegation of responsibility. Additionally, this code removes the infrastructure that sends layout data back to the layout task to be destroyed, since it is now all thread-safe and can be destroyed on the script task. The failing tests now fail because of a pre-existing bug related to intrinsic heights and borders on inline replaced elements. They happened to pass before because we never rendered the iframes at all, which meant they never had a chance to draw the red border the tests expect to not render! Closes #7377.