Bug 48497 - Avoid overlapping label text in autofill popup with icon
Summary: Avoid overlapping label text in autofill popup with icon
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Ilya Sherman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 20:31 PDT by Ilya Sherman
Modified: 2010-11-02 17:25 PDT (History)
11 users (show)

See Also:


Attachments
Patch (3.56 KB, patch)
2010-10-27 20:35 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch, addressing Jay's comments (4.10 KB, patch)
2010-10-28 17:52 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch (4.07 KB, patch)
2010-11-01 11:41 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch (4.00 KB, patch)
2010-11-01 11:46 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff
Patch (3.96 KB, patch)
2010-11-02 09:01 PDT, Ilya Sherman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Sherman 2010-10-27 20:31:10 PDT
Avoid overlapping label text in autocomplete popup with icon
Comment 1 Ilya Sherman 2010-10-27 20:35:21 PDT
Created attachment 72134 [details]
Patch
Comment 2 Ilya Sherman 2010-10-27 20:40:02 PDT
paintRow() probably also needs to updated to take the icon width into account for the |restrictWidthOfListBox| case.  It's not entirely obvious to me how that should work -- should the label take precedence to the icon, or vice versa?  If there are multiple rows and only some of the rows have overflow, what alignment do we want across the rows?

This could probably also use a layout test, but I couldn't find any existing layout tests for these functions.  Could someone please point me in the right direction?
Comment 3 Ilya Sherman 2010-10-27 20:43:17 PDT
I should have mentioned -- this corresponds to Chromium bug 60096: http://code.google.com/p/chromium/issues/detail?id=60096
Comment 4 Jay Civelli 2010-10-28 09:52:36 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=72134&action=review

> WebCore/platform/chromium/PopupMenuChromium.cpp:1272
> +              if (width > 0)

4 space indent

> WebCore/platform/chromium/PopupMenuChromium.cpp:1277
> +

We should probably take into account the icon when computing the row height.
Comment 5 Ilya Sherman 2010-10-28 17:52:04 PDT
Created attachment 72274 [details]
Patch, addressing Jay's comments
Comment 6 Ilya Sherman 2010-10-28 18:03:50 PDT
Comment on attachment 72274 [details]
Patch, addressing Jay's comments

New patch up, addressing Jay's review comments
Comment 7 WebKit Review Bot 2010-10-29 08:16:40 PDT
Attachment 72274 [details] did not build on chromium:
Build output: http://queues.webkit.org/results/4830078
Comment 8 Jay Civelli 2010-10-29 08:36:48 PDT
I am not a reviewer but R+ for me.
Comment 9 Kent Tamura 2010-11-01 05:46:57 PDT
Comment on attachment 72274 [details]
Patch, addressing Jay's comments

View in context: https://bugs.webkit.org/attachment.cgi?id=72274&action=review

> WebCore/ChangeLog:741
> +2010-10-27  Ilya Sherman  <isherman@chromium.org>

New ChangeLog entry should be at the beginning of the file.

> WebCore/platform/chromium/PopupMenuChromium.cpp:1278
> +                width += kLabelToIconPadding;

We don't use "k" prefix in WebKit style.
I understand this symbol is not introduced by this patch.  So you don't need to address this issue for now.
Comment 10 Ilya Sherman 2010-11-01 11:41:15 PDT
Created attachment 72531 [details]
Patch

I think I uploaded an old version of the patch somehow last time; hoping things work better this time
Comment 11 Ilya Sherman 2010-11-01 11:46:12 PDT
Created attachment 72532 [details]
Patch

Third time's the charm?
Comment 12 Kent Tamura 2010-11-01 14:12:22 PDT
Comment on attachment 72532 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72532&action=review

> WebCore/ChangeLog:9
> +        No new tests. (OOPS!)

Remove this line please.
Comment 13 Ilya Sherman 2010-11-01 15:00:42 PDT
(In reply to comment #12)
> (From update of attachment 72532 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72532&action=review
> 
> > WebCore/ChangeLog:9
> > +        No new tests. (OOPS!)
> 
> Remove this line please.

Does that mean this patch doesn't need any tests?  I'd figured that we want tests, but wasn't sure where to add them and what to use as a starting point...
Comment 14 Kent Tamura 2010-11-01 16:32:20 PDT
Comment on attachment 72532 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=72532&action=review

>>> WebCore/ChangeLog:9
>>> +        No new tests. (OOPS!)
>> 
>> Remove this line please.
> 
> Does that mean this patch doesn't need any tests?  I'd figured that we want tests, but wasn't sure where to add them and what to use as a starting point...

Of course we should have tests as possible.  I meant we should remove (OOPS!) except "Reviewed by" line.  Commit-queue rejects a patch with (OOPS!).

We already have WebKit/chromium/tests/PopupMenuTest.cpp, but I think it's difficult to add a test for this change in WebKit.  So I think it's ok to have no tests.
Comment 15 Ilya Sherman 2010-11-02 09:01:03 PDT
Created attachment 72675 [details]
Patch
Comment 16 Ilya Sherman 2010-11-02 09:02:29 PDT
(In reply to comment #14)
> (From update of attachment 72532 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72532&action=review
> 
> >>> WebCore/ChangeLog:9
> >>> +        No new tests. (OOPS!)
> >> 
> >> Remove this line please.
> > 
> > Does that mean this patch doesn't need any tests?  I'd figured that we want tests, but wasn't sure where to add them and what to use as a starting point...
> 
> Of course we should have tests as possible.  I meant we should remove (OOPS!) except "Reviewed by" line.  Commit-queue rejects a patch with (OOPS!).
> 
> We already have WebKit/chromium/tests/PopupMenuTest.cpp, but I think it's difficult to add a test for this change in WebKit.  So I think it's ok to have no tests.

Ok, removed.
Comment 17 WebKit Commit Bot 2010-11-02 17:25:24 PDT
Comment on attachment 72675 [details]
Patch

Clearing flags on attachment: 72675

Committed r71191: <http://trac.webkit.org/changeset/71191>
Comment 18 WebKit Commit Bot 2010-11-02 17:25:31 PDT
All reviewed patches have been landed.  Closing bug.