Commit d07208f
[Backport] Security bug 1227933
Manual cherry-pick of patch originally reviewed on
https://chromium-review.googlesource.com/c/chromium/src/+/3068926:
[M90-LTS] Fix nested inline box fragmentation
Added base/containers/adapters.h dependency when cherry-picking to M90,
otherwise |base::Reversed| couldn't be found. (It probably was included
transitively in newer versions)
This patch fixes when nested inline boxes are fragmented in a
line due to bidi reordering.
Before this change, the fragmented boxes are appended to the
end of |box_data_list_|. Then when |NGInlineLayoutStateStack::
CreateBoxFragments| creates inline boxes in the ascending
order of |box_data_list_|, it failed to add the fragmented
boxes into their parent inline boxes.
This is critical for out-of-flow positioned objects whose
containing block is an inline box, because they expect to be
propagated through all ancestor inline boxes.
|UpdateBoxDataFragmentRange| is a little tricky by appending
to a vector it is iterating. Changing it to insert to the
correct position makes the function even trickier. This patch
changes it to add fragmented boxes to a separate vector, and
let later process |UpdateFragmentedBoxDataEdges| to merge the
vector to |box_data_list_|.
(cherry picked from commit 9c8a39c14a9c80556468593cddf436f5047a16ce)
Bug: 1227933
Change-Id: I7edcd209e1fdac06bab01b16d660383e7e9c37bd
Commit-Queue: Koji Ishii <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#903356}
Reviewed-by: Jana Grill <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Owners-Override: Jana Grill <[email protected]>
Commit-Queue: Zakhar Voit <[email protected]>
Cr-Commit-Position: refs/branch-heads/4430@{#1556}
Cr-Branched-From: e5ce7dc4f7518237b3d9bb93cccca35d25216cbe-refs/heads/master@{#857950}
Reviewed-by: Allan Sandfeld Jensen <[email protected]>1 parent 6ed7e70 commit d07208f
File tree
2 files changed
+63
-27
lines changed- chromium/third_party/blink/renderer/core/layout/ng/inline
2 files changed
+63
-27
lines changedLines changed: 50 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
389 | 390 | | |
390 | 391 | | |
391 | 392 | | |
392 | | - | |
| 393 | + | |
393 | 394 | | |
394 | | - | |
| 395 | + | |
395 | 396 | | |
396 | | - | |
397 | | - | |
398 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
399 | 401 | | |
400 | 402 | | |
401 | 403 | | |
| |||
412 | 414 | | |
413 | 415 | | |
414 | 416 | | |
415 | | - | |
| 417 | + | |
| 418 | + | |
416 | 419 | | |
417 | 420 | | |
418 | 421 | | |
| |||
440 | 443 | | |
441 | 444 | | |
442 | 445 | | |
443 | | - | |
| 446 | + | |
444 | 447 | | |
445 | 448 | | |
446 | 449 | | |
| |||
455 | 458 | | |
456 | 459 | | |
457 | 460 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
466 | 464 | | |
467 | 465 | | |
468 | 466 | | |
| |||
472 | 470 | | |
473 | 471 | | |
474 | 472 | | |
475 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
476 | 510 | | |
477 | 511 | | |
478 | 512 | | |
| |||
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 160 | | |
172 | 161 | | |
173 | 162 | | |
| |||
260 | 249 | | |
261 | 250 | | |
262 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
263 | 265 | | |
264 | 266 | | |
265 | 267 | | |
| |||
0 commit comments