Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6405e8d7d1491f2f2e237b3c27acded5d811cdfa
      
https://github.com/WebKit/WebKit/commit/6405e8d7d1491f2f2e237b3c27acded5d811cdfa
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-10-05 (Mon, 05 Oct 2026)

  Changed paths:
    M Source/WebCore/style/ElementRuleCollector.cpp

  Log Message:
  -----------
  ElementRuleCollector::transferMatchedRules() reserves the wrong capacity for 
the declarations vector
https://bugs.webkit.org/show_bug.cgi?id=325475
rdar://188568226

Reviewed by Antti Koivisto.

Vector::reserveCapacity() takes a total target capacity, not an amount to
add. transferMatchedRules() passed m_matchedRules.size(), ignoring both
the entries the declarations vector already holds and 
m_matchedRuleTransferIndex,
so it under-reserved or did nothing. Reserve for the rules actually about
to be transferred, on top of the current size.

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

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to