Commit fc0d8fb
committed
Detect complex custom property cycles involving multiple loops
https://bugs.webkit.org/show_bug.cgi?id=251269
<rdar://problem/104744972>
Reviewed by Simon Fraser.
We fail in some complex cycle cases.
* LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-cycles-expected.txt:
* Source/WebCore/style/StyleBuilder.cpp:
(WebCore::Style::Builder::applyCustomProperty):
Track property cycles with a separate m_inCycleCustomProperties map instead of eagerly computing them to
an invalid value on first detection. This allows the detection of multiple cycles passing through
the same property. It also simplifies the code.
* Source/WebCore/style/StyleBuilderState.h:
Canonical link: https://commits.webkit.org/259506@main1 parent 7535fd2 commit fc0d8fb
File tree
3 files changed
+21
-28
lines changed- LayoutTests/imported/w3c/web-platform-tests/css/css-variables
- Source/WebCore/style
3 files changed
+21
-28
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | 177 | | |
180 | 178 | | |
181 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
| |||
193 | 202 | | |
194 | 203 | | |
195 | 204 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 207 | + | |
| 208 | + | |
214 | 209 | | |
| 210 | + | |
215 | 211 | | |
216 | | - | |
| 212 | + | |
217 | 213 | | |
218 | 214 | | |
219 | 215 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 216 | + | |
225 | 217 | | |
226 | 218 | | |
227 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
0 commit comments