Commit graph

39866 commits

Author SHA1 Message Date
pylbrecht
25d036f05c Set images' ExtendMode based on available information 2019-12-17 19:52:02 +01:00
pylbrecht
1cdcbb25fa Handle overlapping gradient stops for linear gradients
From `addColorStop(offset, color)`s spec:
If multiple stops are added at the same offset on a gradient, they must
be placed in the order added, with the first one closest to the start of
the gradient, and each subsequent one infinitesimally further along
towards the end point (in effect causing all but the first and last stop
added at each point to be ignored)

https://www.w3.org/html/test/results/2dcontext/annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.overlapu
2019-12-17 19:52:01 +01:00
pylbrecht
04e9523e5f Use push_layer_with_blend() only when necessary
push_layer_with_blend() comes at a performance cost, so we only use it
on blend modes that require it.
2019-12-17 19:52:01 +01:00
pylbrecht
a02daef7b2 Make arc() wrap angles mod 2pi 2019-12-17 19:52:01 +01:00
pylbrecht
02e3325416 Make arc() use anticlockwise argument 2019-12-17 19:52:01 +01:00
pylbrecht
da9b4c33cd Make fill() handle all composition operations 2019-12-17 19:52:00 +01:00
pylbrecht
1597b956b8 Update raqote to have blend modes working on layers 2019-12-17 19:52:00 +01:00
pylbrecht
47ee2729ec Make fill() draw uncovered pixels as (0,0,0,0) for certain composition ops 2019-12-17 19:52:00 +01:00
pylbrecht
4d4e68ca6b Respect direction when drawing arcs 2019-12-17 19:52:00 +01:00
pylbrecht
a473f50245 Respect FilterMode when drawing images 2019-12-17 19:51:59 +01:00
pylbrecht
16f06f24c5 Add check for handling equal radial gradients 2019-12-17 19:51:59 +01:00
pylbrecht
d87e5d831b Add check to handle zerosize linear gradients 2019-12-17 19:51:59 +01:00
pylbrecht
9f58ae4b07 Update raqote: linear gradient fix 2019-12-17 19:51:59 +01:00
pylbrecht
bd1e30fa66 Update raqote 2019-12-17 19:51:58 +01:00
pylbrecht
2087281940 Update raqote due to bugfix for arc point in path 2019-12-17 19:51:58 +01:00
pylbrecht
55256df0ba Use tolerance > 0 in Path::contains_point() 2019-12-17 19:51:58 +01:00
pylbrecht
5151309ee8 Update raqote due to bugfix 2019-12-17 19:51:58 +01:00
pylbrecht
5c6a12a116 Create raqote::SolidSource with premultiplied color
SolidSource expects a premultiplied color.
2019-12-17 19:51:57 +01:00
pylbrecht
77a8bc4a1d Fix conversion of image data slice 2019-12-17 19:51:57 +01:00
pylbrecht
2aa16fc731 Update raqote 2019-12-17 19:51:57 +01:00
pylbrecht
b8b33788b6 Handle empty paths in PathBuilder::get_current_point()
The case of calling get_current_point() on empty paths has not been
handled and caused panics.
2019-12-17 19:51:57 +01:00
pylbrecht
606ad20544 Update raqote due to bugfix 2019-12-17 19:51:57 +01:00
pylbrecht
d6f46b5513 Apply transformation in Path::contains_point() 2019-12-17 19:51:56 +01:00
pylbrecht
c8025c9147 Don't reuse PathBuilder after calling finish() 2019-12-17 19:51:56 +01:00
pylbrecht
65a21e9bad Enable raqote by default 2019-12-17 19:51:55 +01:00
bors-servo
a5844d5efd
Auto merge of #25304 - servo:with, r=jdm
Add `layout-2020` option to the `.servobuild` file

… and `--with-layout-2013` command-line option to disable it.
2019-12-17 09:00:08 -05:00
bors-servo
4458bc762c
Auto merge of #25303 - servo-wpt-sync:wpt_update_16-12-2019, r=servo-wpt-sync
Sync WPT with upstream (16-12-2019)

Automated downstream sync of changes from upstream as of 16-12-2019.
[no-wpt-sync]
r? @servo-wpt-sync
2019-12-17 04:52:30 -05:00
bors-servo
6ccad53937
Auto merge of #25254 - pshaughn:stop_creating_outofspec_events, r=jdm
Removed createEvent cases, removed now-unused new_uninitializeds

<!-- Please describe your changes on the following line: -->
document.createEvent was creating some event types WHATWG now says shouldn't be created that way. This was the only caller of a few new_uninitialized methods, so those are removed too.

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

<!-- 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. -->
2019-12-17 02:13:13 -05:00
bors-servo
a8b8f46476
Auto merge of #25299 - emilio:gecko-sync, r=emilio,nox
style: Sync changes from mozilla-central.

See individual commits for details.
2019-12-16 23:51:18 -05:00
bors-servo
b274d59875
Auto merge of #25236 - pshaughn:safelistct, r=jdm
De-deplicate is_cors_safelisted_request_header helper functions

<!-- Please describe your changes on the following line: -->
Separate is_cors_safelisted_request_header implementations in script::dom::request and net::fetch::methods have been merged to a single implementation in net_traits::request, with additional logic for spec requirements that weren't previously there. This doesn't pass all the failing tests, but it doesn't fail any passing ones either and it reduces confusion about what's supposed to happen where.

---
<!-- 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 #25235 and some but not all subcases in #25175

<!-- Either: -->
- [X] There are tests for these changes, in that the WPT CORS tests that did already pass still do

<!-- 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. -->
2019-12-16 20:51:09 -05:00
bors-servo
d205194618
Auto merge of #25070 - cagandhi:named-form-getter, r=jdm
Named form getter

This PR contains changes related to adding named getter in Servo for getting the list of all meaningful property names for a HTMLFormElement object, and getting the value of a specific property name. The following changes have been made:

* uncomment the [named getter](f63b404e0c/components/script/dom/webidls/HTMLFormElement.webidl (L30)) from HTMLFormElement.webidl
* add the missing `NamedGetter` and `SupportedPropertyNames` methods to [HTMLFormElement](f63b404e0c/components/script/dom/htmlformelement.rs (L113))
* implement `SupportedPropertyNames` according to [the specification](https://html.spec.whatwg.org/multipage/forms.html#the-form-element:supported-property-names):
  * create an enum to represent the `id`, `name`, and `past` states for the sourced names
  * create a vector of `(SourcedName, DomRoot<HTMLElement>)` by iterating over `self.controls` and checking the element type and calling methods like `HTMLElement::is_listed_element`
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #16479 (GitHub issue number if applicable)
2019-12-16 18:10:12 -05:00
bors-servo
846aa5b56a
Auto merge of #25309 - jdm:publisher, r=<try>
Adjust UWP packaging for submission.
2019-12-16 15:16:16 -05:00
Josh Matthews
b3d0388d83 Adjust UWP packaging for submission. 2019-12-16 15:15:13 -05:00
bors-servo
fb5ab1fc74
Auto merge of #25306 - paulrouget:lessAnimMsg, r=jdm
Do not wake up embedder on each animation tick

The constellation should only update the compositor if the animation state actually changed.
2019-12-16 14:59:50 -05:00
Anshul Jethvani
ef8496c7bc updated expected test results in log 2019-12-16 13:07:28 -05:00
bors-servo
c9baa5b9fc
Auto merge of #25211 - kunalmohan:6631-Worker-Id, r=jdm
`worker_id` type changed to uuid

<!-- Please describe your changes on the following line: -->
Fixes #6631
`worker_id` is now generate as uuid and saved as string.

---
<!-- 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 #6631  (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. -->
2019-12-16 11:31:44 -05:00
Paul Rouget
016d9a62ab Do not wake up embedder on each animation tick 2019-12-16 16:50:36 +01:00
Simon Sapin
d670b4420a Add layout-2020 option to the .servobuild file
… and `--with-layout-2013` command-line option to disable it.
2019-12-16 15:36:18 +01:00
Patrick Shaughnessy
67827debd8 Now just one is_cors_safelisted_request_header, with closer spec alignment 2019-12-16 09:07:02 -05:00
Emilio Cobos Álvarez
7513bc293e Cherry-pick some parts of the cssparser update. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
f7c5df5703 Update WPT expectations. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
75a05f0fff Appease tidy. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
ef16c5844f Rustfmt recent changes. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
e885ccb7ae layout-2020: build fixes. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
7d30a7da75 Servo build fixes. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
c1c2b746c8 Update Cargo.lock. 2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
ad61cae6b0 style: Update smallvec to 1.0.
Differential Revision: https://phabricator.services.mozilla.com/D56044
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
789ddd9dc1 style: Make LengthPercentage not copy.
This is needed to support min() / max() / clamp(), etc.

Differential Revision: https://phabricator.services.mozilla.com/D57249
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
a541046147 style: Use less Au in font code.
Font code is the only thing that was using Au in the style system without
interfacing with Gecko, and there was no real reason for it to do so.

This slightly simplifies the code.

Differential Revision: https://phabricator.services.mozilla.com/D57248
2019-12-16 14:23:56 +01:00
Emilio Cobos Álvarez
4cd8813a81 style: Remove full-screen-api.unprefix.enabled.
It's been enabled since Firefox 64.

Differential Revision: https://phabricator.services.mozilla.com/D56951
2019-12-16 14:23:56 +01:00