mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Auto merge of #24573 - teapotd:is-point-in-path-nan, r=jdm
Return false from CanvasState::is_point_in_path for NaN/infinite values Servo doesn't pass WPT test `/2dcontext/path-objects/2d.path.isPointInPath.nonfinite.html` when built with raqote (see [here](https://github.com/servo/servo/pull/24470#issuecomment-546009000)). This change adds a missing check for NaN/infinite values in `CanvasState::is_point_in_path` and fixes this. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #24540 - [X] These changes do not require tests because WPT tests cover it
This commit is contained in:
commit
1b77e42d79
1 changed files with 4 additions and 0 deletions
|
@ -1241,6 +1241,10 @@ impl CanvasState {
|
|||
y: f64,
|
||||
fill_rule: CanvasFillRule,
|
||||
) -> bool {
|
||||
if !(x.is_finite() && y.is_finite()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let fill_rule = match fill_rule {
|
||||
CanvasFillRule::Nonzero => FillRule::Nonzero,
|
||||
CanvasFillRule::Evenodd => FillRule::Evenodd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue