Changeset 149816 in webkit


Ignore:
Timestamp:
May 9, 2013 9:09:31 AM (11 years ago)
Author:
zhajiang@rim.com
Message:

Fix some compiler warnings (miscellaneous)
https://bugs.webkit.org/show_bug.cgi?id=80790

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

Fix the following warnings for BlackBerry:
InRegionScroller.cpp:286:39: warning: suggest parentheses around
assignment used as truth value [-Wparentheses].
InRegionScroller.cpp:349:39: warning: suggest parentheses around
assignment used as truth value [-Wparentheses].
InRegionScroller.cpp:456:82: warning: suggest parentheses around '&&'

within '
' [-Wparentheses].

InRegionScrollableArea.cpp:134:16: warning: suggest explicit braces to
avoid ambiguous 'else' [-Wparentheses].
SelectionHandler.cpp:390:109: warning: suggest parentheses around '&&'

within '
' [-Wparentheses].

SelectionOverlay.cpp:56:47: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare].

  • Api/InRegionScroller.cpp:

(BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
(BlackBerry::WebKit::InRegionScrollerPrivate::firstScrollableInRegionForNode):
(BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):

  • WebKitSupport/InRegionScrollableArea.cpp:

(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):

  • WebKitSupport/SelectionHandler.cpp:

(BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):

  • WebKitSupport/SelectionOverlay.cpp:

(BlackBerry::WebKit::SelectionOverlay::draw):

Location:
trunk/Source/WebKit/blackberry
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/InRegionScroller.cpp

    r149490 r149816  
    284284        }
    285285
    286     } while (layer = parentLayer(layer));
     286    } while ((layer = parentLayer(layer)));
    287287
    288288    if (m_activeInRegionScrollableAreas.empty())
     
    347347        }
    348348
    349     } while (layer = parentLayer(layer));
     349    } while ((layer = parentLayer(layer)));
    350350    return 0;
    351351}
     
    453453        return false;
    454454
    455     if (box->scrollsOverflowX() && (box->scrollWidth() != box->clientWidth())
    456         || box->scrollsOverflowY() && (box->scrollHeight() != box->clientHeight()))
     455    if ((box->scrollsOverflowX() && (box->scrollWidth() != box->clientWidth()))
     456        || (box->scrollsOverflowY() && (box->scrollHeight() != box->clientHeight())))
    457457        return true;
    458458
  • trunk/Source/WebKit/blackberry/ChangeLog

    r149815 r149816  
     12013-05-09  Jacky Jiang  <zhajiang@blackberry.com>
     2
     3        Fix some compiler warnings (miscellaneous)
     4        https://bugs.webkit.org/show_bug.cgi?id=80790
     5
     6        Reviewed by Rob Buis.
     7
     8        Fix the following warnings for BlackBerry:
     9        InRegionScroller.cpp:286:39: warning: suggest parentheses around
     10        assignment used as truth value [-Wparentheses].
     11        InRegionScroller.cpp:349:39: warning: suggest parentheses around
     12        assignment used as truth value [-Wparentheses].
     13        InRegionScroller.cpp:456:82: warning: suggest parentheses around '&&'
     14        within '||' [-Wparentheses].
     15        InRegionScrollableArea.cpp:134:16: warning: suggest explicit braces to
     16        avoid ambiguous 'else' [-Wparentheses].
     17        SelectionHandler.cpp:390:109: warning: suggest parentheses around '&&'
     18        within '||' [-Wparentheses].
     19        SelectionOverlay.cpp:56:47: warning: comparison between signed and
     20        unsigned integer expressions [-Wsign-compare].
     21
     22
     23        * Api/InRegionScroller.cpp:
     24        (BlackBerry::WebKit::InRegionScrollerPrivate::calculateInRegionScrollableAreasForPoint):
     25        (BlackBerry::WebKit::InRegionScrollerPrivate::firstScrollableInRegionForNode):
     26        (BlackBerry::WebKit::InRegionScrollerPrivate::canScrollRenderBox):
     27        * WebKitSupport/InRegionScrollableArea.cpp:
     28        (BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
     29        * WebKitSupport/SelectionHandler.cpp:
     30        (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
     31        * WebKitSupport/SelectionOverlay.cpp:
     32        (BlackBerry::WebKit::SelectionOverlay::draw):
     33
    1342013-05-09  Mike Fenton  <mifenton@rim.com>
    235
  • trunk/Source/WebKit/blackberry/WebKitSupport/InRegionScrollableArea.cpp

    r149808 r149816  
    132132            m_forceContentToBeVerticallyScrollable = m_scrollsVertically;
    133133            // Force content to be scrollable even if it doesn't need to scroll in either direction.
    134             if (!m_scrollsHorizontally && !m_scrollsVertically)
     134            if (!m_scrollsHorizontally && !m_scrollsVertically) {
    135135                if (box->scrollsOverflowY())
    136136                    m_forceContentToBeVerticallyScrollable = true;
    137137                else if (box->scrollsOverflowX()) // If it's already forced scrollable vertically, don't force it to scroll horizontally
    138138                    m_forceContentToBeHorizontallyScrollable = true;
     139            }
    139140            m_supportsCompositedScrolling = true;
    140141            ASSERT(m_layer->backing()->hasScrollingLayer());
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionHandler.cpp

    r149685 r149816  
    387387    // Prevent incorrect movement, handles can only extend the selection this way
    388388    // to prevent inversion of the handles.
    389     if (isStartHandle && (character == KEYCODE_RIGHT || character == KEYCODE_DOWN)
    390         || !isStartHandle && (character == KEYCODE_LEFT || character == KEYCODE_UP))
     389    if ((isStartHandle && (character == KEYCODE_RIGHT || character == KEYCODE_DOWN))
     390        || (!isStartHandle && (character == KEYCODE_LEFT || character == KEYCODE_UP)))
    391391        character = 0;
    392392
  • trunk/Source/WebKit/blackberry/WebKitSupport/SelectionOverlay.cpp

    r149145 r149816  
    5454    m_selection = selection;
    5555
    56     while (m_layers.size() < m_selection.size())
     56    while (m_layers.size() < static_cast<size_t>(m_selection.size()))
    5757        m_layers.append(GraphicsLayer::create(this));
    5858
Note: See TracChangeset for help on using the changeset viewer.