Commit f51a814
committed
[Float][Fizz][Legacy] hoisted elements no longer emit before
renderToString is a legacy server API which used a trick to avoid having
the DOCTYPE included when rendering full documents by setting the root
formatcontext to HTML_MODE rather than ROOT_HTML_MODE. Previously this
was of little consequence but with Float the Root mode started to be
used for things like determining if we could flush hoistable elements
yet. In issue #27177 we see that hoisted elements can appear before the
<html> tag when using a legacy API `renderToString`.
This change exports a DOCTYPE from FizzConfigDOM and FizzConfigDOMLegacy
respectively, using an empty chunk in the legacy case. The only runtime
perf cost here is that for legacy APIs there is an extra empty chunk to
write when rendering a top level <html> tag which is trivial enough
Fixes #27177
DiffTrain build for [86198b9](86198b9)<html> in legacy apis such as renderToString() (#27269)1 parent c1e19bb commit f51a814
File tree
6 files changed
+37
-33
lines changed- compiled/facebook-www
6 files changed
+37
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
2133 | 2143 | | |
2134 | 2144 | | |
2135 | 2145 | | |
| |||
4255 | 4265 | | |
4256 | 4266 | | |
4257 | 4267 | | |
4258 | | - | |
| 4268 | + | |
4259 | 4269 | | |
4260 | 4270 | | |
4261 | 4271 | | |
| |||
4614 | 4624 | | |
4615 | 4625 | | |
4616 | 4626 | | |
4617 | | - | |
4618 | | - | |
4619 | 4627 | | |
4620 | 4628 | | |
4621 | 4629 | | |
| |||
7093 | 7101 | | |
7094 | 7102 | | |
7095 | 7103 | | |
7096 | | - | |
7097 | | - | |
7098 | | - | |
7099 | | - | |
7100 | | - | |
7101 | | - | |
7102 | | - | |
7103 | | - | |
| 7104 | + | |
| 7105 | + | |
7104 | 7106 | | |
7105 | 7107 | | |
7106 | 7108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
2133 | 2143 | | |
2134 | 2144 | | |
2135 | 2145 | | |
| |||
4255 | 4265 | | |
4256 | 4266 | | |
4257 | 4267 | | |
4258 | | - | |
| 4268 | + | |
4259 | 4269 | | |
4260 | 4270 | | |
4261 | 4271 | | |
| |||
4614 | 4624 | | |
4615 | 4625 | | |
4616 | 4626 | | |
4617 | | - | |
4618 | | - | |
4619 | 4627 | | |
4620 | 4628 | | |
4621 | 4629 | | |
| |||
7093 | 7101 | | |
7094 | 7102 | | |
7095 | 7103 | | |
7096 | | - | |
7097 | | - | |
7098 | | - | |
7099 | | - | |
7100 | | - | |
7101 | | - | |
7102 | | - | |
7103 | | - | |
| 7104 | + | |
| 7105 | + | |
7104 | 7106 | | |
7105 | 7107 | | |
7106 | 7108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1396 | 1396 | | |
1397 | 1397 | | |
1398 | 1398 | | |
1399 | | - | |
| 1399 | + | |
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
| |||
4164 | 4164 | | |
4165 | 4165 | | |
4166 | 4166 | | |
4167 | | - | |
| 4167 | + | |
4168 | 4168 | | |
4169 | 4169 | | |
4170 | 4170 | | |
| |||
4215 | 4215 | | |
4216 | 4216 | | |
4217 | 4217 | | |
4218 | | - | |
| 4218 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1396 | 1396 | | |
1397 | 1397 | | |
1398 | 1398 | | |
1399 | | - | |
| 1399 | + | |
1400 | 1400 | | |
1401 | 1401 | | |
1402 | 1402 | | |
| |||
4147 | 4147 | | |
4148 | 4148 | | |
4149 | 4149 | | |
4150 | | - | |
| 4150 | + | |
4151 | 4151 | | |
4152 | 4152 | | |
4153 | 4153 | | |
| |||
4198 | 4198 | | |
4199 | 4199 | | |
4200 | 4200 | | |
4201 | | - | |
| 4201 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4262 | 4262 | | |
4263 | 4263 | | |
4264 | 4264 | | |
4265 | | - | |
| 4265 | + | |
4266 | 4266 | | |
4267 | 4267 | | |
4268 | 4268 | | |
| |||
4622 | 4622 | | |
4623 | 4623 | | |
4624 | 4624 | | |
4625 | | - | |
| 4625 | + | |
4626 | 4626 | | |
4627 | 4627 | | |
4628 | 4628 | | |
| |||
0 commit comments