Anthony Ramine
260e05320c
Replace LengthOrNone by a specific type for the perspective property
...
This was its only use, and it was bugged: AFAIK this didn't properly
clamp animated values below 0.
2018-02-26 22:32:06 +01:00
Anthony Ramine
4a98fa70bf
Streamline parsing of NonNegativeLengthOrNumber a bit
2018-02-26 22:11:17 +01:00
Anthony Ramine
f097dfad59
Reorder some stuff in gecko.mako.rs
2018-02-26 15:38:30 +01:00
Emilio Cobos Álvarez
a2382483f0
style: Remove useless dereferencing.
2018-02-24 23:26:55 +01:00
Emilio Cobos Álvarez
13f61a6e5f
style: Indent properly a couple more functions.
2018-02-24 23:23:16 +01:00
Emilio Cobos Álvarez
a6c6ef91e0
style: Reference #20116 from a few places.
2018-02-24 22:49:32 +01:00
Emilio Cobos Álvarez
f2a808ad58
style: Break needs_animations_update into pieces.
...
To hopefully make some sense out of it.
2018-02-24 22:45:51 +01:00
Emilio Cobos Álvarez
e30a4d2ad2
style: return early in needs_animations_update.
2018-02-24 22:45:49 +01:00
Emilio Cobos Álvarez
e5bd8fc5d8
style: Return early instead of indenting in animation code.
...
And also leave some WTF comments, because they make no sense so far.
2018-02-24 22:45:46 +01:00
Emilio Cobos Álvarez
e77dd773d8
style: Other miscellaneous cleanup.
2018-02-24 22:45:45 +01:00
Emilio Cobos Álvarez
23d9462d23
style: Remove unused and somewhat dubious GeckoElement::set_data.
2018-02-24 22:45:44 +01:00
Emilio Cobos Álvarez
601a351632
style: Remove some get_ prefixes from Gecko functions.
2018-02-24 22:45:43 +01:00
Emilio Cobos Álvarez
f2efd04a5d
style: Make Element::id not clone the attribute.
2018-02-24 22:45:43 +01:00
Emilio Cobos Álvarez
98c9292ecb
style: Remove get_ prefix from get_state and get_id.
2018-02-24 22:45:42 +01:00
Emilio Cobos Álvarez
b8fb41da0c
style: Remove get_css_transitions_info and might_need_transition_update_per_property from TElement.
...
They're only called from wrapper.rs, there's no need to expose them in the
common trait.
2018-02-24 22:45:41 +01:00
Emilio Cobos Álvarez
607cf5aa3c
style: Remove the get_ prefix from get_smil_override, and other animation stuff.
2018-02-24 22:45:41 +01:00
Emilio Cobos Álvarez
c5bfc81b74
style: Remove get_animation_rule_by_cascade.
...
It's pretty useless.
2018-02-24 22:45:40 +01:00
Emilio Cobos Álvarez
8d34aacb3b
style: Remove some useless explicit dereferencing.
2018-02-24 22:45:39 +01:00
Emilio Cobos Álvarez
7ab4b21bc3
selectors: Remove the get_ prefix from get_local_name and get_namespace.
2018-02-24 22:45:38 +01:00
Emilio Cobos Álvarez
da99f159f4
style: Add a shadow root accessor.
...
I'm going to use it in a bit.
2018-02-24 20:29:36 +01:00
Anthony Ramine
0a3f30fb12
Return an error when animating column-count: auto
...
This changes the behaviour of animations of `column-count`
(hello Captain Obvious) but this is a bugfix.
2018-02-22 10:23:58 +01:00
Anthony Ramine
761689f32d
Replace PositiveIntegerOrAuto by ColumnCount
...
It was its only use.
2018-02-22 10:16:46 +01:00
Hiroyuki Ikezoe
2559cfd404
Update bindings.
2018-02-22 07:54:32 +09:00
Hiroyuki Ikezoe
42b0ab77f4
Post DISPLAY_CHANGED_FROM_NONE sequential task if the display property is changed from 'none' in the case the element has script animations
2018-02-22 06:00:07 +09:00
Hiroyuki Ikezoe
6bba9d4dab
Add a new sequential task flag for display propery changes from 'none'
...
Unlike CSS animations/transitions, script animations keep alive on display:none
elements, so once the display property was changed to others in normal
styling, we need to do styling for the script animations in the second
animation traversal. Otherwise, the styling for the script animations will
be deferred to the next frame.
2018-02-22 06:00:07 +09:00
Hiroyuki Ikezoe
5ba2e874b1
Factor out a new function to check display property is changed from 'none' to other
2018-02-22 06:00:07 +09:00
bors-servo
691f3be24a
Auto merge of #20082 - emilio:ignore-existing-styles, r=bholley
...
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.
<!-- 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/20082 )
<!-- Reviewable:end -->
2018-02-21 06:09:15 -05:00
bors-servo
2c060eb81a
Auto merge of #20081 - emilio:more-longhand-stuff, r=nox
...
style: More serialization tweaks.
This still doesn't fix everything. In particular, we need to check whether the
subproperty will be enabled in Longhands and LonghandsToSerialize too.
I haven't decided yet on what's the best way to do that.
<!-- 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/20081 )
<!-- Reviewable:end -->
2018-02-20 23:49:19 -05:00
Emilio Cobos Álvarez
e47b3b23ab
style: Update bindings.
2018-02-20 21:08:21 +01:00
bors-servo
05b8ba0a48
Auto merge of #20079 - servo:ZEH-INDEX, r=emilio
...
Replace IntegerOrAuto with ZIndex
It's its only use.
<!-- 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/20079 )
<!-- Reviewable:end -->
2018-02-20 12:13:40 -05:00
Emilio Cobos Álvarez
0b1f78275c
style: Remove unneeded whitespace.
...
I bet it was added when this code was part of a mako file.
2018-02-20 16:32:13 +01:00
Anthony Ramine
b44ffcf498
Replace IntegerOrAuto with ZIndex
...
It's its only use.
2018-02-20 15:18:22 +01:00
Emilio Cobos Álvarez
1359c7c218
style: Don't try to serialize the same shorthand over and over.
...
I looked at what were we doing in that loop, and we're doing tons of dumb stuff.
In particular, we try to serialize the "all" shorthand all the time. This patch
prevents us from trying to serialize shorthands that we've already tried to
serialize.
2018-02-20 14:21:35 +01:00
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