Changeset 235507 in webkit


Ignore:
Timestamp:
Aug 30, 2018 9:35:46 AM (6 years ago)
Author:
Aditya Keerthi
Message:

[macOS] Color picker layout is broken if suggested colors are specified
https://bugs.webkit.org/show_bug.cgi?id=189117

Reviewed by Tim Horton.

NSPopoverColorWell recently changed the size of its swatches. We need to update
the width of the swatches we provide to match the width of the other swatches,
in order to avoid breaking the layout.

While such a solution is not a good precedent, we do not have fully-functional SPI
to customize the suggested colors. A FIXME has been added for this reason.
However, even once we obtain SPI, we will need to find a way to support older
clients, making conditional compilation a potential necessity.

  • UIProcess/mac/WebColorPickerMac.mm:
Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r235506 r235507  
     12018-08-30  Aditya Keerthi  <akeerthi@apple.com>
     2
     3        [macOS] Color picker layout is broken if suggested colors are specified
     4        https://bugs.webkit.org/show_bug.cgi?id=189117
     5
     6        Reviewed by Tim Horton.
     7
     8        NSPopoverColorWell recently changed the size of its swatches. We need to update
     9        the width of the swatches we provide to match the width of the other swatches,
     10        in order to avoid breaking the layout.
     11
     12        While such a solution is not a good precedent, we do not have fully-functional SPI
     13        to customize the suggested colors. A FIXME has been added for this reason.
     14        However, even once we obtain SPI, we will need to find a way to support older
     15        clients, making conditional compilation a potential necessity.
     16
     17        * UIProcess/mac/WebColorPickerMac.mm:
     18
    1192018-08-30  Brent Fulgham  <bfulgham@apple.com>
    220
  • trunk/Source/WebKit/UIProcess/mac/WebColorPickerMac.mm

    r235435 r235507  
    4545static const size_t maxColorSuggestions = 12;
    4646static const CGFloat colorPickerMatrixNumColumns = 12.0;
     47static const CGFloat colorPickerMatrixBorderWidth = 1.0;
     48
     49// FIXME: <rdar://problem/41173525> We should not have to track changes in NSPopoverColorWell's implementation.
     50#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     51static const CGFloat colorPickerMatrixSwatchWidth = 13.0;
     52#else
    4753static const CGFloat colorPickerMatrixSwatchWidth = 12.0;
    48 static const CGFloat colorPickerMatrixBorderWidth = 1.0;
     54#endif
    4955
    5056@protocol WKPopoverColorWellDelegate <NSObject>
Note: See TracChangeset for help on using the changeset viewer.