[Webkit-unassigned] [Bug 232053] Negative length returned by TextUtil::midWordBreak with surrogate pair

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 28 10:52:01 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=232053

--- Comment #12 from Gabriel Nava Marino <gnavamarino at apple.com> ---
(In reply to zalan from comment #10)
> Comment on attachment 442621 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=442621&action=review
> 
> > Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:178
> > +            if (right < startPosition)
> > +                right = surrogatePairAwareIndex(middle);
> 
> Shouldn't we just simply bail out at this point? We know that our middle
> point (which becomes the right) falls before the start position. We surely
> not going to find a non-empty fitting content anymore in here.

Yes, I have incorporated this suggestion in the latest patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211028/6da988ba/attachment.htm>


More information about the webkit-unassigned mailing list