Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aae7c8216d69474870b85d0cec07a91492317601
https://github.com/WebKit/WebKit/commit/aae7c8216d69474870b85d0cec07a91492317601
Author: Anne van Kesteren <[email protected]>
Date: 2026-06-01 (Mon, 01 Jun 2026)
Changed paths:
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/css/SelectorCheckerTestFunctions.h
M Source/WebCore/cssjit/SelectorCompiler.cpp
Log Message:
-----------
Add CSS JIT support for the :heading pseudo-class
https://bugs.webkit.org/show_bug.cgi?id=315672
Reviewed by Antti Koivisto.
Bug 315659 wants to add the :heading pseudo-class to html.css, so it
better be fast.
We generate inline code that loads the element's NodeName, subtracts HTML_h1,
and range-checks against (HTML_h6 - HTML_h1). For :heading(N) with a single
requested level the check collapses to a scalar compare; for multiple levels
a precomputed bitmask is shifted by the delta and bit 0 is tested. Requested
levels outside 1-6 produce a never-matches short-circuit jump.
Canonical link: https://commits.webkit.org/314340@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications