Commit graph

4994 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
3faba0cfff
style: Remove some no longer needed type arguments. 2017-07-15 19:02:19 +02:00
Pavel Sergeev
729b8120e0 rustify if statements style 2017-07-15 19:57:47 +03:00
Emilio Cobos Álvarez
bf9369b29d
script: Move the layout_wrapper outside of script.
This allows us to have ensure_data() and clear_data() functions on the TElement
trait, instead of hacking around it adding methods in random traits.

This also allows us to do some further cleanup, which I'd rather do in a
followup.
2017-07-15 16:41:12 +02:00
Hiroyuki Ikezoe
0053efb154 Update bindings. 2017-07-15 11:54:43 +09:00
Hiroyuki Ikezoe
e700a66e9f Preserve restyle hints after ForThrottledAnimationFlush restyle.
Those remaining restyle hints are needed for normal traversal later.
2017-07-15 11:54:43 +09:00
bors-servo
3fb309c755 Auto merge of #17696 - jyc:image-orientation-redux, r=Manishearth
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.

Were reviewed here: https://reviewboard.mozilla.org/r/155336/

<!-- 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
- [ ] These changes fix [Bugzilla Bug 1355380](https://bugzilla.mozilla.org/show_bug.cgi?id=1355380) (github issue number if applicable).

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

<!-- 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/17696)
<!-- Reviewable:end -->
2017-07-14 18:54:45 -07:00
Nazım Can Altınova
ade76f10b7 Convert TrackList's 'values' field to store only TrackSize.
It was storing both TrackSize and TrackRepeat before and TrackRepeat have to be
converted into sequence of TrackSize during serialization. Instead of doing this
in serialization process(which is hard and hacky), we converted to do this in
parsing process. We were doing this conversion in the ComputedValue conversion.
So we only had to move this process to parsing.
2017-07-14 15:55:40 -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
bors-servo
bb0c05dd2b Auto merge of #17732 - emilio:font-size-as-ratio, r=nox
style: Simplify font_size::SpecifiedValue::as_font_ratio.

<!-- 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/17732)
<!-- Reviewable:end -->
2017-07-14 05:01:48 -07:00
Emilio Cobos Álvarez
e30ed4ef44
style: Simplify font_size::SpecifiedValue::as_font_ratio.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-07-14 13:47:54 +02:00
Emilio Cobos Álvarez
310be02ba8
style: Respect calc for percentages. 2017-07-14 13:43:27 +02:00
bors-servo
a240054c93 Auto merge of #17729 - emilio:cursor-progress, r=heycam
stylo: Honor cursor: progress.

Gecko maps it to NS_STYLE_CURSOR_SPINNING:

http://searchfox.org/mozilla-central/rev/cbd628b085ac809bf5a536109e6288aa91cbdff0/layout/style/nsCSSProps.cpp#1217

<!-- 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/17729)
<!-- Reviewable:end -->
2017-07-14 03:04:38 -07: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
bors-servo
6597178b91
Auto merge of #17701 - bholley:reuse_allocations, r=emilio
reuse the bloom filter and style sharing cache across traversals

https://bugzilla.mozilla.org/show_bug.cgi?id=1380198

<!-- 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/17701)
<!-- Reviewable:end -->
2017-07-14 11:01:07 +02:00
Emilio Cobos Álvarez
af36ce2ae1
style: Ensure sequential tasks run after the bloom filter is dropped.
MozReview-Commit-ID: 3LjiPP7THg7
2017-07-14 11:00:19 +02:00
bors-servo
1c85c55d02 Auto merge of #17713 - emilio:less-code-is-lovely, r=heycam
style: Kill some style sharing code.

It's trivial to do so after #17688.

<!-- 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/17713)
<!-- Reviewable:end -->
2017-07-14 00:25:37 -07:00
Emilio Cobos Álvarez
bd10081919
style: Move comment to a closer location. 2017-07-14 09:24:38 +02:00
Cameron McCormack
69b839f22e style: Update Gecko bindings. 2017-07-14 14:20:41 +08:00
Cameron McCormack
e8ffd9dbba style: Add FFI function to compare ComputedValues for custom property differences. 2017-07-14 14:19:01 +08:00
bors-servo
18c5ba108d Auto merge of #17722 - upsuper:ruby-fixup, r=heycam,bz
Implement style adjustments for ruby

This is the Servo side changes of [bug 1378287](https://bugzilla.mozilla.org/show_bug.cgi?id=1378287) and [bug 1364274](https://bugzilla.mozilla.org/show_bug.cgi?id=1364274).

<!-- 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/17722)
<!-- Reviewable:end -->
2017-07-13 20:02:36 -07:00
bors-servo
394921e33c Auto merge of #17716 - emilio:reconstruct-root, r=heycam
style: Don't early return before updating the root font-size.

We never use the reconstruct path for the root, but feels less handwavy.

<!-- 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/17716)
<!-- Reviewable:end -->
2017-07-13 18:57:47 -07:00
Xidorn Quan
1362ba5f3c Update binding file. 2017-07-14 10:54:00 +10:00
Xidorn Quan
6a12de1c1a Add style adjustments for ruby. 2017-07-14 10:53:58 +10:00
Xidorn Quan
fcf37b19fd Move HAS_TEXT_DECORATION_LINES setting into StyleAdjuster. 2017-07-14 10:53:50 +10:00
Xidorn Quan
86799d4d6e Inherit computed value flags when inheriting computed values. 2017-07-14 10:53:48 +10:00
Xidorn Quan
2a05c29c30 Rename HAS_TEXT_DECORATION_LINE to match gecko side name. 2017-07-14 10:53:46 +10:00
Xidorn Quan
5270b766c1 Skip parent-display-based display type fixup for all anonymous boxes. 2017-07-14 10:53:38 +10:00
bors-servo
788ba8ccf0 Auto merge of #17717 - emilio:style-sharing-stop, r=bzbarsky
style: Don't stop looking at the sharing cache for various reasons.

