Closed
Bug 936273
Opened 11 years ago
Closed 11 years ago
UITour: Allow page to specify which highlight animation to use
Categories
(Firefox :: General, defect, P3)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 29
People
(Reporter: Unfocused, Assigned: MattN)
References
Details
Attachments
(2 files, 1 obsolete file)
8.57 KB,
patch
|
Unfocused
:
review+
|
Details | Diff | Splinter Review |
370 bytes,
text/html
|
Details |
Currently, the highlight animation is chosen randomly. Would be nice for the page to be able to specify which animation to use.
Reporter | ||
Comment 1•11 years ago
|
||
I should note: This would only cover choosing which of the pre-set animations to use. It would not allow the page to define arbitrary animations.
Reporter | ||
Updated•11 years ago
|
Priority: -- → P4
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Priority: P4 → P3
Assignee | ||
Comment 2•11 years ago
|
||
This depends on patches to bug 940902 and bug 936187.
Attachment #8339031 -
Flags: review?(bmcbride)
Reporter | ||
Comment 3•11 years ago
|
||
Comment on attachment 8339031 [details] [diff] [review]
v.1 Pass the effect through to the attribute, with tests
Review of attachment 8339031 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/modules/UITour.jsm
@@ +86,5 @@
> case "showHighlight": {
> let targetPromise = this.getTarget(window, data.target);
> if (!targetPromise)
> return false;
> + targetPromise.then(target => this.showHighlight(target, data.effect));
Think the API should be more explicit here. Currently, if you specify an effect we don't support, it uses a random effect - which feels a bit too magic. I'd rather have the page specify "random" to get a random effect, and if it specified an effect we don't support it should default to "none".
Also, as a general rule, I've tried to do all input checking/sanitisation in this method here - keeping it all together so it's easier to audit.
Attachment #8339031 -
Flags: review?(bmcbride) → review-
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Blair McBride [:Unfocused] from comment #3)
> Comment on attachment 8339031 [details] [diff] [review]
> v.1 Pass the effect through to the attribute, with tests
>
> ::: browser/modules/UITour.jsm
> @@ +86,5 @@
> > case "showHighlight": {
> > let targetPromise = this.getTarget(window, data.target);
> > if (!targetPromise)
> > return false;
> > + targetPromise.then(target => this.showHighlight(target, data.effect));
>
> Think the API should be more explicit here. Currently, if you specify an
> effect we don't support, it uses a random effect - which feels a bit too
> magic. I'd rather have the page specify "random" to get a random effect, and
> if it specified an effect we don't support it should default to "none".
OK, I changed the default to "none".
> Also, as a general rule, I've tried to do all input checking/sanitisation in
> this method here - keeping it all together so it's easier to audit.
I originally did it in showHighlight so that we would validate the argument from callers other than a website but I suppose this new way allows a JSM consumer use a custom animation.
Attachment #8339031 -
Attachment is obsolete: true
Attachment #8342769 -
Flags: review?(bmcbride)
Reporter | ||
Updated•11 years ago
|
Attachment #8342769 -
Flags: review?(bmcbride) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Pointer to Github pull-request
Assignee | ||
Comment 6•11 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Assignee | ||
Updated•11 years ago
|
Flags: in-testsuite+
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 29
You need to log in
before you can comment on or make changes to this bug.
Description
•