[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 16:11:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cb22bb8a073c86f1c6ca898ffdbcf3322f76fa54
Author: jcivelli at chromium.org <jcivelli at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Nov 19 15:38:58 2010 +0000

    2010-11-19  Jay Civelli  <jcivelli at chromium.org>
    
            Reviewed by David Levin.
    
            [chromium] Removing the now unused code to show popup externally on Mac.
            https://bugs.webkit.org/show_bug.cgi?id=49747
    
            * page/chromium/ChromeClientChromium.h:
            * platform/chromium/PopupMenuChromium.cpp:
            (WebCore::PopupContainer::showPopup):
            (WebCore::PopupListBox::layout):
            (WebCore::PopupMenuChromium::show):
            * platform/chromium/PopupMenuChromium.h:
    2010-11-19  Jay Civelli  <jcivelli at chromium.org>
    
            Reviewed by David Levin.
    
            Removing unused code to show popup externally on Mac.
            https://bugs.webkit.org/show_bug.cgi?id=49747
    
            * src/ChromeClientImpl.cpp:
            (WebKit::ChromeClientImpl::popupOpened):
            * src/ChromeClientImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72399 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 280c0f0..fd87476 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-19  Jay Civelli  <jcivelli at chromium.org>
+
+        Reviewed by David Levin.
+
+        [chromium] Removing the now unused code to show popup externally on Mac.
+        https://bugs.webkit.org/show_bug.cgi?id=49747
+
+        * page/chromium/ChromeClientChromium.h:
+        * platform/chromium/PopupMenuChromium.cpp:
+        (WebCore::PopupContainer::showPopup):
+        (WebCore::PopupListBox::layout):
+        (WebCore::PopupMenuChromium::show):
+        * platform/chromium/PopupMenuChromium.h:
+
 2010-11-18  Ilya Tikhonovsky  <loislo at chromium.org>
 
         Reviewed by Yury Semikhatsky.
diff --git a/WebCore/page/chromium/ChromeClientChromium.h b/WebCore/page/chromium/ChromeClientChromium.h
index 02e2a94..b518b3d 100644
--- a/WebCore/page/chromium/ChromeClientChromium.h
+++ b/WebCore/page/chromium/ChromeClientChromium.h
@@ -44,11 +44,9 @@ class ChromeClientChromium : public ChromeClient {
 public:
     // Notifies the client of a new popup widget.  The client should place
     // and size the widget with the given bounds, relative to the screen.
-    // If handleExternal is true, then drawing and input handling for the
-    // popup will be handled by the external embedder.
-    virtual void popupOpened(PopupContainer* popupContainer, const IntRect& bounds,
-                             bool handleExternal) = 0;
-                             
+    virtual void popupOpened(PopupContainer* popupContainer,
+                             const IntRect& bounds) = 0;
+
     // Notifies the client a popup was closed.
     virtual void popupClosed(PopupContainer* popupContainer) = 0;
 };
diff --git a/WebCore/platform/chromium/PopupMenuChromium.cpp b/WebCore/platform/chromium/PopupMenuChromium.cpp
index 04eeb93..7a3024b 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.cpp
+++ b/WebCore/platform/chromium/PopupMenuChromium.cpp
@@ -371,7 +371,7 @@ void PopupContainer::showPopup(FrameView* view)
                     widgetRect.move(0, -(widgetRect.height() + selectHeight));
             }
         }
-        chromeClient->popupOpened(this, widgetRect, false);
+        chromeClient->popupOpened(this, widgetRect);
         m_popupOpen = true;
     }
 
@@ -387,34 +387,6 @@ void PopupContainer::showPopup(FrameView* view)
     invalidate();
 }
 
-void PopupContainer::showExternal(const IntRect& rect, FrameView* v, int index)
-{
-    if (!listBox())
-        return;
-
-    listBox()->setBaseWidth(rect.width());
-    listBox()->updateFromElement();
-
-    if (listBox()->numItems() < 1) {
-        hidePopup();
-        return;
-    }
-
-    // Adjust the popup position to account for scrolling.
-    IntPoint location = v->contentsToWindow(rect.location());
-    IntRect popupRect(location, rect.size());
-
-    // Get the ChromeClient and pass it the popup menu's listbox data.
-    m_frameView = v;
-    chromeClientChromium()->popupOpened(this, popupRect, 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()
 {
     listBox()->hidePopup();
@@ -1296,27 +1268,14 @@ void PopupListBox::layout()
     // Calculate scroll bar width.
     int windowHeight = 0;
 
-#if OS(DARWIN)
-    // Set the popup's window to contain all available items on Mac only, which
-    // uses native controls that manage their own scrolling. This allows hit
-    // testing to work when selecting items in popups that have more menu entries
-    // than the maximum window size.
-    m_visibleRows = numItems();
-#else
     m_visibleRows = min(numItems(), kMaxVisibleRows);
-#endif
 
     for (int i = 0; i < m_visibleRows; ++i) {
         int rowHeight = getRowHeight(i);
-
-#if !OS(DARWIN)
-        // Only clip the window height for non-Mac platforms.
         if (windowHeight + rowHeight > m_maxHeight) {
             m_visibleRows = i;
             break;
         }
-#endif
-
         windowHeight += rowHeight;
     }
 
@@ -1383,19 +1342,13 @@ PopupMenuChromium::~PopupMenuChromium()
     hide();
 }
 
-// The Mac Chromium implementation relies on external control (a Cocoa control)
-// to display, handle the input tracking and menu item selection for the popup.
 // Windows and Linux Chromium let our WebKit port handle the display, while
 // another process manages the popup window and input handling.
 void PopupMenuChromium::show(const IntRect& r, FrameView* v, int index)
 {
     if (!p.popup)
         p.popup = PopupContainer::create(client(), PopupContainer::Select, dropDownSettings);
-#if OS(DARWIN)
-    p.popup->showExternal(r, v, index);
-#else
     p.popup->show(r, v, index);
-#endif
 }
 
 void PopupMenuChromium::hide()
diff --git a/WebCore/platform/chromium/PopupMenuChromium.h b/WebCore/platform/chromium/PopupMenuChromium.h
index ca47ccf..76665ff 100644
--- a/WebCore/platform/chromium/PopupMenuChromium.h
+++ b/WebCore/platform/chromium/PopupMenuChromium.h
@@ -142,9 +142,6 @@ public:
     // Show the popup
     void showPopup(FrameView*);
 
-    // Used on Mac Chromium for HTML select popup menus.
-    void showExternal(const IntRect&, FrameView*, int index);
-
     // Show the popup in the specified rect for the specified frame.
     // Note: this code was somehow arbitrarily factored-out of the Popup class
     // so WebViewImpl can create a PopupContainer. This method is used for
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 04be936..4a58f88 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-19  Jay Civelli  <jcivelli at chromium.org>
+
+        Reviewed by David Levin.
+
+        Removing unused code to show popup externally on Mac.
+        https://bugs.webkit.org/show_bug.cgi?id=49747
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::popupOpened):
+        * src/ChromeClientImpl.h:
+
 2010-11-19  Pavel Feldman  <pfeldman at chromium.org>
 
         Not reviewed: flip chromium version to mitigate two-sided patch impact.
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index c43a0b0..9e9fc41 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -678,25 +678,14 @@ void ChromeClientImpl::chooseIconForFiles(const Vector<WTF::String>&, WebCore::F
 }
 
 void ChromeClientImpl::popupOpened(PopupContainer* popupContainer,
-                                   const IntRect& bounds,
-                                   bool handleExternally)
+                                   const IntRect& bounds)
 {
     if (!m_webView->client())
         return;
 
-    WebWidget* webwidget;
-    if (handleExternally) {
-        WebPopupMenuInfo popupInfo;
-        getPopupMenuInfo(popupContainer, &popupInfo);
-        webwidget = m_webView->client()->createPopupMenu(popupInfo);
-    } else {
-        webwidget = m_webView->client()->createPopupMenu(
-            convertPopupType(popupContainer->popupType()));
-        // We only notify when the WebView has to handle the popup, as when
-        // the popup is handled externally, the fact that a popup is showing is
-        // transparent to the WebView.
-        m_webView->popupOpened(popupContainer);
-    }
+    WebWidget* webwidget = m_webView->client()->createPopupMenu(
+        convertPopupType(popupContainer->popupType()));
+    m_webView->popupOpened(popupContainer);
     static_cast<WebPopupMenuImpl*>(webwidget)->Init(popupContainer, bounds);
 }
 
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 87c1653..fde46df 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -162,8 +162,7 @@ public:
 
     // ChromeClientChromium methods:
     virtual void popupOpened(WebCore::PopupContainer* popupContainer,
-                             const WebCore::IntRect& bounds,
-                             bool handleExternally);
+                             const WebCore::IntRect& bounds);
     virtual void popupClosed(WebCore::PopupContainer* popupContainer);
     virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list