Changeset 50675 in webkit


Ignore:
Timestamp:
Nov 9, 2009 12:04:49 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-09 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
https://bugs.webkit.org/show_bug.cgi?id=31040

  • interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute):

2009-11-09 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
https://bugs.webkit.org/show_bug.cgi?id=31040

No new tests as there is no functional change.

  • dom/Document.cpp: (WebCore::Document::recalcStyleSelector):
  • editing/TextIterator.cpp: (WebCore::pushFullyClippedState):
  • editing/VisibleSelection.cpp: (WebCore::VisibleSelection::appendTrailingWhitespace):
  • html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process):
  • loader/RedirectScheduler.cpp: (WebCore::RedirectScheduler::mustLockBackForwardList):
  • loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
  • platform/graphics/qt/FontCacheQt.cpp: (WebCore::FontPlatformDataCacheKey::computeHash):
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::handleRunInChild):
  • rendering/RenderBox.cpp: (WebCore::RenderBox::calcHeight):
  • rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::nodeAtPoint):
  • rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::diff):
  • svg/SVGAnimateElement.cpp: (WebCore::parseNumberValueAndUnit):
  • svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::startedActiveInterval):
  • svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::getCTM):

2009-11-09 Laszlo Gombos <Laszlo Gombos>

Reviewed by Kenneth Rohde Christiansen.

Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
https://bugs.webkit.org/show_bug.cgi?id=31040

  • Api/qwebpage.cpp: (QWebPagePrivate::handleScrolling):
