Commit graph

33063 commits

Author SHA1 Message Date
Xidorn Quan
0021c70c08
style: Handle keywords for color values.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 5GvIHSeQuCX
2018-04-29 03:28:47 +02:00
Xidorn Quan
20398491cc
style: Use unified list for TextDecorationLine and implement its SpecifiedValueInfo.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 2sCnK1AecFk
2018-04-29 03:28:46 +02:00
Xidorn Quan
5437c96402
style: Have TextAlign derive ToCss and unship char value from it.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: CXDnyqzjQkq
2018-04-29 03:28:44 +02:00
Xidorn Quan
43bb6364f6
style: Have Parse derive respect #[css(skip)] on variant as well and derive Parse for KeywordSize.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: evSvk1RQGe
2018-04-29 03:28:44 +02:00
Xidorn Quan
185e4ce61d
style: Allow shorthands to specify their own impl of SpecifiedValueInfo and manual impl it for font and border.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 3B9OfkWU0Eq
2018-04-29 03:28:43 +02:00
Xidorn Quan
e50847666c
style: Derive ToCss for values::generics::font::KeywordSize.
Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 9ek3PcqYiU3
2018-04-29 03:28:42 +02:00
Xidorn Quan
54d8863e60
style: Use unified lists to impl several bitflag font-variant properties.
This also changes their ToCss impl to use SequenceWriter instead of
checking has_value manually.

SpecifiedValueInfo for those types are also implemented in this patch.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 23h2VWS417H
2018-04-29 03:28:42 +02:00
Xidorn Quan
eb554044db
style: Add SequenceWriter::item_str for writing str items.
This will be used in the next patch for font-variant bitflag types.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 2IvcsnYBNqA
2018-04-29 03:28:41 +02:00
Xidorn Quan
26c3aeda97
style: Add collect_values function to SpecifiedValueInfo trait for collecting possible values.
This is the basic structure of the stuff. Following patches will fill
the gap between Gecko and Servo on value generating, and finally hook
it into InspectorUtils.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: KNLAfFBiY6e
2018-04-29 03:28:40 +02:00
Xidorn Quan
3b9c40dd14
style: Skip system font variant for ToCss in font subproperties.
System font keywords are not a valid value for those properties.

The newly-added #[css(skip)] would be reused by deriving algorithm of
SpecifiedValueInfo to skip them as well.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: EmnhkaA9RR5
2018-04-29 03:28:39 +02:00
Emilio Cobos Álvarez
6e3fa68f46
style: Fix serialization order of the outline shorthand.
This is going to be tested in
https://github.com/w3c/web-platform-tests/pull/10700.

Bug: 1457652
Reviewed-by: xidorn
MozReview-Commit-ID: 7Oi1it70YFw
2018-04-29 03:28:38 +02:00
Gerald Squelart
361046d4fa
style: Remove "layout.css.text-combine-upright.enabled" pref.
Shipped since Firefox 48, other browsers have similar impls, and the related
spec has been in CR since a while ago.
The syntax of this property as implemented should be considered to be pretty
stable, so we can remove this pref.

Bug: 1417761
Reviewed-by: xidorn
MozReview-Commit-ID: H7lDsdbUamD
2018-04-29 03:28:38 +02:00
sotaro
146be22ada
style: Forward webrender error log to gfxCriticalNote.
Bug: 1456350
Reviewed-by: bholley
2018-04-29 03:28:37 +02:00
Emilio Cobos Álvarez
29d5c47023
style: followup: Skip a rustest that depends on include order and isn't super-useful.
Bug: 1457026
Reviewed-by: bholley
MozReview-Commit-ID: 3lwAyl8aztW
2018-04-29 03:28:36 +02:00
Xidorn Quan
14b05bead7
style: Use Servo side data to back InspectorUtils::CssPropertySupportsType.
The only difference in the final result is "all" shorthand, for which
the original result is wrong because "all" shorthand doesn't accept any
value other than the CSS-wide keywords.

