We need to add a new -webkit-appearance combobox to implement datalist for Mac (Bug 27247). It should draw a NSComboBoxCell.
Created attachment 114453 [details]
I have a couple of issues.
1. How do you figure out the comboBoxMargins? I tweaked it but it still sometimes gets clipped.
2. There seems to be no way to achieve the push state on the combo box button. Will using Carbon API HIComboBox solve it?
Is there some way to set the highlightBy on the NSComboBoxButtonCell inside the NSComboBoxCell?
(In reply to comment #2)
> 2. There seems to be no way to achieve the push state on the combo box button. Will using Carbon API HIComboBox solve it?
> Is there some way to set the highlightBy on the NSComboBoxButtonCell inside the NSComboBoxCell?
NSStepperCell for <input type=number> had similar problems, and so we are using HITheme API. See paintStepper() in ThemeMac.mm and Appearance.h.
kThemeComboBox seems to work!
Created attachment 114613 [details]
I wrote a test but I couldn't find any examples where the test was testing just the -webkit-appearance so I didn't include it in the patch.
I will add a test when applying this style to input element.
(In reply to comment #6)
> I wrote a test but I couldn't find any examples where the test was testing just the -webkit-appearance so I didn't include it in the patch.
> I will add a test when applying this style to input element.
We should have a test. fast/forms/range/thumbslider-no-parent-slider.html is an example of -webkit-appearance testing.
Created attachment 114616 [details]
Comment on attachment 114613 [details]
I noticed a mistake.
Attachment 114616 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1
Source/WebCore/rendering/RenderTheme.cpp:103: A case label should not be indented, but line up with its switch statement. [whitespace/indent] 
Total errors found: 1 in 8 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 114616 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=114616&action=review
> + HIThemeButtonDrawInfo drawInfo;
The code looks very similar to paintStepper(). Can you share the code with it?
> + // Center the stepper rectangle in the specified area.
> +<script src="../../fast/js/resources/js-test-pre.js"></script>
js-test-pre.js and js-test-post.js are not needed.
> +<p>Test combobox -webkit-appearance</p>
Do not show the unnecessary text.
Please add an expectation image too.