2010-11-22 Jay Civelli <jcivelli@chromium.org>
authorjcivelli@chromium.org <jcivelli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Nov 2010 06:46:45 +0000 (06:46 +0000)
committerjcivelli@chromium.org <jcivelli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Nov 2010 06:46:45 +0000 (06:46 +0000)
        Reviewed by David Levin.

        Don't create an external popup menu when there are no items to show.
        https://bugs.webkit.org/show_bug.cgi?id=49937

        * src/ExternalPopupMenu.cpp:
        (WebKit::ExternalPopupMenu::show):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72586 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/chromium/ChangeLog
WebKit/chromium/src/ExternalPopupMenu.cpp

index 17792af..d39c82c 100644 (file)
@@ -1,3 +1,13 @@
+2010-11-22  Jay Civelli  <jcivelli@chromium.org>
+
+        Reviewed by David Levin.
+
+        Don't create an external popup menu when there are no items to show.
+        https://bugs.webkit.org/show_bug.cgi?id=49937
+
+        * src/ExternalPopupMenu.cpp:
+        (WebKit::ExternalPopupMenu::show):
+
 2010-11-22  Nat Duca  <nduca@chromium.org>
 
         Reviewed by Kenneth Russell.
index 0f208fb..f7f9862 100644 (file)
@@ -65,6 +65,8 @@ void ExternalPopupMenu::show(const IntRect& rect, FrameView* v, int index)
 
     WebPopupMenuInfo info;
     getPopupMenuInfo(&info);
+    if (info.items.isEmpty())
+        return;
     m_webExternalPopupMenu =
         m_webViewClient->createExternalPopupMenu(info, this);
     m_webExternalPopupMenu->show(v->contentsToWindow(rect));