Closed Bug 875756 Opened 12 years ago Closed 12 years ago

Implement <input type="color">: Mac OS X widget/color picker

Categories

(Core :: Widget: Cocoa, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: arnaud.bienner, Assigned: mounir)

References

Details

Attachments

(1 file, 2 obsolete files)

No description provided.
Assignee: nobody → arnaud.bienner
Blocks: 547004
Depends on: 875747
Attached patch Patch (obsolete) — Splinter Review
Assignee: arnaud.bienner → mounir
Status: NEW → ASSIGNED
Attachment #766454 - Flags: review?(smichaud)
I haven't yet looked closely at your patch, or tested it. But it appears to use a synchronous native dialog in a separate (app-modal) window. It should really use an asynchronous window-modal sheet. Especially since nsIColorPicker appears to have support for asynchronous use (nsIColorPicker::open() has an aCallback parameter).
Actually this patch does seem to have some asynchronous elements, though I still think the native dialog needs to be a sheet. I'll (probably) do my review and test sometime next week.
The native Cocoa color panel is not using a sheet. Native applications do not do that. I have no idea if that is doable but that would be at best odd to users I believe.
Attached patch Patch (obsolete) — Splinter Review
Small update of patch to make it apply on current trunk.
Attachment #766454 - Attachment is obsolete: true
Attachment #766454 - Flags: review?(smichaud)
Attachment #790790 - Flags: review?(smichaud)
Attachment #790790 - Flags: review?(bgirard)
Comment on attachment 790790 [details] [diff] [review] Patch Trying some alternative reviewers given that Steven seems to have a few reviews in his queue.
Attachment #790790 - Flags: review?(mstange)
Comment on attachment 790790 [details] [diff] [review] Patch Looks good except for some style issues. > - (id) initWithPicker:(nsColorPicker*)aPicker; ^ no space here (+ similar occurrences) > return [NSColor colorWithDeviceRed: red green: green blue: blue alpha: 1.0]; ^ no space here (+ similar occurrences) > [mColorPanel open:GetNSColorFromHexString(mColor) > title: nsCocoaUtils::ToNSString(mTitle)]; ^ align at colon, no space Please add a new line at the end of both files. For the hex to NSColor conversion, I'd prefer something that uses NSScanner, similarly to http://www.karelia.com/cocoa_legacy/Foundation_Categories/NSColor__Instantiat.m But it's not important. Also, you should probably combine the four NSString stringWithFormat invocations into one with format string @"#%02x%02x%02x".
Attachment #790790 - Flags: review?(mstange) → review+
Comment on attachment 790790 [details] [diff] [review] Patch Review of attachment 790790 [details] [diff] [review]: ----------------------------------------------------------------- I did a quick look nothing jumped out at me, except maybe that I'm sure we have a viable implementation of hex->int we could reuse. Markus' review is enough.
Attachment #790790 - Flags: review?(smichaud)
Attachment #790790 - Flags: review?(bgirard)
Attached patch PatchSplinter Review
Attachment #790790 - Attachment is obsolete: true
(In reply to Benoit Girard (:BenWa) from comment #8) > Comment on attachment 790790 [details] [diff] [review] > Patch > > Review of attachment 790790 [details] [diff] [review]: > ----------------------------------------------------------------- > > I did a quick look nothing jumped out at me, except maybe that I'm sure we > have a viable implementation of hex->int we could reuse. My method is using NSString and I guess converting to nsString would not be worth it.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Duplicate of this bug: 242840
No longer duplicate of this bug: 242840
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: