aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/values/generics/border.rs
Commit message (Collapse)AuthorAgeFilesLines
* Move Stylo to its own repo (#31350)Delan Azabani2024-02-271-257/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove packages that were moved to external repo * Add workspace dependencies pointing to 2023-06-14 branch * Fix servo-tidy.toml errors * Update commit to include #31346 * Update commit to include servo/stylo#2 * Move css-properties.json lookup to target/doc/stylo * Remove dependency on vendored mako in favour of pypi dependency This also removes etc/ci/generate_workflow.py, which has been unused since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f. * Add temporary code to debug Windows test failures * Fix failures on Windows due to custom target dir * Update commit to include servo/stylo#3 * Fix license in tests/unit/style/build.rs * Document how to build with local Stylo in Cargo.toml
* style: Remove -moz-outline-radiusEmilio Cobos Álvarez2023-05-241-1/+1
| | | | | | It does nothing since 88 and we unshipped it in 89. Differential Revision: https://phabricator.services.mozilla.com/D117532
* style: Make various border-image-* properties interpolable.Brian Birtles2019-10-091-0/+9
| | | | Differential Revision: https://phabricator.services.mozilla.com/D46724
* style: Parse '0' as a number for border-image-width.Brian Birtles2019-10-091-2/+6
| | | | | | | | | | | As per CSS Values & Units: "However, if a 0 could be parsed as either a <number> or a <length> in a property (such as line-height), it must parse as a <number>." (https://drafts.csswg.org/css-values-4/#lengths) Differential Revision: https://phabricator.services.mozilla.com/D46723
* style: Use cbindgen for border-image-width.Emilio Cobos Álvarez2019-05-291-3/+6
| | | | Differential Revision: https://phabricator.services.mozilla.com/D32032
* style: Reformat recent changes.Emilio Cobos Álvarez2019-04-121-2/+10
|
* style: Derive ToResolvedValue.Emilio Cobos Álvarez2019-04-121-0/+5
| | | | Differential Revision: https://phabricator.services.mozilla.com/D26783
* style: Add derived ToShmem implementations.Cameron McCormack2019-04-121-4/+24
| | | | Differential Revision: https://phabricator.services.mozilla.com/D17197
* style: Add a Zero trait that doesn't require Add, and use it in place of ↵Emilio Cobos Álvarez2019-03-131-5/+30
| | | | | | | | | num_traits and IsZeroLength. Use it to be consistent in InsetRect serialization and storage between Servo and Gecko. Differential Revision: https://phabricator.services.mozilla.com/D21493
* style: Use rust lengths for border corners.Emilio Cobos Álvarez2019-03-131-6/+13
| | | | | | | The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been synced over yet, but it passes with this patch of course. Differential Revision: https://phabricator.services.mozilla.com/D20960
* style: Make the generic size not use euclid under the hood.Emilio Cobos Álvarez2019-03-131-7/+7
| | | | | | | The euclid size is not really used for anything. Also rename it to Size2D to avoid cbindgen conflicts with values::length::Size. Differential Revision: https://phabricator.services.mozilla.com/D20959
* style: Simplify border-radius serialization.Emilio Cobos Álvarez2019-03-131-5/+1
| | | | Differential Revision: https://phabricator.services.mozilla.com/D20958
* style: Use Rust types for some misc properties.Emilio Cobos Álvarez2019-02-231-1/+4
| | | | | | | | | -moz-tab-size, border-image-outset and border-image-slice. This is not a particularly interesting patch, just removes some code. We can remove way more code when a few related properties are also ported. Differential Revision: https://phabricator.services.mozilla.com/D19825
* style: Rename LengthOrPercentage to LengthPercentage.Emilio Cobos Álvarez2019-01-081-7/+7
| | | | | | | | | | | | It does not represent `<length> | <percentage>`, but `<length-percentage>`, so `LengthOrPercentage` is not the right name. This patch is totally autogenerated using: rg 'LengthOrPercentage' servo | cut -d : -f 1 | sort | uniq > files for file in $(cat files); do sed -i "s#LengthOrPercentage#LengthPercentage#g" $file; done Differential Revision: https://phabricator.services.mozilla.com/D15812
* style: Clamp to non-negative value after doing interpolation for circle(), ↵Boris Chiou2019-01-071-0/+1
| | | | | | | | | | | | | | | ellipse(), and inset(). Replace LengthOrPercentage with NonNegativeLengthOrPercentage on ShapeRadius, Circle, Ellipse. And derive ToAnimatedValue for ShapeSource and its related types, so we clamp its interpolated results into non-negative values. (i.e. The radius of circle()/ellipse() and the border-radius of inset().) Note: We may get negative values when using a negative easing function, so the clamp is necessary to avoid the incorrect result or any undefined behavior. Differential Revision: https://phabricator.services.mozilla.com/D14654
* style: Use NonNegative more in the border code.Emilio Cobos Álvarez2019-01-071-13/+2
| | | | | | | | | | | | | | This ended up not being so small of a patch as I'd have thought, since it propagated a bit. But most of it is mechanical. Interesting part is NonNegativeNumberOrPercentage and the actual uses of the NonNegative stuff and during parsing. This looks like it'd fix a few correctness issues during interpolation for all the types except for BorderRadius and co (which handled it manually). I should write tests for those in a different patch. Differential Revision: https://phabricator.services.mozilla.com/D14673
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-101-2/+2
|
* Format style component.chansuke2018-09-091-12/+46
|
* style: Move represents_keyword to the css attributes.Emilio Cobos Álvarez2018-05-051-18/+3
| | | | | | Bug: 1457635 Reviewed-by: xidorn MozReview-Commit-ID: 21yuU4h34AQ
* style: Add some attributes for SpecifiedValueInfo to help deriving more from ↵Xidorn Quan2018-04-291-0/+1
| | | | | | | | types. Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: IyohSTbUO31
* style: Add a ValueInfo trait for exposing types needed by devtools.Xidorn Quan2018-04-291-8/+11
| | | | | | | | | | | | Most of types just derive it using proc_macro directly. Some of value types need manual impl. In my current plan, this new trait will be used in bug 1434130 to expose values as well. Bug: 1455576 Reviewed-by: emilio MozReview-Commit-ID: LI7fy45VkRw
* Run rustfmt on selectors, servo_arc, and style.Bobby Holley2018-04-101-12/+18
| | | | | | | | | | This was generated with: ./mach cargo fmt --package selectors && ./mach cargo fmt --package servo_arc && ./mach cargo fmt --package style Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
* Opt into field bounds when deriving ToCss, instead of opting outAnthony Ramine2018-03-081-2/+2
|
* Properly implement ToAnimatedZero for BorderSpacingAnthony Ramine2018-02-151-1/+1
|
* Change ToCss to take a CssWriter<W>Anthony Ramine2018-01-231-7/+16
| | | | | | This more concrete wrapper type can write a prefix the very first time something is written to it. This allows removing plenty of useless monomorphisations caused by the former W/SequenceWriter<W> pair of types.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-1/+1
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* style: Be a little less From-happy with rect.Emilio Cobos Álvarez2017-09-171-1/+1
|
* style: Make border-spacing serialization consistent, and move it to ↵Emilio Cobos Álvarez2017-09-171-9/+42
| | | | precomputed_type.
* style: Generalise BorderCornerRadius as `Size`.Emilio Cobos Álvarez2017-09-171-48/+6
|
* style: Simplify serialisation of BorderCornerRadius when possible.Emilio Cobos Álvarez2017-09-171-3/+8
| | | | | | | | | | | | | Closes #18458. Matches other browsers in test-cases like: <div id="t" style="border-top-left-radius: 5px 5px"></div> <script>alert(t.style.borderTopLeftRadius)</script> (I think it'd be nicer to preserve the original value completely, but not going to complain given we already do this for all sorts of Rect<T>s and such, and this is much easier).
* Measure PropertyDeclaration more thoroughly.Nicholas Nethercote2017-09-141-0/+4
| | | | | | | | | | | | | | | This patch replaces the handwritten MallocSizeOf implementation for PropertyDeclaration with a derived one, which gives much more thorough measurement. This requires (a) deriving MallocSizeOf for a *lot* of additional types (most of which already have `derive(HeapSizeOf)` in Servo builds), and (b) implementing MallocSizeOf for a few more types in the `malloc_size_of` crate. These changes would significantly improve the reporting coverage for gmail if it weren't for the fact that SpecifiedUrl isn't measured due to a lack of clarity about its fields; that can be fixed as a follow-up once bug 1397971 has landed.
* style: Remove HasViewportPercentage.Emilio Cobos Álvarez2017-08-291-4/+4
| | | | It's not needed since #18268
* Derive the most trivial Animate implsAnthony Ramine2017-08-221-27/+4
|
* Introduce values::animated::AnimateAnthony Ramine2017-08-221-23/+14
| | | | This replaces the Animatable trait and merges its three former methods into a single one.
* Derive ComputeSquaredDistanceAnthony Ramine2017-08-131-28/+3
|
* Introduce ComputeSquaredDistanceAnthony Ramine2017-08-131-11/+13
| | | | | This allows us to merge the former Animatable methods compute_distance and compute_squared_distance, reducing code size.
* Animate basic shapesAnthony Ramine2017-08-111-0/+57
|
* Support unit variants when deriving ToCssAnthony Ramine2017-06-071-15/+1
|
* Rename BorderImageWidthSide to BorderImageSideWidthAnthony Ramine2017-06-021-5/+5
|
* Rename BorderRadiusSize to BorderCornerSizeAnthony Ramine2017-05-291-15/+15
|
* Refactor BorderRadius and move it to the border modulesAnthony Ramine2017-05-281-0/+100
| | | | BorderRadius now parses itself reusing Rect<T>.
* Use generics for border-image-slice propertyAnthony Ramine2017-05-231-0/+37
|
* Use generics for the border-image-width propertyAnthony Ramine2017-05-231-0/+34