Changeset 91896 in webkit


Ignore:
Timestamp:
Jul 27, 2011, 8:55:58 PM (14 years ago)
Author:
fsamuel@chromium.org
Message:

Source/WebCore: Popups on Chromium now check the minimum row height set through the Chromium WebKit API when
computing the height of a row in a popup listbox.
https://bugs.webkit.org/show_bug.cgi?id=64897

Reviewed by Darin Fisher.

No new tests.

  • platform/chromium/PopupMenuChromium.cpp:

(WebCore::PopupListBox::getRowHeight):

  • platform/chromium/PopupMenuChromium.h:

(WebCore::PopupMenuChromium::minimumRowHeight):
(WebCore::PopupMenuChromium::setMinimumRowHeight):

Source/WebKit/chromium: Added a Chromium WebKit API method to set the minimum row height of a popup listbox.
https://bugs.webkit.org/show_bug.cgi?id=64897

Reviewed by Darin Fisher.

  • public/WebPopupMenu.h:
  • src/WebPopupMenuImpl.cpp:

(WebKit::WebPopupMenu::setMinimumRowHeight):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91895 r91896  
     12011-07-27  Fady Samuel  <fsamuel@chromium.org>
     2
     3        Popups on Chromium now check the minimum row height set through the Chromium WebKit API when
     4        computing the height of a row in a popup listbox.
     5        https://bugs.webkit.org/show_bug.cgi?id=64897
     6
     7        Reviewed by Darin Fisher.
     8
     9        No new tests.
     10
     11        * platform/chromium/PopupMenuChromium.cpp:
     12        (WebCore::PopupListBox::getRowHeight):
     13        * platform/chromium/PopupMenuChromium.h:
     14        (WebCore::PopupMenuChromium::minimumRowHeight):
     15        (WebCore::PopupMenuChromium::setMinimumRowHeight):
     16
    1172011-07-27  MORITA Hajime  <morrita@google.com>
    218
  • trunk/Source/WebCore/platform/chromium/PopupMenuChromium.cpp

    r91816 r91896  
    6767
    6868namespace WebCore {
     69
     70int PopupMenuChromium::s_minimumRowHeight = 0;
    6971
    7072typedef unsigned long long TimeStamp;
     
    11771179{
    11781180    if (index < 0)
    1179         return 0;
     1181        return PopupMenuChromium::minimumRowHeight();
    11801182
    11811183    if (m_popupClient->itemStyle(index).isDisplayNone())
    1182         return 0;
     1184        return PopupMenuChromium::minimumRowHeight();
    11831185
    11841186    // Separator row height is the same size as itself.
    11851187    if (m_popupClient->itemIsSeparator(index))
    1186         return separatorHeight;
     1188        return max(separatorHeight, PopupMenuChromium::minimumRowHeight());
    11871189
    11881190    String icon = m_popupClient->itemIcon(index);
     
    11931195
    11941196    int linePaddingHeight = m_popupClient->menuStyle().menuType() == PopupMenuStyle::AutofillPopup ? kLinePaddingHeight : 0;
    1195     return max(fontHeight, iconHeight) + linePaddingHeight * 2;
     1197    int calculatedRowHeight = max(fontHeight, iconHeight) + linePaddingHeight * 2;
     1198    return max(calculatedRowHeight, PopupMenuChromium::minimumRowHeight());
    11961199}
    11971200
  • trunk/Source/WebCore/platform/chromium/PopupMenuChromium.h

    r91816 r91896  
    176176    friend class WTF::RefCounted<PopupContainer>;
    177177
    178     PopupContainer(PopupMenuClient*, PopupType popupType, const PopupContainerSettings&);
     178    PopupContainer(PopupMenuClient*, PopupType, const PopupContainerSettings&);
    179179    ~PopupContainer();
    180180
     
    208208    virtual void disconnectClient();
    209209
     210    static int minimumRowHeight() { return s_minimumRowHeight; }
     211    static void setMinimumRowHeight(int minimumRowHeight) { s_minimumRowHeight = minimumRowHeight; }
     212
    210213private:
    211214    PopupMenuClient* client() const { return m_popupClient; }
     
    213216    PopupMenuClient* m_popupClient;
    214217    PopupMenuPrivate p;
     218
     219    static int s_minimumRowHeight;
    215220};
    216221
  • trunk/Source/WebKit/chromium/ChangeLog

    r91892 r91896  
     12011-07-27  Fady Samuel  <fsamuel@chromium.org>
     2
     3        Added a Chromium WebKit API method to set the minimum row height of a popup listbox.
     4        https://bugs.webkit.org/show_bug.cgi?id=64897
     5
     6        Reviewed by Darin Fisher.
     7
     8        * public/WebPopupMenu.h:
     9        * src/WebPopupMenuImpl.cpp:
     10        (WebKit::WebPopupMenu::setMinimumRowHeight):
     11
    1122011-07-27  Peng Huang  <penghuang@chromium.org>
    213
  • trunk/Source/WebKit/chromium/public/WebPopupMenu.h

    r50717 r91896  
    4242public:
    4343    WEBKIT_API static WebPopupMenu* create(WebWidgetClient*);
     44
     45    // Sets the minimum height of a popup listbox row.
     46    WEBKIT_API static void setMinimumRowHeight(int);
    4447};
    4548
  • trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp

    r91816 r91896  
    252252}
    253253
     254void WebPopupMenu::setMinimumRowHeight(int minimumRowHeight)
     255{
     256    PopupMenuChromium::setMinimumRowHeight(minimumRowHeight);
     257}
     258
    254259bool WebPopupMenuImpl::setComposition(
    255260    const WebString& text, const WebVector<WebCompositionUnderline>& underlines,
Note: See TracChangeset for help on using the changeset viewer.