Commit graph

31644 commits

Author SHA1 Message Date
bors-servo
e654afbc3e
Auto merge of #19994 - Manishearth:rm-telemetry, r=upsuper
Remove traversal telemetry

<!-- 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/19994)
<!-- Reviewable:end -->
2018-02-08 08:10:09 -05:00
bors-servo
c22baf58d0
Auto merge of #19985 - servo:derive-these-things-too, r=emilio
Derive ComputeSquaredDistance for animated filters

<!-- 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/19985)
<!-- Reviewable:end -->
2018-02-08 06:41:22 -05:00
Manish Goregaokar
9d23962d8e Remove traversal telemetry 2018-02-08 03:04:34 -08:00
bors-servo
48611f2f2e
Auto merge of #19993 - moz-servo-sync:gecko-backout, r=moz-servo-sync
Backed out changeset 24f85c628472 for failing in layout/style/test/test_value_storage.html on a CLOSED TREE

Backed out changeset 24f85c628472 for failing in layout/style/test/test_value_storage.html on a CLOSED TREE

Backs out https://github.com/servo/servo/pull/19983

<!-- 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/19993)
<!-- Reviewable:end -->
2018-02-08 04:57:18 -05:00
Gecko Backout
1231868663 Backed out changeset 24f85c628472 for failing in layout/style/test/test_value_storage.html on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/19983
2018-02-08 09:43:28 +00:00
WPT Sync Bot
e0fb3fc586 Update web-platform-tests to revision d6d3f7267e817925131675bfc203c62bda96febe 2018-02-07 23:14:20 -05:00
bors-servo
0d7c2271c2
Auto merge of #19984 - upsuper:media-ident-atom, r=emilio
Use atom for identifier media features

This is the Servo side change of [bug 1435944](https://bugzilla.mozilla.org/show_bug.cgi?id=1435944).

<!-- 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/19984)
<!-- Reviewable:end -->
2018-02-07 21:43:36 -05:00
Anthony Ramine
f017743a55 Derive ComputeSquaredDistance for animated filters 2018-02-08 03:14:23 +01:00
Xidorn Quan
458d94a67e Use atom for identifier media features. 2018-02-08 12:41:17 +11:00
bors-servo
ced67db82d
Auto merge of #19982 - glennw:update-wr-fixes, r=emilio
Update WR (various transform, hit-testing related fixes).

<!-- 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/19982)
<!-- Reviewable:end -->
2018-02-07 20:32:19 -05:00
Glenn Watson
0a2ea7381f Update WR (various transform, hit-testing related fixes). 2018-02-08 11:22:03 +10:00
bors-servo
f317075147
Auto merge of #19983 - emilio:simplify-font-family-serialize, r=xidorn
style: Tweak font-family serialization so that it is simpler.

In particular, every time that there's at least more than one identifier, switch
to quoted family name, since the reconstruction of the serialization will be
lossy anyway.

This allows us to avoid copies and all that.

What Chrome implements doesn't make much sense in the sense that they always
serialize:

  font-family: "foo";  -> font-family: foo;
  font-family: foo bar;  -> font-family: "foo bar";
  font-family: foo\ bar; -> font-family: "foo bar";

This patch makes us match on the second case, but not on the rest, because I
think Gecko's behavior is preferable in those cases.

Bug: 1434802
Reviewed-by: xidorn
MozReview-Commit-ID: JwBECA93lfi

<!-- 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/19983)
<!-- Reviewable:end -->
2018-02-07 19:39:54 -05:00
Emilio Cobos Álvarez
9490786876
style: Tweak font-family serialization so that it is simpler.
In particular, every time that there's at least more than one identifier, switch
to quoted family name, since the reconstruction of the serialization will be
lossy anyway.

This allows us to avoid copies and all that.

What Chrome implements doesn't make much sense in the sense that they always
serialize:

  font-family: "foo";  -> font-family: foo;
  font-family: foo bar;  -> font-family: "foo bar";
  font-family: foo\ bar; -> font-family: "foo bar";

This patch makes us match on the second case, but not on the rest, because I
think Gecko's behavior is preferable in those cases.

Bug: 1434802
Reviewed-by: xidorn
MozReview-Commit-ID: JwBECA93lfi
2018-02-08 01:09:39 +01:00
Anthony Ramine
335cb4c9f4 Whitelist Copy types when generating PropertyDeclaration 2018-02-07 22:49:15 +01:00
Jon Leighton
446b0e47a6 Fix FontTemplateDescriptor under FreeType
Issue #17321. Under Linux, using "font-family: sans-serif" previously
caused Servo to select the "UltraLight" face (of DejaVu Sans). There
were two reasons for this:

1. Font weight was only retrieved from the OS/2 table for bold faces.
   This neglected to retrieve the weight information for "lighter than
   normal" weight faces. This meant that the UltraLight face appeared as
   normal weight, and was selected.

