Changeset 91896 in webkit
- Timestamp:
- Jul 27, 2011, 8:55:58 PM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91895 r91896 1 2011-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 1 17 2011-07-27 MORITA Hajime <morrita@google.com> 2 18 -
trunk/Source/WebCore/platform/chromium/PopupMenuChromium.cpp
r91816 r91896 67 67 68 68 namespace WebCore { 69 70 int PopupMenuChromium::s_minimumRowHeight = 0; 69 71 70 72 typedef unsigned long long TimeStamp; … … 1177 1179 { 1178 1180 if (index < 0) 1179 return 0;1181 return PopupMenuChromium::minimumRowHeight(); 1180 1182 1181 1183 if (m_popupClient->itemStyle(index).isDisplayNone()) 1182 return 0;1184 return PopupMenuChromium::minimumRowHeight(); 1183 1185 1184 1186 // Separator row height is the same size as itself. 1185 1187 if (m_popupClient->itemIsSeparator(index)) 1186 return separatorHeight;1188 return max(separatorHeight, PopupMenuChromium::minimumRowHeight()); 1187 1189 1188 1190 String icon = m_popupClient->itemIcon(index); … … 1193 1195 1194 1196 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()); 1196 1199 } 1197 1200 -
trunk/Source/WebCore/platform/chromium/PopupMenuChromium.h
r91816 r91896 176 176 friend class WTF::RefCounted<PopupContainer>; 177 177 178 PopupContainer(PopupMenuClient*, PopupType popupType, const PopupContainerSettings&);178 PopupContainer(PopupMenuClient*, PopupType, const PopupContainerSettings&); 179 179 ~PopupContainer(); 180 180 … … 208 208 virtual void disconnectClient(); 209 209 210 static int minimumRowHeight() { return s_minimumRowHeight; } 211 static void setMinimumRowHeight(int minimumRowHeight) { s_minimumRowHeight = minimumRowHeight; } 212 210 213 private: 211 214 PopupMenuClient* client() const { return m_popupClient; } … … 213 216 PopupMenuClient* m_popupClient; 214 217 PopupMenuPrivate p; 218 219 static int s_minimumRowHeight; 215 220 }; 216 221 -
trunk/Source/WebKit/chromium/ChangeLog
r91892 r91896 1 2011-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 1 12 2011-07-27 Peng Huang <penghuang@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/public/WebPopupMenu.h
r50717 r91896 42 42 public: 43 43 WEBKIT_API static WebPopupMenu* create(WebWidgetClient*); 44 45 // Sets the minimum height of a popup listbox row. 46 WEBKIT_API static void setMinimumRowHeight(int); 44 47 }; 45 48 -
trunk/Source/WebKit/chromium/src/WebPopupMenuImpl.cpp
r91816 r91896 252 252 } 253 253 254 void WebPopupMenu::setMinimumRowHeight(int minimumRowHeight) 255 { 256 PopupMenuChromium::setMinimumRowHeight(minimumRowHeight); 257 } 258 254 259 bool WebPopupMenuImpl::setComposition( 255 260 const WebString& text, const WebVector<WebCompositionUnderline>& underlines,
Note:
See TracChangeset
for help on using the changeset viewer.