Bug 183753 - Have select element respect current appearance
Summary: Have select element respect current appearance
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Megan Gardner
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-19 15:00 PDT by Megan Gardner
Modified: 2018-03-20 09:26 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.66 KB, patch)
2018-03-19 17:59 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (1.69 KB, patch)
2018-03-19 18:12 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (1.74 KB, patch)
2018-03-19 18:17 PDT, Megan Gardner
thorton: review+
thorton: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Megan Gardner 2018-03-19 15:00:28 PDT
Have select element respect current appearance
Comment 1 Megan Gardner 2018-03-19 17:59:49 PDT
Created attachment 336087 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2018-03-19 18:01:02 PDT
<rdar://problem/38644433>
Comment 3 Tim Horton 2018-03-19 18:04:06 PDT
Comment on attachment 336087 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336087&action=review

> Source/WebCore/rendering/RenderThemeMac.mm:1348
> +    style.setColor(e ? !e->isDisabledFormControl() ? systemColor(CSSValueButtontext, e->document().page()->useSystemAppearance()) : systemColor(CSSValueGraytext, e->document().page()->useSystemAppearance()) : Color::darkGray);

The logic here (nested ternary operators) is incredibly hard to follow. Can we pop it out into a few lines instead?
Comment 4 Tim Horton 2018-03-19 18:04:37 PDT
Also I can't actually follow if you don't dereference e in the !e case
Comment 5 Megan Gardner 2018-03-19 18:12:05 PDT
Created attachment 336088 [details]
Patch
Comment 6 Tim Horton 2018-03-19 18:15:16 PDT
Comment on attachment 336088 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=336088&action=review

> Source/WebCore/rendering/RenderThemeMac.mm:1350
> +        c = !e->isDisabledFormControl() ? systemColor(CSSValueButtontext, e->document().page()->useSystemAppearance()) : systemColor(CSSValueGraytext, e->document().page()->useSystemAppearance());

Pop useSystemAppearance into a local
Comment 7 Megan Gardner 2018-03-19 18:17:17 PDT
Created attachment 336090 [details]
Patch
Comment 8 Megan Gardner 2018-03-19 18:22:52 PDT
https://trac.webkit.org/changeset/229730/webkit
Comment 9 Ryan Haddad 2018-03-20 09:26:35 PDT
Rebaselined failing tests in https://trac.webkit.org/changeset/229762/webkit