[webkit-changes] [WebKit/WebKit] f6173b: Web Inspector: Add initial support for color-mix C...

Patrick Angle noreply at github.com
Wed Feb 15 16:43:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f6173b46292f4fda92346060b35d6a78bf7eb650
      https://github.com/WebKit/WebKit/commit/f6173b46292f4fda92346060b35d6a78bf7eb650
  Author: Patrick Angle <pangle at apple.com>
  Date:   2023-02-15 (Wed, 15 Feb 2023)

  Changed paths:
    M Source/WebInspectorUI/UserInterface/Models/Color.js
    M Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

  Log Message:
  -----------
  Web Inspector: Add initial support for color-mix CSS values
https://bugs.webkit.org/show_bug.cgi?id=252031
rdar://105254118

Reviewed by Tim Nguyen.

Correct the display of `color-mix` to not truncate itself when not being edited, and to correctly show nested color
swatches within itself. This is achieved by sending tokens within a function's parentheses back through _addColorTokens
so that they in turn can be parsed for functions and color keywords. We also now enforce that a function keyword is
followed by a parenthesis to form a function, since some keywords like `rgb` and `hsl` are now also used to denote the
color space in which mixing should occur.

* Source/WebInspectorUI/UserInterface/Models/Color.js:
* Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):

Canonical link: https://commits.webkit.org/260332@main




More information about the webkit-changes mailing list