Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 032d7b853259a90954d3e513e9983807fc7eeca0
https://github.com/WebKit/WebKit/commit/032d7b853259a90954d3e513e9983807fc7eeca0
Author: Taher Ali <[email protected]>
Date: 2026-08-14 (Fri, 14 Aug 2026)
Changed paths:
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/css/parser/CSSSubstitutionParser.cpp
R Source/WebCore/dom/ConstantPropertyMap.cpp
R Source/WebCore/dom/ConstantPropertyMap.h
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/style/StyleDocumentScope.cpp
M Source/WebCore/style/StyleDocumentScope.h
A Source/WebCore/style/StyleEnvironmentVariables.cpp
A Source/WebCore/style/StyleEnvironmentVariables.h
M Source/WebCore/style/StyleSubstitutionResolver.cpp
Log Message:
-----------
Rename ConstantPropertyMap to Style::EnvironmentVariables
https://bugs.webkit.org/show_bug.cgi?id=321696
rdar://184842559
Reviewed by Antti Koivisto.
ConstantPropertyMap is named after constant()/const(). This class currently
is the backing store for env() which is one per Document. We rename it
to Style::EnvironmentVariables, which maintains the same shape but more closer
to the
env() concept.
The enum is renamed to UADefinedVariable rather than EnvironmentVariable so a
class and an enum in one namespace don't differ by a single letter, and because
"UA-defined" is the distinction that will matter once author-set variables land
alongside these. Also, we rename the two remaining constant()-era names in the
env() parser.
No behavior change.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/parser/CSSSubstitutionParser.cpp:
(WebCore::isValidEnvVariableName):
(WebCore::classifyBlock):
(WebCore::isValidEnvReference):
(WebCore::isValidConstantName): Deleted.
(WebCore::isValidConstantReference): Deleted.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::styleEnvironmentVariables const):
(WebCore::Document::constantProperties const): Deleted.
* Source/WebCore/dom/Document.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setUnobscuredSafeAreaInsets):
(WebCore::Page::setFullscreenInsets):
(WebCore::Page::setFullscreenAutoHideDuration):
* Source/WebCore/style/StyleEnvironmentVariables.cpp: Renamed from
Source/WebCore/dom/ConstantPropertyMap.cpp.
(WebCore::Style::EnvironmentVariables::EnvironmentVariables):
(WebCore::Style::EnvironmentVariables::values const):
(WebCore::Style::EnvironmentVariables::nameForVariable const):
(WebCore::Style::EnvironmentVariables::setValueForVariable):
(WebCore::Style::EnvironmentVariables::buildValues):
(WebCore::Style::variableDataForPositivePixelLength):
(WebCore::Style::variableDataForPositiveDuration):
(WebCore::Style::EnvironmentVariables::updateSafeAreaInsetVariables):
(WebCore::Style::EnvironmentVariables::didChangeSafeAreaInsets):
(WebCore::Style::EnvironmentVariables::updateFullscreenVariables):
(WebCore::Style::EnvironmentVariables::didChangeFullscreenInsets):
(WebCore::Style::EnvironmentVariables::setFullscreenAutoHideDuration):
* Source/WebCore/style/StyleEnvironmentVariables.h: Renamed from
Source/WebCore/dom/ConstantPropertyMap.h.
* Source/WebCore/style/StyleSubstitutionResolver.cpp:
(WebCore::Style::SubstitutionResolver::propertyValueForVariableName):
* Source/WebCore/style/StyleDocumentScope.cpp:
(WebCore::Style::DocumentScope::environmentVariables const):
* Source/WebCore/style/StyleDocumentScope.h:
Canonical link: https://commits.webkit.org/319194@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications