Commit graph

15156 commits

Author SHA1 Message Date
Xidorn Quan
97b2b95f99 Update generated files. 2017-07-12 20:33:15 +10:00
Xidorn Quan
441487cec2 Update test in selectors to match types for Gecko. 2017-07-12 20:33:13 +10:00
Xidorn Quan
a307653581 Implement parsing of tree pseudo-elements. 2017-07-12 20:33:11 +10:00
Xidorn Quan
832c4c4079 Add pseudo_element_variant helper function to simplify some code. 2017-07-12 15:07:30 +10:00
Xidorn Quan
2649d0332a Call non-functional pseudo-elements simple pseudo-element. 2017-07-12 15:07:29 +10:00
Xidorn Quan
01ea3cc3e3 Remove special-casing anonymous box in PseudoElement::exposed_in_non_ua_sheets. 2017-07-12 15:07:27 +10:00
Xidorn Quan
38577fd6ee Allow selector parser to specify pseudo-element which can be used with single-colon syntax. 2017-07-12 15:07:25 +10:00
Xidorn Quan
706d54401e Add functional pseudo-element support to selectors crate. 2017-07-12 15:07:24 +10:00
Xidorn Quan
d138fd1a32 Slightly simplify parse_one_simple_selector. 2017-07-12 15:07:22 +10:00
bors-servo
f85778884f Auto merge of #17673 - hgallagher1993:local_branch, r=jdm
Removed unused import

