From 4b81185780aaef7695b652ceb7770e2307867c59 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Wed, 2 Dec 2009 08:32:13 -0500 Subject: Enable orientation events. Remove our old orientation hacks as webkit now supports the orientation event. Call down into webkit when the orientation changes to send the js event. The change to Frame.cpp has been submited to bugs.webkit.org as issue 32321. --- WebCore/platform/android/ScreenAndroid.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'WebCore/platform/android') diff --git a/WebCore/platform/android/ScreenAndroid.cpp b/WebCore/platform/android/ScreenAndroid.cpp index 881c246..ad6e008 100644 --- a/WebCore/platform/android/ScreenAndroid.cpp +++ b/WebCore/platform/android/ScreenAndroid.cpp @@ -60,32 +60,6 @@ bool screenIsMonochrome(Widget* page) return false; } -#ifdef ANDROID_ORIENTATION_SUPPORT -int Screen::orientation() const -{ - android::DisplayInfo info; - android::SurfaceComposerClient::getDisplayInfo( - android::DisplayID(0), &info); - // getDisplayInfo returns an enum describing the orientation. Map the enum - // to the values described here - // (http://developer.apple.com/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/chapter_8_section_6.html) - switch (info.orientation) { - case android::ISurfaceComposer::eOrientationDefault: - return 0; - case android::ISurfaceComposer::eOrientation90: - return 90; - case android::ISurfaceComposer::eOrientation180: - return 180; - case android::ISurfaceComposer::eOrientation270: - return -90; - default: - LOGE("Bad orientation returned from getDisplayIndo %d", - info.orientation); - return 0; - } -} -#endif - // The only place I have seen these values used is // positioning popup windows. If we support multiple windows // they will be most likely full screen. Therefore, -- cgit v1.1