Commit graph

592 commits

Author SHA1 Message Date
Xidorn Quan
0071c7663f Add svg mods and move SVG-related types into them. 2017-08-02 10:03:08 +10:00
Daisuke Akatsuka
f4bd93ea38 Make grid-template-columns/rows animatable 2017-08-01 17:13:42 +09:00
Daisuke Akatsuka
4dcc2d1c9d Make grid-template-areas animatable 2017-08-01 17:12:23 +09:00
Emilio Cobos Álvarez
0e4c7c3722
style: Standardize different methods to inherit and reset properties.
This avoids special-casing justify-items.

MozReview-Commit-ID: FoEs2IHC1t6
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-07-31 11:55:05 +02:00
Emilio Cobos Álvarez
2d9255bff1
style: Get rid of GetParentAllowServo in implementation of CSS 'justify-items' property.
Bug: 1384542
Reviewed-by: heycam
MozReview-Commit-ID: 4qydjqSoVXs
2017-07-31 11:55:04 +02:00
Cameron McCormack
4f525f6fa0 style: Preserve font-family identifier sequence when serializing. 2017-07-30 13:53:34 +08:00
bors-servo
6b320eaad3 Auto merge of #17906 - emilio:calc-bgsize, r=hiro,birtles
style: Don't unconditionally generate Calc values when converting background-size from Gecko.

Bug: 1385140
MozReview-Commit-ID: ERwq50WSvLV

<!-- 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/17906)
<!-- Reviewable:end -->
2017-07-29 06:41:27 -05:00
Boris Zbarsky
7161fff1b8 Add a Stylo API for reparenting a given style.
Servo side of part 4 of the fix for Gecko bug 1324619.  r=emilio
2017-07-28 22:54:06 -04:00
Emilio Cobos Álvarez
23369aee6d
style: Don't unconditionally generate Calc values when converting background-size from Gecko.
Bug: 1385140
MozReview-Commit-ID: ERwq50WSvLV
2017-07-28 14:50:01 +02:00
Cameron McCormack
45df66f9ff style: Remove now-unused empty Variables struct. 2017-07-28 11:57:45 +08:00
Manish Goregaokar
68d67ef3f5 stylo: call update_border_foo when inheriting borders too 2017-07-26 15:48:51 -07:00
Daisuke Akatsuka
40ce3ddd82 make font-variant-alternates animatable 2017-07-26 10:16:39 +09:00
Manish Goregaokar
7cdcfa0f8e stylo: Use saturating ops for clip computation
MozReview-Commit-ID: DYQRM4CJbAg
2017-07-25 14:29:05 -07:00
Manish Goregaokar
9c6f11c965 Allow nonstandard font-weight values for system fonts 2017-07-24 17:24:25 -07:00
Simon Sapin
eb98ae6e04 Update cssparser to 0.18
https://github.com/servo/rust-cssparser/pull/171
2017-07-24 11:39:12 +02:00
Manish Goregaokar
b332a061b4 stylo: Rename ServoComputedValues -> ServoComputedData
ServoComputedValues is confusing because ComputedValues is actually
ServoStyleContext on the C++ side.
2017-07-21 11:04:45 -07:00
Manish Goregaokar
cca0eacf80 stylo: Remove usage of ServoComputedValues from most Gecko code 2017-07-21 08:33:33 -07:00
Manish Goregaokar
3c3e4399da stylo: Remove usage of ServoComputedValues from binding functions 2017-07-21 08:33:11 -07:00
bors-servo
a3c398b5da Auto merge of #17802 - emilio:reland-stuff, r=heycam
Revert "Backed out changeset b10e6ba9cbdb because gecko part had to b…

…e backed out."

This reverts commit b96d96d448.

The fix on the Gecko side is trivial, and I can land it after this lands.

<!-- 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/17802)
<!-- Reviewable:end -->
2017-07-20 20:28:25 -07:00
bors-servo
c81ddeedf3 Auto merge of #17797 - dadaa:bug1378076, r=hiro
make border-XX-style, cursor, -moz-user-select animatable

<!-- 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

<!-- Either: -->
- [X] There are tests for these changes. The test codes are patch 4 and 5 of https://bugzilla.mozilla.org/show_bug.cgi?id=1378076

<!-- 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/17797)
<!-- Reviewable:end -->
2017-07-20 18:20:36 -07:00
Emilio Cobos Álvarez
ef4fbfaa6b
Revert "Backed out changeset b10e6ba9cbdb because gecko part had to be backed out."
This reverts commit b96d96d448.

The fix on the Gecko side is trivial, and I can land it after this lands.
2017-07-20 17:26:53 +02:00
Gecko Backout
b96d96d448 Backed out changeset b10e6ba9cbdb because gecko part had to be backed out. r=backout on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/17796
2017-07-20 13:42:53 +00:00
bors-servo
7b71070c04 Auto merge of #17796 - heycam:calc-difference, r=emilio
style: pass old ComputedValues from Element data into Gecko_CalcStyleDifference

This is the Servo-side part of https://bugzilla.mozilla.org/show_bug.cgi?id=1380133.

<!-- 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/17796)
<!-- Reviewable:end -->
2017-07-20 03:39:15 -07:00
bors-servo
f594ae58a6 Auto merge of #17788 - emilio:clean-cascade, r=heycam
style: Cleanup the cascade a good bit.

Was about the time.

<!-- 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/17788)
<!-- Reviewable:end -->
2017-07-20 02:36:15 -07:00
Emilio Cobos Álvarez
e374a54050
style: Cleanup the cascade a good bit. 2017-07-20 11:20:37 +02:00
bors-servo
20a3b0236d Auto merge of #17776 - canaltinova:disabled-mochitests, r=emilio
More grid serialization and parsing fixes

These are the bugs I discovered while I was re-enabling the disabled grid mochitests. Now all grid mochitests are passing! Additionally I converted `Vec<CustomIdent>`'s into `Box<[CustomIdent]>`. We are storing so many line names in vectors. These should help a bit.

---
<!-- 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

<!-- 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/17776)
<!-- Reviewable:end -->
2017-07-19 23:54:33 -07:00
Cameron McCormack
25dc352d7c style: Pass a &ComputedValues (aka ServoStyleContext*) to Gecko_CalcStyleDifference. 2017-07-20 13:10:11 +08:00
Daisuke Akatsuka
f01ad20f74 make cursor animatable 2017-07-20 12:25:57 +09:00
Nazım Can Altınova
1ab86a46b6 Convert Vec values into boxed slices 2017-07-19 14:26:28 -07:00
Nazım Can Altınova
638a306168 Fix the integer setting of the GridLine struct
GridLine line_num shouldn't be set if it's not parsed. So we can determine if it's set or not for serialization.
2017-07-19 10:36:58 -07:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Emilio Cobos Álvarez
07e1c6e75a
stylo: Cleanup the Gecko bits.
MozReview-Commit-ID: dbVDy1u4vp
2017-07-18 17:35:44 +02:00
Emilio Cobos Álvarez
655c842d2e
style: Cleanup most of the Inner mess.
MozReview-Commit-ID: Ieg2GJT0yUl
2017-07-18 17:34:57 +02:00
Emilio Cobos Álvarez
b113d54987
stylo: Make ComputedValues::to_outer_helper private.
MozReview-Commit-ID: L4VX11FgZg2
2017-07-18 17:34:55 +02:00
Manish Goregaokar
8eafe6a3b7 Fix tidy 2017-07-17 19:43:57 -07:00
Manish Goregaokar
2a49a73f91 stylo: Stop using mStyleIfVisited in Servo 2017-07-17 18:04:46 -07:00
Manish Goregaokar
e78947f8b5 stylo: Remove FFI calls for fetching style structs from ServoComputedValues 2017-07-17 18:04:24 -07:00
Manish Goregaokar
ff4bc5a2c6 stylo: Flatten ServoComputedValues into ServoStyleContext
This patch also removes the duplication of style contexts during the
restyle, because otherwise pointer equality of ServoComputedValues stops
holding (and we assert on that in a few places)
2017-07-17 18:04:01 -07:00
Manish Goregaokar
89930e7565 stylo: Switch Gecko over to ServoStyleContext 2017-07-17 18:03:23 -07:00
Manish Goregaokar
808b1f509b stylo: Use ComputedValuesInner instead of ComputedValues when we don't need it 2017-07-17 18:02:25 -07:00
Manish Goregaokar
04b0ae64f2 stylo: Introduce ComputedValuesInner 2017-07-17 18:01:36 -07:00
Manish Goregaokar
5d78743037 stylo: Replace real ComputedValues with bindgenned ComputedValues2 2017-07-17 18:01:20 -07:00
bors-servo
38f4ae80c4 Auto merge of #17739 - jdm:no-vendor-prefixed-errors, r=emilio
Suppress CSS parser errors for vendor-prefixed properties.

This matches the behaviour of Gecko's CSS parser.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17736
- [X] There are tests for these changes

<!-- 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/17739)
<!-- Reviewable:end -->
2017-07-17 07:10:11 -07:00
Josh Matthews
94d631c1f4 Suppress CSS parser errors for vendor-prefixed properties. 2017-07-17 10:00:31 -04:00
bors-servo
2d37700cf8 Auto merge of #17731 - emilio:percentage-calc, r=nox
style: Respect calc for percentages.

<!-- 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/17731)
<!-- Reviewable:end -->
2017-07-17 01:29:11 -07:00
Jonathan Chan
c6a7f10182 Sync Servo / Gecko image-orientation rounding; pass as enum.
Make Servo's rounding of image-orientation values agree with Gecko's,
and pass orientations directly as an enum instead of as angles.

Depends on a Gecko change to be subsequently landed in m-c.
2017-07-14 14:44:23 -07:00
Emilio Cobos Álvarez
310be02ba8
style: Respect calc for percentages. 2017-07-14 13:43:27 +02:00
Emilio Cobos Álvarez
465e6f14fe
stylo: Honor cursor: progress.
Gecko maps it to NS_STYLE_CURSOR_SPINNING:

http://searchfox.org/mozilla-central/rev/cbd628b085ac809bf5a536109e6288aa91cbdff0/layout/style/nsCSSProps.cpp#1217
2017-07-14 11:26:31 +02:00
Cameron McCormack
e8ffd9dbba style: Add FFI function to compare ComputedValues for custom property differences. 2017-07-14 14:19:01 +08:00
Xidorn Quan
fcf37b19fd Move HAS_TEXT_DECORATION_LINES setting into StyleAdjuster. 2017-07-14 10:53:50 +10:00