Commit graph

19254 commits

Author SHA1 Message Date
Xidorn Quan
ea8a952d51 Remove initial values from font-face descriptors
They are not used anyway.
2018-02-14 17:35:57 +11:00
Xidorn Quan
6ffa888dd6 Integrate font-variation-settings descriptor with stylo 2018-02-14 11:15:58 +11:00
bors-servo
6cb78057bb
Auto merge of #20022 - Eijebong:syn, r=nox
Update syn, quote and synstructure

Right now they're duplicated because we need a new serde release (ping @dtolnay), a new cssparser release (ping @SimonSapin) and a new release of html5ever with https://github.com/servo/html5ever/pull/336

<!-- 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/20022)
<!-- Reviewable:end -->
2018-02-13 11:15:54 -05:00
Anthony Ramine
056abcbf5f Change AnimatedValue for GreaterThanOrEqualToOneNumber to CSSFloat 2018-02-13 16:12:31 +01:00
Anthony Ramine
f89ebf7fe9 Change AnimatedValue for NonNegativeNumber to CSSFloat 2018-02-13 16:12:30 +01:00
Anthony Ramine
da5acc81d2 Change AnimatedValue for NonNegativeLengthOrPercentage to its inner type 2018-02-13 16:12:29 +01:00
Anthony Ramine
b79dc269f7 Change AnimatedValue for PositiveInteger to CSSInteger 2018-02-13 16:12:29 +01:00
bors-servo
b1d3d6f632
Auto merge of #19975 - paulrouget:killbhtml, r=mbrubeck,emilio
Kill browserhtml

Fixes https://github.com/servo/servo/issues/19971

<!-- 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/19975)
<!-- Reviewable:end -->
2018-02-13 04:54:47 -05:00
bors-servo
9e64008e75
Auto merge of #19754 - ferjm:innertext, r=mbrubeck
Implement element.innerText getter

<!-- 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/19754)
<!-- Reviewable:end -->
2018-02-13 03:41:48 -05:00
Paul Rouget
ee25413c0f report panic to embedder 2018-02-13 09:40:08 +01:00
Paul Rouget
da349ee8a9 remove mozbrowser code 2018-02-13 09:40:06 +01:00
Fernando Jiménez Moreno
2a4535f43e Implement element.innerText getter 2018-02-13 09:12:00 +01:00
bors-servo
3d6ce6c36a
Auto merge of #20033 - upsuper:font-space, r=emilio
Output unquoted family name as a series of identifiers

It tries to serialize unquoted family names as a series of identifiers. For family names which contain special white spaces like leading white space, trailing white space, and consective white spaces, unquoted names are marked quoted in parsing to avoid complicating serialization code.

This fixes [bug 1434802](https://bugzilla.mozilla.org/show_bug.cgi?id=1434802).

<!-- 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/20033)
<!-- Reviewable:end -->
2018-02-12 18:21:47 -05:00
Xidorn Quan
caa15ab6a7 Output unquoted family name as a series of identifiers.
It tries to serialize unquoted family names as a series of identifiers.
For family names which contain special white spaces like leading white
space, trailing white space, and consective white spaces, unquoted names
are marked quoted in parsing to avoid complicating serialization code.
2018-02-13 09:17:19 +11:00
bors-servo
62e1fc7899
Auto merge of #19963 - paavininanda:Issue#19958, r=<try>
Correct default SelectionStart and SelectionEnd

<!-- 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] Added unit tests and wpt for these changes
- [x] These changes fix #19958

<!-- 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/19963)
<!-- Reviewable:end -->
2018-02-12 11:56:27 -05:00
Bastien Orivel
9faa579c89 Bump syn/quote in style_derive 2018-02-12 17:08:55 +01:00
Bastien Orivel
cf6330b6c1 Bump syn/quote in malloc_size_of_derive 2018-02-12 17:08:19 +01:00
Bastien Orivel
3670d4d3e5 Bump syn/quote in jstraceable_derive 2018-02-12 17:07:58 +01:00
Bastien Orivel
c18137b4ea Bump syn/quote in domobject_derive 2018-02-12 17:07:40 +01:00
bors-servo
e0b38f9c49
Auto merge of #20025 - servo:derive-all-the-things, r=emilio
Merge similar arms in AnimationValue::from_declaration 🐉🐲

This slims that function by 12KB according to bloaty.

<!-- 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/20025)
<!-- Reviewable:end -->
2018-02-12 10:46:42 -05:00
Bastien Orivel
0a0d37bea3 Bump syn/quote in deny_public_fields 2018-02-12 15:05:18 +01:00
bors-servo
3a42f6f988
Auto merge of #20030 - emilio:useless-return-is-useless, r=nox
style: Remove useless code after #19994

<!-- 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/20030)
<!-- Reviewable:end -->
2018-02-12 08:47:36 -05:00
Emilio Cobos Álvarez
9744840e5a
style: Remove useless code after #19994 2018-02-12 13:52:29 +01:00
bors-servo
889bb012ef
Auto merge of #20027 - emilio:bye-ordermap, r=nox
style: Back out ordermap.

It was worth a shot!

<!-- 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/20027)
<!-- Reviewable:end -->
2018-02-12 07:36:04 -05:00
Emilio Cobos Álvarez
25868beabd
style: Back out ordermap.
It was worth a shot!
2018-02-12 12:20:46 +01:00
bors-servo
63691f01d7
Auto merge of #20026 - emilio:less-stylist-xbl, r=upsuper
style: Use more CascadeData and less Stylist for XBL stuff.

Just some more use-cases that can be converted right away.

I'm trying to make XBL not use a whole Stylist, slowly...

<!-- 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/20026)
<!-- Reviewable:end -->
2018-02-12 06:03:30 -05:00
Emilio Cobos Álvarez
1bb6ce2c88
style: Use more CascadeData and less Stylist for XBL stuff.
Just some more uses of Stylist in XBL that can be converted right away.

I'm trying to make XBL not use a Stylist, slowly...
2018-02-12 11:25:24 +01:00
Anthony Ramine
18b9775173 Merge similar arms in AnimationValue::from_declaration 🐉🐲
This slims that function by 12KB according to bloaty.
2018-02-12 10:34:30 +01:00
bors-servo
9c94fe4279
Auto merge of #20017 - servo:derive-all-the-things, r=emilio
Optimise more AnimationValue methods 🐉🐲

```
__TEXT	__DATA	__OBJC	others	dec	hex
87101440	5226496	0	64122880	156450816	9534000	XUL.old
87072768	5226496	0	64122880	156422144	952d000	XUL.new
```

<!-- 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/20017)
<!-- Reviewable:end -->
2018-02-11 18:43:17 -05:00
Anthony Ramine
e2c674994a Use ascii_case_insensitive_phf_map in TransitionProperty::parse
This divides the size of this method by 30.
2018-02-12 00:42:34 +01:00
bors-servo
0653f3097c
Auto merge of #20019 - paavininanda:deriveToCss, r=emilio
Added derive(ToCss) annotation : WIP

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

<!-- Either: -->
<!--
- [ ] 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/20019)
<!-- Reviewable:end -->
2018-02-11 14:10:48 -05:00
Nupur Baghel
8116962298 Added derive ToCss for Content and removed manual Impl 2018-02-12 00:35:56 +05:30
Emilio Cobos Álvarez
4913d9c900
style: Handle quirks-mode changes correctly.
The reason why bug 1355721 regressed this is because in non-e10s we definitely
flush before parsing the standards quirks-mode. And bug 1355721 introduced an
unconditional UpdateStylistIfNeeded, unless the counter style / font
equivalents.

That means that the stylist wouldn't remain on its initial state after the first
flush, which itself means that when the compat mode changed, the UA and user
rules were already on the stylist with the quirks mode keys. That makes
class-names be keyed in ascii lowercase.

After that no user style changed, so no rebuild happens for the cascade data in
the user origin, so we keep looking at the wrong keys indefinitely.

We should try to avoid the flush there and ensure that by the time we create a
pres shell the quirks mode is already up-to-date...

Bug: 1394233
Reviewed-by: xidorn
MozReview-Commit-ID: 25dD2bca3tN
2018-02-11 19:16:34 +01:00
Anthony Ramine
c92d0a8902 Implement Clone for AnimationValue by hand 🐉🐲
We use the same trick as in PropertyDeclaration::clone.
2018-02-11 09:47:14 +01:00
Anthony Ramine
b95b6c66f3 Implement PartialEq for AnimationValue by hand 🐉🐲
We use the same trick as in PropertyDeclaration::eq.
2018-02-11 09:38:37 +01:00
Paul Rouget
e7c754fb64 remove forcetouch support 2018-02-11 08:02:39 +01:00
Jonathan Kew
81ecc25619 Remove reference to the Gecko pref svg.paint-order.enabled 2018-02-10 21:31:42 +00: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
paavininanda
b2c1f89b93 Correct default Selectionstart and SelectionEnd 2018-02-10 17:46:29 +05:30
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