[LayoutNG] Fix newlines with bidi contexts in relayout (for real this time)
When we encounter a preserved line break in relayout, we can't reuse its items if: - It was in a bidi context in a previous layout - It's in a bidi context in the current (re)layout We attempted to ensure that in crrev.com/c/1626498, but failed because a <span dir=ltr> creates bidi contexts without necessarily setting the NGInlineNodeData::is_bidi_enabled_ flag. This patch fixes the issue by adding a flag to LayoutText to indicate if the text has any bidi control items, so that when it's true and the text contains newlines, we don't reuse its old inline items. Bug: 966751 Change-Id: I63d95c9d1ddcffda62a5227d0d6166b2e9ce221a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649218 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#667289}
Showing
Please register or sign in to comment