Title: [116544] trunk/Source/WebKit/chromium
- Revision
- 116544
- Author
- [email protected]
- Date
- 2012-05-09 10:58:47 -0700 (Wed, 09 May 2012)
Log Message
[chromium] Exposes OrientationChangeEvent.
https://bugs.webkit.org/show_bug.cgi?id=85976
Reviewed by Adam Barth.
This is used by the android port, we need to expose the existing
WebCore API.
* public/WebFrame.h:
(WebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::sendOrientationChangeEvent):
(WebKit):
* src/WebFrameImpl.h:
(WebFrameImpl):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (116543 => 116544)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-09 17:57:50 UTC (rev 116543)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-09 17:58:47 UTC (rev 116544)
@@ -1,3 +1,21 @@
+2012-05-09 Marcus Bulach <[email protected]>
+
+ [chromium] Exposes OrientationChangeEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=85976
+
+ Reviewed by Adam Barth.
+
+ This is used by the android port, we need to expose the existing
+ WebCore API.
+
+ * public/WebFrame.h:
+ (WebFrame):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::sendOrientationChangeEvent):
+ (WebKit):
+ * src/WebFrameImpl.h:
+ (WebFrameImpl):
+
2012-05-09 Dana Jansens <[email protected]>
Early-out and avoid any copying when possible for Region operations
Modified: trunk/Source/WebKit/chromium/public/WebFrame.h (116543 => 116544)
--- trunk/Source/WebKit/chromium/public/WebFrame.h 2012-05-09 17:57:50 UTC (rev 116543)
+++ trunk/Source/WebKit/chromium/public/WebFrame.h 2012-05-09 17:58:47 UTC (rev 116544)
@@ -565,7 +565,14 @@
// of matches found during the scoping effort.
virtual void resetMatchCount() = 0;
+ // OrientationChange event ---------------------------------------------
+ // Orientation is the interface orientation in degrees.
+ // Some examples are:
+ // 0 is straight up; -90 is when the device is rotated 90 clockwise;
+ // 90 is when rotated counter clockwise.
+ virtual void sendOrientationChangeEvent(int orientation) = 0;
+
// Events --------------------------------------------------------------
// These functions all work on the WebFrame's DOMWindow. Keep in mind
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (116543 => 116544)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-05-09 17:57:50 UTC (rev 116543)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2012-05-09 17:58:47 UTC (rev 116544)
@@ -1865,6 +1865,14 @@
{
}
+void WebFrameImpl::sendOrientationChangeEvent(int orientation)
+{
+#if ENABLE(ORIENTATION_EVENTS)
+ if (m_frame)
+ m_frame->sendOrientationChangeEvent(orientation);
+#endif
+}
+
void WebFrameImpl::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
DOMWindow* window = m_frame->domWindow();
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.h (116543 => 116544)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.h 2012-05-09 17:57:50 UTC (rev 116543)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.h 2012-05-09 17:58:47 UTC (rev 116544)
@@ -208,6 +208,8 @@
virtual void handleIntentResult(int, const WebString&);
virtual void handleIntentFailure(int, const WebString&);
+ virtual void sendOrientationChangeEvent(int orientation);
+
virtual void addEventListener(const WebString& eventType,
WebDOMEventListener*, bool useCapture);
virtual void removeEventListener(const WebString& eventType,
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes