[BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 03:38:29 +0000 (03:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Jul 2012 03:38:29 +0000 (03:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90271

Patch by Xiaobo Wang <xbwang@torchmobile.com.cn> on 2012-07-02
Reviewed by George Staikos.

RIM PR #154707

Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
defined by default.
We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
need to rebuild webkit before running DRT.

.:

* Source/cmake/OptionsBlackBerry.cmake:
* Source/cmakeconfig.h.cmake:

Source/WebKit:

* PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::init):
(BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
(BlackBerry::WebKit::WebPage::runLayoutTests):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::addMessageToConsole):
(WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
(WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
(WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
(WebCore::ChromeClientBlackBerry::createWindow):
(WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
(WebCore::ChromeClientBlackBerry::setStatusbarText):
(WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
(WebCore::ChromeClientBlackBerry::keyboardUIMode):

Tools:

* Scripts/webkitdirs.pm:
(blackberryCMakeArguments):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121725 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebKit/ChangeLog
Source/WebKit/PlatformBlackBerry.cmake
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
Source/cmake/OptionsBlackBerry.cmake
Source/cmakeconfig.h.cmake
Tools/ChangeLog
Tools/Scripts/webkitdirs.pm

index 861a9cd..08ae1cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
+
+        [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
+        https://bugs.webkit.org/show_bug.cgi?id=90271
+
+        Reviewed by George Staikos.
+
+        RIM PR #154707
+
+        Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
+        defined by default.
+        We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
+        need to rebuild webkit before running DRT.
+
+        * Source/cmake/OptionsBlackBerry.cmake:
+        * Source/cmakeconfig.h.cmake:
+
 2012-07-02  Thiago Marcos P. Santos  <thiago.santos@intel.com>
 
         [EFL][CMake] Integrate API unit tests with CTest
index d570e20..29798c0 100644 (file)
@@ -1,3 +1,19 @@
+2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
+
+        [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
+        https://bugs.webkit.org/show_bug.cgi?id=90271
+
+        Reviewed by George Staikos.
+
+        RIM PR #154707
+
+        Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
+        defined by default.
+        We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
+        need to rebuild webkit before running DRT.
+
+        * PlatformBlackBerry.cmake:
+
 2012-07-02  Thiago Marcos P. Santos  <thiago.santos@intel.com>
 
         [EFL][CMake] Integrate API unit tests with CTest
index be2a948..fa61b8b 100644 (file)
@@ -24,7 +24,7 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/blackberry/WebKitSupport"
     "${CMAKE_SOURCE_DIR}/Source" # For JavaScriptCore API headers
 )
-IF (ENABLE_DRT)
+IF (NOT PUBLIC_BUILD)
     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
         # needed for DRT for now
         "${JAVASCRIPTCORE_DIR}/wtf"
@@ -107,7 +107,6 @@ LIST(APPEND WebKit_SOURCES
     blackberry/WebKitSupport/FatFingers.cpp
 )
 
-
 IF (ENABLE_WEBGL)
     LIST(APPEND WebKit_INCLUDE_DIRECTORIES
         ${OPENGL_INCLUDE_DIR}
@@ -119,7 +118,7 @@ IF (ENABLE_WEBGL)
     )
 ENDIF (ENABLE_WEBGL)
 
-IF (ENABLE_DRT)
+IF (NOT PUBLIC_BUILD)
     # DumpRenderTree sources
     LIST(APPEND WebKit_SOURCES
         blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
@@ -204,7 +203,7 @@ FILE(GLOB BBWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/blackberry/Api/*.h")
 
 INSTALL(FILES ${BBWebKit_HEADERS} DESTINATION usr/include/browser/webkit)
 
-IF (ENABLE_DRT)
+IF (NOT PUBLIC_BUILD)
     INSTALL(FILES ${TOOLS_DIR}/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
             DESTINATION usr/include/browser/webkit)
 ENDIF ()
index e7f1cc9..2476f55 100644 (file)
 #include "DragClientBlackBerry.h"
 // FIXME: We should be using DumpRenderTreeClient, but I'm not sure where we should
 // create the DRT_BB object. See PR #120355.
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
 #include "DumpRenderTreeBlackBerry.h"
 #endif
 #include "EditorClientBlackBerry.h"
 #include "FocusController.h"
 #include "FrameLoaderClientBlackBerry.h"
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
 #include "GeolocationClientMock.h"
 #endif
 #include "GeolocationControllerClientBlackBerry.h"
@@ -453,7 +453,7 @@ WebPagePrivate::~WebPagePrivate()
     delete m_touchEventHandler;
     m_touchEventHandler = 0;
 
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     delete m_dumpRenderTree;
     m_dumpRenderTree = 0;
 #endif
@@ -502,7 +502,7 @@ void WebPagePrivate::init(const WebString& pageGroupName)
     pageClients.inspectorClient = inspectorClient;
 
     m_page = new Page(pageClients);
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (getenv("drtRun")) {
         // In case running in DumpRenderTree mode set the controller to mock provider.
         GeolocationClientMock* mock = new GeolocationClientMock();
@@ -2225,7 +2225,7 @@ bool WebPagePrivate::authenticationChallenge(const KURL& url, const ProtectionSp
     WebString username;
     WebString password;
 
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_dumpRenderTree)
         return m_dumpRenderTree->didReceiveAuthenticationChallenge(inputCredential);
 #endif
@@ -5167,7 +5167,7 @@ bool WebPage::findNextString(const char* text, bool forward, bool caseSensitive,
 
 void WebPage::runLayoutTests()
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     // FIXME: do we need API to toggle this?
     d->m_page->settings()->setDeveloperExtrasEnabled(true);
 
index 361b195..b250486 100644 (file)
@@ -1,3 +1,33 @@
+2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
+
+        [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
+        https://bugs.webkit.org/show_bug.cgi?id=90271
+
+        Reviewed by George Staikos.
+
+        RIM PR #154707
+
+        Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
+        defined by default.
+        We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
+        need to rebuild webkit before running DRT.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
+        (BlackBerry::WebKit::WebPagePrivate::init):
+        (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+        (BlackBerry::WebKit::WebPage::runLayoutTests):
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::addMessageToConsole):
+        (WebCore::ChromeClientBlackBerry::runJavaScriptAlert):
+        (WebCore::ChromeClientBlackBerry::runJavaScriptConfirm):
+        (WebCore::ChromeClientBlackBerry::runJavaScriptPrompt):
+        (WebCore::ChromeClientBlackBerry::createWindow):
+        (WebCore::ChromeClientBlackBerry::runBeforeUnloadConfirmPanel):
+        (WebCore::ChromeClientBlackBerry::setStatusbarText):
+        (WebCore::ChromeClientBlackBerry::exceededDatabaseQuota):
+        (WebCore::ChromeClientBlackBerry::keyboardUIMode):
+
 2012-07-02  George Staikos  <staikos@webkit.org>
 
         [BlackBerry] Implement cancelVibration, and make sure it's canceled on
index 4d2024b..6f197c8 100644 (file)
@@ -93,7 +93,7 @@ ChromeClientBlackBerry::ChromeClientBlackBerry(WebPagePrivate* pagePrivate)
 
 void ChromeClientBlackBerry::addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned int lineNumber, const String& sourceID)
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree)
         m_webPagePrivate->m_dumpRenderTree->addMessageToConsole(message, lineNumber, sourceID);
 #endif
@@ -103,7 +103,7 @@ void ChromeClientBlackBerry::addMessageToConsole(MessageSource, MessageType, Mes
 
 void ChromeClientBlackBerry::runJavaScriptAlert(Frame* frame, const String& message)
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree) {
         m_webPagePrivate->m_dumpRenderTree->runJavaScriptAlert(message);
         return;
@@ -117,7 +117,7 @@ void ChromeClientBlackBerry::runJavaScriptAlert(Frame* frame, const String& mess
 
 bool ChromeClientBlackBerry::runJavaScriptConfirm(Frame* frame, const String& message)
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree)
         return m_webPagePrivate->m_dumpRenderTree->runJavaScriptConfirm(message);
 #endif
@@ -129,7 +129,7 @@ bool ChromeClientBlackBerry::runJavaScriptConfirm(Frame* frame, const String& me
 
 bool ChromeClientBlackBerry::runJavaScriptPrompt(Frame* frame, const String& message, const String& defaultValue, String& result)
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree) {
         result = m_webPagePrivate->m_dumpRenderTree->runJavaScriptPrompt(message, defaultValue);
         return true;
@@ -217,7 +217,7 @@ bool ChromeClientBlackBerry::shouldForceDocumentStyleSelectorUpdate()
 
 Page* ChromeClientBlackBerry::createWindow(Frame*, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction&)
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree && !m_webPagePrivate->m_dumpRenderTree->allowsOpeningWindow())
         return 0;
 #endif
@@ -252,7 +252,7 @@ Page* ChromeClientBlackBerry::createWindow(Frame*, const FrameLoadRequest& reque
     if (!webPage)
         return 0;
 
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree)
         m_webPagePrivate->m_dumpRenderTree->windowCreated(webPage);
 #endif
@@ -380,7 +380,7 @@ bool ChromeClientBlackBerry::canRunBeforeUnloadConfirmPanel()
 
 bool ChromeClientBlackBerry::runBeforeUnloadConfirmPanel(const String& message, Frame*)
 {
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree)
         return m_webPagePrivate->m_dumpRenderTree->runBeforeUnloadConfirmPanel(message);
 #endif
@@ -398,7 +398,7 @@ void ChromeClientBlackBerry::setStatusbarText(const String& status)
 {
     m_webPagePrivate->m_client->setStatus(status);
 
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree)
         m_webPagePrivate->m_dumpRenderTree->setStatusText(status);
 #endif
@@ -478,7 +478,7 @@ void ChromeClientBlackBerry::exceededDatabaseQuota(Frame* frame, const String& n
 
     SecurityOrigin* origin = document->securityOrigin();
 
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree) {
         m_webPagePrivate->m_dumpRenderTree->exceededDatabaseQuota(origin, name);
         return;
@@ -628,7 +628,7 @@ KeyboardUIMode ChromeClientBlackBerry::keyboardUIMode()
 {
     bool tabsToLinks = true;
 
-#if ENABLE_DRT
+#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
     if (m_webPagePrivate->m_dumpRenderTree)
         tabsToLinks = DumpRenderTreeSupport::linksIncludedInFocusChain();
 #endif
index a04ac31..fa702a8 100644 (file)
@@ -37,7 +37,10 @@ IF (ADDITIONAL_SYSTEM_INCLUDE_PATH)
     ENDIF ()
 ENDIF ()
 
-IF (ENABLE_DRT)
+IF (PUBLIC_BUILD)
+    ADD_DEFINITIONS(-DPUBLIC_BUILD=1)
+    message("*** PUBLIC BUILD ***")
+ELSE (PUBLIC_BUILD)
     message("*** DRT is ENABLED ***")
 ENDIF ()
 
index 933c0cc..b857435 100644 (file)
@@ -25,7 +25,6 @@
 #cmakedefine01 ENABLE_DEVICE_ORIENTATION
 #cmakedefine01 ENABLE_DOWNLOAD_ATTRIBUTE
 #cmakedefine01 ENABLE_DRAG_SUPPORT
-#cmakedefine01 ENABLE_DRT
 #cmakedefine01 ENABLE_EVENT_MODE_METATAGS
 #cmakedefine01 ENABLE_FAST_MOBILE_SCROLLING
 #cmakedefine01 ENABLE_FILE_SYSTEM
index a66e617..bc67298 100644 (file)
@@ -1,3 +1,20 @@
+2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
+
+        [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
+        https://bugs.webkit.org/show_bug.cgi?id=90271
+
+        Reviewed by George Staikos.
+
+        RIM PR #154707
+
+        Currently DRT code will be compiled only if ENABLE_DRT is set, and it's not
+        defined by default.
+        We should enable DRT by default unless PUBLIC_BUILD is set. In this way we don't
+        need to rebuild webkit before running DRT.
+
+        * Scripts/webkitdirs.pm:
+        (blackberryCMakeArguments):
+
 2012-07-02  Ojan Vafai  <ojan@chromium.org>
 
         webkit-patch rebaseline-expectations should share code with rebaseline-all
index 456a999..c1fb8ee 100755 (executable)
@@ -979,7 +979,7 @@ sub blackberryCMakeArguments()
     }
 
     push @cmakeExtraOptions, "-DCMAKE_SKIP_RPATH='ON'" if isDarwin();
-    push @cmakeExtraOptions, "-DENABLE_DRT=1" if $ENV{"ENABLE_DRT"};
+    push @cmakeExtraOptions, "-DPUBLIC_BUILD=1" if $ENV{"PUBLIC_BUILD"};
     push @cmakeExtraOptions, "-DENABLE_GLES2=1" unless $ENV{"DISABLE_GLES2"};
 
     my @includeSystemDirectories;