Closed
Bug 226462
Opened 21 years ago
Closed 21 years ago
Eliminate the aReverseReturnResult argument from nsJSContext::CallEventHandler()
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.7alpha
People
(Reporter: jst, Assigned: jst)
Details
Attachments
(1 file)
(deleted),
patch
|
caillon
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
It's silly, and messy, and only one caller cares so the argument should be
eliminated and the mess should be cleaned up. Patch coming up.
Assignee | ||
Comment 1•21 years ago
|
||
Brendan, here's some spiffy XOR logic for you! I hope I got it right :-)
Assignee | ||
Updated•21 years ago
|
Attachment #136075 -
Flags: superreview?(brendan)
Attachment #136075 -
Flags: review?(caillon)
Comment 2•21 years ago
|
||
Comment on attachment 136075 [details] [diff] [review]
Eliminate aReverseReturnResult
Isn't this comment backward, because it describes the condition that's the
operand of !, not the condition that the if tests?
+ // if mReturnResult == nsReturnResult_eDoNotReverseReturnResult and
+ // jsBoolResult == true, or if mReturnResult !=
+ // nsReturnResult_eDoNotReverseReturnResult and jsBoolResult ==
+ // false, prevent default
Also, it's awfully "code-like" instead of saying in prose what is going on.
Maybe "if the handler returned false and its sense is not reversed, or the
handler returned true and its sense is reversed from the usual (false means
cancel), then prevent default."
/be
Attachment #136075 -
Flags: superreview?(brendan) → superreview+
Assignee | ||
Comment 3•21 years ago
|
||
Yeah, duh, that comment was backwards. I replaced it with the wording you suggested.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.7alpha
Comment 4•21 years ago
|
||
Comment on attachment 136075 [details] [diff] [review]
Eliminate aReverseReturnResult
Nifty tricks! r=caillon with the comment update from brendan.
Attachment #136075 -
Flags: review?(caillon) → review+
Assignee | ||
Comment 5•21 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 6•21 years ago
|
||
x == y is probably more readable than !(x ^ y)
Comment 7•21 years ago
|
||
This caused bug 233142
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•