[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

hamaji at chromium.org hamaji at chromium.org
Fri Feb 26 22:24:02 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit bd374876a09cc281130c2fc0ae31e7a510350c0d
Author: hamaji at chromium.org <hamaji at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Feb 18 08:17:39 2010 +0000

    2010-02-16  Chris Jerdonek  <cjerdonek at webkit.org>
    
            Reviewed by Shinichiro Hamaji.
    
            Refactored check-webkit-style's ProcessorOptions class into two
            classes. This revision contains no new functionality.
    
            https://bugs.webkit.org/show_bug.cgi?id=34674
    
            Divided the ProcessorOptions class into a CommandOptionValues
            class (the result of parsing the command-line options) and
            a StyleCheckerConfiguration class (which configures the main
            StyleChecker).
    
            * Scripts/check-webkit-style:
              - Updated main() to convert the parsed command option values
                to a StyleCheckConfiguration instance prior to constructing
                a StyleChecker.
    
            * Scripts/webkitpy/style/checker.py:
              - Added check_webkit_style_configuration() to convert a
                CommandOptionValues instance into a StyleCheckerConfiguration
                instance.
              - Renamed the ProcessorOptions class to CommandOptionValues.
              - In the CommandOptionValues class--
                - Replaced the filter_configuration attribute with the
                  simpler filter_rules attribute.
                - Removed the max_reports_per_error attribute.
                - Moved the is_reportable() method to the new
                  StyleCheckerConfiguration class.
              - Removed the base_filter_rules attribute from the
                DefaultCommandOptionValues class.
              - In the ArgumentParser class--
                - Added base_filter_rules to the constructor.
                - Changed the parse() method to return a CommandOptionValues
                  instance instead of a ProcessorOptions instance.
              - Created a StyleCheckerConfiguration class.
                - Added the data attributes max_reports_per_category,
                  stderr_write, and verbosity.
                - Added is_reportable() (moved from the ProcessorOptions
                  class) and write_style_error() (moved from the
                  DefaultStyleErrorHandler class).
              - In the StyleChecker class--
                - Replaced the ProcessorOptions options attribute with the
                  StyleCheckerConfiguration _configuration attribute.
                - Removed the _stderr_write attribute.
    
            * Scripts/webkitpy/style/checker_unittest.py:
              - Updated the existing unit test classes as necessary.
              - Added a StyleCheckerConfigurationTest class.
    
            * Scripts/webkitpy/style/error_handlers.py:
              - Updated the DefaultStyleErrorHandler class to accept a
                StyleCheckerConfiguration instance instead of a ProcessorOptions
                instance and an stderr_write method.
    
            * Scripts/webkitpy/style/error_handlers_unittest.py:
              - Updated the unit test classes as necessary.
    
            * Scripts/webkitpy/style/filter.py:
              - Addressed the FIXME in the FilterConfiguration class to change
                the user_rules attribute to _user_rules (since it is now
                accessed only internally).
    
            * Scripts/webkitpy/style/filter_unittest.py:
              - Updated to reflect the change from user_rules to _user_rules.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54942 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 54be5ab..f008433 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -69,6 +69,27 @@
 
         Reviewed by Eric Seidel.
 
+        Share the DRT values maxViewWidth/Height among ports
+        https://bugs.webkit.org/show_bug.cgi?id=34474
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (pageNumberForElementByIdCallback):
+        * DumpRenderTree/LayoutTestController.h:
+        (LayoutTestController::maxViewWidth):
+        (LayoutTestController::maxViewHeight):
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (runTest):
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (createWebViewAndOffscreenWindow):
+        (sizeWebViewForCurrentTest):
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (dump):
+        (createWebViewAndOffscreenWindow):
+
+2010-02-17  Shinichiro Hamaji  <hamaji at chromium.org>
+
+        Reviewed by Eric Seidel.
+
         [Win] Implement test functions for printing
         https://bugs.webkit.org/show_bug.cgi?id=34570
 
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index 2185ede..b76a92c 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -467,10 +467,8 @@ static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function,
 
 static bool parsePageParameters(JSContextRef context, int argumentCount, const JSValueRef* arguments, JSValueRef* exception, float& pageWidthInPixels, float& pageHeightInPixels)
 {
-    // FIXME: These values should sync with maxViewWidth/Height in
-    //        DumpRenderTree.mm. Factor these values out to somewhere.
-    pageWidthInPixels = 800;
-    pageHeightInPixels = 600;
+    pageWidthInPixels = LayoutTestController::maxViewWidth;
+    pageHeightInPixels = LayoutTestController::maxViewHeight;
     switch (argumentCount) {
     case 2:
         pageWidthInPixels = static_cast<float>(JSValueToNumber(context, arguments[0], exception));
@@ -1505,3 +1503,6 @@ void LayoutTestController::setPOSIXLocale(JSStringRef locale)
     JSStringGetUTF8CString(locale, localeBuf, sizeof(localeBuf));
     setlocale(LC_ALL, localeBuf);
 }
+
+const unsigned LayoutTestController::maxViewWidth = 800;
+const unsigned LayoutTestController::maxViewHeight = 600;
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 286d3c9..da41173 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -234,6 +234,9 @@ public:
 
     void setPOSIXLocale(JSStringRef locale);
 
+    static const unsigned maxViewWidth;
+    static const unsigned maxViewHeight;
+
 private:
     bool m_dumpAsPDF;
     bool m_dumpAsText;
diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
index 81734ee..a2fc79b 100644
--- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -94,8 +94,6 @@ GSList* webViewList = 0;
 // current b/f item at the end of the previous test
 static WebKitWebHistoryItem* prevTestBFItem = NULL;
 
-const unsigned maxViewHeight = 600;
-const unsigned maxViewWidth = 800;
 const unsigned historyItemIndent = 8;
 
 static gchar* autocorrectURL(const gchar* url)
@@ -479,8 +477,8 @@ static void runTest(const string& testPathOrURL)
     bool isSVGW3CTest = (gLayoutTestController->testPathOrURL().find("svg/W3C-SVG-1.1") != string::npos);
     GtkAllocation size;
     size.x = size.y = 0;
-    size.width = isSVGW3CTest ? 480 : maxViewWidth;
-    size.height = isSVGW3CTest ? 360 : maxViewHeight;
+    size.width = isSVGW3CTest ? 480 : LayoutTestController::maxViewWidth;
+    size.height = isSVGW3CTest ? 360 : LayoutTestController::maxViewHeight;
     gtk_window_resize(GTK_WINDOW(window), size.width, size.height);
     gtk_widget_size_allocate(container, &size);
 
diff --git a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
index 863565d..c7ddf21 100644
--- a/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -134,9 +134,6 @@ static RetainPtr<CFStringRef> persistentUserStyleSheetLocation;
 
 static WebHistoryItem *prevTestBFItem = nil;  // current b/f item at the end of the previous test
 
-const unsigned maxViewHeight = 600;
-const unsigned maxViewWidth = 800;
-
 #if __OBJC2__
 static void swizzleAllMethods(Class imposter, Class original)
 {
@@ -279,7 +276,7 @@ static void activateFonts()
 
 WebView *createWebViewAndOffscreenWindow()
 {
-    NSRect rect = NSMakeRect(0, 0, maxViewWidth, maxViewHeight);
+    NSRect rect = NSMakeRect(0, 0, LayoutTestController::maxViewWidth, LayoutTestController::maxViewHeight);
     WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"];
         
     [webView setUIDelegate:uiDelegate];
@@ -1021,7 +1018,7 @@ static void sizeWebViewForCurrentTest()
     if (isSVGW3CTest)
         [[mainFrame webView] setFrameSize:NSMakeSize(480, 360)];
     else
-        [[mainFrame webView] setFrameSize:NSMakeSize(maxViewWidth, maxViewHeight)];
+        [[mainFrame webView] setFrameSize:NSMakeSize(LayoutTestController::maxViewWidth, LayoutTestController::maxViewHeight)];
 }
 
 static const char *methodNameStringForFailedTest()
diff --git a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
index b793494..ddfca95 100644
--- a/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -107,9 +107,6 @@ LayoutTestController* gLayoutTestController = 0;
 
 UINT_PTR waitToDumpWatchdog = 0;
 
-const unsigned maxViewWidth = 800;
-const unsigned maxViewHeight = 600;
-
 void setPersistentUserStyleSheetLocation(CFStringRef url)
 {
     persistentUserStyleSheetLocation = url;
@@ -667,8 +664,8 @@ void dump()
                 width = 480;
                 height = 360;
             } else {
-                width = maxViewWidth;
-                height = maxViewHeight;
+                width = LayoutTestController::maxViewWidth;
+                height = LayoutTestController::maxViewHeight;
             }
 
             ::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
@@ -1098,6 +1095,8 @@ WindowToWebViewMap& windowToWebViewMap()
 
 IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
 {
+    unsigned maxViewWidth = LayoutTestController::maxViewWidth;
+    unsigned maxViewHeight = LayoutTestController::maxViewHeight;
     HWND hostWindow = CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP,
       -maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, GetModuleHandle(0), 0);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list