LayoutNG: Fix a crash with input[type=file]::after with huge margin
The crash is similar to crrev.com/806062. In this case, both of |line_width| and |item.InlineOffset()| are saturated to LayoutUnit::Max(), then later width computation didn't work well. This CL fixes the crash by checking the saturation, and also adds vector index checking to prevent similar issues. Bug: 1129570 Change-Id: I7b019fb09dda68b24a70cc6f4865dfa22a70ded1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423759 Auto-Submit: Kent Tamura <tkent@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#809868}
Showing
Please register or sign in to comment