Commit graph

19254 commits

Author SHA1 Message Date
Pyfisch
931f0fcd1d Use rect shorthand constructor in display list builder 2018-02-07 12:21:08 +01:00
Pyfisch
46ada747b0 Use LayoutRects for bounds and overflow in display lists
Convert text runs to glyphs in display list builder.
Remove ComplexClippingRegion and use the WebRender type.
2018-02-07 12:21:08 +01:00
bors-servo
5d209a70ab
Auto merge of #19970 - janczer:change_debug_assertions, r=emilio
Change debug assertions to specific ones

<!-- 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 fix #19962 (github issue number if applicable).

<!-- 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/19970)
<!-- Reviewable:end -->
2018-02-07 06:20:36 -05:00
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
Emilio Cobos Álvarez
d9ae47cb13
style: Fix interpolation of the gecko-size properties.
Followup to #19966 because, well...

The animation code should probably be more obvious.
2018-02-07 07:02:48 +01:00
bors-servo
dc446198a7
Auto merge of #19966 - emilio:bye-gecko-size, r=nox
style: Get rid of gecko_size_type.

It's a hack, should die.

<!-- 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/19966)
<!-- Reviewable:end -->
2018-02-06 21:15:07 -05:00
Emilio Cobos Álvarez
ed2ba30261
style: Sprinkle some comments. 2018-02-07 03:11:14 +01:00
Emilio Cobos Álvarez
32c409d5aa
style: Get rid of gecko_size_type.
This also fixes a style sharing issue with MaxLength, anecdotally.
2018-02-07 02:05:30 +01:00
bors-servo
804b4b3db6
Auto merge of #19957 - gootorov:move-counter-from-mako, r=emilio
style: Move content property out of mako.

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

---
<!-- 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 build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #19936 (github issue number if applicable).

<!-- Either: -->
- [x] These changes do not require tests

<!-- 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/19957)
<!-- Reviewable:end -->
2018-02-06 17:39:03 -05:00
Igor Gutorov
7a00066477 style: Move content property out of mako. 2018-02-07 00:11:57 +02:00
Emilio Cobos Álvarez
100f4cd7c3
style: "%s" % foo is pointless. 2018-02-06 23:06:08 +01:00
Emilio Cobos Álvarez
a0d0769998
style: Move flex-basis out of gecko_size_type. 2018-02-06 23:06:07 +01:00
Emilio Cobos Álvarez
45ba167030
style: Make MozLength / MaxLength a bit more clear and do a bit less work. 2018-02-06 23:06:06 +01:00
bors-servo
dde15d8d65
Auto merge of #19964 - emilio:font-shorthand, r=nox
style: Don't serialize default values of the font shorthand.

This makes us consistent with the old style system and Blink / WebKit.

Not adding a test because shorthands serialization is a mess... :(

Anyway, nothing like fixing bugs by removing code.

Bug: 1436031

<!-- 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/19964)
<!-- Reviewable:end -->
2018-02-06 16:42:23 -05:00
Dan Robertson
6647a2f891 Change selection of the best font for a style
Previously anything with the wrong stretch/italicness was considered
equally bad. Now we consider the wrong weight to be least bad, wrong
boldness of intermediate badness, and wrong itallicness to be most
bad.
2018-02-06 20:46:19 +00:00
Dan Robertson
84de6a84d6 Implement boldness and stretchiness for Freetype
The current implementation for boldness assumes that if Freetype
claims a font is not bold then it must have normal weight. However
fonts with lighter-than-normal weight are not claimed to be bold.
Therefore we get rid of this check.
2018-02-06 20:46:13 +00:00
Emilio Cobos Álvarez
173c9aee61
style: Don't serialize default values of the font shorthand.
This makes us consistent with the old style system and Blink / WebKit.

Not adding a test because shorthands serialization is a mess... :(

Anyway, nothing like fixing bugs by removing code.

Bug: 1436031
2018-02-06 21:42:42 +01:00
bors-servo
36eb711d3b
Auto merge of #19946 - paavininanda:Issue18613, r=jdm
Change Offset_to_text_point function and add unit tests

<!-- 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 fix #18613.

<!-- Either: -->
- [x] Added unit tests and web platform tests

<!-- 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/19946)
<!-- Reviewable:end -->
2018-02-06 15:11:54 -05:00
paavininanda
7b58fb5fdd Changed offset_to_text_point function and added unit tests for the same 2018-02-07 01:18:50 +05:30
Anni Ryynänen
f5a9e16e07 Remove indirect mozjs dependency from compositing 2018-02-06 17:35:09 +02:00
bors-servo
8f24005e17
Auto merge of #19933 - mrobinson:update-wr, r=emilio
Update WebRender

This allows servo to use the ExternalScrollId API from WebRender fixing
some issues related to duplicate scroll root ids.

Fixes #17176.
Fixes #19287.
Fixes #19648.

<!-- 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 #17176, #19287, and #19648.

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

<!-- 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/19933)
<!-- Reviewable:end -->
2018-02-06 09:12:58 -05:00
Martin Robinson
99eb457fc7 Update WebRender
This allows servo to use the ExternalScrollId API from WebRender fixing
some issues related to duplicate scroll root ids.

Fixes #17176.
Fixes #19287.
Fixes #19648.
2018-02-06 15:10:35 +01:00
bors-servo
9faf0cdce5
Auto merge of #19956 - servo:derive-all-the-things, r=emilio
Generate some PropertyDeclaration methods by hand 🐉🐲

We rely on https://github.com/rust-lang/rfcs/pull/2195 to make some enums share the same discriminants by definition.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1428285.

<!-- 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/19956)
<!-- Reviewable:end -->
2018-02-06 08:12:33 -05:00
Anthony Ramine
1f0a1267bb Implement MallocSizeOf for PropertyDeclaration by hand
We merge arms with identical field types.
2018-02-06 14:11:20 +01:00
Anthony Ramine
456c18f767 Implement PartialEq for PropertyDeclaration by hand 🐉🐲
We first check that the discriminants are equal, then we pattern match only
on `*self` and use `PropertyDeclarationVariantRepr` to look into `other` directly.
2018-02-06 14:11:19 +01:00
Anthony Ramine
8ebf0f057f Merge common arms in PropertyDeclaration::to_css 2018-02-06 14:11:18 +01:00
Anthony Ramine
42ea822edf Make LonghandId just be the discriminants of PropertyDeclaration 🐉🐲
This relies on the fact that `#[repr(u16)]` on enums ensure the discriminant will
be the very first field of the enum value. This has always been the case, but it
has been formally defined only since https://github.com/rust-lang/rfcs/pull/2195.

https://bugzilla.mozilla.org/show_bug.cgi?id=1428285
2018-02-06 14:11:14 +01:00
Anthony Ramine
1ec5164900 Generate PropertyDeclaration just after processing all the Mako files 2018-02-06 13:46:33 +01:00
Anthony Ramine
7f98d8e017 Implement Clone for PropertyDeclaration by hand 🐉🐲
This makes the enum `#[repr(u16)]` and generate code that shares the same
Clone::clone call for all variants sharing the same field type.
2018-02-06 13:45:52 +01:00
Anthony Ramine
5195eb38f2 Make all PropertyDeclaration variants have only one field 2018-02-06 13:45:18 +01:00
bors-servo
3a3a7cdc22
Auto merge of #19955 - emilio:number-pseudos-chrome, r=jwatt
style: Make input[type=number] pseudo-elements accessible to chrome.

Bug: 1433389
Reviewed-by: jwatt
MozReview-Commit-ID: 2ycajPYd3CV

<!-- 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/19955)
<!-- Reviewable:end -->
2018-02-05 09:50:35 -05:00
Emilio Cobos Álvarez
1221e9eb30
style: Update bindings. 2018-02-05 13:28:53 +01:00
bors-servo
575fecf810
Auto merge of #19953 - emilio:cleanup, r=wafflespeanut
style: Various cleanups

See each commit for details.

<!-- 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/19953)
<!-- Reviewable:end -->
2018-02-05 07:17:54 -05:00
Emilio Cobos Álvarez
b76bbdf501
style: Make input[type=number] pseudo-elements accessible to chrome.
Bug: 1433389
Reviewed-by: jwatt
MozReview-Commit-ID: 2ycajPYd3CV
2018-02-05 13:05:26 +01:00
Emilio Cobos Álvarez
2090371203
style: Cleanup indentation of Position::parse_quirky. 2018-02-05 13:02:56 +01:00
Emilio Cobos Álvarez
a03aa1b4b9
style: Cleanup the indentation of a function. 2018-02-05 13:02:55 +01:00
Emilio Cobos Álvarez
d4b238bada
style: Cleanup shape-outside code. 2018-02-05 13:02:54 +01:00
Emilio Cobos Álvarez
57ebb2c8af
style: Use debug_assert_eq!. 2018-02-05 13:02:54 +01:00
Emilio Cobos Álvarez
7178e9bf69
style: Remove stray space. 2018-02-05 13:02:53 +01:00
Emilio Cobos Álvarez
412f0133ca
style: Remove unneeded impl block. 2018-02-05 13:02:52 +01:00
Emilio Cobos Álvarez
c72a5623b1
style: Avoid double hash lookup when inserting in OrderMap. 2018-02-05 13:02:52 +01:00
Emilio Cobos Álvarez
001653080d
style: Update bindings. 2018-02-05 11:54:02 +01:00
Emilio Cobos Álvarez
1804f135ec
style: Optimize @keyframes rule insertions.
Bug: 1435214
Reviewed-by: xidorn,hiro
MozReview-Commit-ID: AHwhZynLBv
2018-02-05 11:54:01 +01:00
Emilio Cobos Álvarez
9c66b07b67
style: Make insertion of @font-face rules not necessarily restyle the whole document.
Bug: 1435214
Reviewed-by: xidorn
MozReview-Commit-ID: 5ewKiShUHNi
2018-02-05 11:24:40 +01:00
Anthony Ramine
3918c983e1 Use LonghandId::is_animatable in PropertyDeclaration::is_animatable 2018-02-04 23:23:21 +01:00
Anthony Ramine
90b37cfa21 Use less type aliases from longhands in PropertyDeclaration
This will help us reuse code between different variants in a later patch,
to implement Clone by hand to optimise it.
2018-02-04 22:57:53 +01:00
Anthony Ramine
df11a7fec7 Simplify counter CSS properties 2018-02-04 14:52:38 +01:00
bors-servo
2f8cd0fe22
Auto merge of #19941 - emilio:cleanup-style-builder, r=emilio
style: Handle correctly nested links.

Followup to #19935, since I'm dumb and missed some orange in my try run.

<!-- 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/19941)
<!-- Reviewable:end -->
2018-02-03 15:28:58 -05:00
Emilio Cobos Álvarez
2e08ab1492
style: Handle correctly nested links.
Followup to #19935, since I'm dumb and missed that orange.
2018-02-03 20:45:56 +01:00
bors-servo
bad455138f
Auto merge of #19938 - servo:single-keyword, r=emilio
Simplify single_keyword

<!-- 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/19938)
<!-- Reviewable:end -->
2018-02-03 14:27:18 -05:00