Commit graph

29067 commits

Author SHA1 Message Date
bors-servo
c8bc6ca420 Auto merge of #18409 - BorisChiou:stylo/calc/unit, r=emilio
Keep the unit of the serialization of specified::CalcLengthOrPercentage.

For the serialization of specified values of calc(), we should keep the
units of absolute lengths, so use AbsoluteLength.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1396692](https://bugzilla.mozilla.org/show_bug.cgi?id=1396692).
- [X] These changes do not require tests because we have wpt tests for this already.

<!-- 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/18409)
<!-- Reviewable:end -->
2017-09-07 21:34:28 -05:00
bors-servo
2719e65705 Auto merge of #18416 - glennw:update-wr-clips, r=mbrubeck
Update WR (clip optimizations, shadow fixes, angle update).

<!-- 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/18416)
<!-- Reviewable:end -->
2017-09-07 19:10:57 -05:00
Daniel Johnson
709cd3a0b6 "javascript:" urls: remove unnecessary block
Remove this block and unindent the code one level.

Doing this required cloning `load_data.url` so that we could
later mutate `load_data.url` in the same block.
2017-09-07 17:03:41 -07:00
Glenn Watson
7c10894aa5 Update WR (clip optimizations, shadow fixes, angle update). 2017-09-08 09:59:08 +10:00
bors-servo
e9336b39a6 Auto merge of #18411 - servo:rename-preshint-method, r=emilio
Rename VirtualMethods::attribute_is_mapped

<!-- 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/18411)
<!-- Reviewable:end -->
2017-09-07 15:56:01 -05:00
bors-servo
867a982fa7 Auto merge of #18407 - servo:kill-is-cancelled, r=emilio
Kill Runnable::is_cancelled ⚔️

<!-- 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/18407)
<!-- Reviewable:end -->
2017-09-07 14:53:35 -05:00
bors-servo
8868d2223d Auto merge of #18412 - bholley:bump_style_stacks, r=bholley
Increase stack safety margin for stylo

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

<!-- 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/18412)
<!-- Reviewable:end -->
2017-09-07 13:52:48 -05:00
Bobby Holley
f3abbb4ee3 Increase stack safety margin for stylo.
MozReview-Commit-ID: Fv9DttU20hM
2017-09-07 11:44:45 -07:00
bors-servo
1e93749941 Auto merge of #18283 - ferjm:user.timing.api, r=jdm
User Timing API

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18109
- [X] There are tests for these changes. I enabled the peformance-timeline API WPTs but some of them are still failing because of implementation bugs or missing APIs (Resource Timing, for instance) the tests are dependent of. I'll file issues to fix them.

<!-- 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/18283)
<!-- Reviewable:end -->
2017-09-07 12:45:46 -05:00
Anthony Ramine
558f5772a6 Rename VirtualMethods::attribute_is_mapped
This name doesn't convey what the method is about, it's now
attribute_affects_presentational_hints.
2017-09-07 18:46:53 +02:00
bors-servo
3a7539a442 Auto merge of #18406 - servo:cleanup-media, r=emilio
Start cleaning up HTMLMediaElement a bit

<!-- 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/18406)
<!-- Reviewable:end -->
2017-09-07 11:41:12 -05:00
bors-servo
85167c8b7d Auto merge of #18405 - pylbrecht:dynamic.attribute.change, r=emilio
Handle dynamic font color change

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

<!-- Either: -->
- [X] There are tests for these changes

<!-- 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. -->
r? @emilio

<!-- 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/18405)
<!-- Reviewable:end -->
2017-09-07 10:24:16 -05:00
Boris Chiou
6607103f94 Keep the unit of the serialization of specified::CalcLengthOrPercentage.
For the serialization of specified values of calc(), we should keep the
units of absolute lengths, so use AbsoluteLength.
2017-09-07 22:39:18 +08:00
bors-servo
0c2abbd7ea Auto merge of #18408 - emilio:stylo-fixup-fix, r=upsuper
stylo: Don't add boundary characters to the fixups specified in ServoBindings.toml

This allows adjusting the fixups for the patches in bug 1393230 when using
libclang 3.9.

<!-- 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/18408)
<!-- Reviewable:end -->
2017-09-07 08:51:10 -05:00
P. Albrecht
8161d1931d Handle dynamic font color change 2017-09-07 15:47:28 +02:00
Emilio Cobos Álvarez
86f4e22fc2
stylo: Don't add boundary characters to the fixups specified in ServoBindings.toml
This allows adjusting the fixups for the patches in bug 1393230 when using
libclang 3.9.
2017-09-07 15:37:43 +02:00
Anthony Ramine
17a1dd9385 Kill Runnable::is_cancelled ⚔️ 2017-09-07 14:54:03 +02:00
bors-servo
5defc56ad5 Auto merge of #18393 - servo:get-property-value-unsafe, r=emilio
Make get_property_value unsafe

This takes raw pointers and does things with the things they point to, and
circumvent a lock on a hash table.

<!-- 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/18393)
<!-- Reviewable:end -->
2017-09-07 06:55:02 -05:00
Anthony Ramine
a3044a3755 Document HTMLMediaElement fields and cleanup some algos 2017-09-07 13:45:42 +02:00
Anthony Ramine
83904edbec Make get_property_value unsafe
This takes raw pointers and does things with the things they point to, and
circumvent a lock on a hash table.
2017-09-07 13:34:13 +02:00
bors-servo
c68bc0c145 Auto merge of #18397 - julian-seward1:master, r=Manishearth
Add fallible append APIs for Vec and SmallVec

…r=manishearth.

<!-- 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/18397)
<!-- Reviewable:end -->
2017-09-07 05:54:46 -05:00
Julian Seward
155a20ff83 Bug 1389009 - stylo: Add fallible append APIs for Vec and SmallVec. r=manishearth. 2017-09-07 12:04:37 +02:00
bors-servo
54cd23adb8 Auto merge of #18400 - nnethercote:measure-selectors, r=heycam
Measure selectors.

This patch adds measurement of Selectors within StyleRule. This requires
exposing the pointer within ThinArc.

The patch also adds measurement of the several CssRule variants, in order to
measure nested CssRules (and PropertyDeclarationBlocks) within them:
DocumentRule, MediaRule, PageRule, SupportsRule.

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

r? @heycam

---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because testing is in Gecko.

<!-- 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/18400)
<!-- Reviewable:end -->
2017-09-07 01:35:02 -05:00
Nicholas Nethercote
61877b7316 Measure selectors.
This patch adds measurement of Selectors within StyleRule. This requires
exposing the pointer within ThinArc.

The patch also adds measurement of the several CssRule variants, in order to
measure nested CssRules (and PropertyDeclarationBlocks) within them:
DocumentRule, MediaRule, PageRule, SupportsRule.
2017-09-07 15:01:11 +10:00
bors-servo
812cac78f0 Auto merge of #18399 - Manishearth:stylo-fuzzfix, r=emilio
stylo: Overflow fixes

r=emilio https://bugzilla.mozilla.org/show_bug.cgi?id=1397363 , https://bugzilla.mozilla.org/show_bug.cgi?id=1397439

<!-- 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/18399)
<!-- Reviewable:end -->
2017-09-06 17:47:28 -05:00
Manish Goregaokar
e4de8d10a6 stylo: Use saturating subtraction for script level 2017-09-06 15:42:24 -07:00
Manish Goregaokar
c063ff88de stylo: Clamp Au on accumulation 2017-09-06 15:42:12 -07:00
bors-servo
094502e55f Auto merge of #18398 - canaltinova:at-page-rule, r=emilio
stylo: Pass the @page values to precomputed pseudo element declarations

We were parsing @page rules correctly and serializing for cssom when we
we need. But we weren't actually including them to the pseudo element
declarations when we need to print a page.

Reviewed by emilio on Bugzilla.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [Bug 1394035](https://bugzilla.mozilla.org/show_bug.cgi?id=1394035)

<!-- 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/18398)
<!-- Reviewable:end -->
2017-09-06 16:40:33 -05:00
Nazım Can Altınova
c533e23220 stylo: Pass the @page values to precomputed pseudo element declarations
We were parsing @page rules correctly and serializing for cssom when we
we need. But we weren't actually including them to the pseudo element
declarations when we need to print a page.
2017-09-06 14:04:18 -07:00
bors-servo
5e321cadf3 Auto merge of #18395 - jdm:selector-smallvec, r=SimonSapin
Use a 1-element smallvec for selector lists.

Profiling shows this reducing parsing time by a few milliseconds on the tp6 facebook case. The gtest benchmark with the same concatenated stylesheets also shows a significant improvement.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] There are tests for these changes

