Closed
Bug 1392055
Opened 7 years ago
Closed 7 years ago
Pass the full event to the callback in toolkit/content/widgets/notification.xml
Categories
(Toolkit Graveyard :: Notifications and Alerts, enhancement, P3)
Toolkit Graveyard
Notifications and Alerts
Tracking
(firefox59 fixed)
RESOLVED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | fixed |
People
(Reporter: jorgk-bmo, Assigned: thomas8)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
johannh
:
review+
|
Details | Diff | Splinter Review |
At
https://dxr.mozilla.org/mozilla-central/rev/833f84d0d5c729054a3aa8b3f34735f56fe6436b/toolkit/content/widgets/notification.xml#491
var result = callback(this, button, aEvent.target);
we call a button callback with the event target. It would be beneficial to pass the full event, or at least aEvent.shiftKey.
So the patch would be a one liner adding the extra argument.
Sorry about the NI SPAM, I really can't see who's in charge of this. Please point me to the right person and also adjust the component of this bug.
Flags: needinfo?(squibblyflabbetydoo)
Flags: needinfo?(jhofmann)
Comment 3•7 years ago
|
||
Let's move this to toolkit. I'm not sure who to ping here. Everyone is really busy with 57 right now. I can't imagine us turning down a patch that adds a fourth argument to the callback function, but I really only looked at it briefly.
Component: XP Toolkit/Widgets: XUL → Notifications and Alerts
Flags: needinfo?(squibblyflabbetydoo)
Flags: needinfo?(jhofmann)
Product: Core → Toolkit
Updated•7 years ago
|
Priority: -- → P3
Reporter | ||
Updated•7 years ago
|
Flags: needinfo?(jorgk)
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Jorg K (GMT+1) from comment #0)
> At
> https://dxr.mozilla.org/mozilla-central/rev/
> 833f84d0d5c729054a3aa8b3f34735f56fe6436b/toolkit/content/widgets/
> notification.xml#491
> var result = callback(this, button, aEvent.target);
>
> we call a button callback with the event target. It would be beneficial to
> pass the full event, or at least aEvent.shiftKey.
We definitely need the full event, adding only aEvent.shiftKey would be arbitrary and incomplete and thus perpetuate the shortcomings of the status quo.
With the benefit of hindsight, the third argument was never supposed to be aEvent.target, but just aEvent, then any consumer can pick from aEvent whatever he needs. I'm not sure how much work it would be to replace the aEvent.target argument with aEvent, but it would require adjusting all consumers which sounds like much work. Adding aEvent as a fourth parameter is unlikely to break things for consumers, so that looks like the way of least resistance for now, notwithstanding later efforts to eliminate aEvent.target from the parameters list and update consumers accordingly.
> So the patch would be a one liner adding the extra argument.
Yes. Let's do that, please!
Assignee | ||
Comment 6•7 years ago
|
||
So here's the *ONE-line patch* as hinted by Jörg, adding aEvent as a fourth argument to the callback function.
I am not in a position to check consumers of this, but I would not expect this change to break anything.
Johann, kindly choose an appropriate reviewer if you're not reviewing this yourself.
We should point out that it looks like a risk-free one-liner so it's not worth clogging up anyone's review queue because it'll be faster to just review it immediately.
We're waiting for this to fix Thunderbird Bug 1392056, which is the last piece in the puzzle of a series of bugs to make the choice of composition mode consistent.
Attachment #8937445 -
Flags: review?(jhofmann)
Assignee | ||
Comment 7•7 years ago
|
||
NEW *one-line* patch
Ops, last patch somehow lost its context.
> So here's the *ONE-line patch* as hinted by Jörg, adding aEvent as a fourth
> argument to the callback function.
>
> I am not in a position to check consumers of this, but I would not expect
> this change to break anything.
>
> Johann, kindly choose an appropriate reviewer if you're not reviewing this
> yourself.
>
> We should point out that it looks like a risk-free one-liner so it's not
> worth clogging up anyone's review queue because it'll be faster to just
> review it immediately.
>
> We're waiting for this to fix Thunderbird Bug 1392056, which is the last
> piece in the puzzle of a series of bugs to make the choice of composition
> mode consistent.
Attachment #8937445 -
Attachment is obsolete: true
Attachment #8937445 -
Flags: review?(jhofmann)
Attachment #8937446 -
Flags: review?(jhofmann)
Comment 8•7 years ago
|
||
Comment on attachment 8937446 [details] [diff] [review]
1392055_notification.xml.patch (v.1.1)
Review of attachment 8937446 [details] [diff] [review]:
-----------------------------------------------------------------
Seems good to me. :)
Attachment #8937446 -
Flags: review?(jhofmann) → review+
Assignee | ||
Comment 9•7 years ago
|
||
Thanks for rapid review :)
So I guess that makes this ready for check-in, doesn't it?
Keywords: checkin-needed
Summary: Pass the full event or at least event.shiftKey to the callback in toolkit/content/widgets/notification.xml → Pass the full event to the callback in toolkit/content/widgets/notification.xml
Updated•7 years ago
|
Assignee: nobody → bugzilla2007
Comment 10•7 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/91cf499eff0e
Pass the full event to the callback in notification.xml. r=jhofmann
Keywords: checkin-needed
Comment 11•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Updated•1 year ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•