mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #25540 - pylbrecht:raqote, r=jdm
Fix canvas wpt test ensuring there's a subpath when drawing bezier curves <!-- Please describe your changes on the following line: --> These changes will ensure there's a subpath when drawing bezier curves. --- <!-- 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 part of #25331 <!-- 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. -->
This commit is contained in:
commit
dcc72ab14d
5 changed files with 5 additions and 16 deletions
|
@ -771,8 +771,8 @@ impl<'a> CanvasData<'a> {
|
|||
}
|
||||
|
||||
pub fn quadratic_curve_to(&mut self, cp: &Point2D<f32>, endpoint: &Point2D<f32>) {
|
||||
if self.path_builder().current_point().is_none() {
|
||||
self.path_builder().move_to(cp);
|
||||
if self.path_state.is_none() {
|
||||
self.move_to(cp);
|
||||
}
|
||||
self.path_builder().quadratic_curve_to(cp, endpoint);
|
||||
}
|
||||
|
@ -783,6 +783,9 @@ impl<'a> CanvasData<'a> {
|
|||
cp2: &Point2D<f32>,
|
||||
endpoint: &Point2D<f32>,
|
||||
) {
|
||||
if self.path_state.is_none() {
|
||||
self.move_to(cp1);
|
||||
}
|
||||
self.path_builder().bezier_curve_to(cp1, cp2, endpoint);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[canvas_complexshapes_beziercurveto_001.htm]
|
||||
expected: FAIL
|
|
@ -1,4 +0,0 @@
|
|||
[2d.path.bezierCurveTo.ensuresubpath.2.html]
|
||||
[If there is no subpath, the first control point is added]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.path.bezierCurveTo.ensuresubpath.2.html]
|
||||
[If there is no subpath, the first control point is added]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.path.bezierCurveTo.ensuresubpath.2.worker.html]
|
||||
[If there is no subpath, the first control point is added]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue