[webkit-changes] [WebKit/WebKit] b625b7: The 'length' argument of U16_FWD_1 in TextUtil::br...

Fujii Hironori noreply at github.com
Wed Mar 8 22:33:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b625b7e2bbd34fd3832e284148c5e1f20b2d1caa
      https://github.com/WebKit/WebKit/commit/b625b7e2bbd34fd3832e284148c5e1f20b2d1caa
  Author: Fujii Hironori <Hironori.Fujii at sony.com>
  Date:   2023-03-08 (Wed, 08 Mar 2023)

  Changed paths:
    M LayoutTests/platform/wincairo/TestExpectations
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp

  Log Message:
  -----------
  The 'length' argument of U16_FWD_1 in TextUtil::breakWord is wrong
https://bugs.webkit.org/show_bug.cgi?id=253547

Reviewed by Alan Baradlay.

The test fast/text/midword-break-before-surrogate-pair.html was
failing as the following assertion failure for WinCairo debug, and
timing out by an infinite loop for WinCairo release.

> ASSERTION FAILED: middle >= left && middle < right
> Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp(276) : WebCore::Layout::TextUtil::breakWord::<lambda_1>::operator ()

U16_FWD_1 in nextUserPerceivedCharacterIndex didn't work as expected
because the third argument was wrong. It should be a length of the
input string, but 'length' is the length of the substring starting at
'startPosition'.

* LayoutTests/platform/wincairo/TestExpectations:
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::breakWord):

Canonical link: https://commits.webkit.org/261406@main




More information about the webkit-changes mailing list