Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cfac95680a14569c0cc9a2b2c1eb70904a60c812
      
https://github.com/WebKit/WebKit/commit/cfac95680a14569c0cc9a2b2c1eb70904a60c812
  Author: Antti Koivisto <an...@apple.com>
  Date:   2024-05-23 (Thu, 23 May 2024)

  Changed paths:
    M Source/WebCore/style/ElementRuleCollector.cpp
    M Source/WebCore/style/ElementRuleCollector.h
    M Source/WebCore/style/MatchResult.h
    M Source/WebCore/style/MatchedDeclarationsCache.cpp
    M Source/WebCore/style/PropertyCascade.cpp
    M Source/WebCore/style/PropertyCascade.h
    M Source/WebCore/style/StyleResolver.cpp

  Log Message:
  -----------
  Use partial style application for non-cacheable presentational hint style
https://bugs.webkit.org/show_bug.cgi?id=274081
rdar://127995820

Reviewed by Alan Baradlay.

Presentational hint style especially in SVG often uses many unique property 
values that
miss the the matched declarations cache. We can still use the cache partilly 
for such cases
by applying the presentational properties on top of the existing cache entry.

* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addElementStyleProperties):
(WebCore::Style::ElementRuleCollector::matchAllRules):

Enable partial caching for SVG presentational hints.

(WebCore::Style::ElementRuleCollector::addElementInlineStyleProperties):

This could also be applied to inlne style but this patch does not implement it.

(WebCore::Style::ElementRuleCollector::addMatchedProperties):
* Source/WebCore/style/ElementRuleCollector.h:
* Source/WebCore/style/MatchResult.h:
(WebCore::Style::operator==):
(WebCore::Style::MatchResult::cacheablePropertiesEqual const):

New equality comparison that ignores non-cacheable properties.

(WebCore::Style::add):
* Source/WebCore/style/MatchedDeclarationsCache.cpp:
(WebCore::Style::MatchedDeclarationsCache::computeHash):
(WebCore::Style::MatchedDeclarationsCache::find):
* Source/WebCore/style/PropertyCascade.cpp:
(WebCore::Style::PropertyCascade::addMatch):
* Source/WebCore/style/PropertyCascade.h:
* Source/WebCore/style/StyleResolver.cpp:
(WebCore::Style::Resolver::applyMatchedProperties):

Apply non-cacheable properties after cache hit.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to