- Revision
- 121158
- Author
- [email protected]
- Date
- 2012-06-25 08:27:54 -0700 (Mon, 25 Jun 2012)
Log Message
[BlackBerry] Use AIR controls if client doesn't support HTML control
https://bugs.webkit.org/show_bug.cgi?id=89777
Patch by Crystal Zhang <[email protected]> on 2012-06-25
Reviewed by Yong Li.
Currently HTML controls depend on client implementing CreateWindow event, for those clients
that don't implement CreateWindow event, use old AIR controls so we don't break them.
PR 163818.
Internal reviewed by Mike Fenton.
* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::openPagePopup):
* WebCoreSupport/PagePopupBlackBerry.cpp:
(WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
* WebCoreSupport/PagePopupBlackBerry.h:
(PagePopupBlackBerry):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::openSelectPopup):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/WebPageClient.h (121157 => 121158)
--- trunk/Source/WebKit/blackberry/Api/WebPageClient.h 2012-06-25 15:14:41 UTC (rev 121157)
+++ trunk/Source/WebKit/blackberry/Api/WebPageClient.h 2012-06-25 15:27:54 UTC (rev 121158)
@@ -160,6 +160,7 @@
virtual void resetBackForwardList(unsigned listSize, unsigned currentIndex) = 0;
+ virtual void openPopupList(bool multiple, int size, const ScopeArray<WebString>& labels, const bool* enableds, const int* itemType, const bool* selecteds) = 0;
virtual void openDateTimePopup(int type, const WebString& value, const WebString& min, const WebString& max, double step) = 0;
virtual void openColorPopup(const WebString& value) = 0;
@@ -251,7 +252,7 @@
virtual void clearCache() = 0;
virtual bool hasKeyboardFocus() = 0;
- virtual void createPopupWebView(const Platform::IntRect& webViewRect) = 0;
+ virtual bool createPopupWebView(const Platform::IntRect&) = 0;
virtual void closePopupWebView() = 0;
};
} // namespace WebKit
Modified: trunk/Source/WebKit/blackberry/ChangeLog (121157 => 121158)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-06-25 15:14:41 UTC (rev 121157)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-06-25 15:27:54 UTC (rev 121158)
@@ -1,3 +1,27 @@
+2012-06-25 Crystal Zhang <[email protected]>
+
+ [BlackBerry] Use AIR controls if client doesn't support HTML control
+ https://bugs.webkit.org/show_bug.cgi?id=89777
+
+ Reviewed by Yong Li.
+
+ Currently HTML controls depend on client implementing CreateWindow event, for those clients
+ that don't implement CreateWindow event, use old AIR controls so we don't break them.
+
+ PR 163818.
+
+ Internal reviewed by Mike Fenton.
+
+ * Api/WebPageClient.h:
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ (WebCore::ChromeClientBlackBerry::openPagePopup):
+ * WebCoreSupport/PagePopupBlackBerry.cpp:
+ (WebCore::PagePopupBlackBerry::sendCreatePopupWebViewRequest):
+ * WebCoreSupport/PagePopupBlackBerry.h:
+ (PagePopupBlackBerry):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::openSelectPopup):
+
2012-06-25 Rob Buis <[email protected]>
[BlackBerry] Require text editable element to be enabled for VKB
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (121157 => 121158)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-06-25 15:14:41 UTC (rev 121157)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-06-25 15:27:54 UTC (rev 121158)
@@ -307,8 +307,11 @@
PagePopupBlackBerry* webPopup = new PagePopupBlackBerry(m_webPagePrivate, client, rootViewToScreen(originBoundsInRootView));
m_webPagePrivate->m_webPage->popupOpened(webPopup);
- webPopup->sendCreatePopupWebViewRequest();
- return webPopup;
+ if (webPopup->sendCreatePopupWebViewRequest())
+ return webPopup;
+
+ closePagePopup(0);
+ return 0;
}
void ChromeClientBlackBerry::closePagePopup(PagePopup*)
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.cpp (121157 => 121158)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.cpp 2012-06-25 15:14:41 UTC (rev 121157)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.cpp 2012-06-25 15:27:54 UTC (rev 121158)
@@ -56,9 +56,9 @@
{
}
-void PagePopupBlackBerry::sendCreatePopupWebViewRequest()
+bool PagePopupBlackBerry::sendCreatePopupWebViewRequest()
{
- m_webPagePrivate->client()->createPopupWebView(m_rect);
+ return m_webPagePrivate->client()->createPopupWebView(m_rect);
}
bool PagePopupBlackBerry::init(WebPage* webpage)
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.h (121157 => 121158)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.h 2012-06-25 15:14:41 UTC (rev 121157)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.h 2012-06-25 15:27:54 UTC (rev 121158)
@@ -41,7 +41,7 @@
PagePopupBlackBerry(BlackBerry::WebKit::WebPagePrivate*, PagePopupClient*, const IntRect&);
~PagePopupBlackBerry();
- void sendCreatePopupWebViewRequest();
+ bool sendCreatePopupWebViewRequest();
bool init(BlackBerry::WebKit::WebPage*);
void closePopup();
void installDomFunction(Frame*);
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (121157 => 121158)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-06-25 15:14:41 UTC (rev 121157)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-06-25 15:27:54 UTC (rev 121158)
@@ -1174,8 +1174,10 @@
}
SelectPopupClient* selectClient = new SelectPopupClient(multiple, size, labels, enableds, itemTypes, selecteds, m_webPage, select);
- WebCore::IntRect elementRectInRootView = select->document()->view()->contentsToRootView(select->getRect());
- m_webPage->m_page->chrome()->client()->openPagePopup(selectClient, elementRectInRootView);
+ WebCore::IntRect elementRectInRootView = select->document()->view()->contentsToRootView(enclosingIntRect(select->getRect()));
+ // Fail to create HTML popup, use the old path
+ if (!m_webPage->m_page->chrome()->client()->openPagePopup(selectClient, elementRectInRootView))
+ m_webPage->m_client->openPopupList(multiple, size, labels, enableds, itemTypes, selecteds);
return true;
}