Do not find first=letter text outside first-letter parent
This patch changes |FirstLetterTextLayoutObject()| in |FirstLetterPseudoElement| not to find first-letter text out side first- letter parent as follow-up of [1], which makes finding first-letter text outside parent. In below example, before this patch changing "contenteditable" attribute of <div> causing rebuilding layout tree for <p>, then we have unexpected <::first-letter> element for <p> with first-letter text "abc". Then we have invalid layout tree with invalid |NGOffsetMapping| to crash painting selection. <style>p::first-letter { ... }</style> <div contenteditable><p><b></b></p>abc</div> [1] http://crrev.com/c/2560522 [CSS] Skip empty span when finding the first-letter text Bug: 1159762 Change-Id: I41f5d9e75080633f34c68b328945e1c92721e60b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622362 Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#842418}
Showing
Please register or sign in to comment