diff options
author | Steve Block <steveblock@google.com> | 2009-12-15 10:12:09 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-12-17 17:41:10 +0000 |
commit | 643ca7872b450ea4efacab6188849e5aac2ba161 (patch) | |
tree | 6982576c228bcd1a7efe98afed544d840751094c /WebCore/platform/chromium/PopupMenuChromium.cpp | |
parent | d026980fde6eb3b01c1fe49441174e89cd1be298 (diff) | |
download | external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.zip external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.gz external_webkit-643ca7872b450ea4efacab6188849e5aac2ba161.tar.bz2 |
Merge webkit.org at r51976 : Initial merge by git.
Change-Id: Ib0e7e2f0fb4bee5a186610272edf3186f0986b43
Diffstat (limited to 'WebCore/platform/chromium/PopupMenuChromium.cpp')
-rw-r--r-- | WebCore/platform/chromium/PopupMenuChromium.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp index d6f895d..5abd364 100644 --- a/WebCore/platform/chromium/PopupMenuChromium.cpp +++ b/WebCore/platform/chromium/PopupMenuChromium.cpp @@ -370,6 +370,12 @@ void PopupContainer::showExternal(const IntRect& rect, FrameView* v, int index) ChromeClientChromium* client = static_cast<ChromeClientChromium*>( v->frame()->page()->chrome()->client()); client->popupOpened(this, popupRect, true, true); + + // The popup sends its "closed" notification through its parent. Set the + // parent, even though external popups have no real on-screen widget but a + // native menu (see |PopupListBox::hidePopup()|); + if (!m_listBox->parent()) + addChild(m_listBox.get()); } void PopupContainer::hidePopup() @@ -446,7 +452,7 @@ void PopupContainer::paintBorder(GraphicsContext* gc, const IntRect& rect) Color borderColor(127, 157, 185); gc->setStrokeStyle(NoStroke); - gc->setFillColor(borderColor); + gc->setFillColor(borderColor, DeviceColorSpace); int tx = x(); int ty = y(); @@ -772,7 +778,7 @@ void PopupListBox::paint(GraphicsContext* gc, const IntRect& rect) // Special case for an empty popup. if (numItems() == 0) - gc->fillRect(r, Color::white); + gc->fillRect(r, Color::white, DeviceColorSpace); gc->restore(); @@ -805,23 +811,23 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd // If we have a transparent background, make sure it has a color to blend // against. if (backColor.hasAlpha()) - gc->fillRect(rowRect, Color::white); + gc->fillRect(rowRect, Color::white, DeviceColorSpace); - gc->fillRect(rowRect, backColor); + gc->fillRect(rowRect, backColor, DeviceColorSpace); if (m_popupClient->itemIsSeparator(rowIndex)) { IntRect separatorRect( rowRect.x() + separatorPadding, rowRect.y() + (rowRect.height() - separatorHeight) / 2, rowRect.width() - 2 * separatorPadding, separatorHeight); - gc->fillRect(separatorRect, textColor); + gc->fillRect(separatorRect, textColor, DeviceColorSpace); return; } if (!style.isVisible()) return; - gc->setFillColor(textColor); + gc->setFillColor(textColor, DeviceColorSpace); Font itemFont = getRowFont(rowIndex); // FIXME: http://crbug.com/19872 We should get the padding of individual option |