Repository navigation
Commit b04c358
authored
refactor(webapi): isolate DOMTree and core CSS features [Codex] (#415)
Stacked on
#413.
This replaces the earlier six-module consolidation with selective
feature boundaries.
Keep basic `DOM.res` and seven CSS declaration modules byte-for-byte
unchanged from the History/Location baseline. Add `WebAPI.DOMTree` for
the existing rich tree records and `WebAPI.CSSOMCore` for the CSS
modules those records need. DOMNodes and CSSOM continue to include their
required features, preserving their existing public APIs.
Move DOMStringMap alongside DOMTree and move only the small generic
HTMLCollection representation into DOMTree, retaining the public
collection alias and methods. CSS modules keep their original records
and operations together rather than introducing a large shared-record
layer. The existing fields, generic parameters, privacy, constructors,
and runtime behavior are preserved; all 338 existing modules emit
identical JavaScript to baseline.
React can select `WebAPI.DOMTree`, `WebAPI.History`, and
`WebAPI.Location`: 15 WebAPI source modules rather than 59. The
controlled comparison recorded a 122.27 ms median clean React build,
effectively tied with the earlier six-module version's 121.48 ms,
without enlarging basic DOM. The original 59-module selection measured
196.98 ms in that sample. Timings have substantial variance and are not
a universal performance guarantee.
The seven CSS modules' operations are intentionally included in
CSSOMCore. Element, Node, HTMLCollection, Event, geometry, Animation,
Window, and Document operations still require their respective features.
CSSOM does not select DOMTree.
The dependent React migration, full raw measurements, consumer costs,
and reproduction details are in
jderochervlk/rescript-react#1. Its separate
JsxDOM removal is jderochervlk/rescript-react#2.
Style-input and synthetic-event ownership changes remain outside this
PR.1 parent 994d4e4 commit b04c358
65 files changed
Lines changed: 871 additions & 274 deletions
File tree
- docs/content/docs
- scripts
- fixtures/negative
- src
- cssom-core
- data-transfer
- dom-nodes
- dom-tree
- fetch
- file-entries
- form-data
- touch
- ui-events
- tests
- browser
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | | - | |
| 121 | + | |
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
125 | | - | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
131 | | - | |
132 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
135 | 188 | | |
136 | 189 | | |
137 | 190 | | |
| |||
434 | 487 | | |
435 | 488 | | |
436 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
437 | 501 | | |
438 | 502 | | |
439 | 503 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
44 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
62 | | - | |
| 67 | + | |
| 68 | + | |
63 | 69 | | |
64 | | - | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
93 | 112 | | |
94 | 113 | | |
95 | 114 | | |
| |||
102 | 121 | | |
103 | 122 | | |
104 | 123 | | |
105 | | - | |
106 | 124 | | |
107 | 125 | | |
108 | 126 | | |
| |||
138 | 156 | | |
139 | 157 | | |
140 | 158 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| |||
343 | 354 | | |
344 | 355 | | |
345 | 356 | | |
346 | | - | |
347 | | - | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
| |||
365 | 374 | | |
366 | 375 | | |
367 | 376 | | |
368 | | - | |
369 | 377 | | |
370 | | - | |
371 | | - | |
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
| |||
481 | 487 | | |
482 | 488 | | |
483 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
484 | 514 | | |
485 | 515 | | |
486 | 516 | | |
487 | 517 | | |
488 | 518 | | |
489 | 519 | | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | 520 | | |
494 | 521 | | |
495 | 522 | | |
496 | 523 | | |
497 | 524 | | |
498 | | - | |
499 | 525 | | |
500 | | - | |
501 | 526 | | |
502 | 527 | | |
503 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
| |||
240 | 249 | | |
241 | 250 | | |
242 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
243 | 264 | | |
244 | 265 | | |
245 | 266 | | |
| |||
0 commit comments