RESOLVED FIXED Bug 92109
Implement ColorSuggestionPicker page popup
https://bugs.webkit.org/show_bug.cgi?id=92109
Summary Implement ColorSuggestionPicker page popup
Keishi Hattori
Reported 2012-07-24 06:15:19 PDT
Implement ColorSuggestionPicker page popup
Attachments
Patch (15.35 KB, patch)
2012-07-24 06:30 PDT, Keishi Hattori
no flags
Patch (15.47 KB, patch)
2012-07-24 07:49 PDT, Keishi Hattori
no flags
Patch (15.50 KB, patch)
2012-07-24 19:14 PDT, Keishi Hattori
no flags
Archive of layout-test-results from gce-cr-linux-08 (1020.09 KB, application/zip)
2012-07-24 21:51 PDT, WebKit Review Bot
no flags
Patch (15.51 KB, patch)
2012-07-25 04:01 PDT, Keishi Hattori
no flags
Patch (16.26 KB, patch)
2012-07-26 04:27 PDT, Keishi Hattori
no flags
Keishi Hattori
Comment 1 2012-07-24 06:30:57 PDT
Kent Tamura
Comment 2 2012-07-24 07:34:51 PDT
Comment on attachment 154041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154041&action=review > Source/WebCore/Resources/colorSuggestionPicker.js:97 > +"#ffffff", "#980000", "#ff0000", "#ff9900", "#ffff00", "#00ff00", "#00ffff", > +"#4a86e8", "#0000ff", "#9900ff", "#ff00ff"]; nit: need indentation > Source/WebCore/Resources/colorSuggestionPicker.js:144 > + this.element = element; > + this.config = config; private members should be start with _ this.element -> this._element this.config -> this._config this.layout() -> this._layout() > Source/WebCore/Resources/colorSuggestionPicker.js:150 > +var SwatchSize = 24; // keep in sync with CSS 'Size' is unclear. This should be SwatchBorderBoxWidth or something like that. The comment or the name should have its unit. > Source/WebCore/Resources/colorSuggestionPicker.js:157 > + for (var i = 0; i < this.config.values.length; i ++) { - extra space between i and <. - i ++ should be ++i > Source/WebCore/Resources/colorSuggestionPicker.js:159 > + swatch.value = this.config.values[i]; Adding an application data to a DOM object isn't a good idea. We should use data-* attribute like swatch.dataset.value = ...
Keishi Hattori
Comment 3 2012-07-24 07:49:39 PDT
Keishi Hattori
Comment 4 2012-07-24 07:52:44 PDT
Comment on attachment 154041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154041&action=review >> Source/WebCore/Resources/colorSuggestionPicker.js:97 >> +"#4a86e8", "#0000ff", "#9900ff", "#ff00ff"]; > > nit: need indentation Done. >> Source/WebCore/Resources/colorSuggestionPicker.js:144 >> + this.config = config; > > private members should be start with _ > > this.element -> this._element > this.config -> this._config > this.layout() -> this._layout() Done. >> Source/WebCore/Resources/colorSuggestionPicker.js:150 >> +var SwatchSize = 24; // keep in sync with CSS > > 'Size' is unclear. This should be SwatchBorderBoxWidth or something like that. The comment or the name should have its unit. I was using it as width and height so I made two constants SwatchBorderBoxWidth and SwatchBorderBoxHeight. >> Source/WebCore/Resources/colorSuggestionPicker.js:157 >> + for (var i = 0; i < this.config.values.length; i ++) { > > - extra space between i and <. > - i ++ should be ++i Done. >> Source/WebCore/Resources/colorSuggestionPicker.js:159 >> + swatch.value = this.config.values[i]; > > Adding an application data to a DOM object isn't a good idea. > We should use data-* attribute like > swatch.dataset.value = ... Done.
Kent Tamura
Comment 5 2012-07-24 09:10:13 PDT
Comment on attachment 154060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154060&action=review > Source/WebCore/WebCore.gyp/WebCore.gyp:930 > + 'action_name': 'ColorSuggestionPicker', we should exclude this action for Android.
Kent Tamura
Comment 6 2012-07-24 17:52:51 PDT
Comment on attachment 154060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154060&action=review >> Source/WebCore/WebCore.gyp/WebCore.gyp:930 >> + 'action_name': 'ColorSuggestionPicker', > > we should exclude this action for Android. Probably, it would be simpler to add "&& ENABLE(PAGE_POPUP)" or "&& !OS(ANDROID)" to --condition argument.
Keishi Hattori
Comment 7 2012-07-24 19:14:06 PDT
Keishi Hattori
Comment 8 2012-07-24 19:14:15 PDT
(In reply to comment #6) > (From update of attachment 154060 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=154060&action=review > > >> Source/WebCore/WebCore.gyp/WebCore.gyp:930 > >> + 'action_name': 'ColorSuggestionPicker', > > > > we should exclude this action for Android. > > Probably, it would be simpler to add "&& ENABLE(PAGE_POPUP)" or "&& !OS(ANDROID)" to --condition argument. Added && ENABLE(PAGE_POPUP)
Kent Tamura
Comment 9 2012-07-24 20:27:05 PDT
Comment on attachment 154222 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=154222&action=review > Source/WebCore/Resources/colorSuggestionPicker.js:28 > +var global = { > + argumentsReceived: false > +}; Making 'global' object only for 'argumentsReceived' flag is overkill. We had better remove global, or add scrollbarWidth to global.
WebKit Review Bot
Comment 10 2012-07-24 21:50:59 PDT
Comment on attachment 154222 [details] Patch Attachment 154222 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13343112 New failing tests: fast/forms/range/slider-onchange-event.html fast/forms/range/slider-mouse-events.html fast/forms/range/slider-delete-while-dragging-thumb.html
WebKit Review Bot
Comment 11 2012-07-24 21:51:02 PDT
Created attachment 154246 [details] Archive of layout-test-results from gce-cr-linux-08 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-08 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Keishi Hattori
Comment 12 2012-07-25 04:01:21 PDT
scrollbarWidth(In reply to comment #9) > (From update of attachment 154222 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=154222&action=review > > > Source/WebCore/Resources/colorSuggestionPicker.js:28 > > +var global = { > > + argumentsReceived: false > > +}; > > Making 'global' object only for 'argumentsReceived' flag is overkill. > We had better remove global, or add scrollbarWidth to global. Added scrollbarWidth to global.
Keishi Hattori
Comment 13 2012-07-25 04:01:45 PDT
WebKit Review Bot
Comment 14 2012-07-25 04:57:42 PDT
Comment on attachment 154317 [details] Patch Clearing flags on attachment: 154317 Committed r123606: <http://trac.webkit.org/changeset/123606>
WebKit Review Bot
Comment 15 2012-07-25 04:57:47 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 16 2012-07-25 06:57:47 PDT
Re-opened since this is blocked by 92247
Tom Hudson
Comment 17 2012-07-25 07:19:38 PDT
Breaks the Chromium Windows Canary bots with the following error message: 72>------ Build started: Project: webcore_bindings_sources, Configuration: Release Win32 ------ ... 72> ColorSuggestionPicker 72> bash: -c: line 0: unexpected EOF while looking for matching `"' 72> bash: -c: line 1: syntax error: unexpected end of file
Keishi Hattori
Comment 18 2012-07-25 13:12:41 PDT
(In reply to comment #17) > Breaks the Chromium Windows Canary bots with the following error message: > > 72>------ Build started: Project: webcore_bindings_sources, Configuration: Release Win32 ------ > ... > 72> ColorSuggestionPicker > 72> bash: -c: line 0: unexpected EOF while looking for matching `"' > 72> bash: -c: line 1: syntax error: unexpected end of file I looked at webcore_bindings_sources.vcxproj but the quotes seemed to be balanced. Any ideas?
Kent Tamura
Comment 19 2012-07-26 00:19:27 PDT
(In reply to comment #18) > (In reply to comment #17) > > Breaks the Chromium Windows Canary bots with the following error message: > > > > 72>------ Build started: Project: webcore_bindings_sources, Configuration: Release Win32 ------ > > ... > > 72> ColorSuggestionPicker > > 72> bash: -c: line 0: unexpected EOF while looking for matching `"' > > 72> bash: -c: line 1: syntax error: unexpected end of file > > I looked at webcore_bindings_sources.vcxproj but the quotes seemed to be balanced. Any ideas? The generated command is: call call "$(ProjectDir)..\..\..\..\..\third_party\cygwin\setup_env.bat" && set CYGWIN=nontsec&& set OUTDIR=$(OutDir)&& bash -c "\"python\" \"../make-file-arrays.py\" \"--condition=ENABLE(INPUT_TYPE_COLOR) && ENABLE(DATALIST_ELEMENT) && ENABLE(PAGE_POPUP)\" \"--out-h=`cygpath -m \\\"${OUTDIR}\\\"`/obj/global_intermediate/webkit/ColorSuggestionPicker.h\" \"--out-cpp=`cygpath -m \\\"${OUTDIR}\\\"`/obj/global_intermediate/webkit/ColorSuggestionPicker.cpp\" \"../Resources/colorSuggestionPicker.css\" \"../Resources/colorSuggestionPicker.js\"" I guess CMD's command-line parser split it by '&&' first. I have no idea to avoid this issue. How about changing the --condition processing of make-file-arrays.py? e.g. make-file-arrays.py replaces " AND " with " && ".
Keishi Hattori
Comment 20 2012-07-26 01:08:57 PDT
> I guess CMD's command-line parser split it by '&&' first. I have no idea to avoid this issue. > How about changing the --condition processing of make-file-arrays.py? e.g. make-file-arrays.py replaces " AND " with " && ". How about '--condition=!!ENABLE(INPUT_TYPE_COLOR) & !!ENABLE(DATALIST_ELEMENT) & !!ENABLE(PAGE_POPUP)', ? Which is better?
Kent Tamura
Comment 21 2012-07-26 02:29:27 PDT
(In reply to comment #20) > > I guess CMD's command-line parser split it by '&&' first. I have no idea to avoid this issue. > > How about changing the --condition processing of make-file-arrays.py? e.g. make-file-arrays.py replaces " AND " with " && ". > > How about '--condition=!!ENABLE(INPUT_TYPE_COLOR) & !!ENABLE(DATALIST_ELEMENT) & !!ENABLE(PAGE_POPUP)', ? Which is better? '&' is also a special character in CMD. I confirmed it didn't work.
Keishi Hattori
Comment 22 2012-07-26 04:27:22 PDT
Kent Tamura
Comment 23 2012-07-26 04:31:56 PDT
Comment on attachment 154608 [details] Patch ok
WebKit Review Bot
Comment 24 2012-07-26 20:22:11 PDT
Comment on attachment 154608 [details] Patch Clearing flags on attachment: 154608 Committed r123833: <http://trac.webkit.org/changeset/123833>
WebKit Review Bot
Comment 25 2012-07-26 20:22:16 PDT
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.