[Chromium] Set Result Before Early Exit for Fixed Layout Methods in LayoutTestController
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2011 09:27:08 +0000 (09:27 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Nov 2011 09:27:08 +0000 (09:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=73328

Reviewed by Kent Tamura.

* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::enableFixedLayoutMode):
(LayoutTestController::setFixedLayoutSize):

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

Tools/ChangeLog
Tools/DumpRenderTree/chromium/LayoutTestController.cpp

index 077e774..1c76920 100644 (file)
@@ -1,3 +1,14 @@
+2011-11-30  Fady Samuel  <fsamuel@chromium.org>
+
+        [Chromium] Set Result Before Early Exit for Fixed Layout Methods in LayoutTestController
+        https://bugs.webkit.org/show_bug.cgi?id=73328
+
+        Reviewed by Kent Tamura.
+
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::enableFixedLayoutMode):
+        (LayoutTestController::setFixedLayoutSize):
+
 2011-11-29  Hayato Ito  <hayato@chromium.org>
 
         Skip writing the result of diff_image since non-chromium ports don't implement diff_image.
index 3181a52..ab56262 100644 (file)
@@ -2022,21 +2022,21 @@ void LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload(const Cp
 
 void LayoutTestController::enableFixedLayoutMode(const CppArgumentList& arguments, CppVariant* result)
 {
+    result->setNull();
     if (arguments.size() <  1 || !arguments[0].isBool())
         return;
     bool enableFixedLayout = arguments[0].toBoolean();
     m_shell->webView()->enableFixedLayoutMode(enableFixedLayout);
-    result->setNull();
 }
 
 void LayoutTestController::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant* result)
 {
+    result->setNull();
     if (arguments.size() <  2 || !arguments[0].isNumber() || !arguments[1].isNumber())
         return;
     int width = arguments[0].toInt32();
     int height = arguments[1].toInt32();
     m_shell->webView()->setFixedLayoutSize(WebSize(width, height));
-    result->setNull();
 }
 
 void LayoutTestController::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result)