[webkit-reviews] review requested: [Bug 12726] REGRESSION (r12073): Text wraps in the middle of a word instead of wrapping at the space before the word : [Attachment 13157] Use the inaccurate text measurement only as a lower bound

bugzilla-request-daemon at macosforge.org bugzilla-request-daemon at macosforge.org
Tue Feb 13 16:31:11 PST 2007


mitz at webkit.org has asked  for review:
Bug 12726: REGRESSION (r12073): Text wraps in the middle of a word instead of
wrapping at the space before the word
http://bugs.webkit.org/show_bug.cgi?id=12726

Attachment 13157: Use the inaccurate text measurement only as a lower bound
http://bugs.webkit.org/attachment.cgi?id=13157&action=edit

------- Additional Comments from mitz at webkit.org
This patch keeps the current mechanism that adds up single characters' widths,
but once the total width overflows the line's width, it starts measuring
everything as a single run. Looking at r12073, I realized that this was
actually what the code was doing before that patch (modulo the bugs fixed since
then). I also made things a little more efficient by not measuring or computing
things that didn't change or that you no longer care about.

I think this approach is better than the alternative of not measuring anything
until you hit the first word boundary, since that can be proportional to the
length of the entire text object, whereas the rounding error is proportional to
the length of a single line. (This might make a difference when you're editing
the first line of a very long "word").



More information about the webkit-reviews mailing list