2006-08-28 Nikolas Zimmermann <zimmermann@kde.org>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Aug 2006 18:49:55 +0000 (18:49 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Aug 2006 18:49:55 +0000 (18:49 +0000)
        Reviewed and landed by ap.

        Fixes one chunk of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10604
        Provide stub implementation of RenderPopupMenuQt.

        * CMakeLists.txt:
        * platform/qt/RenderPopupMenuQt.cpp: Added.
        (WebCore::RenderPopupMenuQt::RenderPopupMenuQt):
        (WebCore::RenderPopupMenuQt::~RenderPopupMenuQt):
        (WebCore::RenderPopupMenuQt::clear):
        (WebCore::RenderPopupMenuQt::populate):
        (WebCore::RenderPopupMenuQt::showPopup):
        (WebCore::RenderPopupMenuQt::hidePopup):
        (WebCore::RenderPopupMenuQt::addSeparator):
        (WebCore::RenderPopupMenuQt::addGroupLabel):
        (WebCore::RenderPopupMenuQt::addOption):
        * platform/qt/RenderPopupMenuQt.h: Added.
        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::systemFont):
        (WebCore::RenderThemeQt::createPopupMenu):

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

WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/platform/qt/RenderPopupMenuQt.cpp [new file with mode: 0644]
WebCore/platform/qt/RenderPopupMenuQt.h [new file with mode: 0644]
WebCore/platform/qt/RenderThemeQt.cpp

index 6a7f1e17332f433f66cde35ec10bf7bd0355b0fe..0e50cd4141b525ebcaf56571b8e033015b347d06 100644 (file)
@@ -866,6 +866,7 @@ set(WebCore_SRCS
     platform/qt/RenderThemeQt.cpp
     platform/qt/FontDataQt.cpp
     platform/qt/SharedTimerQt.cpp
+    platform/qt/RenderPopupMenuQt.cpp
     platform/qt/ResourceLoaderCurl.cpp
     platform/qt/ResourceLoaderManager.cpp
     platform/qt/FloatPointQt.cpp
@@ -907,6 +908,7 @@ set(WebCore_SRCS
     rendering/RenderPartObject.cpp
     rendering/RenderView.cpp
     rendering/RenderMenuList.cpp
+    rendering/RenderPopupMenu.cpp
     rendering/InlineFlowBox.cpp
     rendering/RenderListMarker.cpp
     rendering/RenderImage.cpp
index c0955e10947e71cb6b78f7cabb8aecdeae66c372..e00c1bf27aa9b0a54583b1d7bf20b4e3e2aacba3 100644 (file)
@@ -1,3 +1,26 @@
+2006-08-28  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed and landed by ap.
+
+        Fixes one chunk of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10604
+        Provide stub implementation of RenderPopupMenuQt.
+
+        * CMakeLists.txt:
+        * platform/qt/RenderPopupMenuQt.cpp: Added.
+        (WebCore::RenderPopupMenuQt::RenderPopupMenuQt):
+        (WebCore::RenderPopupMenuQt::~RenderPopupMenuQt):
+        (WebCore::RenderPopupMenuQt::clear):
+        (WebCore::RenderPopupMenuQt::populate):
+        (WebCore::RenderPopupMenuQt::showPopup):
+        (WebCore::RenderPopupMenuQt::hidePopup):
+        (WebCore::RenderPopupMenuQt::addSeparator):
+        (WebCore::RenderPopupMenuQt::addGroupLabel):
+        (WebCore::RenderPopupMenuQt::addOption):
+        * platform/qt/RenderPopupMenuQt.h: Added.
+        * platform/qt/RenderThemeQt.cpp:
+        (WebCore::RenderThemeQt::systemFont):
+        (WebCore::RenderThemeQt::createPopupMenu):
+
 2006-08-28  Nikolas Zimmermann  <zimmermann@kde.org>
 
         Reviewed and landed by ap.
diff --git a/WebCore/platform/qt/RenderPopupMenuQt.cpp b/WebCore/platform/qt/RenderPopupMenuQt.cpp
new file mode 100644 (file)
index 0000000..c8b3433
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * This file is part of the popup menu implementation for <select> elements in WebCore.
+ *
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
+ * Coypright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "config.h"
+#include "RenderPopupMenuQt.h"
+
+#define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
+
+namespace WebCore {
+
+RenderPopupMenuQt::RenderPopupMenuQt(Node* element, RenderMenuList* menuList)
+    : RenderPopupMenu(element, menuList)
+{
+}
+
+RenderPopupMenuQt::~RenderPopupMenuQt()
+{
+}
+
+void RenderPopupMenuQt::clear()
+{
+    notImplemented();
+}
+
+void RenderPopupMenuQt::populate()
+{
+    notImplemented();
+}
+
+void RenderPopupMenuQt::showPopup(const IntRect&, FrameView*, int)
+{
+    notImplemented();
+}
+
+void RenderPopupMenuQt::hidePopup()
+{
+    notImplemented();
+}
+
+void RenderPopupMenuQt::addSeparator()
+{
+    notImplemented();
+}
+
+void RenderPopupMenuQt::addGroupLabel(HTMLOptGroupElement*)
+{
+    notImplemented();
+}
+
+void RenderPopupMenuQt::addOption(HTMLOptionElement*)
+{
+    notImplemented();
+}
+
+}
+
+// vim: ts=4 sw=4 et
diff --git a/WebCore/platform/qt/RenderPopupMenuQt.h b/WebCore/platform/qt/RenderPopupMenuQt.h
new file mode 100644 (file)
index 0000000..bc657a9
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * This file is part of the popup menu implementation for <select> elements in WebCore.
+ *
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com 
+ * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef RENDER_POPUPMENU_QT_H
+#define RENDER_POPUPMENU_QT_H
+
+#include "RenderPopupMenu.h"
+
+namespace WebCore {
+
+class HTMLOptionElement;
+class HTMLOptGroupElement;
+
+class RenderPopupMenuQt : public RenderPopupMenu {
+public:
+    RenderPopupMenuQt(Node*, RenderMenuList*);
+    ~RenderPopupMenuQt();
+
+    virtual void clear();
+    virtual void populate();
+    virtual void showPopup(const IntRect&, FrameView*, int index);
+    virtual void hidePopup();
+
+protected:
+    virtual void addSeparator();
+    virtual void addGroupLabel(HTMLOptGroupElement*);
+    virtual void addOption(HTMLOptionElement*);
+
+};
+
+}
+
+#endif
index ee38fe982b9325133d381fea6535d370ee022cba..2df5b74e427fea1d238d9f0f6ddc2162ad8adea4 100644 (file)
 #include <QPainter>
 #include <QStyleOptionButton>
 
+#include "Document.h"
 #include "RenderTheme.h"
 #include "GraphicsContext.h"
+#include "RenderPopupMenuQt.h"
 
 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
 
@@ -116,10 +118,9 @@ void RenderThemeQt::systemFont(int propId, FontDescription& fontDescription) con
     // no-op
 }
 
-RenderPopupMenu* RenderThemeQt::createPopupMenu(RenderArena*, Document*, RenderMenuList*)
+RenderPopupMenu* RenderThemeQt::createPopupMenu(RenderArena* arena, Document* doc, RenderMenuList* menuList)
 {
-    notImplemented();
-    return 0;
+    return new (arena) RenderPopupMenuQt(doc, menuList);
 }
 
 void RenderThemeQt::addIntrinsicMargins(RenderStyle* style) const