aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/fragment.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add unique canvas IDs to all canvas operations.Brody Eastwood2018-04-021-1/+3
|/
* Replace LengthOrNone by a specific type for the perspective propertyAnthony Ramine2018-02-261-5/+4
| | | | | This was its only use, and it was bugged: AFAIK this didn't properly clamp animated values below 0.
* Use typed transforms in stacking contextsPyfisch2018-02-241-23/+29
|
* Auto merge of #20034 - Manishearth:table-backgrounds, r=mbrubeckbors-servo2018-02-211-0/+10
|\ | | | | | | | | | | | | | | | | | | | | Handle table cell backgrounds during display list generation for <table> Fixes #19788 <!-- 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/20034) <!-- Reviewable:end -->
| * Add get_column_styles for getting column structure and styles for a tableManish Goregaokar2018-02-161-0/+10
| |
* | Replace IntegerOrAuto with ZIndexAnthony Ramine2018-02-201-2/+2
|/ | | | It's its only use.
* Auto merge of #19970 - janczer:change_debug_assertions, r=emiliobors-servo2018-02-071-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change debug assertions to specific ones <!-- 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 #19962 (github issue number if applicable). <!-- 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/19970) <!-- Reviewable:end -->
| * Change debug assertions to specific onesjanczer2018-02-071-1/+1
| |
* | style: Move content property out of mako.Igor Gutorov2018-02-071-4/+4
|/
* do not preserve suppress flag on second half of splitManish Goregaokar2018-01-241-3/+10
|
* Share line breaking state across text runsManish Goregaokar2018-01-241-0/+23
| | | | Fixes #874
* layout: Remove type parameter from PseudoElementType.Emilio Cobos Álvarez2018-01-141-3/+3
| | | | Everyone uses () now.
* Auto merge of #19651 - pyfisch:background-placement, r=emiliobors-servo2018-01-021-71/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify background placement code Merges the implementations for background-image placement from gradients and images. Add missing parts and fix bugs. Now supported are the CSS properties: * background-attachment (except for local value, see #19650) * background-clip * background-origin * background-position-x/y * background-repeat * background-size It should be noted that backgrounds are not clipped to rounded border corners. (This was done before but worked only in simple cases) See: #19649 This solves the following issues: closes #19626 closes #16657 closes #19482 (examples from http://lea.verou.me/css3patterns/ are rendered perfectly but the round border is completely ignored now) closes #19577 - `./mach build -d` does not report any errors - `./mach test-tidy` does not report any errors I enabled a few tests with the first commit but I have written about a dozen manual tests I will try to turn into ref tests either before or after this patch lands. @bors-servo try The relationship between the different inputs is visualized in this flowchart: ![flowchart-background](https://user-images.githubusercontent.com/2781017/34394430-5a06c72c-eb59-11e7-9d51-3d23e2215f07.png) <!-- 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/19651) <!-- Reviewable:end -->
| * Unify background placement codePyfisch2017-12-281-71/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merges the implementations for background-image placement from gradients and images. Add missing parts and fix bugs. Now supported are the CSS properties: * background-attachment (except for local value) * background-clip * background-origin * background-position-x/y * background-repeat * background-size It should be noted that backgrounds are not clipped to rounded border corners.
* | pretty print treetigercosmos2017-12-231-4/+4
|/
* Turn flow::base and friends into methodsMatt Brubeck2017-12-141-4/+4
|
* style: Use the ? operator for OptionMatt Brubeck2017-12-091-16/+11
|
* style: Make all keywords CamelCase for consistency.Emilio Cobos Álvarez2017-12-061-35/+45
| | | | This prevents confusion and paves the ground for derive(Parse) of them.
* Implement Servo_ParseTransformIntoMatrix.Boris Chiou2017-11-281-3/+3
| | | | | | | | | | | | DOMMatrix needs to convert a specified transform list into a matrix, so we could rewrite to_transform_3d_matrix by generics for both specified and computed transform lists. Besides, we have to update the test case because we use Transform3D<f64> to compute the matrix, instead of Transform3D<f32>, so the result will be the same as that in Gecko. Using 0.3 may cause floating point issue because (0.3f32 as f64) is not equal to 0.3 (i.e. floating point precision issue), so using 0.25 instead.
* Replace old transform code with new generic codeManish Goregaokar2017-11-021-2/+2
|
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-60/+67
|
* Auto merge of #18968 - mbrubeck:try, r=emiliobors-servo2017-10-211-8/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Use try syntax for Option where appropriate - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they are refactoring only <!-- 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/18968) <!-- Reviewable:end -->
| * Use try syntax for Option where appropriateMatt Brubeck2017-10-201-8/+2
| |
* | Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-67/+60
|/ | | | | | 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-60/+67
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Remove usage of unstable feature box_patternsSimon Sapin2017-10-131-130/+147
|
* Remove usage of unstable box syntax, except in the script crateSimon Sapin2017-10-121-5/+8
| | | | | … because there’s a lot of it, and script still uses any other unstable features anyway.
* Remove sources of panic when laying out an iframe without a nested browsing ↵Alan Jeffrey2017-09-221-4/+4
| | | | context.
* Use CSSPixelLength in LengthOrPercentage{*}.Boris Chiou2017-09-131-7/+7
| | | | | Replace Au with CSSPixelLength in LengthOrPercentage, LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
* Replace Au with CSSPixelLength in CalcLengthOrPercentage.Boris Chiou2017-09-131-1/+1
| | | | | | We replace Au with CSSPixelLength for the length part of computed::CalcLengthOrPercentage. Therefore, it would be easier to use CSSPixelLength for all other LengthOrPercentage{*} types.
* Introduce CSSPixelLength and update NonNegativeLength.Boris Chiou2017-09-131-5/+7
| | | | | | | | | | | 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>)
* Auto merge of #18212 - mrobinson:position-sticky, r=emiliobors-servo2017-09-051-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for position:sticky This leverages the position:sticky support in WebRender to bring basic support for position:sticky in Servo. There are still some issues with nested sticky flows as well as a few other corner cases. Tests are imported from WPT and can be removed once we update to the latest version. <!-- 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 _____ <!-- 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/18212) <!-- Reviewable:end -->
| * Add support for position:stickyMartin Robinson2017-09-051-2/+3
| | | | | | | | | | | | | | | | This leverages the position:sticky support in WebRender to bring basic support for position:sticky in Servo. There are still some issues with nested sticky flows as well as a few other corner cases. Tests are imported from WPT and can be removed once we update to the latest version.
* | Use generics for the vertical-align propertyAnthony Ramine2017-08-301-15/+15
| |
* | Auto merge of #18234 - BorisChiou:stylo/transform/distance_mismatch, ↵bors-servo2017-08-301-73/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=birtles,nox stylo: Bug 1390039 - Implement compute_distance for mismatched transform lists. Implement ComputeSquaredDistance for mismatched transform lists. In order to do this, we have to convert a transform list into a 3d matrix, so I move the code from layout module into style module for reusing it. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix [Bug 1390039](https://bugzilla.mozilla.org/show_bug.cgi?id=1390039). - [X] These changes do not require tests because this is a Gecko feature and I add many tests in Gecko already. <!-- 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/18234) <!-- Reviewable:end -->
| * | Implement to_transform_3d_matrix for computing distance of mismatched ↵Boris Chiou2017-08-251-73/+8
| |/ | | | | | | | | | | | | | | | | | | transform lists. We could use this method to convert a TransformList into a Matrix, and use this matrix for computing distance for Stylo and rendering the transform for Servo. This is an equivalent of nsStyleTransformMatrix::ReadTransforms in Gecko.
* / Remove border collapse argument from compute_border_and_paddingKeith Yeung2017-08-251-6/+2
|/
* Allow overflow:scroll without a stacking contextMartin Robinson2017-08-241-20/+10
| | | | | | | | Fix the long-standing bug where items that are positioned and have overflow:scroll or overflow:auto automatically create stacking contexts. In order to do this we need to fix another bug where display list sorting can put a Clip or ScrollFrame definition after the first time it is used in a display list.
* order derivable traits listsClément DAVID2017-08-231-6/+6
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Improve containing block creation for position:absolute flowsMartin Robinson2017-08-171-10/+12
| | | | | | | | | | Instead of only promoting flows with positioned fragments to containing blocks, also do this for flows which have the transform, perspective or filter properties set. This is what the spec requires and also fixes some failing tests. It will allow us to stop creating stacking contexts for overflow:hidden and overflow:scroll flows. Fixes #18091.
* Improve WebGL architecture.Imanol Fernandez2017-08-151-5/+20
|
* Don't apply the rotation if it cannot be normalized.Boris Chiou2017-08-081-2/+11
| | | | | | | | | | | | | According to the spec, the computed value of transform is as specified, but with relative lengths converted into absolute lengths, so in Gecko, we do nothing while computing the value of rotate3d(), and do normalization in ProcessRotate3D(). If the direction cannot be normalized, we treat it as an identity matrix. However, in Servo, we do normalization in to_computed_value(), and looks like we are trying to normalize any kind of direction vectors, so according to the spec, let's move the normalization into Fragment::transform_matrix(), and return an identity matrix if we cannot normalize its direction vector.
* Bug 1374233 - Part 13: Use NonNegative{*} types for components of Shadow and ↵Boris Chiou2017-08-041-1/+1
| | | | | | Filter. MozReview-Commit-ID: Im4KGy1n9IJ
* Bug 1374233 - Part 2: Add NonNegativeAu.Boris Chiou2017-08-041-1/+1
| | | | | | | | | | | 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-7/+7
| | | | | | 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-13/+13
|
* layout: Clean up inline_metrics_of_block a little.Jonathan Chan2017-07-051-11/+29
| | | | | | | Previously the variable names were a little confusing (ascent was used for the space_above_baseline in one branch and the and ascent field in another branch, and was not really the ascent in one). Also add a small diagram.
* Make text-shadow and box-shadow use SimpleShadowAnthony Ramine2017-06-281-3/+2
|
* 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().
* Use generics for the filter propertyAnthony Ramine2017-06-201-1/+1
| | | | This introduces an additional shadow type for drop-shadow().