Commit graph

783 commits

Author SHA1 Message Date
Botond Ballo
5e2622f259 Bug 951793 - Style support for overscroll-behavior in Stylo. r=emilio 2017-11-24 16:48:04 -05:00
CYBAI
20cfefbbbd style: Move -moz-script-size-multiplier outside of mako 2017-11-23 10:26:50 +08:00
Emilio Cobos Álvarez
8de554f334
style: Move property allowance tests to PropertyId::parse_into.
It's not only more consistent (since we have a proper ParserContext there), but
also fixes a bunch of bugs where Gecko accidentally exposes and allows setting
internal state because of conversions from nsCSSPropertyID to PropertyId.

This adds the extra complexity of caring about aliases for longer, but that's
probably not a big deal in practice, since we also have PropertyDeclarationId.

MozReview-Commit-ID: C2Js8PfloxQ
2017-11-21 14:26:16 +01:00
Cameron McCormack
f2bc28f358 style: Update layer filling function call. 2017-11-21 12:25:14 +08:00
bors-servo
9863d51451 Auto merge of #19227 - servo:array-warn, r=emilio
Work around "this expression will panic at run-time" warnings

CC https://github.com/rust-lang/rust/issues/45850

<!-- 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/19227)
<!-- Reviewable:end -->
2017-11-15 11:00:29 -06:00
Simon Sapin
aca0015930 Work around "this expression will panic at run-time" warnings
CC https://github.com/rust-lang/rust/issues/45850
2017-11-15 14:31:39 +01:00
Emilio Cobos Álvarez
69ddb9501b
style: Remove some uses of unused unsafe. 2017-11-15 13:26:24 +01:00
Xidorn Quan
79ea639458 Add general impl in gecko_properties for TransformOrigin value and add -moz-window-transform-origin. 2017-11-12 10:59:55 -08:00
Xidorn Quan
dfbf632fd6 Add general impl in gecko_properties for Transform value and add -moz-window-transform. 2017-11-12 10:59:54 -08:00
Xidorn Quan
8b9bbfea75 Use helpers.predefined_type for transform property. 2017-11-12 10:59:53 -08:00
CYBAI
aeae3113bf style: Move font-variant-alternates outside of mako 2017-11-11 02:21:12 +08:00
CYBAI
0f57d250bb style: Move font-size outside of mako 2017-11-08 14:31:06 +08:00
Gecko Backout
2c1b041fc6 Backed out changeset d77275db6419 (bug 1374178) for failure reftests/transform-3d/translatez-1a.html r=backout a=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19106
2017-11-07 06:49:27 +00:00
Xidorn Quan
7dfcbb582a Add general impl in gecko_properties for TransformOrigin value and add -moz-window-transform-origin. 2017-11-06 11:49:53 -08:00
Xidorn Quan
9f5195eeec Add general impl in gecko_properties for Transform value and add -moz-window-transform. 2017-11-06 11:49:52 -08:00
Xidorn Quan
79fb584eac Use helpers.predefined_type for transform property. 2017-11-06 11:49:50 -08:00
bors-servo
107ead64d0 Auto merge of #19101 - CYBAI:moz-script-level-out-of-mako, r=emilio
style: Move font -moz-script-level outside of mako

This is a sub-PR of #19015
r? emilio

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19068 (github issue number if applicable).
- [x] These changes do not require tests because _____

<!-- 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/19101)
<!-- Reviewable:end -->
2017-11-03 11:09:39 -05:00
CYBAI
d316c55590 style: Move font -moz-script-level outside of mako 2017-11-03 09:49:19 +08:00
Manish Goregaokar
cb9645cd17
Comments and minor fixes 2017-11-02 14:37:54 -07:00
Manish Goregaokar
e15695289d
Add support for transform functions with an optional final argument in gecko glue 2017-11-02 14:30:08 -07:00
Manish Goregaokar
e20c508a6e
Add support for 2D matrices in Gecko glue 2017-11-02 14:30:07 -07:00
Manish Goregaokar
fc29de8986
Add support for more functions in Gecko glue 2017-11-02 14:30:06 -07: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
Manish Goregaokar
6631594e28
Replace old transform code with new generic code 2017-11-02 14:30:04 -07:00
Emilio Cobos Álvarez
b721215a00
style: Update bindgen to 0.31.3.
Constified enums are default now. I think I want to introduce an option to
bindgen to allow setting the default enum behavior, but it doesn't need to block
this.

The ServoBindings.toml changes are somewhat hacky, but that's because of
https://github.com/rust-lang-nursery/rust-bindgen/issues/1125.

Also, the fixups now need to account for whitespace, since quote generates stuff
like root :: nsString, and we don't rustfmt the bindings if there's no rustfmt
installed.

Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: EY5eNnCiTIw
2017-10-31 20:09:18 +01:00
Emilio Cobos Álvarez
480d2267e6
style: Don't force ComputedValues to derive Debug.
The code that uses it is of dubious utility, fwiw, but some of it is used on
Servo, so I'll kill that separately.

