RESOLVED FIXED 41925
[Chromium] Linux implementation of <input type=number> UI
https://bugs.webkit.org/show_bug.cgi?id=41925
Summary [Chromium] Linux implementation of <input type=number> UI
Kent Tamura
Reported 2010-07-08 19:13:44 PDT
[Chromium] Linux implementation of <input type=number> UI
Attachments
Patch (21.21 KB, patch)
2010-07-08 19:23 PDT, Kent Tamura
no flags
Screenshot (21.30 KB, image/png)
2010-07-09 00:49 PDT, Kent Tamura
no flags
Patch 2 (21.26 KB, patch)
2010-07-12 03:32 PDT, Kent Tamura
no flags
Patch 3 (31.46 KB, patch)
2010-07-13 04:06 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2010-07-08 19:23:22 PDT
Kent Tamura
Comment 2 2010-07-08 19:26:21 PDT
(In reply to comment #1) > Created an attachment (id=60997) [details] > Patch This patch contains no tests because nothing is drawn without the patch of Bug#41924. If the patch of Bug#41924 is committed before this, I'll add a test to this. If this patch is committed before Bug#41924, I'll add a test separately.
Kent Tamura
Comment 3 2010-07-09 00:49:24 PDT
Created attachment 61008 [details] Screenshot
Evan Stade
Comment 4 2010-07-09 12:06:20 PDT
the code looks fine to me (I am not a reviewer though). The screenshots look a little funky imo---I think it's because the up/down arrows are not symmetric (the bottom being slightly larger, especially noticeable because the arrows are not the same distance from the middle line). I'm not sure how to fix that and it's certianly pretty nitpicky. Shrug.
Tony Chang
Comment 5 2010-07-09 12:21:34 PDT
Comment on attachment 60997 [details] Patch LGTM (also not a reviewer), just some nits. WebCore/rendering/RenderThemeChromiumLinux.cpp:187 + SkScalar* hsv, SkScalar saturateAmount, SkScalar brightenAmount) Nit: can we make |hsv| const? WebCore/rendering/RenderThemeChromiumLinux.cpp:196 + SkColor RenderThemeChromiumLinux::outlineColor(SkScalar* hsv1, SkScalar* hsv2) Nit: Can we make these const too?
Kent Tamura
Comment 6 2010-07-12 03:32:55 PDT
Created attachment 61204 [details] Patch 2
Kent Tamura
Comment 7 2010-07-12 03:47:26 PDT
(In reply to comment #6) > Created an attachment (id=61204) [details] > Patch 2 Changed parameter type: SkScalar* -> const SkScalar[3]
Darin Fisher (:fishd, Google)
Comment 8 2010-07-12 22:43:22 PDT
Comment on attachment 61204 [details] Patch 2 WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp:90 + paint.setColor(RenderThemeChromiumLinux::saturateAndBrighten(trackHSV, 0, 0)); code in platform/ should not depend on code in rendering/. that's a layering violation. it seems like you should refactor this so that there is another file in platform/chromium/ that defines the shared theme code.
Kent Tamura
Comment 9 2010-07-12 22:49:18 PDT
(In reply to comment #8) > (From update of attachment 61204 [details]) > WebCore/platform/chromium/ScrollbarThemeChromiumLinux.cpp:90 > + paint.setColor(RenderThemeChromiumLinux::saturateAndBrighten(trackHSV, 0, 0)); > code in platform/ should not depend on code in rendering/. > that's a layering violation. it seems like you should > refactor this so that there is another file in platform/chromium/ > that defines the shared theme code. I see. Do you think it's acceptable to remain these function in ScrollbarThemeChromiumLinux and call them from RenderThemeChroimiumLinux?
Darin Fisher (:fishd, Google)
Comment 10 2010-07-12 23:37:34 PDT
(In reply to comment #9) > Do you think it's acceptable to remain these function in > ScrollbarThemeChromiumLinux and call them from RenderThemeChroimiumLinux? That seems suboptimal since you plan to use them for things that aren't related to scrollbars, right? How about a new file: PlatformThemeChromium{Linux}?
Kent Tamura
Comment 11 2010-07-13 04:06:10 PDT
Created attachment 61352 [details] Patch 3
Kent Tamura
Comment 12 2010-07-13 04:08:22 PDT
(In reply to comment #10) > > Do you think it's acceptable to remain these function in > > ScrollbarThemeChromiumLinux and call them from RenderThemeChroimiumLinux? > > That seems suboptimal since you plan to use them for things that aren't related to scrollbars, right? Right :-) > How about a new file: PlatformThemeChromium{Linux}? ok, the updated patch introduced PlatformThemeChromiumGtk, and fixes other layer violations.
Darin Fisher (:fishd, Google)
Comment 13 2010-07-13 10:01:06 PDT
Comment on attachment 61352 [details] Patch 3 WebCore/platform/chromium/PlatformThemeChromiumGtk.h:52 + enum ArrowDirection { nit: usually ideal style-wise to put enum declarations at the top of the public section with a new line separating it from the methods. WebCore/platform/chromium/PlatformThemeChromiumGtk.h:68 + } } // namespace WebCore WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp:220 + } } // namespace WebCore
Kent Tamura
Comment 14 2010-07-13 21:49:04 PDT
Thank you for reviewing. (In reply to comment #13) > (From update of attachment 61352 [details]) > WebCore/platform/chromium/PlatformThemeChromiumGtk.h:52 > + enum ArrowDirection { > nit: usually ideal style-wise to put enum declarations at the top of the > public section with a new line separating it from the methods. Done. > WebCore/platform/chromium/PlatformThemeChromiumGtk.h:68 > + } > } // namespace WebCore Done. > WebCore/platform/chromium/PlatformThemeChromiumGtk.cpp:220 > + } > } // namespace WebCore Done. Landed as r63280.
Note You need to log in before you can comment on or make changes to this bug.