[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 15:16:10 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit a78a2bbac0b7e0f9cd3f82076d0d173d40352886
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 16:27:05 2010 +0000
Remove unnecessary #includes from WebEvent.h
Fixes <http://webkit.org/b/48609> WebEvent.h #includes things it
doesn't need
Reviewed by Sam Weinig.
* Scripts/webkit2/messages.py:
(MessageReceiver.iterparameters): Merged iterreplyparameters into this
function. All callers to iterparameters are really interested in the
reply parameters, too. This will cause us to, e.g., add
forward-declarations for types used in sync replies.
(headers_for_type): Added a special case for WebCore::KeypressCommand.
* Scripts/webkit2/messages_unittest.py: Added a test to cover the
failing case that inspired the above changes.
* Shared/WebEvent.h: Replaced #includes with forward-declarations.
* Shared/API/c/WKSharedAPICast.h:
* Shared/NativeWebKeyboardEvent.h:
* Shared/WebEvent.cpp:
* Shared/WebKeyboardEvent.cpp:
* Shared/WebMouseEvent.cpp:
* Shared/WebPlatformTouchPoint.cpp:
* Shared/WebTouchEvent.cpp:
* Shared/WebWheelEvent.cpp:
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
* UIProcess/WebUIClient.cpp:
* UIProcess/WebUIClient.h:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
Added now-needed #includes and declarations.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index ab0a941..32d3c59 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,43 @@
+2010-10-28 Adam Roben <aroben at apple.com>
+
+ Remove unnecessary #includes from WebEvent.h
+
+ Fixes <http://webkit.org/b/48609> WebEvent.h #includes things it
+ doesn't need
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/webkit2/messages.py:
+ (MessageReceiver.iterparameters): Merged iterreplyparameters into this
+ function. All callers to iterparameters are really interested in the
+ reply parameters, too. This will cause us to, e.g., add
+ forward-declarations for types used in sync replies.
+ (headers_for_type): Added a special case for WebCore::KeypressCommand.
+
+ * Scripts/webkit2/messages_unittest.py: Added a test to cover the
+ failing case that inspired the above changes.
+
+ * Shared/WebEvent.h: Replaced #includes with forward-declarations.
+
+ * Shared/API/c/WKSharedAPICast.h:
+ * Shared/NativeWebKeyboardEvent.h:
+ * Shared/WebEvent.cpp:
+ * Shared/WebKeyboardEvent.cpp:
+ * Shared/WebMouseEvent.cpp:
+ * Shared/WebPlatformTouchPoint.cpp:
+ * Shared/WebTouchEvent.cpp:
+ * Shared/WebWheelEvent.cpp:
+ * Shared/qt/WebEventFactoryQt.cpp:
+ * Shared/win/WebEventFactory.cpp:
+ * UIProcess/API/qt/qwkpage.cpp:
+ * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+ * UIProcess/WebUIClient.cpp:
+ * UIProcess/WebUIClient.h:
+ * UIProcess/win/WebView.cpp:
+ * WebProcess/WebPage/FindController.cpp:
+ * WebProcess/WebPage/mac/WebPageMac.mm:
+ Added now-needed #includes and declarations.
+
2010-10-29 Csaba Osztrogonác <ossy at webkit.org>
Reviewed by Adam Roben and David Kilzer.
diff --git a/WebKit2/Scripts/webkit2/messages.py b/WebKit2/Scripts/webkit2/messages.py
index b36ef72..05b6332 100644
--- a/WebKit2/Scripts/webkit2/messages.py
+++ b/WebKit2/Scripts/webkit2/messages.py
@@ -21,6 +21,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import collections
+import itertools
import re
@@ -56,10 +57,8 @@ class MessageReceiver(object):
self.condition = condition
def iterparameters(self):
- return (parameter for message in self.messages for parameter in message.parameters)
-
- def iterreplyparameters(self):
- return (reply_parameter for message in self.messages for reply_parameter in message.reply_parameters)
+ return itertools.chain((parameter for message in self.messages for parameter in message.parameters),
+ (reply_parameter for message in self.messages if message.reply_parameters for reply_parameter in message.reply_parameters))
@classmethod
def parse(cls, file):
@@ -381,6 +380,7 @@ def headers_for_type(type):
special_cases = {
'WTF::String': '<wtf/text/WTFString.h>',
+ 'WebCore::KeypressCommand': '<WebCore/KeyboardEvent.h>',
'WebKit::WebKeyboardEvent': '"WebEvent.h"',
'WebKit::WebMouseEvent': '"WebEvent.h"',
'WebKit::WebWheelEvent': '"WebEvent.h"',
diff --git a/WebKit2/Scripts/webkit2/messages_unittest.py b/WebKit2/Scripts/webkit2/messages_unittest.py
index 12f0699..8cf7edd 100644
--- a/WebKit2/Scripts/webkit2/messages_unittest.py
+++ b/WebKit2/Scripts/webkit2/messages_unittest.py
@@ -67,6 +67,11 @@ messages -> WebPage {
GetPluginProcessConnection(WTF::String pluginPath) -> (CoreIPC::Connection::Handle connectionHandle) delayed
DidCreateWebProcessConnection(CoreIPC::MachPort connectionIdentifier)
+
+#if PLATFORM(MAC)
+ # Keyboard support
+ InterpretKeyEvent(uint32_t type) -> (Vector<WebCore::KeypressCommand> commandName)
+#endif
}
#endif
@@ -174,6 +179,16 @@ _expected_results = {
),
'condition': None,
},
+ {
+ 'name': 'InterpretKeyEvent',
+ 'parameters': (
+ ('uint32_t', 'type'),
+ ),
+ 'reply_parameters': (
+ ('Vector<WebCore::KeypressCommand>', 'commandName'),
+ ),
+ 'condition': 'PLATFORM(MAC)',
+ },
),
}
@@ -236,8 +251,11 @@ _expected_header = """/*
#if ENABLE(WEBKIT2)
#include "Arguments.h"
+#include "Connection.h"
#include "MessageID.h"
#include "Plugin.h"
+#include <WebCore/KeyboardEvent.h>
+#include <WebCore/PluginInfo.h>
#include <wtf/Vector.h>
namespace CoreIPC {
@@ -272,6 +290,9 @@ enum Kind {
GetPluginsID,
GetPluginProcessConnectionID,
DidCreateWebProcessConnectionID,
+#if PLATFORM(MAC)
+ InterpretKeyEventID,
+#endif
};
struct LoadURL : CoreIPC::Arguments1<const WTF::String&> {
@@ -384,6 +405,18 @@ struct DidCreateWebProcessConnection : CoreIPC::Arguments1<const CoreIPC::MachPo
}
};
+#if PLATFORM(MAC)
+struct InterpretKeyEvent : CoreIPC::Arguments1<uint32_t> {
+ static const Kind messageID = InterpretKeyEventID;
+ typedef CoreIPC::Arguments1<Vector<WebCore::KeypressCommand>&> Reply;
+ typedef CoreIPC::Arguments1<uint32_t> DecodeType;
+ explicit InterpretKeyEvent(uint32_t type)
+ : CoreIPC::Arguments1<uint32_t>(type)
+ {
+ }
+};
+#endif
+
} // namespace WebPage
} // namespace Messages
@@ -493,6 +526,11 @@ CoreIPC::SyncReplyMode WebPage::didReceiveSyncWebPageMessage(CoreIPC::Connection
case Messages::WebPage::GetPluginProcessConnectionID:
CoreIPC::handleMessage<Messages::WebPage::GetPluginProcessConnection>(arguments, reply, this, &WebPage::getPluginProcessConnection);
return CoreIPC::AutomaticReply;
+#if PLATFORM(MAC)
+ case Messages::WebPage::InterpretKeyEventID:
+ CoreIPC::handleMessage<Messages::WebPage::InterpretKeyEvent>(arguments, reply, this, &WebPage::interpretKeyEvent);
+ return CoreIPC::AutomaticReply;
+#endif
default:
break;
}
diff --git a/WebKit2/Shared/API/c/WKSharedAPICast.h b/WebKit2/Shared/API/c/WKSharedAPICast.h
index 1e5d6de..2daa96b 100644
--- a/WebKit2/Shared/API/c/WKSharedAPICast.h
+++ b/WebKit2/Shared/API/c/WKSharedAPICast.h
@@ -34,6 +34,7 @@
#include "WebNumber.h"
#include "WebString.h"
#include "WebURL.h"
+#include <WebCore/IntRect.h>
#include <WebCore/FloatRect.h>
#include <wtf/TypeTraits.h>
diff --git a/WebKit2/Shared/NativeWebKeyboardEvent.h b/WebKit2/Shared/NativeWebKeyboardEvent.h
index b9598d9..9c4e480 100644
--- a/WebKit2/Shared/NativeWebKeyboardEvent.h
+++ b/WebKit2/Shared/NativeWebKeyboardEvent.h
@@ -29,6 +29,7 @@
#include "WebEvent.h"
#if PLATFORM(MAC)
+#include <wtf/RetainPtr.h>
#ifdef __OBJC__
@class NSView;
#else
diff --git a/WebKit2/Shared/WebEvent.cpp b/WebKit2/Shared/WebEvent.cpp
index 1086126..00f38f2 100644
--- a/WebKit2/Shared/WebEvent.cpp
+++ b/WebKit2/Shared/WebEvent.cpp
@@ -25,6 +25,9 @@
#include "WebEvent.h"
+#include "ArgumentDecoder.h"
+#include "ArgumentEncoder.h"
+
namespace WebKit {
WebEvent::WebEvent(Type type, Modifiers modifiers, double timestamp)
diff --git a/WebKit2/Shared/WebEvent.h b/WebKit2/Shared/WebEvent.h
index 76f262a..67120da 100644
--- a/WebKit2/Shared/WebEvent.h
+++ b/WebKit2/Shared/WebEvent.h
@@ -29,11 +29,13 @@
// FIXME: We should probably move to makeing the WebCore/PlatformFooEvents trivial classes so that
// we can use them as the event type.
-#include "ArgumentDecoder.h"
-#include "ArgumentEncoder.h"
-#include "WebCoreArgumentCoders.h"
#include <wtf/text/WTFString.h>
+namespace CoreIPC {
+ class ArgumentDecoder;
+ class ArgumentEncoder;
+}
+
namespace WebKit {
class WebEvent {
diff --git a/WebKit2/Shared/WebKeyboardEvent.cpp b/WebKit2/Shared/WebKeyboardEvent.cpp
index c711a5b..0859cdd 100644
--- a/WebKit2/Shared/WebKeyboardEvent.cpp
+++ b/WebKit2/Shared/WebKeyboardEvent.cpp
@@ -25,6 +25,8 @@
#include "WebEvent.h"
+#include "WebCoreArgumentCoders.h"
+
namespace WebKit {
WebKeyboardEvent::WebKeyboardEvent(Type type, const String& text, const String& unmodifiedText, const String& keyIdentifier, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, Modifiers modifiers, double timestamp)
diff --git a/WebKit2/Shared/WebMouseEvent.cpp b/WebKit2/Shared/WebMouseEvent.cpp
index 7c6cff1..97b9d13 100644
--- a/WebKit2/Shared/WebMouseEvent.cpp
+++ b/WebKit2/Shared/WebMouseEvent.cpp
@@ -25,6 +25,9 @@
#include "WebEvent.h"
+#include "ArgumentDecoder.h"
+#include "ArgumentEncoder.h"
+
namespace WebKit {
WebMouseEvent::WebMouseEvent(Type type, Button button, int x, int y, int globalX, int globalY, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp)
diff --git a/WebKit2/Shared/WebPlatformTouchPoint.cpp b/WebKit2/Shared/WebPlatformTouchPoint.cpp
index cfc285c..85eaca4 100644
--- a/WebKit2/Shared/WebPlatformTouchPoint.cpp
+++ b/WebKit2/Shared/WebPlatformTouchPoint.cpp
@@ -27,6 +27,9 @@
#include "WebEvent.h"
+#include "ArgumentDecoder.h"
+#include "ArgumentEncoder.h"
+
namespace WebKit {
WebPlatformTouchPoint::WebPlatformTouchPoint(unsigned id, TouchPointState state, int screenPosX, int screenPosY, int posX, int posY)
diff --git a/WebKit2/Shared/WebTouchEvent.cpp b/WebKit2/Shared/WebTouchEvent.cpp
index 344b038..f705ca0 100644
--- a/WebKit2/Shared/WebTouchEvent.cpp
+++ b/WebKit2/Shared/WebTouchEvent.cpp
@@ -27,6 +27,8 @@
#include "WebEvent.h"
+#include "ArgumentCoders.h"
+
namespace WebKit {
WebTouchEvent::WebTouchEvent(WebEvent::Type type, Vector<WebPlatformTouchPoint> touchPoints, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, Modifiers modifiers, double timestamp)
diff --git a/WebKit2/Shared/WebWheelEvent.cpp b/WebKit2/Shared/WebWheelEvent.cpp
index 7b46fca..bb9b2ad 100644
--- a/WebKit2/Shared/WebWheelEvent.cpp
+++ b/WebKit2/Shared/WebWheelEvent.cpp
@@ -25,6 +25,9 @@
#include "WebEvent.h"
+#include "ArgumentDecoder.h"
+#include "ArgumentEncoder.h"
+
namespace WebKit {
WebWheelEvent::WebWheelEvent(Type type, int x, int y, int globalX, int globalY, float deltaX, float deltaY, float wheelTicksX, float wheelTicksY, Granularity granularity, Modifiers modifiers, double timestamp)
diff --git a/WebKit2/Shared/qt/WebEventFactoryQt.cpp b/WebKit2/Shared/qt/WebEventFactoryQt.cpp
index 009a470..aaeb33b 100644
--- a/WebKit2/Shared/qt/WebEventFactoryQt.cpp
+++ b/WebKit2/Shared/qt/WebEventFactoryQt.cpp
@@ -28,6 +28,8 @@
#include <qgraphicssceneevent.h>
#include <QApplication>
#include <QKeyEvent>
+#include <WebCore/IntPoint.h>
+#include <WebCore/FloatPoint.h>
#include <WebCore/PlatformKeyboardEvent.h>
#include <wtf/ASCIICType.h>
#include <wtf/CurrentTime.h>
diff --git a/WebKit2/Shared/win/WebEventFactory.cpp b/WebKit2/Shared/win/WebEventFactory.cpp
index 3104f18..22e5f1b 100644
--- a/WebKit2/Shared/win/WebEventFactory.cpp
+++ b/WebKit2/Shared/win/WebEventFactory.cpp
@@ -29,8 +29,6 @@
#include <windowsx.h>
#include <wtf/ASCIICType.h>
-using namespace WebCore;
-
namespace WebKit {
static const unsigned short HIGH_BIT_MASK_SHORT = 0x8000;
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index cf122d6..edb9699 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -42,6 +42,7 @@
#include <QStyle>
#include <QTouchEvent>
#include <QtDebug>
+#include <WebCore/Cursor.h>
#include <WebCore/FloatRect.h>
#include <WebKit2/WKFrame.h>
#include <WebKit2/WKRetainPtr.h>
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index 4e162b3..4c57cd9 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -30,6 +30,7 @@
#include "DrawingAreaMessageKinds.h"
#include "DrawingAreaProxyMessageKinds.h"
#include "MessageID.h"
+#include "WebCoreArgumentCoders.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
diff --git a/WebKit2/UIProcess/WebUIClient.cpp b/WebKit2/UIProcess/WebUIClient.cpp
index 140e5ff..fe1bd91 100644
--- a/WebKit2/UIProcess/WebUIClient.cpp
+++ b/WebKit2/UIProcess/WebUIClient.cpp
@@ -32,6 +32,7 @@
#include "WebPageProxy.h"
#include <WebCore/FloatRect.h>
#include <WebCore/IntSize.h>
+#include <WebCore/WindowFeatures.h>
#include <string.h>
#include <wtf/text/WTFString.h>
diff --git a/WebKit2/UIProcess/WebUIClient.h b/WebKit2/UIProcess/WebUIClient.h
index 9e6630e..51c193c 100644
--- a/WebKit2/UIProcess/WebUIClient.h
+++ b/WebKit2/UIProcess/WebUIClient.h
@@ -32,8 +32,9 @@
#include <wtf/PassRefPtr.h>
namespace WebCore {
-class IntSize;
-struct WindowFeatures;
+ class FloatRect;
+ class IntSize;
+ struct WindowFeatures;
}
namespace WebKit {
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index 47145a3..dfee2aa 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -35,6 +35,7 @@
#include "WebPageProxy.h"
#include "WebPopupMenuProxyWin.h"
#include <Commctrl.h>
+#include <WebCore/Cursor.h>
#include <WebCore/FloatRect.h>
#include <WebCore/IntRect.h>
#include <WebCore/WebCoreInstanceHandle.h>
diff --git a/WebKit2/WebProcess/WebPage/FindController.cpp b/WebKit2/WebProcess/WebPage/FindController.cpp
index 4792e33..bdf9ba9 100644
--- a/WebKit2/WebProcess/WebPage/FindController.cpp
+++ b/WebKit2/WebProcess/WebPage/FindController.cpp
@@ -28,6 +28,7 @@
#include "BackingStore.h"
#include "FindPageOverlay.h"
#include "WKPage.h"
+#include "WebCoreArgumentCoders.h"
#include "WebPage.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
diff --git a/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm b/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
index fb07f26..556dc31 100644
--- a/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
@@ -25,6 +25,7 @@
#include "WebPage.h"
+#include "WebCoreArgumentCoders.h"
#include "WebEvent.h"
#include "WebPageProxyMessages.h"
#include "WebProcess.h"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list