[webkit-changes] [WebKit/WebKit] 5ec234: Avoid creating a new CSSParserContext each time a ...

Cameron McCormack noreply at github.com
Sun Jul 23 19:20:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5ec234192a2eebd476418c0dea4a3fc20604b92c
      https://github.com/WebKit/WebKit/commit/5ec234192a2eebd476418c0dea4a3fc20604b92c
  Author: Cameron McCormack <heycam at apple.com>
  Date:   2023-07-23 (Sun, 23 Jul 2023)

  Changed paths:
    M Source/WebCore/html/HTMLCanvasElement.h
    M Source/WebCore/html/canvas/CanvasStyle.cpp

  Log Message:
  -----------
  Avoid creating a new CSSParserContext each time a color is assigned to fillStyle/strokeStyle on a canvas context
https://bugs.webkit.org/show_bug.cgi?id=259431
rdar://112439220

Reviewed by Tim Nguyen.

Creating the CSSParserContext is slightly expensive, since it fetches all of the relevant document Settings.

* Source/WebCore/html/HTMLCanvasElement.h:
(WebCore::HTMLCanvasElement::cssParserContext):
* Source/WebCore/html/canvas/CanvasStyle.cpp:
(WebCore::parseColor):

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




More information about the webkit-changes mailing list