Commit graph

34 commits

Author SHA1 Message Date
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
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
Xidorn Quan
8932dc98be Remove all color stuff from nsCSSValue. 2018-04-05 19:37:20 +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
Xidorn Quan
6ffa888dd6 Integrate font-variation-settings descriptor with stylo 2018-02-14 11:15:58 +11: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
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
Boris Chiou
1f5551c397 Add Servo_AnimationValue_Transform which creates an AnimationValue of transform. 2017-10-27 21:18:11 +02:00
Cameron McCormack
ef28ccb1a3 style: Add FFI function for parsing IntersectionObserver rootMargin values. 2017-10-17 12:50:02 +08: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
Emilio Cobos Álvarez
310be02ba8
style: Respect calc for percentages. 2017-07-14 13:43:27 +02:00
Anthony Ramine
608e7f71a2 Make computed types hold Percentage instead of bare CSSFloat 2017-06-15 16:59:03 +02:00
Boris Chiou
1a3845b719 Convert between {Accumulate, Interpolate}Matrix and the related gecko type.
We convert ComputedOperation::{Accumulate, Interpolate}Matrix into gecko type
not on the main thread, so we cannot use nsCSSValueList_heap (which is not
thread safe so we cannot create it and destroy it on different threads).
Therefore, we use nsCSSValueSharedList to represent the cloned
from_list/to_list. In this patch, we also implement the reversing way,
i.e. Convert eCSSKeyword_{accumulate, interpolate}matrix into
{Accumulate, Interpolate}Matrix.
2017-06-07 11:31:27 +08:00
Boris Chiou
8a69132de0 Use IntoIterator for nsCSSValueList. 2017-06-07 11:31:14 +08:00
Emilio Cobos Álvarez
1f7d48f564
Revert "Auto merge of #16976 - upsuper:bug1366247, r=nox"
This reverts commit 3d40b516c8, reversing
changes made to 255387a915.
2017-05-21 21:29:50 +02:00
Xidorn Quan
2b1f7f6081 Add sugar for already_AddRefed and use it for conversion between Atom and nsIAtom pointer. 2017-05-21 18:03:47 +10:00
Xidorn Quan
138fa4ca08 Change ToNsCssValue to take the ownership of value. 2017-05-16 14:42:42 +10:00
Xidorn Quan
f733958f2e Add bindings for list and pair list value of nsCSSValue. 2017-05-16 14:42:40 +10:00
Xidorn Quan
fdb29e15a4 Add binding for setting pair value of nsCSSValue. 2017-05-16 14:42:36 +10:00
Xidorn Quan
3ea2f3a16c Add support for auto value in nsCSSValue sugar. 2017-05-16 14:42:35 +10:00
Xidorn Quan
1ef7b323ac Fix stylo issue after changing counter style names to nsIAtom. 2017-05-06 12:50:08 +10:00
Nazım Can Altınova
f8710bc189
stylo: Support other unit types in computed angle 2017-05-01 16:25:18 +03:00
Simon Sapin
0ba5cae707 Add 'fallback' descriptor to @counter-style 2017-04-26 13:02:30 +09:00
Simon Sapin
b43e2fb0df Macroize conversion of @font-face values to Gecko types 2017-04-01 14:05:32 +02:00
Xidorn Quan
e0c9a3fa12 Add function for sugar of nsCSSValue. 2017-03-30 11:41:08 +11:00
Bobby Holley
7654488988 stylo: Remove ThreadSafeArray.
MozReview-Commit-ID: JSpV8nhIVQA
2017-03-27 20:36:42 -07:00
Bobby Holley
e485365288 Bug 1348606 - Use a threadsafe array for counters. r=xidorn
MozReview-Commit-ID: KgTgcD5mGqr
2017-03-23 09:35:12 -07:00
Manish Goregaokar
07723eba7a stylo: Implement remaining content values
MozReview-Commit-ID: 9fLM5bdR8hr
2017-03-14 09:24:58 -07:00
Manish Goregaokar
34ba00e6d9 Basic handling framework for presentation attributes in Stylo, with handling for font-size and color
This introduces a basic framework for servo's style system to be able
to query the style of presentation attributes which it can then insert
into the cascade. It uses that framework to implement the size and
color attributes on <font>.

There are a number of improvements that can be done on top of this:

 - Implement all other properties
 - Abstractify the ruledata parameter of the mappers using templates or virtual dispatch so that it can be a Servo decl block instead
 - Implement aforementiond abstraction over Servo decl blocks (this obsoletes the code in the first item above, so it might just be better to skip that and directly do this)
 - Replace uses of nsHTMLStyleSheet with an abstract base class containing common elements between Servo and Gecko

I'd prefer for these to be done in separate steps.
2017-02-03 17:35:44 -08:00
Hiroyuki Ikezoe
10b6c1bb4f Implement clone_transform.
The implementation of clone_transform is an adaptation of set_transform.

MozReview-Commit-ID: ESE1ha0x666
2017-02-04 08:54:00 +09:00
Emilio Cobos Álvarez
2dceb4502f
Bug 1331213: Add sugar for nsCSSValue and nsCSSValue::Array. r=heycam r=Manishearth
I will use this soon to implement the media query evaluation code.

Please review carefully.

MozReview-Commit-ID: HXelawXBfH8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-17 14:05:34 +01:00