Title: [131326] trunk/Source/WebKit/blackberry
- Revision
- 131326
- Author
- commit-qu...@webkit.org
- Date
- 2012-10-15 11:33:37 -0700 (Mon, 15 Oct 2012)
Log Message
[BlackBerry] [DRT] Skip region of interest zooming when running DRT
https://bugs.webkit.org/show_bug.cgi?id=97663
Patch by Xiaobo Wang <xbw...@torchmobile.com.cn> on 2012-10-15
Reviewed by Rob Buis.
This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and
1. Add a global function isRunningDrt to check if we're currently running DRT.
2. Use the new function in places where getenv("drtRun") is used.
* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::isRunningDrt):
(WebKit):
* Api/BlackBerryGlobal.h:
(WebKit):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
* WebKitSupport/DumpRenderTreeSupport.cpp:
(toGeolocationClientMock):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
Modified Paths
Diff
Modified: trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp (131325 => 131326)
--- trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp 2012-10-15 18:26:18 UTC (rev 131325)
+++ trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp 2012-10-15 18:33:37 UTC (rev 131326)
@@ -149,5 +149,14 @@
networkStateNotifier().networkStateChange(online);
}
+bool isRunningDrt()
+{
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
+ return getenv("drtRun");
+#else
+ return false;
+#endif
}
+
}
+}
Modified: trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.h (131325 => 131326)
--- trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.h 2012-10-15 18:26:18 UTC (rev 131325)
+++ trunk/Source/WebKit/blackberry/Api/BlackBerryGlobal.h 2012-10-15 18:33:37 UTC (rev 131326)
@@ -20,9 +20,9 @@
#define BlackBerryGlobal_h
#if defined(__QNXNTO__) && defined(BUILD_WEBKIT)
- #define BLACKBERRY_EXPORT __attribute__ ((visibility("default")))
+#define BLACKBERRY_EXPORT __attribute__ ((visibility("default")))
#else
- #define BLACKBERRY_EXPORT
+#define BLACKBERRY_EXPORT
#endif
namespace BlackBerry {
@@ -43,6 +43,7 @@
void reopenAllTrackerDatabases();
void closeAllTrackerDatabases();
void updateOnlineStatus(bool online);
+bool isRunningDrt();
}
}
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (131325 => 131326)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-10-15 18:26:18 UTC (rev 131325)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-10-15 18:33:37 UTC (rev 131326)
@@ -537,7 +537,7 @@
m_page = new Page(pageClients);
#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
- if (getenv("drtRun")) {
+ if (isRunningDrt()) {
// In case running in DumpRenderTree mode set the controller to mock provider.
GeolocationClientMock* mock = new GeolocationClientMock();
WebCore::provideGeolocationTo(m_page, mock);
Modified: trunk/Source/WebKit/blackberry/ChangeLog (131325 => 131326)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-10-15 18:26:18 UTC (rev 131325)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-10-15 18:33:37 UTC (rev 131326)
@@ -1,3 +1,26 @@
+2012-10-15 Xiaobo Wang <xbw...@torchmobile.com.cn>
+
+ [BlackBerry] [DRT] Skip region of interest zooming when running DRT
+ https://bugs.webkit.org/show_bug.cgi?id=97663
+
+ Reviewed by Rob Buis.
+
+ This patch fixes test fast/forms/textarea-scrolled-endline-caret.html, and
+ 1. Add a global function isRunningDrt to check if we're currently running DRT.
+ 2. Use the new function in places where getenv("drtRun") is used.
+
+ * Api/BlackBerryGlobal.cpp:
+ (BlackBerry::WebKit::isRunningDrt):
+ (WebKit):
+ * Api/BlackBerryGlobal.h:
+ (WebKit):
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * WebKitSupport/DumpRenderTreeSupport.cpp:
+ (toGeolocationClientMock):
+ * WebKitSupport/InputHandler.cpp:
+ (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+
2012-10-15 George Staikos <stai...@webkit.org>
[BlackBerry] Adapt to Platform API changes in string handling
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp (131325 => 131326)
--- trunk/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp 2012-10-15 18:26:18 UTC (rev 131325)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp 2012-10-15 18:33:37 UTC (rev 131326)
@@ -45,8 +45,8 @@
GeolocationClientMock* toGeolocationClientMock(GeolocationClient* client)
{
- ASSERT(getenv("drtRun"));
- return static_cast<GeolocationClientMock*>(client);
+ ASSERT(isRunningDrt());
+ return static_cast<GeolocationClientMock*>(client);
}
DumpRenderTreeSupport::DumpRenderTreeSupport()
Modified: trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp (131325 => 131326)
--- trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-10-15 18:26:18 UTC (rev 131325)
+++ trunk/Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp 2012-10-15 18:33:37 UTC (rev 131326)
@@ -1079,7 +1079,7 @@
// The minimum size being defined as 3 mm is a good value based on my observations.
static const int s_minimumTextHeightInPixels = Graphics::Screen::primaryScreen()->heightInMMToPixels(3);
- if (fontHeight && fontHeight * m_webPage->currentScale() < s_minimumTextHeightInPixels) {
+ if (fontHeight && fontHeight * m_webPage->currentScale() < s_minimumTextHeightInPixels && !isRunningDrt()) {
if (!m_focusZoomScale) {
m_focusZoomScale = m_webPage->currentScale();
m_focusZoomLocation = selectionFocusRect.location();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes