Commit graph

3116 commits

Author SHA1 Message Date
bors-servo
b2f8974ab8 Auto merge of #18290 - jdm:selectorerr, r=heycam
Report more specific CSS selector errors

Report more specific errors for invalid CSS selectors. Reviewed by @heycam in https://bugzilla.mozilla.org/show_bug.cgi?id=1384216.

---
- [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/18290)
<!-- Reviewable:end -->
2017-08-29 09:46:22 -05:00
Josh Matthews
549cdb27d9 Report invalid at-rules (bug 1384216). 2017-08-28 17:22:24 -07:00
Josh Matthews
4016371e1d Report more invalid selectors (bug 1384216). 2017-08-28 17:21:57 -07:00
Josh Matthews
9a7cceb0a1 Report invalid selectors (bug 1384216). 2017-08-28 17:21:07 -07:00
Josh Matthews
408c34a76d Report more specific invalid attribute selectors (bug 1384216). 2017-08-28 17:20:45 -07:00
Josh Matthews
73e903ad3c Report unexpected attribute selector tokens (bug 1384216). 2017-08-28 17:20:17 -07:00
Josh Matthews
8e20a6a110 Report unknown pseudos (bug 1384216). 2017-08-28 17:19:28 -07:00
Josh Matthews
f94612cfeb Allow null parameters for Gecko error reporter (bug 1384216). 2017-08-28 17:18:45 -07:00
Tom Tromey
546ecaeee9 Use cssparser's new_with_line_number_offset
cssparser provides a way to set the initial line number on a
ParserInput.  This patch changes servo to use this facility, rather than
reimplement the same functionality itself.
2017-08-28 12:49:30 -06:00
Emilio Cobos Álvarez
97338d0e84
stylo: Make a few functions output more useful debug information. 2017-08-27 00:14:12 +02:00
Emilio Cobos Álvarez
8c3cc9ba1f Hook the recursive invalidation traversal up to the stack checker machinery.
MozReview-Commit-ID: 3tX3gHFTBT
2017-08-25 18:39:20 -07:00
bors-servo
dc8f26432f Auto merge of #18241 - canaltinova:font-feature-values-lookup, r=emilio,xidorn
stylo: Implement font feature values lookup

This PR reviewed by emilio and xidorn on bugzilla. That is backed out because of Windows build problems. Fixed and landing it again.

---
<!-- 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 [Bug 1355721](https://bugzilla.mozilla.org/show_bug.cgi?id=1355721)

<!-- 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/18241)
<!-- Reviewable:end -->
2017-08-25 15:45:03 -05:00
Nazım Can Altınova
81be90cce2 Implement font feature values lookup for stylo 2017-08-25 12:03:38 -07:00
Bobby Holley
707ab455bb Eliminate the sequential/traversal parallel distinction in favor of a unified adaptive driver.
MozReview-Commit-ID: ADVTNJntzmp
2017-08-25 10:00:27 -07:00
bors-servo
4fca1703cf Auto merge of #18235 - emilio:shared-context-cleanup, r=nox
style: Remove SharedStyleContext::quirks_mode.

<!-- 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/18235)
<!-- Reviewable:end -->
2017-08-25 07:59:24 -05:00
Emilio Cobos Álvarez
723d31a4d8
style: Remove SharedStyleContext::quirks_mode. 2017-08-25 12:23:30 +02:00
bors-servo
04e6051742 Auto merge of #18229 - legnaleurc:bug_1388298, r=emilio
Add an API to process all invalidations on the main thread

fixes [bug 1388298](https://bugzil.la/1388298)

---
<!-- 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
- [ ] 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/18229)
<!-- Reviewable:end -->
2017-08-25 03:36:34 -05:00
Emilio Cobos Álvarez
ff700aba75
style: Only store applicable ::before / ::after pseudo styles during the traversal. 2017-08-25 08:46:22 +02:00
Gecko Backout
12b02ce9d5 Backed out changeset 01348a3860f7 for build bustage
CLOSED TREE

Backs out https://github.com/servo/servo/pull/18222
2017-08-25 03:45:31 +00:00
Wei-Cheng Pan
19b94561af Add an API to process all invalidations on the main thread
fixes [bug 1388298](https://bugzil.la/1388298)
2017-08-25 11:16:21 +08:00
bors-servo
76e77be041 Auto merge of #18222 - canaltinova:font-feature-values-lookup, r=emilo,xidorn
stylo: Implement font feature values lookup

This PR reviewed by emilio and xidorn on bugzilla

---
<!-- 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 [Bug 1355721](https://bugzilla.mozilla.org/show_bug.cgi?id=1355721)

<!-- 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/18222)
<!-- Reviewable:end -->
2017-08-24 17:36:44 -05:00
bors-servo
1e0ebf1c1a Auto merge of #18207 - bradwerth:reuseImports, r=xidorn
Add a reusable sheets parameter to Servo_StyleSheet_FromUTF8Bytes.

MozReview-Commit-ID: DdMQpUY1WcJ

<!-- Please describe your changes on the following line: -->
https://bugzilla.mozilla.org/show_bug.cgi?id=1387933
https://reviewboard.mozilla.org/r/171308/

---
<!-- 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
- [ ] 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/18207)
<!-- Reviewable:end -->
2017-08-24 14:58:49 -05:00
Nazım Can Altınova
6d7a1903b8 Implement font feature values lookup for stylo 2017-08-24 12:41:36 -07:00
Josh Matthews
1297c0ff51 Devirtualize CSS error reporting. 2017-08-24 10:41:06 -07:00
Brad Werth
cdcd7edb01 Add a reusable sheets parameter to Servo_StyleSheet_FromUTF8Bytes.
MozReview-Commit-ID: DdMQpUY1WcJ
2017-08-24 10:38:52 -07:00
Bobby Holley
d4aa8e3cef Track the restyle root and use it to do less work during the traversal.
MozReview-Commit-ID: A8O3JOpsv4E
2017-08-22 19:34:46 -07:00
bors-servo
5bfd5b966b Auto merge of #18190 - jryans:stylo-linux32-getorigin, r=emilio
Stylo: Fix up Servo_StyleSheet_GetOrigin for Linux 32-bit ABI

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

<!-- 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/18190)
<!-- Reviewable:end -->
2017-08-22 13:42:39 -05:00
bors-servo
019b125963 Auto merge of #18170 - emilio:stylist-stylesheet-set, r=SimonSapin
style: Move the StyleSheetSet into the Stylist.

This will allow tracking whether there have been only additions to the
stylesheet set, and in that case don't destroy and completely rebuild the
invalidation map.

This is on top of #18143.

<!-- 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/18170)
<!-- Reviewable:end -->
2017-08-22 11:45:42 -05:00
J. Ryan Stinnett
214c59b25e Fix up Servo_StyleSheet_GetOrigin for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: JHDp0XAmQCG
2017-08-22 11:00:01 -05:00
Emilio Cobos Álvarez
cbf388a5fd
style: Move the StyleSheetSet into the Stylist.
This will allow tracking whether there have been only additions to the
stylesheet set, and in that case don't destroy and completely rebuild the
invalidation map.
2017-08-22 16:55:52 +02:00
bors-servo
8ca9542de6 Auto merge of #18134 - servo:we-are-leaving-babylon, r=emilio
Introduce values::animated::Animate

<!-- 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/18134)
<!-- Reviewable:end -->
2017-08-22 07:22:10 -05:00
Anthony Ramine
aea0cd7ec7 Introduce values::animated::Animate
This replaces the Animatable trait and merges its three former methods into a single one.
2017-08-22 09:41:01 +02:00
bors-servo
10779f0251 Auto merge of #18077 - glennw:wr-profiling, r=emilio
Add key bindings for more WR debug / profiler options.

<!-- 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/18077)
<!-- Reviewable:end -->
2017-08-21 16:11:20 -05:00
Brian Birtles
4f53ca2e39 Expand var() references in single_value_to_css
This is a temporary step needed to support Gecko's getKeyframes() API
until we implement bug 1391537. It only takes effect when
a ComputedValues object is supplied and only for longhand declarations.
2017-08-21 12:59:53 +09:00
bors-servo
941e0dbb5a Auto merge of #18142 - emilio:less-mess-ns, r=SimonSapin
style: Less messy namespace handling.

This PR accounts for the fact that the namespace table is only needed in
`NestedRuleParser`, and only for style rules, in order to simplify the setup and
be able to fix a few bugs wrt parsing of invalid rules.

<!-- 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/18142)
<!-- Reviewable:end -->
2017-08-18 12:58:46 -05:00
Emilio Cobos Álvarez
62d42a090b
style: Fix namespace handling during keyframe parsing. 2017-08-18 19:58:00 +02:00
Emilio Cobos Álvarez
a962c54928
style: Cleanup ParserContext::new_with_rule_type. 2017-08-18 19:57:59 +02:00
Emilio Cobos Álvarez
d1725b1f19
style: Replicate the list of stylesheets on the layout thread.
This is a patch that unifies a bit how Gecko and Stylo stylesheets work, in
order to be able to eventually move the stylesheets into the stylist, and be
able to incrementally update the invalidation map.
2017-08-18 14:31:35 +02:00
bors-servo
b8159e659e Auto merge of #18135 - jdm:lesstring, r=emilio
Use fewer allocations when reporting Gecko errors.

Avoid some unnecessary string allocations when extracting meaningful values out of CSS parser error messages.

---
- [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/18135)
<!-- Reviewable:end -->
2017-08-18 05:46:48 -05:00
Josh Matthews
86f1628928 Use fewer allocations when reporting Gecko errors. 2017-08-17 18:25:52 -07:00
bors-servo
f6a42ed9c1 Auto merge of #18096 - glennw:update-wr-deinit, r=jdm
Update WR (new texture cache allocator, shader deinit path).

<!-- 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/18096)
<!-- Reviewable:end -->
2017-08-17 17:28:18 -05:00
Glenn Watson
e1b1bc7c96 Add key bindings for more WR debug / profiler options. 2017-08-18 06:41:28 +10:00
bors-servo
cc86ca2bcd Auto merge of #18126 - servo:glow-fox, r=emilio
geckolib: Fix some warnings (treated as error) new in Rust Nigthly

<!-- 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/18126)
<!-- Reviewable:end -->
2017-08-17 11:05:32 -05:00
Simon Sapin
35282042bc geckolib: Fix some warnings (treated as error) new in Rust Nigthly 2017-08-17 15:59:33 +02:00
Tom Tromey
7224a5617f Expose the source map URL on a style sheet
This changes Servo to track the source map URL of a style sheet.  This
parallels a change going in to Gecko:
https://bugzilla.mozilla.org/show_bug.cgi?id=1388855
2017-08-17 06:51:30 -06:00
Glenn Watson
26083b1dca Update WR (new texture cache allocator, shader deinit path). 2017-08-17 20:03:28 +10:00
Nazım Can Altınova
6893446b71 Add a pref checking mechanism for alias properties 2017-08-16 13:23:14 -07:00
Emilio Cobos Álvarez
4c80cccbd2
stylo: Cleanup a bit of the Stylist clear setup.
This moves us to clear on rebuild, which allows us to remove yet another place
where we track stylist dirtiness.

Bug: 1390255
Reviewed-by: heycam
MozReview-Commit-ID: nihQbUAbh8
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-08-16 08:49:41 +02:00
J. Ryan Stinnett
25d2b70252 Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: LY6z7lEKgOp
2017-08-15 21:10:55 -05:00
J. Ryan Stinnett
22e794bbd8 Fix up Servo_TakeChangeHint for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: 6qqVVfU8Mb2
2017-08-15 21:10:48 -05:00