Closed
Bug 1195123
Opened 9 years ago
Closed 9 years ago
Pull "!" inverting operator out of logic in SVG-image rejection code, to make it clearer that it matches the comment
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 file)
1.80 KB,
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
As noted in bug 693940 comment 37, and bug 693940 comment 39, we've got some code for rejecting SVG images which is the inverse of the comment that describes it. (The comment describes what's accepted; the code tests for what's rejected.) This could be made clearer by pulling the "!" out of the code, so that we effectively have: if (!(accepted)) { reject; Then it's easier to audit that the code matches the comment.
Assignee | ||
Comment 1•9 years ago
|
||
[er, somehow ended up with an arbitrary component. Sorry; --> SVG]
Component: Audio/Video: Playback → SVG
Assignee | ||
Comment 2•9 years ago
|
||
So this patch changes: if (!A || (!B && !C)) ...to: if (!(A && (B || C)) ...which are be equivalent by the laws of logic and how "!" is applied to a complex expression.
Attachment #8648503 -
Flags: review?(longsonr)
Assignee | ||
Comment 3•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f3c16ab74123
Updated•9 years ago
|
Attachment #8648503 -
Flags: review?(longsonr) → review+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1563c2cabdc8
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•