Fix some compiler warnings (miscellaneous)
authorzhajiang@rim.com <zhajiang@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2013 21:28:14 +0000 (21:28 +0000)
committerzhajiang@rim.com <zhajiang@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2013 21:28:14 +0000 (21:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=80790

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-05-10.
Reviewed by Rob Buis.

Source/WebKit/blackberry:

Fix the following warnings for BlackBerry:
BackingStore.cpp:852:60: warning: suggest parentheses around '&&' within
'||' [-Wparentheses].
WebPage.cpp:2858:40: warning: suggest parentheses around assignment used
as truth value [-Wparentheses].
WebPage.cpp:2880:42: warning: suggest parentheses around assignment used
as truth value [-Wparentheses]

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::adjustRectOffsetForFrameOffset):
(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):

Tools:

Fix the following warnings for BlackBerry:
DumpRenderTree.cpp:357:42: warning: suggest parentheses around assignment
used as truth value [-Wparentheses].

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):

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

Source/WebKit/blackberry/Api/BackingStore.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Tools/ChangeLog
Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp

index 4065ac1..6f616cc 100644 (file)
@@ -848,8 +848,8 @@ void BackingStorePrivate::updateTilesAfterBackingStoreRectChange()
                     tileNotRenderedRegion.extents().toString().c_str());
 #endif
             } else {
-                if (!tileBuffer || !tileBuffer->isRendered(tileVisibleContentsRect(index, geometry), geometry->scale())
-                    && !isCurrentVisibleJob(index, geometry))
+                if (!tileBuffer || (!tileBuffer->isRendered(tileVisibleContentsRect(index, geometry), geometry->scale())
+                    && !isCurrentVisibleJob(index, geometry)))
                     updateTile(tileOrigin, false /*immediate*/);
             }
         } else if (rect.intersects(expandedContentsRect()))
index db52b7a..a400f15 100644 (file)
@@ -2815,7 +2815,7 @@ IntRect WebPagePrivate::adjustRectOffsetForFrameOffset(const IntRect& rect, cons
             } while (iFrameRect.isEmpty() && ownerNode);
         } else
             break;
-    } while (tnode = tnode->parentNode());
+    } while ((tnode = tnode->parentNode()));
 
     return adjustedRect;
 }
@@ -2837,7 +2837,7 @@ IntRect WebPagePrivate::blockZoomRectForNode(Node* node)
     double blockExpansionRatio = 5.0 * blockToPageRatio * blockToPageRatio;
 
     if (!tnode->hasTagName(HTMLNames::imgTag) && !tnode->hasTagName(HTMLNames::inputTag) && !tnode->hasTagName(HTMLNames::textareaTag)) {
-        while (tnode = tnode->parentNode()) {
+        while ((tnode = tnode->parentNode())) {
             ASSERT(tnode);
             IntRect tRect = rectForNode(tnode);
             int tempBlockArea = tRect.width() * tRect.height();
index 61f2114..f5ee923 100644 (file)
@@ -1,3 +1,24 @@
+2013-05-10  Jacky Jiang  <zhajiang@blackberry.com>
+
+        Fix some compiler warnings (miscellaneous)
+        https://bugs.webkit.org/show_bug.cgi?id=80790
+
+        Reviewed by Rob Buis.
+
+        Fix the following warnings for BlackBerry:
+        BackingStore.cpp:852:60: warning: suggest parentheses around '&&' within
+        '||' [-Wparentheses].
+        WebPage.cpp:2858:40: warning: suggest parentheses around assignment used
+        as truth value [-Wparentheses].
+        WebPage.cpp:2880:42: warning: suggest parentheses around assignment used
+        as truth value [-Wparentheses]
+
+        * Api/BackingStore.cpp:
+        (BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::adjustRectOffsetForFrameOffset):
+        (BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):
+
 2013-05-09  Mike Fenton  <mifenton@rim.com>
 
         [BlackBerry] Style updates required based on new check-webkit-style
index a49c3ec..54e3772 100644 (file)
@@ -1,3 +1,17 @@
+2013-05-10  Jacky Jiang  <zhajiang@blackberry.com>
+
+        Fix some compiler warnings (miscellaneous)
+        https://bugs.webkit.org/show_bug.cgi?id=80790
+
+        Reviewed by Rob Buis.
+
+        Fix the following warnings for BlackBerry:
+        DumpRenderTree.cpp:357:42: warning: suggest parentheses around assignment
+        used as truth value [-Wparentheses].
+
+        * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+        (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+
 2013-05-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
 
         [WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
index ecbb4d4..ec5bd96 100644 (file)
@@ -354,7 +354,7 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting(const String& url, cons
         page->settings()->setUsePreHTML5ParserQuirks(false);
         // FIXME: Other ports also clear history/backForwardList allong with visited links.
         page->group().removeVisitedLinks();
-        if (mainFrame = page->mainFrame()) {
+        if ((mainFrame = page->mainFrame())) {
             mainFrame->tree()->clearName();
             mainFrame->loader()->setOpener(0);
             // [WebKit bug #86899] Reset JS state settings.