[Webkit-unassigned] [Bug 75454] Web Inspector: Add utility changes for Spectrum colorpicker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 3 11:24:20 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=75454





--- Comment #5 from Brian Grinstead <briangrinstead at gmail.com>  2012-01-03 11:24:20 PST ---
(In reply to comment #4)
> (From update of attachment 120902 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=120902&action=review
> 
> >> Source/WebCore/inspector/front-end/utilities.js:916
> >> +function stopPropagation(e) {
> > 
> > Not sure if this is too useful. Pavel can comment on this
> 
> I don't even see you calling this in your patch. What does this have to do with anonymous functions? Just locally call event.stopPropagation(). This is useless, please remove.

Please see this comment by Pavel Feldman: https://bugs.webkit.org/show_bug.cgi?id=71262#c31.  I don't call any of these changes in the patch.  He wanted me to include the utility functions as one patch and the code using it as another patch.  This is to make it easier to land all the changes.

I think it is useful to be able to replace this anonymous function:

element.addEventListener("click", function(e) {
   e.stopPropagation();
}, false);

With this:

element.addEventListener("click", stopPropagation, false);

I was told to not use anonymous functions in the web inspector code, that is why I created the helper function.  As I said, I can move this to a local scope and land it with the Spectrum changes, but there is at least one other place in code where this exact thing is done, so this could help with that as well.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list