Find LayoutText containing the first letter before attaching pseudo.
We assert that we find the same text node before creating the element as we find when attaching the first letter LayoutText. We used to attach the ::first-letter pseudo element before finding the LayoutText from which we get the first letter text. We did crash in a clusterfuzz test because FirstLetterTextLayoutObject() was confused by a combination of a grid, button, anonymous wrappers and continuations. Instead of trying to fix all bugs in FirstLetterTextLayoutObject(), find the LayoutText before attaching the ::first-letter to make sure we are consistent instead of chasing clusterfuzz issues. Reported the incorrectness for button, grid, and ::first-letter in 868380. Bug: 859285, 868380 Change-Id: I335a32b466ab31858fb05ea5f650cf12ab674040 Reviewed-on: https://chromium-review.googlesource.com/1152982Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#578993}
Showing
Please register or sign in to comment