aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* style: Remove -servo-display-for-hypothetical-box from longhandCYBAI2018-01-131-1/+1
|
* style: Remove TNode::set_can_be_fragmented and TNode::can_be_fragmented.Emilio Cobos Álvarez2018-01-041-12/+6
| | | | | Replace them instead by a computed value flag, the same way as the IS_IN_DISPLAY_NONE_SUBTREE flag works.
* Turn flow::base and friends into methodsMatt Brubeck2017-12-141-16/+16
|
* style: Make all keywords CamelCase for consistency.Emilio Cobos Álvarez2017-12-061-53/+59
| | | | This prevents confusion and paves the ground for derive(Parse) of them.
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-33/+33
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-33/+33
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-33/+33
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Remove usage of unstable box syntax, except in the script crateSimon Sapin2017-10-121-19/+24
| | | | | … because there’s a lot of it, and script still uses any other unstable features anyway.
* style: Kill -servo-under-display-none.Emilio Cobos Álvarez2017-09-171-1/+1
| | | | Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* Introduce CSSPixelLength and update NonNegativeLength.Boris Chiou2017-09-131-5/+4
| | | | | | | | | | | First, we define computed::CSSPixelLength which contains a CSSFloat, a pixel value, and then we replace computed::Length with CSSPixelLength. Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength, FontRelativeLength, ViewportPercentageLength, CharacterWidth, and PhysicalLength is CSSPixelLength. Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
* Use the is_absolute_containing_block method everywhereMartin Robinson2017-08-161-14/+6
| | | | | | This is a better approach than relying on contains_positioned_fragments, because in the future other properties will create absolute containing blocks.
* Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)Simon Sapin2017-08-151-3/+3
|
* Bug 1374233 - Part 2: Add NonNegativeAu.Boris Chiou2017-08-041-4/+4
| | | | | | | | | | | Add values::computed::NonNegativeAu, so BorderSideWith could be computed to this non-negative Au, for the following properties: 1. outline-width 2. border-{*}-width 3. column-rule-width 4. -webkit-text-stroke-width MozReview-Commit-ID: ASHaB2F7VtM
* 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-5/+5
|
* layout: Stop doing unsafe transmutes between refcell references.Emilio Cobos Álvarez2017-05-251-3/+3
| | | | | | | | | This commit splits the style and layout data in two separate refcells. These transmutes have been a source of trouble (for example on Android), and they feel like a hack anyway. Fixes #16982
* Stylo: Pass style list's image_value to gecko.cku2017-05-161-2/+3
|
* Fix up script and layout.Bobby Holley2017-05-021-3/+4
|
* Use empty pseudo to cascade only inheritable properties for textPu Xingyu2017-04-011-58/+40
| | | | | | Since for nested inline elements non-inheritable properties are properly stored in the inline context of an inline fragment, so get rid of them on the style.
* Use Servo-specific pseudo element for InlineAbsolute fragmentPu Xingyu2017-03-311-2/+3
|
* Use Servo-specific pseudo element for InlineBlock fragmentPu Xingyu2017-03-311-3/+5
|
* Replace RwLock<StyleRule> with Locked<StyleRule>Simon Sapin2017-03-191-13/+14
|
* style: Kill SharedStyleContext::default_computed_values.Emilio Cobos Álvarez2017-03-141-4/+5
| | | | | | | Now that cascade() gets a Device, we can use the default computed values from there to avoid propagating that state all over the place. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
* layout: Replace ConstructionResult::swap_out() with get()Patrick Walton2017-03-031-14/+9
| | | | | It only actually swaps out in nonincremental mode (which isn't suitable for real world use), so the name is confusing.
* Make script thread initiate requests for images needed by layout.Josh Matthews2017-02-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In support of this goal, the layout thread collects information about CSS images that are missing image data and hands it off to the script thread after layout completes. The script thread stores a list of nodes that will need to be reflowed after the associated network request is complete. The script thread ensures that the nodes are not GCed while a request is ongoing, which the layout thread is incapable of guaranteeing. The image cache's API has also been redesigned in support of this work. No network requests are made by the new image cache, since it does not possess the document-specific information necessary to initiate them. Instead, there is now a single, synchronous query operation that optionally reserves a slot when a cache entry for a URL cannot be found. This reserved slot is then the responsibility of the queryer to populate with the contents of the network response for the URL once it is complete. Any subsequent queries for the same URL will be informed that the response is pending until that occurs. The changes to layout also remove the synchronous image loading code path, which means that reftests now test the same code that non-test binaries execute. The decision to take a screenshot now considers whether there are any outstanding image requests for layout in order to avoid intermittent failures in reftests that use CSS images.
* Remove cached thread local context from LayoutContextPu Xingyu2017-02-081-13/+18
| | | | | Remove cached thread local context from LayoutContext, use LayoutContext for assign_inline_sizes(), and simplify the parallel flow traversal code.
* Remove redundant style_context() method of LayoutContextPu Xingyu2017-02-061-1/+1
|
* Auto merge of #14978 - shinglyu:inline-flex, r=notriddlebors-servo2017-01-221-4/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+16
| |
* | Tidy up rust code with regard to new rule (no = in beginning of line)Jure Podgoršek2017-01-061-2/+2
| |
* | Bug 1298588 part 9, servo piece. Pass through useful default styles to ↵Boris Zbarsky2017-01-041-3/+4
| | | | | | | | cascade(). r=bholley
* | Bug 1298588 part 8. Pass a SharedStyleContext, not a Stylist, to Legalizer ↵Boris Zbarsky2017-01-041-20/+19
|/ | | | methods. r=bholley
* Fix an outdated commentMichael Howell2016-12-231-10/+15
|
* Removed util.Alan Jeffrey2016-12-141-1/+1
|
* Remove unused replaced size calculation methodsPu Xingyu2016-12-121-8/+5
| | | | | Remove some fields and methods from SpecificFragmentInfo and change some function signatures.
* use Either type for UrlOrNoneThiago Pontes2016-11-301-3/+4
| | | | | | | | | | | | fix test-tidy errors fix style unit test use the Parse trait instead of ParseWithContext fix stylo test and geckolib build move all specified url parse code to parse trait and remove refs to unused type
* Bug 1317016 - Basic infrastructure for RestyleHint-driven traversal.Bobby Holley2016-11-241-1/+1
| | | | MozReview-Commit-ID: 7wH5XcILVmX
* Rename selector_impl.rs to selector_parser.rsSimon Sapin2016-11-201-1/+1
| | | | This makes it consistent with an upcoming update of the selectors crate.
* Rename selector_matching.rs to stylist.rsSimon Sapin2016-11-201-1/+1
|
* Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-5/+5
|
* Auto merge of #14136 - stshine:orthogonal-symmetry, r=SimonSapinbors-servo2016-11-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style: Add a "start_end()" method to LogicalMargin <!-- Please describe your changes on the following line: --> Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox. Part of #14123. --- <!-- 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 - [X] These changes do not require tests because refactoring <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin <!-- 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/14136) <!-- Reviewable:end -->
| * style: Add a "start_end()" method to LogicalMarginPu Xingyu2016-11-101-1/+1
| | | | | | | | | | | | Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox.
* | style: Centralize specified url value handling, and refcount urls.Emilio Cobos Álvarez2016-11-101-2/+2
|/
* Auto merge of #14035 - Permutatrix:iss-14030, r=emiliobors-servo2016-11-091-28/+47
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT. <!-- Please describe your changes on the following line: --> This change allows inline margins, borders, and padding to interact correctly with {ib} splits. --- <!-- 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 #14030 - [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/14035) <!-- Reviewable:end -->
| * Elaborated on enclosing_node in comment, moved existing comments aroundPermutator2016-11-061-6/+12
| |
| * Don't mark start/end of {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENTPermutator2016-11-021-26/+39
| |
* | layout: Mark flex items properly during constructionPu Xingyu2016-11-091-4/+22
| | | | | | | | | | | | | | Set the flag of the fragment of children in a flex container according to the direction of the container. The mark is done on the fragment because flex item enstablish a stacking context when its z-index is non-zero ,despite its `position' property.
* | Stop using associated types for the concrete TRestyleDamage implementation.Bobby Holley2016-11-071-2/+2
| | | | | | | | MozReview-Commit-ID: LfaZFCVlIb1
* | Make `FlowRef` a newtypeMichael Howell2016-11-041-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Update to string-cache 0.3Simon Sapin2016-11-031-2/+8
|/