Commit graph

6718 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
c09257b540
style: There's no need to check the serialized custom properties.
Given they're not duplicated, and can't be part of a shorthand.
2018-02-20 14:21:34 +01:00
Emilio Cobos Álvarez
94b687306f
style: Cleanup always-false argument to Servo_ResolveStyleLazily.
I changed this setup in https://bugzilla.mozilla.org/show_bug.cgi?id=1414999,
because it was totally unsound.
2018-02-20 12:59:21 +01:00
bors-servo
4d7383f4f3
Auto merge of #20078 - emilio:decl-block-serialization, r=nox
style: Rejigger serialization of a declaration block to not look at the shorthands length.

This is because I'm going to make shorthands() and longhands() return an
iterator, so that we account for prefs properly
(https://bugzilla.mozilla.org/show_bug.cgi?id=1438234).

<!-- 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/20078)
<!-- Reviewable:end -->
2018-02-20 06:40:43 -05:00
Emilio Cobos Álvarez
e46f910b66
style: Rejigger serialization of a declaration block to not look at the shorthands length.
This is because I'm going to make shorthands() and longhands() return an
iterator, so that we account for prefs properly
(https://bugzilla.mozilla.org/show_bug.cgi?id=1438234).
2018-02-20 10:05:58 +01:00
Emilio Cobos Álvarez
c676b52448
style: Sprinkle some #[inline] on trivial methods. 2018-02-20 10:05:12 +01:00
Emilio Cobos Álvarez
f896cb63a6
style: Make DeclarationBlock::get O(1) if we know the longhand isn't there. 2018-02-20 10:04:17 +01:00
bors-servo
be902d56c0
Auto merge of #20073 - servo:keywordsize, r=emilio
Remove some useless manual layout optimisation for KeywordSize

<!-- 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/20073)
<!-- Reviewable:end -->
2018-02-19 07:02:45 -05:00
Anthony Ramine
e976955634 Remove some useless manual layout optimisation for KeywordSize 2018-02-19 12:37:46 +01:00
Emilio Cobos Álvarez
df132b4954
style: Update bindings. 2018-02-19 11:45:47 +01:00
Emilio Cobos Álvarez
7473796aba
style: Unship the legacy syntax for -moz-transform.
Intent to unship link:

  https://groups.google.com/d/msg/mozilla.dev.platform/T3PGm97MPNU/59XUavMlCgAJ

Reviewed-by: xidorn
Bug: 1438297
MozReview-Commit-ID: 6ybGBasPAWU
2018-02-19 10:46:14 +01:00
Xidorn Quan
f518e55c28 Add sizeof for AuthorStyles. 2018-02-19 15:12:13 +11:00
bors-servo
d423e54d58
Auto merge of #20065 - emilio:note-stuff, r=nox
style: Cleanup GeckoElement::note_explicit_hints

What it's doing is not so complicated.

<!-- 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/20065)
<!-- Reviewable:end -->
2018-02-16 15:33:48 -05:00
bors-servo
d092c2e877
Auto merge of #20064 - emilio:cleanup-length-parsing, r=nox
style: Trivially cleanup length parsing.

Mostly formatting signatures properly, but also removing useless functions and
stuff.

<!-- 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/20064)
<!-- Reviewable:end -->
2018-02-16 14:43:50 -05:00
Emilio Cobos Álvarez
2c03609dc1
style: Cleanup GeckoElement::note_explicit_hints.
What it's doing is not so complicated.
2018-02-16 19:00:21 +01:00
Emilio Cobos Álvarez
36e6d57aee
style: Inline maybe_restyle, since it only has one caller. 2018-02-16 19:00:21 +01:00
Emilio Cobos Álvarez
fdc8405330
style: Trivially cleanup length parsing.
Mostly formatting signatures properly, but also removing useless functions and
stuff.
2018-02-16 16:04:19 +01:00
Emilio Cobos Álvarez
a6afaf2428
style: Update bindings. 2018-02-16 15:21:08 +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
bors-servo
ff58cb0a3f
Auto merge of #20056 - emilio:moz-user-input, r=bz
style: Remove -moz-user-input: enabled / disabled.

https://groups.google.com/d/msg/mozilla.dev.platform/E6tfP__wkwg/YVW6nPX9CQA

Bug: 1405087
Reviewed-by: bz

<!-- 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/20056)
<!-- Reviewable:end -->
2018-02-15 14:57:52 -05:00
Anthony Ramine
d8c43ac855 Animate NonNegativeLength as its inner type 2018-02-15 12:03:02 +01:00
Anthony Ramine
52f0fcabad Properly implement ToAnimatedZero for BorderSpacing 2018-02-15 12:03:01 +01:00
Anthony Ramine
b17fea1d7f Make KeywordInfo generic 2018-02-15 12:03:00 +01:00
Anthony Ramine
aea66a9fb6 Move FontTag to the generic module 2018-02-15 12:03:00 +01:00
Emilio Cobos Álvarez
db689c85c2
style: Update bindings. 2018-02-15 11:50:50 +01:00
Emilio Cobos Álvarez
3378d29548
style: Also nix -moz-user-input: enabled.
It only has one use, has the same effect that "auto", and should have no effect
in <a> elements anyway (plus it's not overridden or used in that file at all
anyway), so we can remove its only use instead.

I can also change that use to "auto" if you want, but bug 760876 doesn't mention
-moz-user-input at all, so I think this is quite useless...

See the intent to unship for research on out of the tree usage:

  https://groups.google.com/d/msg/mozilla.dev.platform/E6tfP__wkwg/YVW6nPX9CQAJ

Bug: 1405087
Reviewed-by: bz
MozReview-Commit-ID: 8EzQlzu9drE
2018-02-15 11:49:24 +01:00
Emilio Cobos Álvarez
5c19eb5998
style: Nix -moz-user-input: disabled.
It does nothing, and there's only one use of it anyway.

See the intent to unship for research on out of the tree usage:

  https://groups.google.com/d/msg/mozilla.dev.platform/E6tfP__wkwg/YVW6nPX9CQAJ

Bug: 1405087
Reviewed-by: bz
MozReview-Commit-ID: 5XnsewYdvgQ
2018-02-15 11:49:00 +01:00
Emilio Cobos Álvarez
502b734a1a
style: Update a couple other spec links. 2018-02-14 20:29:40 +01:00
Emilio Cobos Álvarez
808102035e
style: Deindent and reuse some more code in single_value_to_css.
This method is a hack on its own, let's try to scope it a bit...
2018-02-14 20:29:11 +01:00
Emilio Cobos Álvarez
f3e38aca1b
style: Move the shorthand serialization code to its own function. 2018-02-14 20:29:10 +01:00
Emilio Cobos Álvarez
5c2ac8cf8b
style: Deindent a giant loop guarded by an !is_empty() condition. 2018-02-14 20:29:09 +01:00
Emilio Cobos Álvarez
ba7629a17e
style: Update a spec link. 2018-02-14 20:29:09 +01:00
Emilio Cobos Álvarez
1548520710
style: Move most of allowed_in to NonCustomPropertyId.
Also simplify the servo property id to gecko property id conversion to be faster
and less repetitive.
2018-02-14 19:10:28 +01:00
bors-servo
112bb55b92
Auto merge of #20040 - servo:derive-all-the-things, r=emilio
Change how some clamped types are animated

<!-- 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/20040)
<!-- Reviewable:end -->
2018-02-14 05:48:10 -05:00
Xidorn Quan
ea8a952d51 Remove initial values from font-face descriptors
They are not used anyway.
2018-02-14 17:35:57 +11:00
Xidorn Quan
6ffa888dd6 Integrate font-variation-settings descriptor with stylo 2018-02-14 11:15:58 +11:00
Anthony Ramine
056abcbf5f Change AnimatedValue for GreaterThanOrEqualToOneNumber to CSSFloat 2018-02-13 16:12:31 +01:00
Anthony Ramine
f89ebf7fe9 Change AnimatedValue for NonNegativeNumber to CSSFloat 2018-02-13 16:12:30 +01:00
Anthony Ramine
da5acc81d2 Change AnimatedValue for NonNegativeLengthOrPercentage to its inner type 2018-02-13 16:12:29 +01:00
Anthony Ramine
b79dc269f7 Change AnimatedValue for PositiveInteger to CSSInteger 2018-02-13 16:12:29 +01:00
Xidorn Quan
caa15ab6a7 Output unquoted family name as a series of identifiers.
It tries to serialize unquoted family names as a series of identifiers.
For family names which contain special white spaces like leading white
space, trailing white space, and consective white spaces, unquoted names
are marked quoted in parsing to avoid complicating serialization code.
2018-02-13 09:17:19 +11:00
bors-servo
e0b38f9c49
Auto merge of #20025 - servo:derive-all-the-things, r=emilio
Merge similar arms in AnimationValue::from_declaration 🐉🐲

This slims that function by 12KB according to bloaty.

<!-- 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/20025)
<!-- Reviewable:end -->
2018-02-12 10:46:42 -05:00
bors-servo
3a42f6f988
Auto merge of #20030 - emilio:useless-return-is-useless, r=nox
style: Remove useless code after #19994

<!-- 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/20030)
<!-- Reviewable:end -->
2018-02-12 08:47:36 -05:00
Emilio Cobos Álvarez
9744840e5a
style: Remove useless code after #19994 2018-02-12 13:52:29 +01:00
bors-servo
889bb012ef
Auto merge of #20027 - emilio:bye-ordermap, r=nox
style: Back out ordermap.

It was worth a shot!

<!-- 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/20027)
<!-- Reviewable:end -->
2018-02-12 07:36:04 -05:00
Emilio Cobos Álvarez
25868beabd
style: Back out ordermap.
It was worth a shot!
2018-02-12 12:20:46 +01:00
bors-servo
63691f01d7
Auto merge of #20026 - emilio:less-stylist-xbl, r=upsuper
style: Use more CascadeData and less Stylist for XBL stuff.

Just some more use-cases that can be converted right away.

I'm trying to make XBL not use a whole Stylist, slowly...

<!-- 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/20026)
<!-- Reviewable:end -->
2018-02-12 06:03:30 -05:00
Emilio Cobos Álvarez
1bb6ce2c88
style: Use more CascadeData and less Stylist for XBL stuff.
Just some more uses of Stylist in XBL that can be converted right away.

I'm trying to make XBL not use a Stylist, slowly...
2018-02-12 11:25:24 +01:00
Anthony Ramine
18b9775173 Merge similar arms in AnimationValue::from_declaration 🐉🐲
This slims that function by 12KB according to bloaty.
2018-02-12 10:34:30 +01:00
bors-servo
9c94fe4279
Auto merge of #20017 - servo:derive-all-the-things, r=emilio
Optimise more AnimationValue methods 🐉🐲

```
__TEXT	__DATA	__OBJC	others	dec	hex
87101440	5226496	0	64122880	156450816	9534000	XUL.old
87072768	5226496	0	64122880	156422144	952d000	XUL.new
```

<!-- 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/20017)
<!-- Reviewable:end -->
2018-02-11 18:43:17 -05:00
Anthony Ramine
e2c674994a Use ascii_case_insensitive_phf_map in TransitionProperty::parse
This divides the size of this method by 30.
2018-02-12 00:42:34 +01:00