Bug: 1455576
Reviewed-by: emilio
MozReview-Commit-ID: BmT7kGwC0ZQ
2018-04-29 03:28:35 +02:00
Xidorn Quan
7fe7b2ffb1
style: Add a ValueInfo trait for exposing types needed by devtools.
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
2018-04-29 03:28:34 +02:00
Emilio Cobos Álvarez
276fb7e04b
style: Unify MediaList and ServoMediaList.
Bug: 1456471
Reviewed-by: xidorn
MozReview-Commit-ID: KFWxoohpGlb
2018-04-29 03:28:33 +02:00
Brad Werth
b91ae6b1f9
style: support shape-margin.
Bug: 1265342
Reviewed-by: xidorn
MozReview-Commit-ID: 99pLZsFA9mj
2018-04-29 03:28:32 +02:00
Bobby Holley
48558e313a
style: Update StyleSource to use ArcUnion.
Bug: 1455784
Reviewed-by: Manishearth
MozReview-Commit-ID: AT4sud9goGV
2018-04-29 03:28:32 +02:00
Bobby Holley
cbbefebdba
servo_arc: ArcUnion.
Bug: 1455784
Reviewed-by: Manishearth
MozReview-Commit-ID: Jxp2A7cj6CV
2018-04-29 03:28:31 +02:00
Xidorn Quan
89fba41e1d
style: Support calc in cursor.
Bug: 1453258
Reviewed-by: emilio
MozReview-Commit-ID: 1ZzxkYboWZg
2018-04-29 03:17:19 +02:00
bors-servo
da43a33fb1
Auto merge of #20692 - emilio:gecko-sync-next, r=emilio,Manishearth,nox
style: Sync more changes from m-c.

<!-- 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/20692)
<!-- Reviewable:end -->
2018-04-28 09:37:25 -04:00
Emilio Cobos Álvarez
1eec31ace0
Update test expectations. 2018-04-28 15:36:52 +02:00
Emilio Cobos Álvarez
8146850215
Remove Geckolib CI. 2018-04-28 10:26:48 +02:00
Emilio Cobos Álvarez
54b444992d
Fix servo build. 2018-04-28 10:26:47 +02:00
Emilio Cobos Álvarez
16ca8de6df
style: Compare degrees for font-style to account for compute_angle introducing error. 2018-04-28 10:26:40 +02:00
Emilio Cobos Álvarez
1f5d90568d
style: Make tidy happy. 2018-04-28 10:26:08 +02:00
Mats Palmgren
62c6f58a5b
style: Add 'row-gap' and 'gap' properties; make 'grid-[column|row]-gap' and 'grid-gap' alias the respective unprefixed properties.
This also makes 'normal' the initial value for the grid-*
properties, per:
https://github.com/w3c/csswg-drafts/issues/2294#issuecomment-369313438

Bug: 1398482
Reviewed-by: emilio
2018-04-28 10:26:08 +02:00
Emilio Cobos Álvarez
e5878b96a9
style: Remove Valgrind workaround to make ::slotted use the rule hash.
Bug: 1426516
Reviewed-by: emilio
MozReview-Commit-ID: 2q14kHjajIr
2018-04-28 10:26:07 +02:00
Emilio Cobos Álvarez
b5c18c24fe
style: Pack the shadow cascade order in ApplicableDeclarationBlock.
I didn't bother not shifting there. We need to load the whole thing and shift
for at least one of cascade level / shadow cascade order.

Callers of level() other than for_rule_tree are non-existent in release builds,
so we'd be doing the shift anyway. I can implement the same thing for
shadow_cascade_order too, but I don't think that optimization is measurable in
any way, either, the compiler should make the decision.

And just in case, the simpler version actually generated less instructions in:

  https://play.rust-lang.org/?gist=ceadb0d3cbce4eeca76e4d9ab9a1c744&version=nightly

with the simple thing.

Bug: 1455032
Reviewed-by: heycam
MozReview-Commit-ID: 8xPBJmlcyKh
2018-04-28 10:26:07 +02:00
Emilio Cobos Álvarez
b1fbb28b8a
style: Only parse font-stretch keywords in the font shorthand.
Bug: 1454883
Reviewed-by: xidorn
MozReview-Commit-ID: 4BqnOSz83w4
2018-04-28 10:26:07 +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
Emilio Cobos Álvarez
b2722e965c
style: Cleanup (a bit) system font copypasta.
If I had to write that again I would've killed myself :).

