Changeset 64205 in webkit


Ignore:
Timestamp:
Jul 28, 2010 8:19:23 AM (14 years ago)
Author:
jcivelli@chromium.org
Message:

2010-07-28 Jay Civelli <jcivelli@chromium.org>

Reviewed by Kent Tamura.

[Chromium] The popup now layouts properly its rows by
taking into account the label width.
https://bugs.webkit.org/show_bug.cgi?id=42910

  • platform/chromium/PopupMenuChromium.cpp: (WebCore::PopupListBox::layout):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64204 r64205  
     12010-07-28  Jay Civelli  <jcivelli@chromium.org>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [Chromium] The popup now layouts properly its rows by
     6        taking into account the label width.
     7        https://bugs.webkit.org/show_bug.cgi?id=42910
     8
     9        * platform/chromium/PopupMenuChromium.cpp:
     10        (WebCore::PopupListBox::layout):
     11
    1122010-07-28  Pavel Feldman  <pfeldman@chromium.org>
    213
  • trunk/WebCore/platform/chromium/PopupMenuChromium.cpp

    r64173 r64205  
    12571257        // Ensure the popup is wide enough to fit this item.
    12581258        String text = m_popupClient->itemText(i);
    1259         if (!text.isEmpty()) {
    1260             int width = itemFont.width(TextRun(text));
    1261             baseWidth = max(baseWidth, width);
     1259        String label = m_popupClient->itemLabel(i);
     1260        int width = 0;
     1261        if (!text.isEmpty())
     1262            width = itemFont.width(TextRun(text));
     1263        if (!label.isEmpty()) {
     1264            if (width > 0)
     1265                width += kTextToLabelPadding;
     1266            width += itemFont.width(TextRun(label));
    12621267        }
     1268        baseWidth = max(baseWidth, width);
    12631269        // FIXME: http://b/1210481 We should get the padding of individual option elements.
    12641270        paddingWidth = max(paddingWidth,
Note: See TracChangeset for help on using the changeset viewer.