[webkit-changes] [WebKit/WebKit] 202e03: Web Inspector: Font Panel: Avoid needless refresh ...

Razvan Caliman - Apple noreply at github.com
Fri Feb 3 10:26:58 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 202e031fdd6bde16c53b3817fb7fe229cbcb1884
      https://github.com/WebKit/WebKit/commit/202e031fdd6bde16c53b3817fb7fe229cbcb1884
  Author: Razvan Caliman <rcaliman at apple.com>
  Date:   2023-02-03 (Fri, 03 Feb 2023)

  Changed paths:
    M Source/WebInspectorUI/UserInterface/Views/FontDetailsPanel.js
    M Source/WebInspectorUI/UserInterface/Views/FontVariationDetailsSectionRow.js

  Log Message:
  -----------
  Web Inspector: Font Panel: Avoid needless refresh of FontStyles
https://bugs.webkit.org/show_bug.cgi?id=250128

Reviewed by Patrick Angle.

There are a number of expensive operations in the Fonts sidebar panel done in reaction
to style changes of the inspected node, like computing applicable font properties and their values,
and updating the Fonts panel DOM structure.

These operations must be done whenever styles change from outside the Fonts panel
so it can reflect the latest changes. But they don't have to be done live.
Throtting the update in reaction to changes from the outside is acceptable.

The slider inputs for editing variation axis values from the Fonts sidebar panel
are a source of high-frequency style changes.
This is necessary so that the inspected page reacts immediately to style changes.
But there's no need for the Fonts panel to react to style chagnes it originates.
In this scenario it is acceptable to inhibit updates of the Fonts panel and keep state local.

* Source/WebInspectorUI/UserInterface/Views/FontDetailsPanel.js:
(WI.FontDetailsPanel):
(WI.FontDetailsPanel.prototype.refresh):
(WI.FontDetailsPanel.prototype.update):
(WI.FontDetailsPanel.prototype._handleFontVariationValueChanged):
* Source/WebInspectorUI/UserInterface/Views/FontVariationDetailsSectionRow.js:
(WI.FontVariationDetailsSectionRow):

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




More information about the webkit-changes mailing list