This is still not perfect, and the system font code is still quite a mess, but
well, little steps.

Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: BmrZlCSejo7
2018-04-28 10:26:06 +02:00
Emilio Cobos Álvarez
0a8518b452
style: Fix clamping on animations for fort-style.
Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: Awyub0dMOmq
2018-04-28 10:26:06 +02:00
Emilio Cobos Álvarez
737501153b
style: Use a generic type in preparation to fix animation.
Apart from a bit more code reuse.

Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: 2BNOK6v30lX
2018-04-28 10:26:05 +02:00
Emilio Cobos Álvarez
32d4da8a99
style: Update font-style to css-fonts-4.
Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: 1Nq5DyCjaZe
2018-04-28 10:26:05 +02:00
Emilio Cobos Álvarez
f7636e6662
style: Update font-stretch to css-fonts-4.
These won't "just work", pending changes from bug 1436048 to use a floating
point representation for those.

Bug: 1454883
Reviewed-by: xidorn
MozReview-Commit-ID: Bi5iTdFreMA
2018-04-28 10:26:04 +02:00
Xidorn Quan
91be6c31c3
style: Not copy generated binding files into dist.
Bug: 1455623
Reviewed-by: emilio
MozReview-Commit-ID: GBnkmwjDS8Y
2018-04-28 10:26:04 +02:00
Emilio Cobos Álvarez
cf8f371bdb
Update test expectations. 2018-04-28 10:26:03 +02:00
Emilio Cobos Álvarez
91c3214772
style: Update bindings. 2018-04-28 10:26:03 +02:00
Emilio Cobos Álvarez
48de556f8c
style: Fixups for css-fonts-4 font-weight. 2018-04-28 10:26:03 +02:00
Xidorn Quan
0f19c25706
style: Add CAN_ANIMATE_ON_COMPOSITOR in Servo side and propagate it to ServoCSSPropList.h.
Bug: 1454830
Reviewed-by: emilio
MozReview-Commit-ID: 2OBCliDY02g
2018-04-28 10:26:02 +02:00
Xidorn Quan
bc81f09833
style: Add GETCS_NEEDS_LAYOUT_FLUSH flag in Servo side and propagate it to ServoCSSPropList.h.
Bug: 1454830
Reviewed-by: emilio
MozReview-Commit-ID: 5k08FWjobCg
2018-04-28 10:26:02 +02:00
Xidorn Quan
cfffff33a0
style: Generate nsCSSPropertyID.h from data file directly.
Bug: 1454831
Reviewed-by: emilio
MozReview-Commit-ID: CcX2uzgjWFo
2018-04-28 10:26:02 +02:00
Emilio Cobos Álvarez
84d6c13871
style: Fix cascade order of !important in Shadow DOM.
No cleaner ideas right now that carrying that counter around... Maybe a custom
type may be cleaner?

This makes ApplicableDeclarationBlock a bit bigger. I could probably try to make
the counter a 4 / 5-bit number or something and pack the counter there in the
SourceOrderAndCascadeLevel somehow...

But doesn't seem really worth the churn, and can be done as a followup in any
case. Let me know if you want to block on that.

Bug: 1454162
Reviewed-by: heycam
MozReview-Commit-ID: 1LdW9S4xA6f
2018-04-28 10:26:01 +02:00
Xidorn Quan
78f9672b6c
style: Generate property list from Servo data.
Bug: 1452542
Reviewed-by: emilio,froydnj
MozReview-Commit-ID: CwK2oL88r6F
2018-04-28 10:26:01 +02:00
Xidorn Quan
2cd06807fa
style: Have ENABLED_IN flags in nsCSSPropList.h match those in Servo side.
Bug: 1452542
Reviewed-by: emilio
MozReview-Commit-ID: 48t5u1D5rZX
2018-04-28 10:26:00 +02:00
Xidorn Quan
ff9325de5e
style: Use snake_case naming for nsCSSPropertyID of alias as well.
Bug: 1452542
Reviewed-by: emilio
MozReview-Commit-ID: 242ms8wBDIU
2018-04-28 10:26:00 +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
Bobby Holley
c06e3dcd58
style: Pass a bonafide nsACString to Servo.
This will allow the Rust code hold a copy-free strong reference to the string
past callstack unwind.

Bug: 1454460
Reviewed-by: bz
MozReview-Commit-ID: HCop9h2abZU
2018-04-28 10:25:59 +02:00