Closed
Bug 1627285
Opened 5 years ago
Closed 5 years ago
DOMQuad and DOMRect should not use std::min/max for NaN-able doubles
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Core
DOM: CSS Object Model
Tracking
()
RESOLVED
FIXED
mozilla77
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: TimothyGu, Assigned: TimothyGu)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.83 Safari/537.36
Steps to reproduce:
console.log(new DOMRect(0, 0, NaN, NaN).top);
console.log(new DOMRect(0, 0, NaN, NaN).left);
console.log(new DOMQuad({x: 0}, {x: 0}, {x: NaN}, {x: 0}).getBounds().x)
Actual results:
All three return 0.
Expected results:
After https://github.com/w3c/fxtf-drafts/pull/395, all three should return NaN. WPTs:
Assignee | ||
Comment 1•5 years ago
|
||
I could help fix this bug in
Updated•5 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•5 years ago
|
Priority: -- → P3
Assignee | ||
Comment 2•5 years ago
|
||
Oops, pressed send too early. I'm creating a patch for this.
Assignee | ||
Comment 3•5 years ago
|
||
Tests will be added as a part of bug 1626471. I have manually confirmed that
the added tests pass after this commit.
Updated•5 years ago
|
Assignee: nobody → timothygu99
Status: NEW → ASSIGNED
Updated•5 years ago
|
Attachment #9138115 -
Attachment description: Bug 1627285 - Check for NaN before std::min/max() in DOMQuad and DOMRect. r=emilio → Bug 1627285 - Check for NaN before std::min/max() in DOMQuad and DOMRect. r=emilio,jwalden
Pushed by rmaries@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/791ce1643ae0
Check for NaN before std::min/max() in DOMQuad and DOMRect. r=emilio,jwalden
Comment 5•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox77:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in
before you can comment on or make changes to this bug.
Description
•