Commit graph

419 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
a360dbf98d
style: Remove dead and unsafe code.
MozReview-Commit-ID: 9seuLNCJAqz
2018-05-28 15:38:56 +02:00
Xidorn Quan
1b236bf620
style: Rename CaretColor to ColorOrAuto for reusing.
Bug: 1460456
Reviewed-by: heycam
MozReview-Commit-ID: LD6PlNI60GC
2018-05-28 15:36:55 +02:00
Xidorn Quan
db0134e697
style: Rename pointing to inherited_ui.
And also merge values::*::pointing into values::*::ui.

Bug: 1460192
Reviewed-by: heycam
MozReview-Commit-ID: FM4gWEszahB
2018-05-19 10:15:17 +02:00
Jonathan Watt
36cef8ec68
style: Use user defined types for font-stretch / font-style.
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>
Bug: 1436048
Reviewed-by: jfkthame,jwatt
MozReview-Commit-ID: 7ONYtICeAqb
2018-04-28 10:26:06 +02:00
Bobby Holley
dfa019c884
style: Parse sheets on the thread pool.
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.

Bug: 1346988
Reviewed-by: bz,emilio
MozReview-Commit-ID: KddpGFdaqEe
2018-04-28 10:25:59 +02:00
Emilio Cobos Álvarez
bc1126ee8c
style: Update font-weight property and descriptor to css-fonts-4.
Bug: 1454596
Reviewed-by: xidorn
MozReview-Commit-ID: 27aS2UrgXjs
2018-04-28 10:25:59 +02:00
Jonathan Watt
245d848508
style: Use a user defined type for font weight everywhere.
Bug: 1436048
Reviewed-by: emilio
2018-04-14 21:15:43 +02:00
Bobby Holley
c99bcdd4b8 Run rustfmt on selectors, servo_arc, and style.
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)
2018-04-10 17:35:15 -07:00
Bobby Holley
f7ae1a37e3 Manual fixups so that the rustfmt output won't trigger tidy. 2018-04-10 17:33:25 -07:00
Xidorn Quan
8932dc98be Remove all color stuff from nsCSSValue. 2018-04-05 19:37:20 +10:00
Xidorn Quan
80ab893e3a Use Servo data to back @counter-style rule. 2018-04-05 09:33:45 +10:00
Xidorn Quan
ac7467221a Use Servo data to back @font-face rule in Gecko. 2018-04-04 09:33:07 +10:00
Xidorn Quan
ecbc55ffcf Construct URLValue eagerly and share it between specified value and style structs. 2018-03-08 23:34:35 +11:00
Anthony Ramine
c4efbb4d51 Replace ColorOrAuto by CaretColor
This is its only use.
2018-02-28 10:25:59 +01:00
Emilio Cobos Álvarez
5e64cb3516
style: Make XBL / Shadow DOM use something more light-weight than a Stylist.
It's just a struct aggregating stylesheets + CascadeData, with a quirks_mode
parameter because XBL sucks so bad.

Bug: 1436059
Reviewed-by: xidorn
MozReview-Commit-ID: 7q99tSNXo0K
2018-02-16 13:42:36 +01:00
Xidorn Quan
6ffa888dd6 Integrate font-variation-settings descriptor with stylo 2018-02-14 11:15:58 +11:00
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
Bobby Holley
f858ce91e8 Avoid entraining various Debug impls in release builds.
MozReview-Commit-ID: Lp9i9EI5qdU
2018-01-13 09:51:46 -08:00
Emilio Cobos Álvarez
20a0d52598
style: Remove pointless assertion.
It's a reference, it's not going to be null, and if it was, it would've already
been UB on the caller.
2017-12-29 19:17:29 +01:00
Emilio Cobos Álvarez
40b9d78a34
style: Remove needless and bogus bounds-check.
The check should read index >= self.len(). But it doesn't matter anyway since
we're covered by Rust's bound checks by default anyway.
2017-12-21 04:08:44 +01:00
Emilio Cobos Álvarez
69ddb9501b
style: Remove some uses of unused unsafe. 2017-11-15 13:26:24 +01:00
Manish Goregaokar
079b25db93
Share transform function lists between set_transform and clone_transform
This will also fix https://bugzilla.mozilla.org/show_bug.cgi?id=1405881
2017-11-02 14:30:05 -07:00
Emilio Cobos Álvarez
b5f8edc4ae
style: Unconditionally implement Debug for RefPtr.
Bindgen doesn't know how to derive debug for a Gecko font family list. Hopefully
it doesn't need to.

Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: 4iZKzjad6K9
2017-10-31 17:31:17 +01:00
Bastien Orivel
29b4eec141 Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
Boris Chiou
1f5551c397 Add Servo_AnimationValue_Transform which creates an AnimationValue of transform. 2017-10-27 21:18:11 +02:00
Nika Layzell
2d3331fbd4 Move nsstring from gecko into servo/support/gecko/nsstring
This is the servo side of bug 1403213.

MozReview-Commit-ID: HFdQiuMnGhJ
2017-10-23 14:22:42 -04:00
Gecko Backout
662b2e7397 Backed out changeset 196206f129ef (bug 1403213) for referencing non-existing xpcom/rust/gtest/moz.build in xpcom/moz.build. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/18941
2017-10-20 19:33:29 +00:00
Nika Layzell
ec5cf5ceaf Move nsstring from gecko into servo/support/gecko/nsstring
This is the servo side of bug 1403213.

MozReview-Commit-ID: HFdQiuMnGhJ
2017-10-20 10:52:57 -04:00
Gecko Backout
11c64178d8 Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest 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
2017-10-19 21:26:51 +00:00
Bastien Orivel
e8e2d0a4b2 Update bitflags to 1.0 in every servo crate
It still needs dependencies update to remove all the other bitflags
versions.
2017-10-19 15:01:17 +02:00
Cameron McCormack
ef28ccb1a3 style: Add FFI function for parsing IntersectionObserver rootMargin values. 2017-10-17 12:50:02 +08:00
Xidorn Quan
23d9d12430 Only generate structs file for the current build 2017-10-05 15:29:32 +11:00
Cameron McCormack
4d9dd4b757 style: Use a SharedFontList object to store font-family values for Gecko. 2017-10-04 13:38:07 +08:00
Nicholas Nethercote
365ae0b637 Remove nsTFixedString<T>.
nsTFixedString<T> is only used as a base class for nsTAutoStringN<T, N>, so
this patch merges the former into the latter, cutting some code and simplifying
the string class hierarchy.

Because the "Fixed" name is now gone, the patch also renames
StringDataFlags::FIXED as INLINE and ClassDataFlags::FIXED as INLINE.

The patch also removes nsFixed[C]String and ns_auto_[c]string! from Rust code
because nsAutoString can't be implemented directly in Rust due to its move
semantics. There were only two uses of ns_auto_string! outside of tests so this
seems like a minor loss.
2017-10-04 13:31:09 +11:00
Michael Layzell
47df1375c5 Stop allocating in fmt::Write for nsA[C]String 2017-09-27 13:51:02 -04:00
Michael Layzell
98dbf149ad Remove unlanded TakeFrom methods from nsstring_vendor 2017-09-26 14:14:22 -04:00
Michael Layzell
cc8b69bae1 Update version of nsstring bindings used by stylo 2017-09-26 10:45:35 -04:00
Boris Chiou
b89286e8e7 Use CSSPixelLength in LengthOrPercentage{*}.
Replace Au with CSSPixelLength in LengthOrPercentage,
LengthOrPercentageOrAuto, and LengthOrPercentageOrNone.
2017-09-13 18:10:46 +08:00
Boris Chiou
a949e2a057 Introduce CSSPixelLength and update NonNegativeLength.
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>)
2017-09-13 18:05:14 +08:00
Manish Goregaokar
799437430e Mark the CoordData traits as unsafe 2017-08-28 22:28:20 -07:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Xidorn Quan
4e0b1071e7 Use Option<RGBA> for color in shadow 2017-08-19 00:20:24 +10:00
Simon Sapin
35282042bc geckolib: Fix some warnings (treated as error) new in Rust Nigthly 2017-08-17 15:59:33 +02:00
Hiroyuki Ikezoe
95994bd710 Convert gecko's currentcolor to servo one. 2017-08-15 15:19:47 +09:00
Hiroyuki Ikezoe
4665d6dd15 Reuse to_simple_shadow() for box-shadow as well. 2017-08-15 15:19:31 +09:00
Emilio Cobos Álvarez
f7eb46f484
style: Introduce OriginSet. 2017-08-14 12:46:41 +02:00
Cameron McCormack
0cf487b0ac style: Make Servo_StyleSet_NoteStyleSheetsChanged take a set of origins to dirty. 2017-08-13 18:51:07 +08:00
Boris Chiou
8651acd94c Bug 1374233 - Part 13: Use NonNegative{*} types for components of Shadow and Filter.
MozReview-Commit-ID: Im4KGy1n9IJ
2017-08-04 14:23:30 +08:00
Xidorn Quan
3991e7d344 Have CoordDataValue derive Debug and PartialEq. 2017-08-02 10:03:09 +10:00
bors-servo
31228c1849 Auto merge of #17775 - michael-p:rename-stylearc-to-servo-arc, r=emilio
Replace all uses of the style::stylearc alias with servo_arc.

The `stylearc` alias is left there temporarilly and will be removed completely in a later commit/PR where also `components/style/gecko/generated/structs_{debug|release}.rs` are re-generated (they still use the old alias).

---
<!-- 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 #17768  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because no new features / only refactoring

<!-- 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/17775)
<!-- Reviewable:end -->
2017-07-19 06:03:17 -07:00