Summary: | Web Inspector: Incline swatches for variables with colors should update when variable value changes | ||
---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> |
Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> |
Status: | ASSIGNED --- | ||
Severity: | Normal | CC: | inspector-bugzilla-changes, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 205482 | ||
Bug Blocks: |
Description
Nikita Vasilyev
2020-02-11 10:27:45 PST
Here's how I plan to resolve this. Editing a CSS variable value should cause full style editor layout. The full layout should happen when focus is moved from the value field (on spreadsheetTextFieldDidCommit). It should NOT happen on every key stroke. The tricky part here is to focus on the right CSS property or selector after the value is committed. SpreadsheetCSSStyleDeclarationEditor handles this currently. However, the full style editor layout removes all SpreadsheetCSSStyleDeclarationEditor instances and creates new ones. There are two general approaches of solving this: 1. Store what CSS rule, selector and property is pending focus at the higher level of the view hierarchy so it can be restored even after the full layout. 2. Don't update parts of the DOM that didn't change by comparing new data with the rendered data. One example of this approach is a virtual DOM. |