Commit graph

31644 commits

Author SHA1 Message Date
Paul Rouget
019fdaa1bd remove bhtml 2018-02-11 08:02:39 +01:00
bors-servo
2f4362e0c1
Auto merge of #20014 - servo:by-the-power-of-void, r=emilio
Optimise some AnimationValue methods for size 🐉🐲

This shaves 40KB off of libxul.

<!-- 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/20014)
<!-- Reviewable:end -->
2018-02-10 10:32:21 -05:00
Anthony Ramine
b9505ae72b Merge similar arms in AnimationValue::compute_squared_distance 🐉🐲
This uses the same trick as in PropertyDeclaration::eq.
2018-02-10 16:31:50 +01:00
Anthony Ramine
fc24cf34c5 Merge similar arms in AnimationValue::animate 🐉🐲
This uses the same trick as in PropertyDeclaration::eq and removes
roughly 10KB off of libxul.
2018-02-10 16:31:49 +01:00
Anthony Ramine
38520af970 Merge similar arms in AnimationValue::uncompute 🐉🐲
This uses the same kind of trick as PropertyDeclaration::clone and
removes 15KB off of libxul according to bloaty.
2018-02-10 16:31:48 +01:00
Anthony Ramine
aa7cc261f8 Determine animated types from specified types 2018-02-10 16:31:48 +01:00
Anthony Ramine
a90e660eac Kill AnimatedValueAsComputed 2018-02-10 16:31:47 +01:00
Anthony Ramine
57daf06c71 Make PropertyDeclaration::id and AnimationValue::id inline 2018-02-10 16:31:46 +01:00
Anthony Ramine
921d1aeeba Make AnimationValue::id be just a pointer cast 🐉🐲
Now that PropertyDeclaration and AnimationValue have the same discriminants,
that means the trick found in PropertyDeclaration::id can be done in
AnimationValue::id.
2018-02-10 16:31:45 +01:00
bors-servo
2cc75a783d
Auto merge of #20010 - emilio:pres-hints-cascade, r=bholley
style: Cascade pres hints after normal user rules.

Per https://drafts.csswg.org/css-cascade/#preshint and
https://html.spec.whatwg.org/#presentational-hints.

This was causing failures in the link color reftests with the preferences sheet
as a User sheet.

Bug: 1436782
Reviewed-by: bholley
MozReview-Commit-ID: 9iwEqPBw4CF

<!-- 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/20010)
<!-- Reviewable:end -->
2018-02-10 07:46:38 -05:00
Emilio Cobos Álvarez
69c018c70d
style: Cascade pres hints after normal user rules.
Per https://drafts.csswg.org/css-cascade/#preshint and
https://html.spec.whatwg.org/multipage/#presentational-hints.

This was causing failures in the link color reftests with the preferences sheet
as a User sheet.

Bug: 1436782
Reviewed-by: bholley
MozReview-Commit-ID: 9iwEqPBw4CF
2018-02-10 13:12:30 +01:00
bors-servo
0098d51903
Auto merge of #20011 - emilio:cleanup-for-declarations-stuff, r=Manishearth
style: Tidy Stylist::compute_for_declarations.

<!-- 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/20011)
<!-- Reviewable:end -->
2018-02-10 06:45:52 -05:00
Anthony Ramine
79775541f2 Make AnimationValue have the same variants as PropertyDeclaration
By making AnimationValue have the same representation as PropertyDeclaration
and Void variants for non-animatable properties, we know by constructions
that all properties have the same discriminant in both.
2018-02-10 12:37:30 +01:00
bors-servo
afaa51b993
Auto merge of #20013 - upsuper:remove-prop-bool, r=bzbarsky
Return whether property was removed from Servo_DeclarationBlock_RemoveProperty

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

<!-- 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/20013)
<!-- Reviewable:end -->
2018-02-10 03:59:43 -05:00
Xidorn Quan
b9ef2bbdd5 Return whether property was removed from Servo_DeclarationBlock_RemoveProperty. 2018-02-10 19:58:30 +11:00
Emilio Cobos Álvarez
8e3da86636
style: Tidy Stylist::compute_for_declarations. 2018-02-10 03:39:56 +01:00
bors-servo
1d8e78720b
Auto merge of #20006 - servo:jdm-patch-16, r=emilio
Try to reduce instances of intermittent failures in wpt sync.

Making the job take longer in favour of reducing the variability of test results makes sense to me.