Location:
trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r50634 r50675  
     12009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
     6        https://bugs.webkit.org/show_bug.cgi?id=31040
     7
     8        * interpreter/Interpreter.cpp:
     9        (JSC::Interpreter::privateExecute):
     10
    1112009-11-08  David Levin  <levin@chromium.org>
    212
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r50608 r50675  
    14961496        JSValue src1 = callFrame->r(vPC[2].u.operand).jsValue();
    14971497        JSValue src2 = callFrame->r(vPC[3].u.operand).jsValue();
    1498         if (src1.isInt32() && src2.isInt32() && !(src1.asInt32() | src2.asInt32() & 0xc0000000)) // no overflow
     1498        if (src1.isInt32() && src2.isInt32() && !(src1.asInt32() | (src2.asInt32() & 0xc0000000))) // no overflow
    14991499            callFrame->r(dst) = jsNumber(callFrame, src1.asInt32() + src2.asInt32());
    15001500        else {
     
    15831583        JSValue src1 = callFrame->r(vPC[2].u.operand).jsValue();
    15841584        JSValue src2 = callFrame->r(vPC[3].u.operand).jsValue();
    1585         if (src1.isInt32() && src2.isInt32() && !(src1.asInt32() | src2.asInt32() & 0xc0000000)) // no overflow
     1585        if (src1.isInt32() && src2.isInt32() && !(src1.asInt32() | (src2.asInt32() & 0xc0000000))) // no overflow
    15861586            callFrame->r(dst) = jsNumber(callFrame, src1.asInt32() - src2.asInt32());
    15871587        else {
  • trunk/WebCore/ChangeLog

    r50674 r50675  
     12009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
     6        https://bugs.webkit.org/show_bug.cgi?id=31040
     7
     8        No new tests as there is no functional change.
     9
     10        * dom/Document.cpp:
     11        (WebCore::Document::recalcStyleSelector):
     12        * editing/TextIterator.cpp:
     13        (WebCore::pushFullyClippedState):
     14        * editing/VisibleSelection.cpp:
     15        (WebCore::VisibleSelection::appendTrailingWhitespace):
     16        * html/HTMLLinkElement.cpp:
     17        (WebCore::HTMLLinkElement::process):
     18        * loader/RedirectScheduler.cpp:
     19        (WebCore::RedirectScheduler::mustLockBackForwardList):
     20        * loader/appcache/ApplicationCacheGroup.cpp:
     21        (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
     22        * platform/graphics/qt/FontCacheQt.cpp:
     23        (WebCore::FontPlatformDataCacheKey::computeHash):
     24        * rendering/RenderBlock.cpp:
     25        (WebCore::RenderBlock::handleRunInChild):
     26        * rendering/RenderBox.cpp:
     27        (WebCore::RenderBox::calcHeight):
     28        * rendering/RenderTextControlMultiLine.cpp:
     29        (WebCore::RenderTextControlMultiLine::nodeAtPoint):
     30        * rendering/style/RenderStyle.cpp:
     31        (WebCore::RenderStyle::diff):
     32        * svg/SVGAnimateElement.cpp:
     33        (WebCore::parseNumberValueAndUnit):
     34        * svg/SVGAnimationElement.cpp:
     35        (WebCore::SVGAnimationElement::startedActiveInterval):
     36        * svg/SVGPreserveAspectRatio.cpp:
     37        (WebCore::SVGPreserveAspectRatio::getCTM):
     38
    1392009-11-09  Shinichiro Hamaji  <hamaji@chromium.org>
    240
  • trunk/WebCore/dom/Document.cpp

    r50523 r50675  
    24912491                }
    24922492            }
    2493         } else if (n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagName(styleTag))
     2493        } else if ((n->isHTMLElement() && (n->hasTagName(linkTag) || n->hasTagName(styleTag)))
    24942494#if ENABLE(SVG)
    24952495            ||  (n->isSVGElement() && n->hasTagName(SVGNames::styleTag))
  • trunk/WebCore/editing/TextIterator.cpp

    r49926 r50675  
    219219    // Push true if this node full clips its contents, or if a parent already has fully
    220220    // clipped and this is not a node that ignores its container's clip.
    221     stack.push(fullyClipsContents(node) || stack.top() && !ignoresContainerClip(node));
     221    stack.push(fullyClipsContents(node) || (stack.top() && !ignoresContainerClip(node)));
    222222}
    223223
  • trunk/WebCore/editing/VisibleSelection.cpp

    r49767 r50675  
    238238    for (; charIt.length(); charIt.advance(1)) {
    239239        UChar c = charIt.characters()[0];
    240         if (!isSpaceOrNewline(c) && c != noBreakSpace || c == '\n')
     240        if ((!isSpaceOrNewline(c) && c != noBreakSpace) || c == '\n')
    241241            break;
    242242        m_end = charIt.range()->endPosition();
  • trunk/WebCore/html/HTMLLinkElement.cpp

    r49208 r50675  
    189189    // Stylesheet
    190190    // This was buggy and would incorrectly match <link rel="alternate">, which has a different specified meaning. -dwh
    191     if (m_disabledState != 2 && (m_isStyleSheet || acceptIfTypeContainsTextCSS && type.contains("text/css")) && document()->frame() && m_url.isValid()) {
     191    if (m_disabledState != 2 && (m_isStyleSheet || (acceptIfTypeContainsTextCSS && type.contains("text/css"))) && document()->frame() && m_url.isValid()) {
    192192        // also, don't load style sheets for standalone documents
    193193       
  • trunk/WebCore/loader/RedirectScheduler.cpp

    r50658 r50675  
    173173    for (Frame* ancestor = targetFrame->tree()->parent(); ancestor; ancestor = ancestor->tree()->parent()) {
    174174        Document* document = ancestor->document();
    175         if (!ancestor->loader()->isComplete() || document && document->processingLoadEvent())
     175        if (!ancestor->loader()->isComplete() || (document && document->processingLoadEvent()))
    176176            return true;
    177177    }
  • trunk/WebCore/loader/appcache/ApplicationCacheGroup.cpp

    r50427 r50675  
    623623   
    624624        if (!m_manifestResource || // The resource will be null if HTTP response was 304 Not Modified.
    625             newestManifest->data()->size() == m_manifestResource->data()->size() && !memcmp(newestManifest->data()->data(), m_manifestResource->data()->data(), newestManifest->data()->size())) {
     625            (newestManifest->data()->size() == m_manifestResource->data()->size() && !memcmp(newestManifest->data()->data(), m_manifestResource->data()->data(), newestManifest->data()->size()))) {
    626626
    627627            m_completionType = NoUpdate;
  • trunk/WebCore/platform/graphics/qt/FontCacheQt.cpp

    r50510 r50675  
    124124        unsigned hashCodes[] = {
    125125            CaseFoldingHash::hash(m_familyName),
    126             m_size | static_cast<unsigned>(m_bold << sizeof(unsigned) * 8 - 1)
    127                 | static_cast<unsigned>(m_italic) << sizeof(unsigned) *8 - 2
    128                 | static_cast<unsigned>(m_smallCaps) << sizeof(unsigned) * 8 - 3
     126            m_size | static_cast<unsigned>(m_bold << (sizeof(unsigned) * 8 - 1))
     127                | static_cast<unsigned>(m_italic) << (sizeof(unsigned) * 8 - 2)
     128                | static_cast<unsigned>(m_smallCaps) << (sizeof(unsigned) * 8 - 3)
    129129        };
    130130        m_hash = StringImpl::computeHash(reinterpret_cast<UChar*>(hashCodes), sizeof(hashCodes) / sizeof(UChar));
  • trunk/WebCore/rendering/RenderBlock.cpp

    r50623 r50675  
    961961    // been regenerated by the new inline.
    962962    for (RenderObject* runInChild = blockRunIn->firstChild(); runInChild; runInChild = runInChild->nextSibling()) {
    963         if (runInIsGenerated || runInChild->style()->styleType() != BEFORE && runInChild->style()->styleType() != AFTER) {
     963        if (runInIsGenerated || (runInChild->style()->styleType() != BEFORE && runInChild->style()->styleType() != AFTER)) {
    964964            blockRunIn->children()->removeChildNode(blockRunIn, runInChild, false);
    965965            inlineRunIn->addChild(runInChild); // Use addChild instead of appendChildNode since it handles correct placement of the children relative to :after-generated content.
  • trunk/WebCore/rendering/RenderBox.cpp

    r50341 r50675  
    14721472    // height has nothing to be a percentage of, and it ends up being 0. That is bad.
    14731473    bool printingNeedsBaseHeight = document()->printing() && h.isPercent()
    1474         && (isRoot() || isBody() && document()->documentElement()->renderer()->style()->height().isPercent());
     1474        && (isRoot() || (isBody() && document()->documentElement()->renderer()->style()->height().isPercent()));
    14751475    if (stretchesToViewHeight() || printingNeedsBaseHeight) {
    14761476        int margins = collapsedMarginTop() + collapsedMarginBottom();
  • trunk/WebCore/rendering/RenderTextControlMultiLine.cpp

    r49105 r50675  
    6565
    6666    bool resultIsTextValueOrPlaceholder
    67         = !m_placeholderVisible && result.innerNode() == innerTextElement()
    68         || m_placeholderVisible && result.innerNode()->isDescendantOf(innerTextElement());
     67        = (!m_placeholderVisible && result.innerNode() == innerTextElement())
     68        || (m_placeholderVisible && result.innerNode()->isDescendantOf(innerTextElement()));
    6969    if (result.innerNode() == node() || resultIsTextValueOrPlaceholder)
    7070        hitInnerTextElement(result, x, y, tx, ty);
  • trunk/WebCore/rendering/style/RenderStyle.cpp

    r47805 r50675  
    455455        return StyleDifferenceLayout;
    456456
    457     if (rareNonInheritedData->opacity == 1 && other->rareNonInheritedData->opacity < 1 ||
    458         rareNonInheritedData->opacity < 1 && other->rareNonInheritedData->opacity == 1) {
     457    if ((rareNonInheritedData->opacity == 1 && other->rareNonInheritedData->opacity < 1) ||
     458        (rareNonInheritedData->opacity < 1 && other->rareNonInheritedData->opacity == 1)) {
    459459        // FIXME: We should add an optimized form of layout that just recomputes visual overflow.
    460460        return StyleDifferenceLayout;
  • trunk/WebCore/svg/SVGAnimateElement.cpp

    r50583 r50675  
    6363    String newUnit = parse.right(unitLength);
    6464    String number = parse.left(parse.length() - unitLength);
    65     if (!unit.isEmpty() && newUnit != unit || number.isEmpty())
     65    if ((!unit.isEmpty() && newUnit != unit) || number.isEmpty())
    6666        return false;
    6767    UChar last = number[number.length() - 1];
  • trunk/WebCore/svg/SVGAnimationElement.cpp

    r50583 r50675  
    488488            && (calcMode == CalcModePaced || !hasAttribute(SVGNames::keyTimesAttr) || hasAttribute(SVGNames::keyPointsAttr) || (m_values.size() == m_keyTimes.size()))
    489489            && (calcMode == CalcModeDiscrete || !m_keyTimes.size() || m_keyTimes.last() == 1.0)
    490             && (calcMode != CalcModeSpline || (m_keySplines.size() && (m_keySplines.size() == m_values.size() - 1) || m_keySplines.size() == m_keyPoints.size() - 1))
     490            && (calcMode != CalcModeSpline || ((m_keySplines.size() && (m_keySplines.size() == m_values.size() - 1)) || m_keySplines.size() == m_keyPoints.size() - 1))
    491491            && (!hasAttribute(SVGNames::keyPointsAttr) || (m_keyTimes.size() > 1 && m_keyTimes.size() == m_keyPoints.size()));
    492492        if (calcMode == CalcModePaced && m_animationValid)
  • trunk/WebCore/svg/SVGPreserveAspectRatio.cpp

    r50583 r50675  
    179179        temp.scaleNonUniform(physWidth / logicWidth, physHeight / logicHeight);
    180180        temp.translate(-logicX, -logicY);
    181     } else if (vpar < svgar && (meetOrSlice() == SVG_MEETORSLICE_MEET) || vpar >= svgar && (meetOrSlice() == SVG_MEETORSLICE_SLICE)) {
     181    } else if ((vpar < svgar && (meetOrSlice() == SVG_MEETORSLICE_MEET)) || (vpar >= svgar && (meetOrSlice() == SVG_MEETORSLICE_SLICE))) {
    182182        temp.scaleNonUniform(physHeight / logicHeight, physHeight / logicHeight);
    183183
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r50656 r50675  
    13041304        direction = ScrollDown;
    13051305    } else if (ev == QKeySequence::MoveToPreviousPage
    1306                || (ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier)) {
     1306               || ((ev->key() == Qt::Key_Space) && (ev->modifiers() & Qt::ShiftModifier))) {
    13071307        granularity = ScrollByPage;
    13081308        direction = ScrollUp;
    13091309    } else
    13101310#endif // QT_NO_SHORTCUT
    1311     if (ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier
     1311    if ((ev->key() == Qt::Key_Up && ev->modifiers() & Qt::ControlModifier)
    13121312               || ev->key() == Qt::Key_Home) {
    13131313        granularity = ScrollByDocument;
    13141314        direction = ScrollUp;
    1315     } else if (ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier
     1315    } else if ((ev->key() == Qt::Key_Down && ev->modifiers() & Qt::ControlModifier)
    13161316               || ev->key() == Qt::Key_End) {
    13171317        granularity = ScrollByDocument;
  • trunk/WebKit/qt/ChangeLog

    r50665 r50675  
     12009-11-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Use explicit parentheses to silence gcc 4.4 -Wparentheses warnings
     6        https://bugs.webkit.org/show_bug.cgi?id=31040
     7
     8        * Api/qwebpage.cpp:
     9        (QWebPagePrivate::handleScrolling):
     10
    1112009-11-09  Mark Mentovai  <mark@chromium.org>
    212
Note: See TracChangeset for help on using the changeset viewer.