Removed unused import `script_layout_interface::reporter::CSSErrorReporter in components/layout_thread/lib.rs

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

<!-- 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/17673)
<!-- Reviewable:end -->
2017-07-11 20:09:52 -07:00
bors-servo
749891e48e Auto merge of #17672 - sadmansk:heap_in_box, r=jdm
Use boxed slice instead of vec for FuntionTimerCallback

<!-- Please describe your changes on the following line: -->
Added `fn trace()` implementation for `Box<[T]>` type, and change FunctionTimerCallback to store boxed slices for heap values instead of Vector.

---
<!-- 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 #17611

<!-- 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/17672)
<!-- Reviewable:end -->
2017-07-11 18:55:18 -07:00
bors-servo
882fc4731c Auto merge of #17682 - birtles:check-pref-for-frames-timing, r=hiro
Check Gecko pref before parsing frames() timing function

These are the Servo-side changes for [Gecko bug 1379582](https://bugzilla.mozilla.org/show_bug.cgi?id=1379582).

They have been reviewed by @hiikezoe.

<!-- 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/17682)
<!-- Reviewable:end -->
2017-07-11 17:28:29 -07:00
Brian Birtles
8daeeb159a Check Gecko pref before parsing frames() timing function 2017-07-12 08:49:10 +09:00
bors-servo
bc44246fc6 Auto merge of #17364 - asajeffrey:script-paint-worklets-properties, r=jdm
Implement paint worklet properties

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

This is the final PR to get basic paint worklet support. It adds support for paint worklet properties (https://drafts.css-houdini.org/css-paint-api/#paint-definition-input-properties). When a paint worklet is registered, it specifies a list of CSS properties, and is provided with their computed values when it is invoked.

This is a dependent PR:
* "Implemented paint worklets invoking worklet scripts" is #17239.
* "Implemented paint worklets rendering contexts" is #17326.

There should be tests added for this, hopefully the existing wpt houdini tests.

---
<!-- 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 #16839
- [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. -->

<!-- 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/17364)
<!-- Reviewable:end -->
2017-07-11 16:24:18 -07:00
Alan Jeffrey
ef033b8362 Implemented paint worklet properties. 2017-07-11 17:28:56 -05:00
Gecko Backout
02d9305782 Backed out changeset 3977404931e5 for failing mochitest layout/style/test/test_value_computation.html. r=backout
Backs out https://github.com/servo/servo/pull/17654
2017-07-11 22:14:04 +00:00
Sadman Kazi
fa678992ff Use boxed slice instead of vec for FuntionTimerCallback 2017-07-11 14:07:40 -07:00
Hugh Gallagher
e13daa1e78 Removed unused import script_layout_interface::reporter::CSSErrorReporter 2017-07-11 21:54:07 +01:00
bors-servo
2a575acabe Auto merge of #17665 - jdm:postmessage-panic, r=KiChjang
Avoid panic when postMessage targets closed window.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17664
- [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/17665)
<!-- Reviewable:end -->
2017-07-11 12:28:33 -07:00
bors-servo
de331c6bc8 Auto merge of #17654 - jyc:image-orientation, r=Manishearth
Make Servo's rounding of image-orientation values agree with Gecko's, and pass orientations directly as an enum instead of as angles.

Has been reviewed: https://reviewboard.mozilla.org/r/155336/

<!-- 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: -->
- [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. -->

Bugzilla issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1355380

<!-- 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/17654)
<!-- Reviewable:end -->
2017-07-11 11:22:26 -07:00
Jonathan Chan
e554146e2a Make Servo's rounding of image-orientation values agree with Gecko's,
and pass orientations directly as an enum instead of as angles.

Depends on a Gecko change to be subsequently landed in m-c.
2017-07-11 11:19:39 -07:00
Josh Matthews
4c54129877 Avoid panic when postMessage targets closed window. 2017-07-11 10:37:58 -04:00
bors-servo
bc1ac6e64c Auto merge of #17609 - asajeffrey:canvas-clear-state, r=jdm
Clear canvas thread state on recreation.

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

The canvas rendering context is cleared when it is recreated, but not the matching state in the canvas paint thread.

---
<!-- 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 #17533
- [X] These changes do not require tests because the css-paint-api tests test for this already.

<!-- 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/17609)
<!-- Reviewable:end -->
2017-07-11 06:40:33 -07:00
bors-servo
ee95bda3bf Auto merge of #17652 - Tremoneck:debug_key_mover, r=paulrouget
Move Ctrl-F12 keybindings outside of libservo

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

Creates a new WindowEvent called ToggleProfiller, when this Event is queued the profiler is toggled.
When Crtl + F12 are pressed the Event is queued.

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

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/17652)
<!-- Reviewable:end -->
2017-07-11 01:17:20 -07:00
Tremoneck
6309d516bd Remove set_webrenderer_profiler_enabled in compositing/compositor.rs and servo/lib.rs and inlining this function in compositing/compositor.rs 2017-07-11 09:51:58 +02:00
Xidorn Quan
0e91f033cb Serialize font longhands to -moz-use-system-font when using system font like what Gecko does. 2017-07-11 17:19:12 +10:00
Tremoneck
e5e3748a46 Move WR profiler keybindings to glutin window, where the other keybindings
are located
2017-07-11 08:08:57 +02:00
bors-servo
8fa2a262dc Auto merge of #17658 - emilio:nesting-level, r=bholley
selectors: Avoid looking at MatchingMode if the selector isn't the topmost.

Also, switch the hover quirk to the same mechanism.

Bug: 1379696
Reviewed-By: bholley
MozReview-Commit-ID: KrmNqNyASf6

<!-- 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/17658)
<!-- Reviewable:end -->
2017-07-10 19:16:35 -07:00
Emilio Cobos Álvarez
1f2b79bc30
selectors: Avoid looking at MatchingMode if the selector isn't the topmost.
Also, switch the hover quirk to the same mechanism.

Bug: 1379696
Reviewed-By: bholley
MozReview-Commit-ID: KrmNqNyASf6
2017-07-11 03:52:07 +02:00
bors-servo
2ddbc92d90 Auto merge of #17655 - jdm:stylo-error-reporter, r=emilio
Hook up Stylo error reporter to Firefox devtools

Reviewed by @emilio in https://bugzilla.mozilla.org/show_bug.cgi?id=1352669.

---
- [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/17655)
<!-- Reviewable:end -->
2017-07-10 18:13:44 -07:00
Josh Matthews
0b43d0072c stylo: Update rust-cssparser; extract more specific error types when reporting (bug 1352669). 2017-07-10 20:46:12 -04:00
Josh Matthews
a08371e8eb stylo: Create error reporters linked to documents (bug 1352669) 2017-07-10 20:46:08 -04:00
Hiroyuki Ikezoe
0d43281fad Consider f64 epsilon for add_weighted portions.
This patch also degrade assert! to debug_assert! since crash reports don't show
us useful information so far (no assertion messages at all).
2017-07-11 08:42:28 +09:00
Hiroyuki Ikezoe
8f1bb25807 Update bindings. 2017-07-11 06:47:17 +09:00
J. Ryan Stinnett
3463a9c210 Pass through visited style for after change
When a transition update is needed during restyling, `get_after_change_style` is
called to re-cascade without transition rules, and this style is then used for
primary styling instead of the style just computed.

`get_after_change_style` used to ignore visited styles, so this meant that if a
transition update was needed, visited styles were effectively dropped.

To fix the crash here, we pass through the existing visited styles when
re-cascading as part of `get_after_change_style`.

MozReview-Commit-ID: 4HBQAdeJ38B
2017-07-10 13:28:12 -05:00
Hiroyuki Ikezoe
1a5e1c6255 Update bindings. 2017-07-10 18:27:19 +09:00
Xidorn Quan
7fd4b43aea Use ComputedValues rather than element to get style rule list. 2017-07-10 13:07:15 +10:00
bors-servo
82f65f6eb3 Auto merge of #17505 - cbrewster:less_blocking, r=asajeffrey,glennw
Remove unnecessary `recv` in the constellation

<!-- 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
- [ ] 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/17505)
<!-- Reviewable:end -->
2017-07-09 14:39:59 -07:00
Emilio Cobos Álvarez
43d58fc01a
stylo: Run the stylehseet invalidation pass also for stylesheet removals.
People apparently do all sorts of silly stuff with stylesheets, see Google Inbox
in bug 1379203.

Bug: 1379433
Reviewed-By: heycam
MozReview-Commit-ID: 4x2d3glOFu8
2017-07-09 14:17:19 +02:00
bors-servo
104e0b4730 Auto merge of #17640 - emilio:starts-with-ignore-ascii-case, r=stshine
style: Fix starts_with_ignore_ascii_case.

In particular, fix a panic when the input is not ASCII and we happen to index in
something that is not a char boundary.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1379380

<!-- 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/17640)
<!-- Reviewable:end -->
2017-07-08 12:59:29 -07:00
Emilio Cobos Álvarez
9e00efc8a5
style: Make starts_with_ignore_ascii_case not lie if the strings are the same length. 2017-07-08 19:41:28 +02:00
Emilio Cobos Álvarez
d8a22d8bd7
style: Fix starts_with_ignore_ascii_case.
In particular, fix a panic when the input is not ASCII and we happen to index in
something that is not a char boundary.

This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1379380
2017-07-08 19:32:11 +02:00
bors-servo
7a17de4fd0 Auto merge of #17639 - emilio:gdcs-rem, r=heycam
style: Avoid overriding the root font size from a getDefaultComputedStyle call

<!-- 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/17639)
<!-- Reviewable:end -->
2017-07-08 10:28:10 -07:00
Emilio Cobos Álvarez
c2cc6b08f8
style: Avoid overriding the root font size from a getDefaultComputedStyle call.
MozReview-Commit-ID: 2WFyGj868fJ
2017-07-08 18:05:31 +02:00
Emilio Cobos Álvarez
5d03ba3cbe
style: Move root font size handling outside of the cascade.
And merge it with the rest of the code handling root font-size changes.

MozReview-Commit-ID: 3rW1C3mXiMd
2017-07-08 18:05:30 +02:00
Ralph Giles
ec49c4d8c8 Better bindgen error message when files are missing.
This is only slightly more informative because it doesn't give
the filename, but I think it's an improvement on the simple
unwrap() panic when we try to read a file which isn't there.

See also [Gecko bug 1368083](https://bugzilla.mozilla.org/show_bug.cgi?id=1368083).
2017-07-07 22:49:45 -07:00
Ralph Giles
8db2775ba6 Read bindgen flags from a generated file.
Bindgen needs some build-specific flags, like the -isysroot
passed to clang for the C++ compilation. Try to read
these from $objdir/layout/style/bindgen.toml which is
created by the Firefox build system, and merge them
into the config.

See also [Gecko bug 1368083](https://bugzilla.mozilla.org/show_bug.cgi?id=1368083).
2017-07-07 22:48:55 -07:00
bors-servo
6e2e7151d8 Auto merge of #17632 - omakk:master, r=jdm
Clean up HTMLImageElement::handle_event

Reflects desired changes in #15832

<!-- Please describe your changes on the following line: -->
Cleans up `HTMLImageElement::handle_event` located in `components/script/dom/htmlimageelement.rs`

---
<!-- 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 #15832

- [X] These changes do not require tests because this change maintains the same logic

<!-- 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/17632)
<!-- Reviewable:end -->
2017-07-07 11:21:16 -07:00
Omar Akkila
420a7878b9 Refactor HTMLImageElement::handle_event to be idiomatic
Clean up HTMLImageElement::handle_event

Area::hit_test now uses a reference instead of taking ownership

Fix trailing whitespace

Unalign => in match

Fix Area::hit_test tests to reflect updated function signature
2017-07-07 21:07:12 +04:00
Simon Sapin
665e9203a1 Upgrade to rustc 1.20.0-nightly (696412de7 2017-07-06) 2017-07-07 15:28:22 +02:00