[Webkit-unassigned] [Bug 65277] Improve performance of --webkit-visual-word

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 8 13:08:17 PDT 2011


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





--- Comment #4 from Xiaomei Ji <xji at chromium.org>  2011-08-08 13:08:17 PST ---
We are using logical word break to get the visual word break.
due to the way logical word break works (in terms of whether the word break is before or after the space), even when the start position is within the box, we are not able to correctly get the visual word break (in terms of before or after space) by directly using logical word break in 50% of the cases.

Using moving left as example, 
Given a LTR box "abc def|" in LTR block, we can get visually left word break "abc |def" by directly using previousWordPosition().
Given a RTL box "FED CBA|" in LTR block, we can get the visually left word break "FED |CBA" by directly using nextWordPosition().
But given LTR box "abc def|" in RTL block, we are not able to get the visual word break "abc| def" (which is a position after previous word) by directly using previousWordPosition(). (please refer to http://trac.webkit.org/changeset/88359 for more details). Instead, we are collecting all word breaks in the box and compare offset to get the correct visual word break.
Similar for  a RTL box "FED CBA|" in RTL block.

If we provide flexible logical word breaker (in terms of whether it breaks before or after space), we could always use that directly when start position is inside box, instead of collecting word breaks of the box and comparing the offset to get the correct word break for 50% cases.

Also, we could use this flexible logical word breaker in some cases when start position is at the boundary.

-- 
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