Revise condition of using fast path in LayoutText::SetTextWithOffset()
This patch makes |LayoutText::SetTextWithOffset()| to use fast path in case of using generated break opportunities for spaces after newline in same layout text. There are three cases we use generated break opportunities: 1. In white-space:pre-wrap: leading spaces after newline 2. In white-space:pre-wrap: spaces after newline 3. collapsible space after newline in white-space:pre-wrap <b><i><s>ab\n</s></i>\n</b> The CL[1] makes |LayoutText::SetTextWithOffset()| to use slow path because of it is hard to handle case 3 even if we can handle case 1 and 2. In this CL, we use fast path for case 1 and 2 but case 3. [1] http://crrev.com/c/2395136: Make LayoutText::SetTextWithOffset() to use slow path for generated break opportunities Bug: 1125640, 1125641 Change-Id: I22ee9c1aa6b7ff5f57c08524ee7ac704ecb5db6a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2397036Reviewed-by:Koji Ishii <kojii@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Auto-Submit: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#804840}
Showing
Please register or sign in to comment