RESOLVED FIXED53576
Improve readability of updateWidget by converting bool parameter to an enum
https://bugs.webkit.org/show_bug.cgi?id=53576
Summary Improve readability of updateWidget by converting bool parameter to an enum
Adam Barth
Reported 2011-02-01 22:11:39 PST
Improve readability of updateWidget by converting bool parameter to an enum
Attachments
Patch (8.04 KB, patch)
2011-02-01 22:12 PST, Adam Barth
no flags
Patch for landing (8.23 KB, patch)
2011-02-01 22:36 PST, Adam Barth
no flags
Adam Barth
Comment 1 2011-02-01 22:12:06 PST
Alexey Proskuryakov
Comment 2 2011-02-01 22:16:39 PST
Comment on attachment 80891 [details] Patch OK. I hope that someone actually refactors this code one day, so that we don't pass plugin creation option in HTMLMediaElement::updateWidget(), and that HTMLPlugInImageElement::updateWidgetIfNecessary() doesn't know about types of plug-ins!
Adam Barth
Comment 3 2011-02-01 22:17:45 PST
Comment on attachment 80891 [details] Patch Yes. This code is pretty goofy.
Simon Fraser (smfr)
Comment 4 2011-02-01 22:18:24 PST
Comment on attachment 80891 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80891&action=review > Source/WebCore/html/HTMLPlugInImageElement.h:33 > + CreateAllWidgetTypes, CreateAnyPluginType is better, I think.
Adam Barth
Comment 5 2011-02-01 22:23:35 PST
> CreateAnyPluginType is better, I think. Maybe "CreateAnyWidgeType" ? This function can create more than just plugins.
Alexey Proskuryakov
Comment 6 2011-02-01 22:30:16 PST
I think that to make these two changes a definitive win, you could also add a proper FIXME comment to the original spot, perhaps something like "FIXME: Why do we have a special case for some plug-in types here?"
Adam Barth
Comment 7 2011-02-01 22:36:40 PST
Created attachment 80892 [details] Patch for landing
Alexey Proskuryakov
Comment 8 2011-02-01 23:06:18 PST
Thanks Adam!
WebKit Commit Bot
Comment 9 2011-02-02 00:00:31 PST
Comment on attachment 80892 [details] Patch for landing Clearing flags on attachment: 80892 Committed r77366: <http://trac.webkit.org/changeset/77366>
WebKit Commit Bot
Comment 10 2011-02-02 00:00:37 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.