[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jcivelli at chromium.org
jcivelli at chromium.org
Wed Dec 22 11:32:01 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2fe11482d6a480d141fd15c97f399883f2270249
Author: jcivelli at chromium.org <jcivelli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 28 15:19:23 2010 +0000
2010-07-28 Jay Civelli <jcivelli at 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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d8c96e3..071e15d 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-28 Jay Civelli <jcivelli at 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):
+
2010-07-28 Pavel Feldman <pfeldman at chromium.org>
Not reviewed: chromium tests fix.
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 2618362..d07ba2e 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -1256,10 +1256,16 @@ void PopupListBox::layout()
// Ensure the popup is wide enough to fit this item.
String text = m_popupClient->itemText(i);
- if (!text.isEmpty()) {
- int width = itemFont.width(TextRun(text));
- baseWidth = max(baseWidth, width);
+ String label = m_popupClient->itemLabel(i);
+ int width = 0;
+ if (!text.isEmpty())
+ width = itemFont.width(TextRun(text));
+ if (!label.isEmpty()) {
+ if (width > 0)
+ width += kTextToLabelPadding;
+ width += itemFont.width(TextRun(label));
}
+ baseWidth = max(baseWidth, width);
// FIXME: http://b/1210481 We should get the padding of individual option elements.
paddingWidth = max(paddingWidth,
m_popupClient->clientPaddingLeft() + m_popupClient->clientPaddingRight());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list