-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 9c8a39c) Bug: 1227933 Change-Id: I7edcd209e1fdac06bab01b16d660383e7e9c37bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3038308 Commit-Queue: Koji Ishii <kojii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#903356} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3068926 Reviewed-by: Jana Grill <janagrill@google.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Owners-Override: Jana Grill <janagrill@google.com> Commit-Queue: Zakhar Voit <voit@google.com> Cr-Commit-Position: refs/branch-heads/4430@{#1556} Cr-Branched-From: e5ce7dc-refs/heads/master@{#857950}
- Loading branch information
1 parent
0421bd7
commit a6ed635
Showing
3 changed files
with
76 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...blink/web_tests/external/wpt/css/CSS2/text/crashtests/bidi-inline-fragment-oof-crash.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<link rel="author" href="mailto:mstensho@chromium.org"> | ||
<link rel="help" href="https://crbug.com/1229999"> | ||
<div style="direction:rtl; width:500px"> | ||
<span style="border:solid"> | ||
<span style="position:relative"> | ||
<div style="display:inline-block; width:1000%; height:10px"></div> | ||
<span dir="ltr"> | ||
<div style="position:absolute"></div> | ||
</span> | ||
</span> | ||
</span> | ||
</div> |