2. Retrieval of font stretch information from the OS/2 table was not
   implemented at all.
2018-02-07 21:24:08 +01:00
Anthony Ramine
8b9b3617a2 Merge all keyword arms in Clone for PropertyDeclaration 🐉🐲
We further partition the variants to retrieve all properties that are
defined as simple keywords, and we clone them by copying the value
as a smaller enum made of only the keyword variants.
2018-02-07 20:50:00 +01:00
bors-servo
a0e4ea9f56
Auto merge of #19974 - emilio:atom-serialization, r=nox
style: Optimize serialization of identifiers of length <= 16 🐉🐲

Much like we optimize to_ascii_lowercase.

<!-- 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/19974)
<!-- Reviewable:end -->
2018-02-07 13:33:36 -05:00
bors-servo
10552c23fc
Auto merge of #19981 - emilio:nicer, r=nox
style: Derive ToCss for FontFamilyList.

The extra reference in to_css is needed because the family list iterator returns
by value in Gecko.

<!-- 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/19981)
<!-- Reviewable:end -->
2018-02-07 12:42:18 -05:00
Emilio Cobos Álvarez
e41d724694
style: Derive ToCss for FontFamilyList.
The extra reference in to_css is needed because the family list iterator returns
by value in Gecko.
2018-02-07 17:44:15 +01:00
Emilio Cobos Álvarez
f4c9c598a3
style: Optimize serialization of identifiers of length <= 16 🐉🐲
Much like we optimize to_ascii_lowercase.

This also fixes a bug in Servo where attr() rules with an unknown namespace
prefix are parsed, which is wrong.
2018-02-07 17:34:22 +01:00
bors-servo
c659993a6f
Auto merge of #19968 - servo-wpt-sync:wpt_update_06-02-2018, r=jdm
Sync WPT with upstream (06-02-2018)

Automated downstream sync of changes from upstream as of 06-02-2018.
[no-wpt-sync]

<!-- 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/19968)
<!-- Reviewable:end -->
2018-02-07 09:34:15 -05:00
bors-servo
e57319a734
Auto merge of #19973 - emilio:media-feature-change, r=xidorn
style: Rework how media feature changes are handled for XBL.

Bug: 1435939
Reviewed-by: xidorn

<!-- 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/19973)
<!-- Reviewable:end -->
2018-02-07 08:02:34 -05:00
Emilio Cobos Álvarez
091a97e092
style: Update bindings. 2018-02-07 13:30:23 +01:00
Emilio Cobos Álvarez
0907c21600
style: Process all the MediumFeatureChanges at the same time.
This avoids resetting the computed values all the time, and paves the way to
avoid using a StyleSet on XBL bindings / Shadow DOM, which we should really
really do because it's super overkill.

There are some XBL bits that are kind of hacky, in particular the mStylistDirty,
but they'll go away soon, since I want to redo how we store styles in XBL.

The alternative, which was returning an array of indices or something was even
more hacky I think.

Bug: 1435939
Reviewed-by: xidorn
MozReview-Commit-ID: 6tEl5gebXVF
2018-02-07 13:29:58 +01:00
Emilio Cobos Álvarez
9324feb994
style: Don't reset the default computed values if they cannot change.
This actually fixes the bug.

Bug: 1435939
Reviewed-by: xidorn
MozReview-Commit-ID: AejqMLZzpQp
2018-02-07 13:29:43 +01:00
bors-servo
03a1a014ae
Auto merge of #19931 - pyfisch:float-bounds, r=mrobinson
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.

<!-- 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/19931)
<!-- Reviewable:end -->
2018-02-07 07:11:41 -05:00
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
bors-servo
cf4f89c36e
Auto merge of #19969 - emilio:whoopsies, r=emilio
style: Fix interpolation of the gecko-size properties.

Followup to #19966 because, well...

The animation code should probably be more obvious.
2018-02-07 01:04:51 -05: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
WPT Sync Bot
a4b4c8e015 Update web-platform-tests to revision b7ee88243f64e6c7f2d00c163bd3bc501e4db7ef 2018-02-06 21:05:52 -05: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
58d1969c5a Added a test for font selection
The test picks a font and makes a table asking for that font at every
possible weight/stretch combination. One should expect the table
entries to get bolder from right to left and wider from top to bottom.
2018-02-06 20:46:20 +00: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
bors-servo
2cf0077be1
Auto merge of #19948 - anniryynanen:less-dependencies, r=jdm
Remove indirect mozjs dependency from compositing

<!-- 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 #19939.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because there is no change to functionality.

<!-- 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/19948)
<!-- Reviewable:end -->
2018-02-06 12:43:50 -05:00
Anni Ryynänen
f5a9e16e07 Remove indirect mozjs dependency from compositing 2018-02-06 17:35:09 +02:00