[webkit-changes] [WebKit/WebKit] 6442b8: [WebCore] Do not lookup HashSet multiple times in ...

Yusuke Suzuki noreply at github.com
Tue Sep 19 02:10:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6442b8b0a4a1e7b7f644329a83b4fbc751ee4569
      https://github.com/WebKit/WebKit/commit/6442b8b0a4a1e7b7f644329a83b4fbc751ee4569
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-09-19 (Tue, 19 Sep 2023)

  Changed paths:
    M Source/WebCore/style/PropertyCascade.cpp
    M Source/WebCore/style/StyleBuilder.cpp
    M Source/WebCore/style/StyleBuilder.h
    M Source/WebCore/style/StyleBuilderState.h

  Log Message:
  -----------
  [WebCore] Do not lookup HashSet multiple times in PropertyCascade
https://bugs.webkit.org/show_bug.cgi?id=261722
rdar://115706784

Reviewed by Antti Koivisto.

Let's not lookup the same HashSet / HashMap multiple times.
And use HashSet<AtomString> instead of HashSet<String> since name is already atomized.

* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::set):
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyCustomProperties):
(WebCore::Style::Builder::applyCustomProperty):
(WebCore::Style::Builder::applyCustomPropertyImpl):
(WebCore::Style::Builder::applyProperty):
* Source/WebCore/style/StyleBuilder.h:
* Source/WebCore/style/StyleBuilderState.h:

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




More information about the webkit-changes mailing list