All the information that made those failures expensive is now lazily computed
and cached, or eagerly computed anyway, so seems not worth to stop iteration.

<!-- 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/17717)
<!-- Reviewable:end -->
2017-07-13 15:05:07 -07:00
Simon Sapin
09d6c83c50 Use match instead of if let of one-line branches. 2017-07-13 16:58:19 +02:00
Emilio Cobos Álvarez
8667cea4ca
style: Don't stop looking at the sharing cache for various reasons.
All the information that made those failures expensive is now lazily computed
and cached, or eagerly computed anyway, so seems not worth to stop iteration.
2017-07-13 16:23:56 +02:00
Simon Sapin
34c5a21691 Merge per-property substitute_variables* functions into one. 2017-07-13 16:23:36 +02:00
Simon Sapin
3d3c196d90 Fix shorthand parsing pushing declarations when parse_entirely returns Err 2017-07-13 16:23:35 +02:00
Simon Sapin
66c357feef Fix handling of all shorthand with var() functions 2017-07-13 16:23:14 +02:00
Simon Sapin
42813bc813 Move property value parsing from longhand/shorthand ID into separate methods. 2017-07-13 16:23:13 +02:00
Simon Sapin
54f1325a49 var() functions in longhands: use a single code path with IDs
… rather than generating similar code for every longhand property
2017-07-13 16:23:12 +02:00
Simon Sapin
252e52e24e var() functions in shorthands: use a single code path with IDs
… rather than generating similar code for each shorthand.
2017-07-13 16:23:11 +02:00
Simon Sapin
8a8614eccd CSS-wide keywords parsing in longhands: use a single code path with IDs
… rather than generating similar code for every longhand property.
2017-07-13 16:23:10 +02:00
Simon Sapin
a5b80e2d75 CSS-wide keywords parsing in shorthand: use a single code path with IDs
… rather than generating similar code for each shorthand.
2017-07-13 16:23:09 +02:00
Simon Sapin
3075746edd Property validity checks: generated tables rather than genrated code 2017-07-13 16:23:08 +02:00
Emilio Cobos Álvarez
f77bfedb9e
style: Don't early return before updating the root font-size.
We never use the reconstruct path for the root, but feels less handwavy.
2017-07-13 16:00:20 +02:00
Emilio Cobos Álvarez
62310d9bd5
style: Don't use the current element info for cached validation data.
We can take it straight from the validation target.
2017-07-13 15:36:59 +02:00
Emilio Cobos Álvarez
36310e3b66
style: Kill some style sharing code.
MozReview-Commit-ID: 42MyHx3QHuu
2017-07-13 15:32:20 +02:00
bors-servo
347cbb0635 Auto merge of #17711 - ferjm:bug1367274.linear.gradient, r=xidorn
Implement serialization of linear-gradient the same ways as in Gecko

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

From https://bugzilla.mozilla.org/show_bug.cgi?id=1367274

<!-- 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/17711)
<!-- Reviewable:end -->
2017-07-13 05:17:06 -07:00
bors-servo
9515abbca3 Auto merge of #17707 - emilio:invalidation-less-memory, r=heycam
stylo: Waste less memory in invalidation stuff and style rules.

This should help a lot with https://bugzilla.mozilla.org/show_bug.cgi?id=1380488.

<!-- 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/17707)
<!-- Reviewable:end -->
2017-07-13 04:15:15 -07:00
Fernando Jiménez Moreno
6ae4bf6ee8 Implement serialization of linear-gradient the same ways as in Gecko 2017-07-13 12:20:30 +02:00
bors-servo
9d74ae890b Auto merge of #17710 - emilio:revert-bloom-sharing, r=heycam
Revert "Auto merge of #17701 - bholley:reuse_allocations, r=emilio"

This reverts commit ebfc8f5858, reversing
changes made to 5585ff2c44.

Animation code can reenter and create a new TLS context from the traversal
SequentialTask, so this won't work as written, and it's making test fails.

<!-- 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/17710)
<!-- Reviewable:end -->
2017-07-13 01:26:34 -07:00
Emilio Cobos Álvarez
a34f288b98
Revert "Auto merge of #17701 - bholley:reuse_allocations, r=emilio"
This reverts commit ebfc8f5858, reversing
changes made to 5585ff2c44.

Animation code can reenter and create a new TLS context from the traversal
SequentialTask, so this won't work as written.
2017-07-13 09:58:08 +02:00
bors-servo
9451b41d33 Auto merge of #17702 - upsuper:python-addr-in-generated, r=emilio
Avoid random python address to be added to generated files

This would catch cases like #17691 and avoid regressing [bug 1380327](https://bugzilla.mozilla.org/show_bug.cgi?id=1380327) in this manner.

<!-- 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/17702)
<!-- Reviewable:end -->
2017-07-12 23:34:58 -07:00
Emilio Cobos Álvarez
445b8fb3e8
style: Remove SelectorAndHashes. 2017-07-13 05:44:55 +02:00
Emilio Cobos Álvarez
dee4aea264
style: Remove hashes from style rules and dependencies.
Dependencies are very numerous, and now we shouldn't be getting so many of them.

Style rules just don't need them, so it's a waste of memory.
2017-07-13 05:44:53 +02:00