aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/construct.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rustfmt layout cratePyfisch2018-09-011-567/+824
|
* layout: script: Fix build.Emilio Cobos Álvarez2018-06-231-3/+3
|
* Fix Servo build.Emilio Cobos Álvarez2018-05-281-2/+3
|
* Fix Servo build.Emilio Cobos Álvarez2018-05-191-1/+1
|
* Auto merge of #20420 - pyfisch:corner-clipping, r=emiliobors-servo2018-04-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move DL items from gfx to layout and implement corner clipping Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, closes #19680, closes #19802 <!-- 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 #__ (github issue number if applicable). <!-- Either: --> - [x] 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/20420) <!-- Reviewable:end -->
| * Move DL items from gfx to layoutPyfisch2018-04-221-1/+1
| | | | | | | | | | | | | | | | | | Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, #19680, #19802
* | Implement a URL-generic type for list-style-imageFausto Núñez Alberro2018-04-031-4/+3
|/ | | | | | | | | | This should fix the following two "expected to fail" tests: - getComputedStyle(elem) for url() listStyleImage uses the resolved URL and elem.style uses the original URL - getComputedStyle(elem) for url() listStyle uses the resolved URL and elem.style uses the original URL
* style: Move content property out of mako.Igor Gutorov2018-02-071-8/+7
|
* style: Make the TElement type arrive to the `cascade` function.Emilio Cobos Álvarez2018-01-231-103/+228
| | | | | | | | | | | | | | | | | Not super-proud of this one, but it's the easiest way I could think of. The changeset looks bigger than what it is, because while at it I've rewrapped a fair amount of functions around to use proper block indentation. Alternatives are parameterizing Stylist by <E>, which is not fun, or moving the concrete element from layout_thread to layout, but that implies layout depending on script, which isn't fun either. Other alternative is implementing an empty enum and making anon boxes work on it. It has the advantage of removing the annoying type parameter, but the disadvantage of instantiating `cascade` twice, which isn't great, and having to maintain all the boilerplate of a `TElement` implementation that just does nothing.
* Merge layout and layout_testsAnthony Ramine2018-01-201-8/+8
|
* layout: Add a FIXME for #19771.Emilio Cobos Álvarez2018-01-151-0/+3
|
* layout: Avoid doing stupid calls to Node::style.Emilio Cobos Álvarez2018-01-151-3/+3
|
* layout: Remove type parameter from PseudoElementType.Emilio Cobos Álvarez2018-01-141-12/+15
| | | | Everyone uses () now.
* style: Remove unused optional display from PseudoElementType definition.Emilio Cobos Álvarez2018-01-141-9/+1
| | | | Everyone passes None now.
* 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