<!-- 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/20006)
<!-- Reviewable:end -->
2018-02-09 18:11:36 -05:00
bors-servo
6b1a74672d
Auto merge of #20004 - emilio:author-sheet-collection, r=nox
style: Add infrastructure to have a standalone author stylesheet collection

Right now Gecko uses a whole `Stylist` for stuff like XBL / Shadow DOM.

That's not great, because it has tons of unrelated logic, and also eats up a lot of memory. Also, it prevents us to optimize style changes in shadow hosts the same way we do for the document.

These patches mostly rejigger stuff around so that you can define a `DocumentStylesheetSet` and then an `AuthorStylesheetSet`, which would contain just the Shadow DOM sheets / XBL resource sheets.

It still doesn't introduce any use for the later, but that will come later.

There's a patch in this PR that requires Gecko changes, posted in https://bugzilla.mozilla.org/show_bug.cgi?id=1436798.

<!-- 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/20004)
<!-- Reviewable:end -->
2018-02-09 17:18:08 -05:00
bors-servo
41fb6ed1ff
Auto merge of #19980 - servo:derive-all-the-things, r=emilio
Merge all keyword arms in Clone for PropertyDeclaration 🐉🐲

<!-- 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/19980)
<!-- Reviewable:end -->
2018-02-09 16:17:01 -05:00
Emilio Cobos Álvarez
f16e699db5
style: Update bindings. 2018-02-09 19:46:26 +01:00
Emilio Cobos Álvarez
88cc2798c4
style: Move more stuff to the place it belongs to.
In particular, `rebuild` is now done entirely by CascadeData, which simplifies
more stuff.

The eventual final state for this is that the data structure we use to store the
XBL / Shadow DOM stuff will be something like:

  struct AuthorStyles { CascadeData, AuthorSheetCollection }

MozReview-Commit-ID: 8TExtP58L4X
2018-02-09 19:45:04 +01:00
Emilio Cobos Álvarez
7edd25890d
style: Introduce AuthorStyleSheetSet.
MozReview-Commit-ID: K3ciocPJuz3
2018-02-09 19:45:03 +01:00
Emilio Cobos Álvarez
5e8dd8a2d4
style: Move the stylesheet set methods under a macro to reuse it soon.
MozReview-Commit-ID: 50Srw4Mjw18
2018-02-09 19:45:02 +01:00
Emilio Cobos Álvarez
a254dc12a4
style: Move author-style-disabled handling to push_applicable_declarations.
This will make it easier to handle it properly for Shadow DOM, though this patch
doesn't do that.

This also makes some method inline and infallible for convenience, since nobody
checks the errors anyway.

Bug: 1436798
Reviewed-by: bholley
MozReview-Commit-ID: Hq3erAUs5tf
2018-02-09 19:44:53 +01:00
bors-servo
e19bab84cf
Auto merge of #20001 - Manishearth:compute-damage, r=mbrubeck
Autogenerate compute_damage

fixes #10622

<!-- 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/20001)
<!-- Reviewable:end -->
2018-02-09 12:02:04 -05:00
Manish Goregaokar
daea6d0f75 Set restyle_damage = reflow for some more properties 2018-02-09 08:48:07 -08:00
Manish Goregaokar
11fb2e644a Use restyle_damage=rebuild_and_reflow for list types 2018-02-09 08:48:06 -08:00
Manish Goregaokar
7e928b02f2 Make individual transform properties have restyle_damage = reflow_out_of_flow 2018-02-09 08:48:05 -08:00
Manish Goregaokar
6ba23fe58a Set damage for min/max width/height to reflow_and_bubble 2018-02-09 08:48:05 -08:00
Manish Goregaokar
8c2b7b41ef Autogenerate compute_damage (fixes #10622) 2018-02-09 08:48:04 -08:00
Josh Matthews
298f70711c
Try to reduce instances of intermittent failures in nightly sync. 2018-02-09 10:26:35 -05:00
bors-servo
198ffda1de
Auto merge of #20002 - servo-wpt-sync:wpt_update_08-02-2018, r=jdm
Sync WPT with upstream (08-02-2018)

Automated downstream sync of changes from upstream as of 08-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/20002)
<!-- Reviewable:end -->
2018-02-09 08:59:02 -05:00
Emilio Cobos Álvarez
438251cbfc
style: Make AuthorStylesEnabled an enum.
Chances are we need to pass it around in a bit.

