[Webkit-unassigned] [Bug 65277] Make functions to find word boundaries more flexible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 19 15:59:07 PDT 2011


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





--- Comment #45 from Van Lam <vanlam at google.com>  2011-08-19 15:59:07 PST ---
(In reply to comment #43)
> (From update of attachment 104432 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=104432&action=review
> 
> > Source/WebCore/editing/visible_units.cpp:1591
> > +static VisiblePosition nextWordBoundaryBeforeWord(VisiblePosition startingPosition, InlineBox* startingBox, int startingOffset)
> 
> Why do we ned startingBox and startingOffset?

We could obtain these from the VisiblePosition passed in but since these two functions are called from right/leftWordPositionIgnoringEditingBoundary in which we've already called getInlineBoxAndOffset, I chose to just pass in the box and offset instead of recalculating. The actual box and offset are used to check if the result actually makes sense; since these two functions rely on next/previousBoundary which are logical functions, if the result is outside the box there's no guarantee that there's visual continuity.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list