Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick fix for 1227933 from chromium #30583

Merged
merged 2 commits into from Aug 18, 2021
Merged

Conversation

zcbenz
Copy link
Member

@zcbenz zcbenz commented Aug 18, 2021

Merge 4577: Fix nested inline box fragmentation

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, 1229999
Change-Id: I7edcd209e1fdac06bab01b16d660383e7e9c37bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3038308
Commit-Queue: Koji Ishii kojii@chromium.org
Reviewed-by: Yoshifumi Inoue yosin@chromium.org
Cr-Original-Commit-Position: refs/heads/master@{#903356}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3053212
Commit-Queue: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com
Bot-Commit: Rubber Stamper rubber-stamper@appspot.gserviceaccount.com
Auto-Submit: Koji Ishii kojii@chromium.org

[modify] https://crrev.com/e17983c2294a81bbc44f867ce319320cc11ff94f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
[modify] https://crrev.com/e17983c2294a81bbc44f867ce319320cc11ff94f/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.h
[add] https://crrev.com/e17983c2294a81bbc44f867ce319320cc11ff94f/third_party/blink/web_tests/external/wpt/css/CSS2/text/crashtests/bidi-inline-fragment-oof-crash.html

Notes: Security: Backported fix for 1227933.

@zcbenz zcbenz added semver/patch backwards-compatible bug fixes target/11-x-y labels Aug 18, 2021
@zcbenz zcbenz requested a review from a team as a code owner August 18, 2021 00:58
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 18, 2021
@zcbenz zcbenz added the backport-check-skip Skip trop's backport validity checking label Aug 18, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 18, 2021
@zcbenz zcbenz changed the title chore: cherry-pick 1227933 from chromium chore: cherry-pick fix for 1227933 from chromium Aug 18, 2021
@zcbenz zcbenz merged commit e70c39e into 13-x-y Aug 18, 2021
@zcbenz zcbenz deleted the cherry-pick-1227933 branch August 18, 2021 23:26
@release-clerk
Copy link

release-clerk bot commented Aug 18, 2021

Release Notes Persisted

Security: Backported fix for 1227933.

@trop
Copy link
Contributor

trop bot commented Aug 18, 2021

I have automatically backported this PR to "11-x-y", please check out #30614

@trop
Copy link
Contributor

trop bot commented Aug 18, 2021

I have automatically backported this PR to "12-x-y", please check out #30615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants