Changeset 235866 in webkit


Ignore:
Timestamp:
Sep 10, 2018 3:16:35 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Expose -apple-system-container-border color to internal web views.
https://bugs.webkit.org/show_bug.cgi?id=189178.

Patch by James Savage <James Savage> on 2018-09-10
Reviewed by Timothy Hatcher.

Source/WebCore:

Tests: LayoutTests/fast/css/apple-system-colors.html

  • css/CSSValueKeywords.in: Add new semantic color name.
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::systemColor const): Use system color on supported
systems, and fall back to approximation for older systems.

Source/WebCore/PAL:

  • pal/spi/cocoa/NSColorSPI.h: Declare SPI.

LayoutTests:

  • fast/css/apple-system-control-colors-expected.txt:
  • fast/css/apple-system-control-colors.html:
  • platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt:
  • platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt:
  • platform/mac/fast/css/apple-system-control-colors-expected.txt:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r235865 r235866  
     12018-09-10  James Savage  <james.savage@apple.com>
     2
     3        Expose -apple-system-container-border color to internal web views.
     4        https://bugs.webkit.org/show_bug.cgi?id=189178.
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * fast/css/apple-system-control-colors-expected.txt:
     9        * fast/css/apple-system-control-colors.html:
     10        * platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt:
     11        * platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt:
     12        * platform/mac/fast/css/apple-system-control-colors-expected.txt:
     13
    1142018-09-07  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/LayoutTests/fast/css/apple-system-control-colors-expected.txt

    r234466 r235866  
    2020-apple-system-grid : rgb(204, 204, 204)
    2121-apple-system-separator : rgb(204, 204, 204)
     22-apple-system-container-border : rgb(197, 197, 197)
    2223current-color with inherited -apple-system-label : rgba(0, 0, 0, 0.85098)
  • trunk/LayoutTests/fast/css/apple-system-control-colors.html

    r232847 r235866  
    4343<div><span class="swatch" style="background-color: -apple-system-grid"></span>-apple-system-grid</div>
    4444<div><span class="swatch" style="background-color: -apple-system-separator"></span>-apple-system-separator</div>
     45<div><span class="swatch" style="background-color: -apple-system-container-border"></span>-apple-system-container-border</div>
    4546<div style="color: -apple-system-label"><span class="swatch" style="background-color: currentcolor;"></span>current-color with inherited -apple-system-label</div>
  • trunk/LayoutTests/platform/mac-highsierra/fast/css/apple-system-control-colors-expected.txt

    r234466 r235866  
    2020-apple-system-grid : rgb(204, 204, 204)
    2121-apple-system-separator : rgb(204, 204, 204)
     22-apple-system-container-border : rgb(197, 197, 197)
    2223current-color with inherited -apple-system-label : rgba(0, 0, 0, 0.85098)
  • trunk/LayoutTests/platform/mac-sierra/fast/css/apple-system-control-colors-expected.txt

    r234466 r235866  
    2020-apple-system-grid : rgb(204, 204, 204)
    2121-apple-system-separator : rgb(204, 204, 204)
     22-apple-system-container-border : rgb(197, 197, 197)
    2223current-color with inherited -apple-system-label : rgba(0, 0, 0, 0.85098)
  • trunk/LayoutTests/platform/mac/fast/css/apple-system-control-colors-expected.txt

    r234466 r235866  
    2020-apple-system-grid : rgb(204, 204, 204)
    2121-apple-system-separator : rgba(0, 0, 0, 0.0980392)
     22-apple-system-container-border : rgba(0, 0, 0, 0.247059)
    2223current-color with inherited -apple-system-label : rgba(0, 0, 0, 0.847059)
  • trunk/Source/WebCore/ChangeLog

    r235865 r235866  
     12018-09-10  James Savage  <james.savage@apple.com>
     2
     3        Expose -apple-system-container-border color to internal web views.
     4        https://bugs.webkit.org/show_bug.cgi?id=189178.
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Tests: LayoutTests/fast/css/apple-system-colors.html
     9
     10        * css/CSSValueKeywords.in: Add new semantic color name.
     11        * rendering/RenderThemeMac.mm:
     12        (WebCore::RenderThemeMac::systemColor const): Use system color on supported
     13        systems, and fall back to approximation for older systems.
     14
    1152018-09-07  Ryosuke Niwa  <rniwa@webkit.org>
    216
  • trunk/Source/WebCore/PAL/ChangeLog

    r235772 r235866  
     12018-09-10  James Savage  <james.savage@apple.com>
     2
     3        Expose -apple-system-container-border color to internal web views.
     4        https://bugs.webkit.org/show_bug.cgi?id=189178.
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * pal/spi/cocoa/NSColorSPI.h: Declare SPI.
     9
    1102018-09-06  Megan Gardner  <megan_gardner@apple.com>
    211
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/NSColorSPI.h

    r234898 r235866  
    4949+ (NSColor *)findHighlightColor;
    5050+ (NSColor *)placeholderTextColor;
     51+ (NSColor *)containerBorderColor;
    5152@end
    5253
  • trunk/Source/WebCore/css/CSSValueKeywords.in

    r235754 r235866  
    245245-apple-system-grid
    246246-apple-system-separator
     247-apple-system-container-border
    247248#endif
    248249-apple-wireless-playback-target-active
  • trunk/Source/WebCore/rendering/RenderThemeMac.mm

    r235380 r235866  
    769769                return nullptr;
    770770#endif
     771            case CSSValueAppleSystemContainerBorder:
     772#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     773                return @selector(containerBorderColor);
     774#else
     775                // Handled below.
     776                return nullptr;
     777#endif
    771778            case CSSValueAppleSystemLabel:
    772779                return @selector(labelColor);
     
    861868        case CSSValueAppleSystemFindHighlightBackground:
    862869            return platformActiveTextSearchHighlightColor(options);
     870
     871        case CSSValueAppleSystemContainerBorder:
     872            return 0xFFC5C5C5;
    863873#endif
    864874
Note: See TracChangeset for help on using the changeset viewer.