<!-- 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/18395)
<!-- Reviewable:end -->
2017-09-06 15:33:20 -05:00
Josh Matthews
3ae7781b5f Use a 1-element smallvec for selector lists. 2017-09-06 12:13:40 -07:00
bors-servo
af587e5f84 Auto merge of #18396 - jdm:codesize, r=emilio
Reduce duplication in generated ServoComputedData::to_declaration_block.

This reduces the size of the code in libXUL by 23.4k according to bloaty.

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

<!-- 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/18396)
<!-- Reviewable:end -->
2017-09-06 13:44:30 -05:00
Josh Matthews
ca9b231173 Reduce duplication in generated ServoComputedData::to_declaration_block. 2017-09-06 11:02:53 -07:00
bors-servo
a7ea6741d3 Auto merge of #18394 - jdm:filtererr, r=xidorn
Report more specific error for invalid filter properties

Reviewed by xidorn in https://bugzilla.mozilla.org/show_bug.cgi?id=1386900.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix [bug 1386900](https://bugzilla.mozilla.org/show_bug.cgi?id=1386900).
- [X] There are tests for these changes

<!-- 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/18394)
<!-- Reviewable:end -->
2017-09-06 12:18:41 -05:00
Josh Matthews
6827a10893 Report more specific error for invalid filter properties (bug 1386900). 2017-09-06 10:06:07 -07:00
bors-servo
00867711b3 Auto merge of #18389 - legnaleurc:has_pending_restyle_ancestor, r=emilio
Add a function to find out if a node has any ancestor that is pending for restyling.

Fixes [Bug 1397168](https://bugzil.la/1397168).

<!-- 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 [Bug 1397168](https://bugzil.la/1397168) (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/18389)
<!-- Reviewable:end -->
2017-09-06 10:47:32 -05:00
Nick Price
823565cda0 Add test for 18224 2017-09-06 11:01:29 -04:00
bors-servo
4ada03febf Auto merge of #18382 - servo:jdm-patch-1, r=cbrewster
Add CEReactions to element creation APIs.

This addresses https://github.com/whatwg/dom/pull/506.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not require tests because they will exist upstream in the future.

<!-- 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/18382)
<!-- Reviewable:end -->
2017-09-06 09:38:58 -05:00
bors-servo
9802214aba Auto merge of #18391 - emilio:cascade-stoph, r=heycam
style: Stop the cascade when only reset structs change

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

<!-- 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/18391)
<!-- Reviewable:end -->
2017-09-06 07:55:08 -05:00
Emilio Cobos Álvarez
ac2be54470
style: Make the skip-applying-damage stuff Gecko-only. 2017-09-06 14:54:20 +02:00
Anthony Ramine
e169acd1d6 Put HTMLMediaElement first in its module 2017-09-06 13:50:56 +02:00
Fernando Jiménez Moreno
8412f5403a User Timing API 2017-09-06 13:33:30 +02:00
Emilio Cobos Álvarez
d8234fef82
style: update bindings. 2017-09-06 13:20:00 +02:00
Emilio Cobos Álvarez
7d2e2e25d6
style: Handle correctly display changes from ruby to non-ruby in some edge cases.
And add comments to the reset-property-dependent adjustments.

MozReview-Commit-ID: Li6Epx8k5x8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-06 12:56:34 +02:00
Emilio Cobos Álvarez
deefacc9de
style: Reindent some code.
MozReview-Commit-ID: H2qucldbBkc
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-06 12:56:33 +02:00
Emilio Cobos Álvarez
05371b56eb
style: Fix recascading when child blockification depends on our display value.
All other browsers get it right because they basically throw away all the styles
in a subtree after a display change. We do better, but need to do this check.

MozReview-Commit-ID: BODx0gnSzwI
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-06 12:56:32 +02:00
Emilio Cobos Álvarez
35504c1bb7
style: Fix the legacy value of justify-items propagation.
That property is pretty sad :(

MozReview-Commit-ID: GaKYvqR19M4
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-06 12:56:30 +02:00
Emilio Cobos Álvarez
825f623b3c
style: Stop the cascade when only reset structs change.
Bug: 1395227
Reviewed-by: heycam
MozReview-Commit-ID: JCZJl2fmtJ9
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-09-06 12:56:29 +02:00
Fernando Jiménez Moreno
8306946e7f stylo: store specified value of grid layout repeat() function 2017-09-06 12:53:07 +02:00
Wei-Cheng Pan
ffa9ee3f61 Add a function to find out if a node has any ancestor that is pending for restyling. 2017-09-06 17:05:18 +08:00