[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
paroga at webkit.org
paroga at webkit.org
Fri Jan 21 14:45:40 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit d371891dabe0b945e99d681a92e3977d44d80811
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 29 15:38:17 2010 +0000
2010-12-29 Patrick Gansterer <paroga at webkit.org>
Unreviewed build fix for WinCE after r73802.
Reapply parts from r72585:
Port ContextMenuWin.cpp to WinCE
https://bugs.webkit.org/show_bug.cgi?id=48408
* CMakeLists.txt:
* platform/ContextMenu.h:
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::getContextMenuItems):
(WebCore::ContextMenu::createNativeMenuFromItems):
2010-12-29 Patrick Gansterer <paroga at webkit.org>
Unreviewed build fix for WinCE after r73802.
* WebCoreSupport/ContextMenuClientWinCE.cpp:
(WebKit::ContextMenuClientWinCE::customizeMenu):
* WebCoreSupport/ContextMenuClientWinCE.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt
index 46912d1..02d87b7 100644
--- a/WebCore/CMakeLists.txt
+++ b/WebCore/CMakeLists.txt
@@ -1288,6 +1288,8 @@ SET(WebCore_SOURCES
page/animation/KeyframeAnimation.cpp
platform/Arena.cpp
+ platform/ContextMenu.cpp
+ platform/ContextMenuItem.cpp
platform/ContentType.cpp
platform/CrossThreadCopier.cpp
platform/DeprecatedPtrListImpl.cpp
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a5dd527..b5222e3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-29 Patrick Gansterer <paroga at webkit.org>
+
+ Unreviewed build fix for WinCE after r73802.
+
+ Reapply parts from r72585:
+ Port ContextMenuWin.cpp to WinCE
+ https://bugs.webkit.org/show_bug.cgi?id=48408
+
+ * CMakeLists.txt:
+ * platform/ContextMenu.h:
+ * platform/win/ContextMenuWin.cpp:
+ (WebCore::ContextMenu::getContextMenuItems):
+ (WebCore::ContextMenu::createNativeMenuFromItems):
+
2010-12-29 Kent Hansen <kent.hansen at nokia.com>
Reviewed by Simon Hausmann.
diff --git a/WebCore/platform/win/ContextMenuWin.cpp b/WebCore/platform/win/ContextMenuWin.cpp
index 24c355d..ed1b895 100644
--- a/WebCore/platform/win/ContextMenuWin.cpp
+++ b/WebCore/platform/win/ContextMenuWin.cpp
@@ -30,6 +30,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "Node.h"
+#include "NotImplemented.h"
#include <tchar.h>
#include <windows.h>
#include <wtf/Vector.h>
@@ -51,6 +52,9 @@ ContextMenu::ContextMenu(HMENU menu)
void ContextMenu::getContextMenuItems(HMENU menu, Vector<ContextMenuItem>& items)
{
+#if OS(WINCE)
+ notImplemented();
+#else
int count = ::GetMenuItemCount(menu);
if (count <= 0)
return;
@@ -76,6 +80,7 @@ void ContextMenu::getContextMenuItems(HMENU menu, Vector<ContextMenuItem>& items
if (::GetMenuItemInfo(menu, i, TRUE, &info))
items.append(ContextMenuItem(info));
}
+#endif
}
HMENU ContextMenu::createNativeMenuFromItems(const Vector<ContextMenuItem>& items)
@@ -87,6 +92,31 @@ HMENU ContextMenu::createNativeMenuFromItems(const Vector<ContextMenuItem>& item
MENUITEMINFO menuItem = item.nativeMenuItem();
+#if OS(WINCE)
+ UINT flags = MF_BYPOSITION;
+ UINT newItem = 0;
+ LPCWSTR title = 0;
+
+ if (item.type() == SeparatorType)
+ flags |= MF_SEPARATOR;
+ else {
+ flags |= MF_STRING;
+ flags |= item.checked() ? MF_CHECKED : MF_UNCHECKED;
+ flags |= item.enabled() ? MF_ENABLED : MF_GRAYED;
+
+ title = menuItem.dwTypeData;
+ menuItem.dwTypeData = 0;
+
+ if (menuItem.hSubMenu) {
+ flags |= MF_POPUP;
+ newItem = reinterpret_cast<UINT>(menuItem.hSubMenu);
+ menuItem.hSubMenu = 0;
+ } else
+ newItem = menuItem.wID;
+ }
+
+ ::InsertMenuW(menu, i, flags, newItem, title);
+#else
// ContextMenuItem::nativeMenuItem doesn't set the title of the MENUITEMINFO to make the
// lifetime handling easier for callers.
String itemTitle = item.title();
@@ -97,6 +127,7 @@ HMENU ContextMenu::createNativeMenuFromItems(const Vector<ContextMenuItem>& item
}
::InsertMenuItem(menu, i, TRUE, &menuItem);
+#endif
}
return menu;
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index 436e9e6..f392570 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,11 @@
+2010-12-29 Patrick Gansterer <paroga at webkit.org>
+
+ Unreviewed build fix for WinCE after r73802.
+
+ * WebCoreSupport/ContextMenuClientWinCE.cpp:
+ (WebKit::ContextMenuClientWinCE::customizeMenu):
+ * WebCoreSupport/ContextMenuClientWinCE.h:
+
2010-12-22 Sam Weinig <sam at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
index 7358f2a..dda4d27 100644
--- a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.cpp
@@ -42,9 +42,9 @@ void ContextMenuClientWinCE::contextMenuDestroyed()
delete this;
}
-PlatformMenuDescription ContextMenuClientWinCE::getCustomMenuFromDefaultItems(ContextMenu* menu)
+PassOwnPtr<ContextMenu> ContextMenuClientWinCE::customizeMenu(PassOwnPtr<ContextMenu> menu)
{
- return menu->releasePlatformDescription();
+ return menu;
}
void ContextMenuClientWinCE::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
diff --git a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
index 13d91d1..8cd1951 100644
--- a/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
+++ b/WebKit/wince/WebCoreSupport/ContextMenuClientWinCE.h
@@ -37,7 +37,7 @@ public:
virtual void contextMenuDestroyed();
- virtual WebCore::PlatformMenuDescription getCustomMenuFromDefaultItems(WebCore::ContextMenu*);
+ virtual PassOwnPtr<WebCore::ContextMenu> customizeMenu(PassOwnPtr<WebCore::ContextMenu>);
virtual void contextMenuItemSelected(WebCore::ContextMenuItem*, const WebCore::ContextMenu*);
virtual void downloadURL(const WebCore::KURL&);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list