Bug: 1412486
Reviewed-by: xidorn
MozReview-Commit-ID: KauvXX32zLM
2017-10-31 17:30:52 +01:00
Bastien Orivel
29b4eec141 Bump bitflags to 1.0 in every servo crate 2017-10-30 23:36:06 +01:00
bors-servo
10227e3cd2 Auto merge of #19051 - CYBAI:moz-script-min-size-no-mako, r=emilio,canaltinova
style: Move font -moz-script-min-size outside of mako

This is a sub-PR for #19015
r? emilio

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #19034 (github issue number if applicable).
- [X] These changes do not require tests because _____

<!-- 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/19051)
<!-- Reviewable:end -->
2017-10-30 15:00:05 -05:00
bors-servo
7f8842f7a9 Auto merge of #19044 - cbrewster:text_overflow_nomako, r=emilio
style: Move text-overflow outside of mako

<!-- Please describe your changes on the following line: -->

---
<!-- 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 are apart of #19015 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because refactoring.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/19044)
<!-- Reviewable:end -->
2017-10-30 14:04:52 -05:00
CYBAI
63cd930fd0 style: Move font -moz-script-min-size outside of mako 2017-10-31 00:44:55 +08:00
Connor Brewster
deb932784e style: Move text-overflow outside of mako 2017-10-27 23:09:05 -05:00
Boris Chiou
3a29c63250 Handle rotate, rotate{x|y|z}, and skew{x|y} properly when cloning transforms. 2017-10-27 21:18:31 +02:00
Boris Chiou
1f5551c397 Add Servo_AnimationValue_Transform which creates an AnimationValue of transform. 2017-10-27 21:18:11 +02:00
Emilio Cobos Álvarez
328f142f38
style: Cleanup a bit the scroll-snap-type properties.
Still not perfect, but at least a bit more consistent.
2017-10-25 20:12:37 +02:00
bors-servo
f9f71c7ed1 Auto merge of #19005 - emilio:less-mako-more-joy, r=jdm
style: Move animation-name and animation-iteration-count outside of mako.

<!-- 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/19005)
<!-- Reviewable:end -->
2017-10-24 15:29:21 -05:00
Emilio Cobos Álvarez
dc414134bf
style: Move animation-iteration-count outside of mako. 2017-10-24 22:28:34 +02:00
Emilio Cobos Álvarez
fd1e2c1f3f
style: Move background-repeat and mask-repeat outside of mako. 2017-10-24 15:31:11 +02: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
J. Ryan Stinnett
cedc17550c Clear visited rules for text inheritance
There are two key steps when resolving text styles with `::first-line`:

1. `ResolveStyleForText` computes the initial style of the text via
   `Servo_ComputedValues_Inherit`
2. `ReparentStyleContext` is called to update style data when the first line
   of text is moved to be a child of the `::first-line` frame

Before this patch, `Servo_ComputedValues_Inherit` would clear out unvisited
rules, but visited styles (with rules inside) were cloned as-is, meaning that
step 1 might leave the text node with a style that has:

* Unvisited rules: None
* Visited rules: Some

When we later go to step 2 and re-parent onto the `::first-line` styles, we try
to cascade with these leftover visited rules.  This causes any `::first-line`
styles from our parent to be overridden by these rules which are no longer quite
right for the new frame tree.

In this patch, we resolve this by changing `StyleBuilder::for_inheritance`
(which is used by step 1's `Servo_ComputedValues_Inherit`) to also clear out
visited rules, so that we use the same logic for both unvisited and visited text
styles when reparenting onto the `::first-line` frame.

MozReview-Commit-ID: 3sgc4eGHBXs
2017-10-11 18:45:45 -05:00
Hiroyuki Ikezoe
e0ef378b20 Use atom for animation-name property 2017-10-10 17:10:02 +09:00
Nicholas Nethercote
7628c1236a Rename nsIAtom as nsAtom.
Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than
nsIAtom.
2017-10-09 09:27:11 +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
Ting-Yu Lin
3547a59e28 style: Remove refcount for StyleBasicShape
This is due to Bug 1404243 Part 3.

MozReview-Commit-ID: DKymebmAYLX
2017-10-02 11:50:30 +08:00
Emilio Cobos Álvarez
4933a54803
style: deduplicate some code in the ComputedValues code. 2017-10-01 13:27:15 +02:00
Emilio Cobos Álvarez
2adfd84636
style: Avoid being so Arc-happy in the custom properties code. 2017-10-01 13:27:15 +02:00
Emilio Cobos Álvarez
3215e36b5b
style: Cleanup the animated value setup.
We have three different enums to represent slightly different things. Reuse them
properly, and kill some code in the animated_properties module while at it.

MozReview-Commit-ID: 5ZAly8f4lWy
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-29 13:20:50 +02:00
Nicholas Nethercote
7019d42523 Devirtualize nsIAtom. 2017-09-27 12:40:31 +10:00
Michael Layzell
c1c98659b9 Update ns[C]String::from -> ns[C]Str::from where possible 2017-09-26 11:03:35 -04:00
Emilio Cobos Álvarez
614da6b4a1
style: Simplify paint-order gecko-related code.
We share value representation, so there's no reason to do this in a more complex
way.

MozReview-Commit-ID: BITfCPqTkal
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-25 16:07:33 +02:00