Also invert the boolean because I don't want to reason about double negations,
even if they're simple.

MozReview-Commit-ID: KhX4lDKwDoj
2018-02-09 13:27:35 +01:00
Emilio Cobos Álvarez
4cc5717116
style: Save some work if the origin is not dirty.
MozReview-Commit-ID: EGHztVLj9i3
2018-02-09 13:27:34 +01:00
Emilio Cobos Álvarez
bbc6857c06
style: Rename OriginValidity to DataValidity.
MozReview-Commit-ID: FpsYUlWLWTt
2018-02-09 13:27:33 +01:00
Emilio Cobos Álvarez
01915d84db
style: Assert we don't try to do dumb stuff.
MozReview-Commit-ID: 6DpkiwUdccD
2018-02-09 13:27:33 +01:00
Emilio Cobos Álvarez
c88d339db2
style: Move the dirty bit to SheetCollection.
MozReview-Commit-ID: DO9vv9vmSzF
2018-02-09 13:27:31 +01:00
Emilio Cobos Álvarez
f1516d228f
style: Rename StylesheetSet to DocumentStylesheetSet.
MozReview-Commit-ID: 5Xl1eRLu1VF
2018-02-09 13:27:30 +01:00
bors-servo
f8ac623047
Auto merge of #20003 - emilio:simplify-font-family-serialize, r=nox
style: Remove unneeded clone.

<!-- 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/20003)
<!-- Reviewable:end -->
2018-02-09 06:32:39 -05:00
Emilio Cobos Álvarez
655e0c6beb
style: Remove unneeded clone. 2018-02-09 12:30:20 +01:00
Anthony Ramine
5d8e70dc27 Avoid pattern matching to clone Copy variants of PropertyDeclaration 🐉🐲 2018-02-09 12:10:42 +01:00
bors-servo
7e501f50f7
Auto merge of #19972 - paavininanda:Issue16483, r=jdm
replaced content_type from DOCString to Mime

Replaced content_type from DomString to Mime

---
<!-- 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 #16483 (https://github.com/servo/servo/issues/16483).

<!-- Either: -->
- [x] These changes do not require tests because they make changes to already existing files

<!-- 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/19972)
<!-- Reviewable:end -->
2018-02-09 05:02:19 -05:00
Nupur Baghel
d02422408e Updated content_type of Document and XMLDocument from DOCString to Mime 2018-02-09 09:32:56 +05:30
WPT Sync Bot
b524b7c279 Update web-platform-tests to revision 6d85a3b422cab97d032ad3db47cb741ca364185f 2018-02-08 21:30:07 -05:00
bors-servo
cd663ea332
Auto merge of #19942 - pyfisch:update-euclid, r=emilio
Use Rect::inner_rect from euclid

Update euclid.

<!-- 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/19942)
<!-- Reviewable:end -->
2018-02-08 14:02:32 -05:00
bors-servo
13cf813048
Auto merge of #19965 - dan-robertson:freetype2, r=jdm
Improve Freetype font handling and font selection

<!-- Please describe your changes on the following line: -->
This correctly implements the boldness and stretchiness properties for Freetype fonts. This also modifies the metric used to select fonts so that it takes account of stretchiness and italicness instead of just boldness. Finally there is a test of font selection (and thereby that fonts are having their boldness/italicness correctly read).

These were originally part of an old and abandoned pull request. I've rebased the changes and modified them to make them work with some name changes.

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

<!-- 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/19965)
<!-- Reviewable:end -->
2018-02-08 13:14:11 -05:00
dan-robertson
426bd83a0d
Merge branch 'master' into freetype2 2018-02-08 16:59:09 +00:00
Pyfisch
5697171ed6 Use Rect::inner_rect from euclid
Update euclid.
2018-02-08 16:45:27 +01:00
bors-servo
1ed6010069
Auto merge of #19928 - jonleighton:issue-17321, r=jdm
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.

<!-- 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/19928)
<!-- Reviewable:end -->
2018-02-08 10:37:13 -05:00
bors-servo
aa497bd31b
Auto merge of #19987 - servo-wpt-sync:wpt_update_07-02-2018, r=jdm
Sync WPT with upstream (07-02-2018)

Automated downstream sync of changes from upstream as of 07-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/19987)
<!-- Reviewable:end -->
2018-02-08 09:21:12 -05:00