mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #25622 - pylbrecht:composite.op.clear, r=jdm
Add missing CanvasRenderingContext2D global composition operation "clear" <!-- 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 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
1b7223a284
5 changed files with 4 additions and 13 deletions
|
@ -1002,6 +1002,7 @@ impl ToRaqoteStyle for CompositionStyle {
|
|||
CompositionStyle::Copy => raqote::BlendMode::Src,
|
||||
CompositionStyle::Lighter => raqote::BlendMode::Add,
|
||||
CompositionStyle::Xor => raqote::BlendMode::Xor,
|
||||
CompositionStyle::Clear => raqote::BlendMode::Clear,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,6 +254,7 @@ pub enum CompositionStyle {
|
|||
Copy,
|
||||
Lighter,
|
||||
Xor,
|
||||
Clear,
|
||||
}
|
||||
|
||||
impl FromStr for CompositionStyle {
|
||||
|
@ -272,6 +273,7 @@ impl FromStr for CompositionStyle {
|
|||
"copy" => Ok(CompositionStyle::Copy),
|
||||
"lighter" => Ok(CompositionStyle::Lighter),
|
||||
"xor" => Ok(CompositionStyle::Xor),
|
||||
"clear" => Ok(CompositionStyle::Clear),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
@ -291,6 +293,7 @@ impl CompositionStyle {
|
|||
CompositionStyle::Copy => "copy",
|
||||
CompositionStyle::Lighter => "lighter",
|
||||
CompositionStyle::Xor => "xor",
|
||||
CompositionStyle::Clear => "clear",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[2d.composite.operation.clear.html]
|
||||
type: testharness
|
||||
[Canvas test: 2d.composite.operation.clear]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.composite.operation.clear.html]
|
||||
[OffscreenCanvas test: 2d.composite.operation.clear]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[2d.composite.operation.clear.worker.html]
|
||||
[2d]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue