[Webkit-unassigned] [Bug 27889] [Chromium] RTL autocomplete popup is not layout correctly.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 10 21:09:08 PDT 2009


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


mitz at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #34536|review?                     |review-
               Flag|                            |




--- Comment #21 from mitz at webkit.org  2009-08-10 21:09:06 PDT ---
(From update of attachment 34536)
Switching to StringTruncator is a move in the right direction, but I don’t
think the GraphicsContext changes are good or necessary. GraphicsContext is not
the place to create Strings and truncate them. The logical structure where
drawBidiText calls drawBidiTextWithinWidth, which calls back into drawBidiText
does not make much sense either. Also, if width != -1 (that is, the caller
wants truncation), calling Font::floatWidth() once seems wasteful, as the
StringTruncator should have the smarts to detect the case where no truncation
is necessary.

I think your PopupListBox should handle the truncation, create a TextRun from
the potentially-truncated String, and call drawBidiText with that. I also don’t
understand why you need the ellipsesNeeded member. It seems like you could just
always use the StringTruncator. It won’t truncate when unnecessary. If you find
out that you need to optimize, then you can cache the actual truncated strings
(rather than just a bit telling you whether to truncate).

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