Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 31871cbfb029cd2dc2389d87b70af72876ef52ec
https://github.com/WebKit/WebKit/commit/31871cbfb029cd2dc2389d87b70af72876ef52ec
Author: Sam Weinig <[email protected]>
Date: 2026-07-05 (Sun, 05 Jul 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/css/geometry/DOMMatrix-001-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-scroll-margin-units-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-scroll-margin-units.html
M Source/WebCore/css/calc/CSSCalcTree+Parser.cpp
M Source/WebCore/css/parser/CSSPropertyParserConsumer+AngleDefinitions.h
M
Source/WebCore/css/parser/CSSPropertyParserConsumer+AnglePercentageDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+FlexDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+FrequencyDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+IntegerDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthDefinitions.h
M
Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentageDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+NumberDefinitions.h
M
Source/WebCore/css/parser/CSSPropertyParserConsumer+PercentageDefinitions.h
M
Source/WebCore/css/parser/CSSPropertyParserConsumer+ResolutionDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+TimeDefinitions.h
M Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.cpp
M Source/WebCore/css/parser/CSSPropertyParserState.h
M Source/WebCore/page/IntersectionObserver.cpp
Log Message:
-----------
Fix issues with DOMMatrix/IntersectionObserver absolute length unit
requirements
https://bugs.webkit.org/show_bug.cgi?id=318632
Reviewed by Darin Adler.
Adds a new off by default bit to `CSS::PropertyParserState` called
`absoluteLengthUnitsOnly`
to make it parse error to consume length units that are not absolute (e.g.
font/viewport/container
relative units). Uses this for the `DOMMatrix` (`parseTransformRaw`) and
`IntersectionObserver`
(`parseMargin`) parsers.
Additionally, added support for using a `CSS::{primitive}Raw` type in the
MetaConsumer, indicating
that the parse should not allow `calc()`. Uses this to remove the post parse
check in the
`IntersectionObserver` (`parseMargin`) parser.
Added a test for non-px, but still absolute units in IntersectionObserver and
updated a failing
DOMMatrix test result.
Test:
imported/w3c/web-platform-tests/intersection-observer/root-margin-scroll-margin-units.html
*
LayoutTests/imported/w3c/web-platform-tests/css/geometry/DOMMatrix-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-scroll-margin-units-expected.txt:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/intersection-observer/root-margin-scroll-margin-units.html:
Added.
* Source/WebCore/css/calc/CSSCalcTree+Parser.cpp:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+AngleDefinitions.h:
*
Source/WebCore/css/parser/CSSPropertyParserConsumer+AnglePercentageDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+FlexDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+FrequencyDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+IntegerDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthDefinitions.h:
*
Source/WebCore/css/parser/CSSPropertyParserConsumer+LengthPercentageDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+NumberDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+PercentageDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+ResolutionDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+TimeDefinitions.h:
* Source/WebCore/css/parser/CSSPropertyParserConsumer+Transform.cpp:
* Source/WebCore/css/parser/CSSPropertyParserState.h:
* Source/WebCore/page/IntersectionObserver.cpp:
Canonical link: https://commits.webkit.org/316532@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications