Changeset 42002 in webkit


Ignore:
Timestamp:
Mar 26, 2009 7:24:15 AM (15 years ago)
Author:
staikos@webkit.org
Message:

2009-03-26 Eli Fidler <eli.fidler@torchmobile.com>

Reviewed by George Staikos.

Remove warnings all over the place by making operator precedence

explicit in cases like x && y
z. No functional change.
Location:
trunk/WebCore
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r42001 r42002  
     12009-03-26  Eli Fidler  <eli.fidler@torchmobile.com>
     2
     3        Reviewed by George Staikos.
     4
     5        Remove warnings all over the place by making operator precedence
     6        explicit in cases like x && y || z.  No functional change.
     7
     8        * css/CSSFontSelector.cpp:
     9        (WebCore::CSSFontSelector::addFontFaceRule):
     10        * css/CSSParser.cpp:
     11        (WebCore::CSSParser::parseValue):
     12        (WebCore::CSSParser::parseShadow):
     13        * dom/Document.cpp:
     14        (WebCore::Document::shouldScheduleLayout):
     15        * dom/Node.cpp:
     16        (WebCore::Node::isBlockFlowOrBlockTable):
     17        * dom/Node.h:
     18        (WebCore::Node::document):
     19        * dom/Position.cpp:
     20        (WebCore::Position::next):
     21        (WebCore::Position::upstream):
     22        (WebCore::Position::downstream):
     23        (WebCore::Position::getInlineBoxAndOffset):
     24        * dom/PositionIterator.cpp:
     25        (WebCore::PositionIterator::atStart):
     26        * dom/Range.cpp:
     27        (WebCore::Range::intersectsNode):
     28        * editing/Editor.cpp:
     29        (WebCore::Editor::setBaseWritingDirection):
     30        * editing/InsertParagraphSeparatorCommand.cpp:
     31        (WebCore::InsertParagraphSeparatorCommand::doApply):
     32        * editing/ReplaceSelectionCommand.cpp:
     33        (WebCore::ReplaceSelectionCommand::doApply):
     34        * editing/TextIterator.cpp:
     35        (WebCore::TextIterator::advance):
     36        (WebCore::SimplifiedBackwardsTextIterator::advance):
     37        * editing/VisiblePosition.cpp:
     38        (WebCore::VisiblePosition::leftVisuallyDistinctCandidate):
     39        (WebCore::VisiblePosition::rightVisuallyDistinctCandidate):
     40        (WebCore::VisiblePosition::canonicalPosition):
     41        * editing/htmlediting.cpp:
     42        (WebCore::isMailBlockquote):
     43        (WebCore::lineBreakExistsAtPosition):
     44        * html/HTMLSelectElement.cpp:
     45        (WebCore::HTMLSelectElement::parseMappedAttribute):
     46        * loader/FTPDirectoryDocument.cpp:
     47        (WebCore::processFileDateString):
     48        * loader/ImageLoader.cpp:
     49        (WebCore::ImageLoader::updateFromElement):
     50        * loader/TextResourceDecoder.cpp:
     51        (WebCore::TextResourceDecoder::checkForHeadCharset):
     52        * page/AccessibilityObject.cpp:
     53        (WebCore::updateAXLineStartForVisiblePosition):
     54        * page/EventHandler.cpp:
     55        (WebCore::EventHandler::sendContextMenuEvent):
     56        * page/animation/AnimationBase.cpp:
     57        (WebCore::PropertyWrapperGetter::equals):
     58        (WebCore::PropertyWrapperShadow::equals):
     59        * platform/ContextMenu.cpp:
     60        (WebCore::ContextMenu::populate):
     61        * platform/ScrollView.cpp:
     62        (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount):
     63        * platform/text/Base64.cpp:
     64        (WebCore::base64Encode):
     65        * platform/text/BidiResolver.h:
     66        (WebCore::::raiseExplicitEmbeddingLevel):
     67        (WebCore::::createBidiRunsForLine):
     68        * rendering/InlineTextBox.cpp:
     69        (WebCore::InlineTextBox::placeEllipsisBox):
     70        * rendering/RenderBlock.cpp:
     71        (WebCore::RenderBlock::addChild):
     72        (WebCore::RenderBlock::repaintOverhangingFloats):
     73        (WebCore::RenderBlock::fillInlineSelectionGaps):
     74        (WebCore::RenderBlock::positionForPoint):
     75        (WebCore::RenderBlock::calcInlinePrefWidths):
     76        (WebCore::RenderBlock::hasLineIfEmpty):
     77        * rendering/RenderBox.cpp:
     78        (WebCore::RenderBox::imageChanged):
     79        (WebCore::RenderBox::localCaretRect):
     80        (WebCore::RenderBox::positionForPoint):
     81        (WebCore::RenderBox::shrinkToAvoidFloats):
     82        * rendering/RenderObject.h:
     83        (WebCore::objectIsRelayoutBoundary):
     84        * rendering/RenderTableCell.cpp:
     85        (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
     86        * rendering/RenderText.cpp:
     87        (WebCore::RenderText::calcPrefWidths):
     88        * rendering/bidi.cpp:
     89        (WebCore::RenderBlock::determineStartPosition):
     90        (WebCore::textWidth):
     91        * rendering/style/RenderStyle.cpp:
     92        (WebCore::RenderStyle::diff):
     93        * rendering/style/StyleInheritedData.cpp:
     94        (WebCore::cursorDataEquivalent):
     95        * rendering/style/StyleRareInheritedData.cpp:
     96        (WebCore::StyleRareInheritedData::shadowDataEquivalent):
     97        * rendering/style/StyleRareNonInheritedData.cpp:
     98        (WebCore::StyleRareNonInheritedData::shadowDataEquivalent):
     99        (WebCore::StyleRareNonInheritedData::animationDataEquivalent):
     100        (WebCore::StyleRareNonInheritedData::transitionDataEquivalent):
     101
    11022009-03-26  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
    2103
  • trunk/WebCore/css/CSSFontSelector.cpp

    r41984 r42002  
    9494    RefPtr<CSSValue> src = style->getPropertyCSSValue(CSSPropertySrc);
    9595    RefPtr<CSSValue> unicodeRange = style->getPropertyCSSValue(CSSPropertyUnicodeRange);
    96     if (!fontFamily || !src || !fontFamily->isValueList() || !src->isValueList() || unicodeRange && !unicodeRange->isValueList())
     96    if (!fontFamily || !src || !fontFamily->isValueList() || !src->isValueList() || (unicodeRange && !unicodeRange->isValueList()))
    9797        return;
    9898
  • trunk/WebCore/css/CSSParser.cpp

    r41979 r42002  
    792792        else if (id == CSSValueCurrentcolor)
    793793            valid_primitive = true;
    794         else if (id >= CSSValueAqua && id <= CSSValueWindowtext || id == CSSValueMenu ||
     794        else if ((id >= CSSValueAqua && id <= CSSValueWindowtext) || id == CSSValueMenu ||
    795795             (id >= CSSValueWebkitFocusRingColor && id < CSSValueWebkitText && !m_strict)) {
    796796            valid_primitive = true;
     
    35013501            // The only other type of value that's ok is a color value.
    35023502            RefPtr<CSSPrimitiveValue> parsedColor;
    3503             bool isColor = (val->id >= CSSValueAqua && val->id <= CSSValueWindowtext || val->id == CSSValueMenu ||
     3503            bool isColor = ((val->id >= CSSValueAqua && val->id <= CSSValueWindowtext) || val->id == CSSValueMenu ||
    35043504                            (val->id >= CSSValueWebkitFocusRingColor && val->id <= CSSValueWebkitText && !m_strict));
    35053505            if (isColor) {
  • trunk/WebCore/dom/Document.cpp

    r41986 r42002  
    16711671    //    (b) Only schedule layout once we have a body element.
    16721672
    1673     return haveStylesheetsLoaded()
    1674         && body() || (documentElement() && !documentElement()->hasTagName(htmlTag));
     1673    return (haveStylesheetsLoaded() && body()) ||
     1674        (documentElement() && !documentElement()->hasTagName(htmlTag));
    16751675}
    16761676
  • trunk/WebCore/dom/Node.cpp

    r41899 r42002  
    13381338bool Node::isBlockFlowOrBlockTable() const
    13391339{
    1340     return renderer() && (renderer()->isBlockFlow() || renderer()->isTable() && !renderer()->isInline());
     1340    return renderer() && (renderer()->isBlockFlow() || (renderer()->isTable() && !renderer()->isInline()));
    13411341}
    13421342
  • trunk/WebCore/dom/Node.h

    r41218 r42002  
    316316    {
    317317        ASSERT(this);
    318         ASSERT(m_document || nodeType() == DOCUMENT_TYPE_NODE && !inDocument());
     318        ASSERT(m_document || (nodeType() == DOCUMENT_TYPE_NODE && !inDocument()));
    319319        return m_document.get();
    320320    }
  • trunk/WebCore/dom/Position.cpp

    r41863 r42002  
    148148
    149149    Node* child = n->childNode(o);
    150     if (child || !n->hasChildNodes() && o < lastOffsetForEditing(n)) {
     150    if (child || (!n->hasChildNodes() && o < lastOffsetForEditing(n))) {
    151151        if (child)
    152152            return firstDeepEditingPositionForNode(child);
     
    421421                    if (!otherBox)
    422422                        break;
    423                     if (otherBox == lastTextBox || otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() > textOffset)
     423                    if (otherBox == lastTextBox || (otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() > textOffset))
    424424                        continuesOnNextLine = false;
    425425                }
     
    430430                    if (!otherBox)
    431431                        break;
    432                     if (otherBox == lastTextBox || otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() > textOffset)
     432                    if (otherBox == lastTextBox || (otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() > textOffset))
    433433                        continuesOnNextLine = false;
    434434                }
     
    533533                    if (!otherBox)
    534534                        break;
    535                     if (otherBox == lastTextBox || otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() >= textOffset)
     535                    if (otherBox == lastTextBox || (otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() >= textOffset))
    536536                        continuesOnNextLine = false;
    537537                }
     
    542542                    if (!otherBox)
    543543                        break;
    544                     if (otherBox == lastTextBox || otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() >= textOffset)
     544                    if (otherBox == lastTextBox || (otherBox->renderer() == textRenderer && static_cast<InlineTextBox*>(otherBox)->start() >= textOffset))
    545545                        continuesOnNextLine = false;
    546546                }
     
    838838    if (!renderer->isText()) {
    839839        inlineBox = renderer->isBox() ? toRenderBox(renderer)->inlineBoxWrapper() : 0;
    840         if (!inlineBox || caretOffset > inlineBox->caretMinOffset() && caretOffset < inlineBox->caretMaxOffset())
     840        if (!inlineBox || (caretOffset > inlineBox->caretMinOffset() && caretOffset < inlineBox->caretMaxOffset()))
    841841            return;
    842842    } else {
     
    850850            int caretMaxOffset = box->caretMaxOffset();
    851851
    852             if (caretOffset < caretMinOffset || caretOffset > caretMaxOffset || caretOffset == caretMaxOffset && box->isLineBreak())
     852            if (caretOffset < caretMinOffset || caretOffset > caretMaxOffset || (caretOffset == caretMaxOffset && box->isLineBreak()))
    853853                continue;
    854854
  • trunk/WebCore/dom/PositionIterator.cpp

    r41863 r42002  
    106106    if (m_parent->parentNode())
    107107        return false;
    108     return !m_parent->hasChildNodes() && !m_offset || m_child && !m_child->previousSibling();
     108    return (!m_parent->hasChildNodes() && !m_offset) || (m_child && !m_child->previousSibling());
    109109}
    110110
  • trunk/WebCore/dom/Range.cpp

    r41933 r42002  
    555555    }
    556556   
    557     if (!m_start.container() && refNode->attached()
    558             || m_start.container() && !refNode->attached()
     557    if ((!m_start.container() && refNode->attached())
     558            || (m_start.container() && !refNode->attached())
    559559            || refNode->document() != m_ownerDocument) {
    560560        // Firefox doesn't throw an exception for these cases; it returns false.
  • trunk/WebCore/editing/Editor.cpp

    r41863 r42002  
    11931193    Node* focusedNode = frame()->document()->focusedNode();
    11941194    if (focusedNode && (focusedNode->hasTagName(textareaTag)
    1195                         || focusedNode->hasTagName(inputTag) && (static_cast<HTMLInputElement*>(focusedNode)->inputType() == HTMLInputElement::TEXT
    1196                                                                 || static_cast<HTMLInputElement*>(focusedNode)->inputType() == HTMLInputElement::SEARCH))) {
     1195                        || (focusedNode->hasTagName(inputTag) && (static_cast<HTMLInputElement*>(focusedNode)->inputType() == HTMLInputElement::TEXT
     1196                                                                || static_cast<HTMLInputElement*>(focusedNode)->inputType() == HTMLInputElement::SEARCH)))) {
    11971197        if (direction == NaturalWritingDirection)
    11981198            return;
  • trunk/WebCore/editing/InsertParagraphSeparatorCommand.cpp

    r41986 r42002  
    128128            || isTableCell(startBlock)
    129129            || startBlock->hasTagName(formTag)
    130             || canonicalPos.node()->renderer() && canonicalPos.node()->renderer()->isTable()
     130            || (canonicalPos.node()->renderer() && canonicalPos.node()->renderer()->isTable())
    131131            || canonicalPos.node()->hasTagName(hrTag)) {
    132132        applyCommandToComposite(InsertLineBreakCommand::create(document()));
  • trunk/WebCore/editing/ReplaceSelectionCommand.cpp

    r41863 r42002  
    726726    bool startIsInsideMailBlockquote = nearestMailBlockquote(insertionPos.node());
    727727   
    728     if (selectionStartWasStartOfParagraph && selectionEndWasEndOfParagraph && !startIsInsideMailBlockquote ||
     728    if ((selectionStartWasStartOfParagraph && selectionEndWasEndOfParagraph && !startIsInsideMailBlockquote) ||
    729729        startBlock == currentRoot ||
    730         startBlock && startBlock->renderer() && startBlock->renderer()->isListItem() ||
     730        (startBlock && startBlock->renderer() && startBlock->renderer()->isListItem()) ||
    731731        selectionIsPlainText)
    732732        m_preventNesting = false;
  • trunk/WebCore/editing/TextIterator.cpp

    r41607 r42002  
    250250                }
    251251                while (!next && parentNode) {
    252                     if (pastEnd && parentNode == m_endContainer || m_endContainer->isDescendantOf(parentNode))
     252                    if ((pastEnd && parentNode == m_endContainer) || m_endContainer->isDescendantOf(parentNode))
    253253                        return;
    254254                    bool haveRenderer = m_node->renderer();
     
    861861                canHaveChildrenForEditing(m_node) &&
    862862                m_node->parentNode() &&
    863                 (!m_node->lastChild() || m_node == m_endNode && m_endOffset == 0)) {
     863                (!m_node->lastChild() || (m_node == m_endNode && m_endOffset == 0))) {
    864864                exitNode();
    865865                if (m_positionNode) {
  • trunk/WebCore/editing/VisiblePosition.cpp

    r41863 r42002  
    224224        p = Position(renderer->node(), offset);
    225225
    226         if (p.isCandidate() && p.downstream() != downstreamStart || p.atStartOfTree() || p.atEndOfTree())
     226        if ((p.isCandidate() && p.downstream() != downstreamStart) || p.atStartOfTree() || p.atEndOfTree())
    227227            return p;
    228228    }
     
    367367        p = Position(renderer->node(), offset);
    368368
    369         if (p.isCandidate() && p.downstream() != downstreamStart || p.atStartOfTree() || p.atEndOfTree())
     369        if ((p.isCandidate() && p.downstream() != downstreamStart) || p.atStartOfTree() || p.atEndOfTree())
    370370            return p;
    371371    }
     
    488488    // If the html element is editable, descending into its body will look like a descent
    489489    // from non-editable to editable content since rootEditableElement() always stops at the body.
    490     if (editingRoot && editingRoot->hasTagName(htmlTag) || position.node()->isDocumentNode())
     490    if ((editingRoot && editingRoot->hasTagName(htmlTag)) || position.node()->isDocumentNode())
    491491        return next.isNotNull() ? next : prev;
    492492       
  • trunk/WebCore/editing/htmlediting.cpp

    r41863 r42002  
    883883bool isMailBlockquote(const Node *node)
    884884{
    885     if (!node || !node->isElementNode() && !node->hasTagName(blockquoteTag))
     885    if (!node || (!node->isElementNode() && !node->hasTagName(blockquoteTag)))
    886886        return false;
    887887       
     
    914914    Position downstream(visiblePosition.deepEquivalent().downstream());
    915915    return downstream.node()->hasTagName(brTag) ||
    916            downstream.node()->isTextNode() && downstream.node()->renderer()->style()->preserveNewline() && visiblePosition.characterAfter() == '\n';
     916           (downstream.node()->isTextNode() && downstream.node()->renderer()->style()->preserveNewline() && visiblePosition.characterAfter() == '\n');
    917917}
    918918
  • trunk/WebCore/html/HTMLSelectElement.cpp

    r41914 r42002  
    308308
    309309        m_size = max(size, 1);
    310         if ((oldUsesMenuList != usesMenuList() || !oldUsesMenuList && m_size != oldSize) && attached()) {
     310        if ((oldUsesMenuList != usesMenuList() || (!oldUsesMenuList && m_size != oldSize)) && attached()) {
    311311            detach();
    312312            attach();
  • trunk/WebCore/loader/FTPDirectoryDocument.cpp

    r41771 r42002  
    277277        }
    278278       
    279         if (now.tm_mday == 1 && (now.tm_mon == fileTime.tm_mon + 1 || now.tm_mon == 0 && fileTime.tm_mon == 11) &&
     279        if (now.tm_mday == 1 && (now.tm_mon == fileTime.tm_mon + 1 || (now.tm_mon == 0 && fileTime.tm_mon == 11)) &&
    280280            wasLastDayOfMonth(fileTime.tm_year, fileTime.tm_mon, fileTime.tm_mday))
    281281                return "Yesterday" + timeOfDay;
  • trunk/WebCore/loader/ImageLoader.cpp

    r41766 r42002  
    120120    // need (<rdar://problem/5994621>).
    121121    CachedImage* newImage = 0;
    122     if (!(attr.isNull() || attr.isEmpty() && document->baseURI().isLocalFile())) {
     122    if (!(attr.isNull() || (attr.isEmpty() && document->baseURI().isLocalFile()))) {
    123123        if (m_loadManually) {
    124124            document->docLoader()->setAutoLoadImages(false);
  • trunk/WebCore/loader/TextResourceDecoder.cpp

    r41551 r42002  
    643643                    continue;
    644644                }
    645                 if (c >= 'a' && c <= 'z' || c >= '0' && c <= '9')
     645                if ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))
    646646                    ;
    647647                else if (c >= 'A' && c <= 'Z')
     
    702702                    if (str[pos++] != '=')
    703703                        continue;
    704                     while (pos < length &&
    705                             (str[pos] <= ' ') || str[pos] == '=' || str[pos] == '"' || str[pos] == '\'')
     704                    while ((pos < length) &&
     705                            (str[pos] <= ' ' || str[pos] == '=' || str[pos] == '"' || str[pos] == '\''))
    706706                        pos++;
    707707
  • trunk/WebCore/page/AccessibilityObject.cpp

    r41863 r42002  
    405405            break;
    406406        renderer = p.node()->renderer();
    407         if (!renderer || renderer->isRenderBlock() && !p.m_offset)
     407        if (!renderer || (renderer->isRenderBlock() && !p.m_offset))
    408408            break;
    409409        InlineBox* box;
  • trunk/WebCore/page/EventHandler.cpp

    r41970 r42002  
    16631663        // If the selection is non-editable, we do word selection to make it easier to use the contextual menu items
    16641664        // available for text selections.  But only if we're above text.
    1665         (m_frame->selection()->isContentEditable() || mev.targetNode() && mev.targetNode()->isTextNode())) {
     1665        (m_frame->selection()->isContentEditable() || (mev.targetNode() && mev.targetNode()->isTextNode()))) {
    16661666        m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
    16671667        selectClosestWordOrLinkFromMouseEvent(mev);
  • trunk/WebCore/page/animation/AnimationBase.cpp

    r41745 r42002  
    207207       // If the style pointers are the same, don't bother doing the test.
    208208       // If either is null, return false. If both are null, return true.
    209        if (!a && !b || a == b)
     209       if ((!a && !b) || a == b)
    210210           return true;
    211211       if (!a || !b)
     
    284284        ShadowData* shadowB = (b->*m_getter)();
    285285
    286         if (!shadowA && shadowB || shadowA && !shadowB)
     286        if ((!shadowA && shadowB) || (shadowA && !shadowB))
    287287            return false;
    288288        if (shadowA && shadowB && (*shadowA != *shadowB))
  • trunk/WebCore/platform/ContextMenu.cpp

    r41496 r42002  
    426426                if (Settings* settings = page->settings()) {
    427427                    bool includeTextDirectionSubmenu = settings->textDirectionSubmenuInclusionBehavior() == TextDirectionSubmenuAlwaysIncluded
    428                         || settings->textDirectionSubmenuInclusionBehavior() == TextDirectionSubmenuAutomaticallyIncluded && frame->editor()->hasBidiSelection();
     428                        || (settings->textDirectionSubmenuInclusionBehavior() == TextDirectionSubmenuAutomaticallyIncluded && frame->editor()->hasBidiSelection());
    429429                    if (includeTextDirectionSubmenu) {
    430430                        ContextMenuItem TextDirectionMenuItem(SubmenuType, ContextMenuItemTagTextDirectionMenu,
  • trunk/WebCore/platform/ScrollView.cpp

    r41495 r42002  
    530530        // we need to invalidate the windowResizerRect(), since it will now need to paint
    531531        // differently.
    532         if (oldCount > 0 && m_scrollbarsAvoidingResizer == 0 ||
    533             oldCount == 0 && m_scrollbarsAvoidingResizer > 0)
     532        if ((oldCount > 0 && m_scrollbarsAvoidingResizer == 0) ||
     533            (oldCount == 0 && m_scrollbarsAvoidingResizer > 0))
    534534            invalidateRect(windowResizerRect());
    535535    }
  • trunk/WebCore/platform/text/Base64.cpp

    r29470 r42002  
    9898            }
    9999            out[didx++] = base64EncMap[(data[sidx] >> 2) & 077];
    100             out[didx++] = base64EncMap[(data[sidx + 1] >> 4) & 017 | (data[sidx] << 4) & 077];
    101             out[didx++] = base64EncMap[(data[sidx + 2] >> 6) & 003 | (data[sidx + 1] << 2) & 077];
     100            out[didx++] = base64EncMap[((data[sidx + 1] >> 4) & 017) | ((data[sidx] << 4) & 077)];
     101            out[didx++] = base64EncMap[((data[sidx + 2] >> 6) & 003) | ((data[sidx + 1] << 2) & 077)];
    102102            out[didx++] = base64EncMap[data[sidx + 2] & 077];
    103103            sidx += 3;
     
    111111        out[didx++] = base64EncMap[(data[sidx] >> 2) & 077];
    112112        if (sidx < len - 1) {
    113             out[didx++] = base64EncMap[(data[sidx + 1] >> 4) & 017 | (data[sidx] << 4) & 077];
     113            out[didx++] = base64EncMap[((data[sidx + 1] >> 4) & 017) | ((data[sidx] << 4) & 077)];
    114114            out[didx++] = base64EncMap[(data[sidx + 1] << 2) & 077];
    115115        } else
  • trunk/WebCore/platform/text/BidiResolver.h

    r37828 r42002  
    353353            }
    354354        } else if (m_status.eor == ArabicNumber
    355             || m_status.eor == EuropeanNumber && (m_status.lastStrong != LeftToRight || from == RightToLeft)
    356             || m_status.eor != EuropeanNumber && m_status.lastStrong == LeftToRight && from == RightToLeft) {
     355            || (m_status.eor == EuropeanNumber && (m_status.lastStrong != LeftToRight || from == RightToLeft))
     356            || (m_status.eor != EuropeanNumber && m_status.lastStrong == LeftToRight && from == RightToLeft)) {
    357357            appendRun();
    358358            m_direction = RightToLeft;
     
    723723                case OtherNeutral:
    724724                    if (m_status.eor == ArabicNumber
    725                         || m_status.eor == EuropeanNumber && (m_status.lastStrong == RightToLeft || context()->dir() == RightToLeft)
    726                         || m_status.eor != EuropeanNumber && m_status.lastStrong == LeftToRight && context()->dir() == RightToLeft) {
     725                        || (m_status.eor == EuropeanNumber && (m_status.lastStrong == RightToLeft || context()->dir() == RightToLeft))
     726                        || (m_status.eor != EuropeanNumber && m_status.lastStrong == LeftToRight && context()->dir() == RightToLeft)) {
    727727                        // Terminate the run before the neutrals.
    728728                        appendRun();
  • trunk/WebCore/rendering/InlineTextBox.cpp

    r41152 r42002  
    158158    bool rtlEllipsisWithinBox = !ltr && (ellipsisX > m_x);
    159159    if (ltrEllipsisWithinBox || rtlEllipsisWithinBox) {
    160         if (ltr && direction() == RTL || !ltr && direction() == LTR)
     160        if ((ltr && direction() == RTL) || (!ltr && direction() == LTR))
    161161            return -1; // FIXME: Support cases in which the last run's directionality differs from the context.
    162162
  • trunk/WebCore/rendering/RenderBlock.cpp

    r41928 r42002  
    289289
    290290        ASSERT(anonymousChild->isTable());
    291         if (newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP
    292                 || newChild->isRenderBlock() && newChild->style()->display() == TABLE_CAPTION
     291        if ((newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP)
     292                || (newChild->isRenderBlock() && newChild->style()->display() == TABLE_CAPTION)
    293293                || newChild->isTableSection()
    294294                || newChild->isTableRow()
     
    15371537            // is our responsibility to paint (m_shouldPaint is set). When paintAllDescendants is true, the latter
    15381538            // condition is replaced with being a descendant of us.
    1539             if (r->m_bottom > height() && (paintAllDescendants && r->m_renderer->isDescendantOf(this) || r->m_shouldPaint) && !r->m_renderer->hasSelfPaintingLayer()) {               
     1539            if (r->m_bottom > height() && ((paintAllDescendants && r->m_renderer->isDescendantOf(this)) || r->m_shouldPaint) && !r->m_renderer->hasSelfPaintingLayer()) {
    15401540                r->m_renderer->repaint();
    15411541                r->m_renderer->repaintOverhangingFloats();
     
    20772077                                                        rootBlock, blockX, blockY, paintInfo));
    20782078
    2079         if (!paintInfo || ty + selTop < paintInfo->rect.bottom() && ty + selTop + selHeight > paintInfo->rect.y())
     2079        if (!paintInfo || (ty + selTop < paintInfo->rect.bottom() && ty + selTop + selHeight > paintInfo->rect.y()))
    20802080            result.unite(curr->fillLineSelectionGap(selTop, selHeight, rootBlock, blockX, blockY, tx, ty, paintInfo));
    20812081
     
    34983498
    34993499    if (isReplaced()) {
    3500         if (point.y() < 0 || point.y() < height() && point.x() < 0)
     3500        if (point.y() < 0 || (point.y() < height() && point.x() < 0))
    35013501            return createVisiblePosition(caretMinOffset(), DOWNSTREAM);
    3502         if (point.y() >= height() || point.y() >= 0 && point.x() >= width())
     3502        if (point.y() >= height() || (point.y() >= 0 && point.x() >= width()))
    35033503            return createVisiblePosition(caretMaxOffset(), DOWNSTREAM);
    35043504    }
     
    40814081                if (child->isFloating()) {
    40824082                    clearPreviousFloat = (prevFloat
    4083                         && (prevFloat->style()->floating() == FLEFT && (child->style()->clear() & CLEFT)
    4084                             || prevFloat->style()->floating() == FRIGHT && (child->style()->clear() & CRIGHT)));
     4083                        && ((prevFloat->style()->floating() == FLEFT && (child->style()->clear() & CLEFT))
     4084                            || (prevFloat->style()->floating() == FRIGHT && (child->style()->clear() & CRIGHT))));
    40854085                    prevFloat = child;
    40864086                } else
     
    40884088
    40894089                bool canBreakReplacedElement = !child->isImage() || allowImagesToBreak;
    4090                 if (canBreakReplacedElement && (autoWrap || oldAutoWrap) || clearPreviousFloat) {
     4090                if ((canBreakReplacedElement && (autoWrap || oldAutoWrap)) || clearPreviousFloat) {
    40914091                    m_minPrefWidth = max(inlineMin, m_minPrefWidth);
    40924092                    inlineMin = 0;
     
    43404340bool RenderBlock::hasLineIfEmpty() const
    43414341{
    4342     return node() && (node()->isContentEditable() && node()->rootEditableElement() == node() ||
    4343                          node()->isShadowNode() && node()->shadowParentNode()->hasTagName(inputTag));
     4342    return node() && ((node()->isContentEditable() && node()->rootEditableElement() == node()) ||
     4343            (node()->isShadowNode() && node()->shadowParentNode()->hasTagName(inputTag)));
    43444344}
    43454345
  • trunk/WebCore/rendering/RenderBox.cpp

    r41948 r42002  
    756756        return;
    757757
    758     if (style()->borderImage().image() && style()->borderImage().image()->data() == image ||
    759         style()->maskBoxImage().image() && style()->maskBoxImage().image()->data() == image) {
     758    if ((style()->borderImage().image() && style()->borderImage().image()->data() == image) ||
     759        (style()->maskBoxImage().image() && style()->maskBoxImage().image()->data() == image)) {
    760760        repaint();
    761761        return;
     
    26312631    // FIXME: ignoring :first-line, missing good reason to take care of
    26322632    int fontHeight = style()->font().height();
    2633     if (fontHeight > rect.height() || !isReplaced() && !isTable())
     2633    if (fontHeight > rect.height() || (!isReplaced() && !isTable()))
    26342634        rect.setHeight(fontHeight);
    26352635
     
    27072707    }
    27082708    for (RenderObject* renderObject = firstChild(); renderObject; renderObject = renderObject->nextSibling()) {
    2709         if (!renderObject->firstChild() && !renderObject->isInline() && !renderObject->isBlockFlow()
     2709        if ((!renderObject->firstChild() && !renderObject->isInline() && !renderObject->isBlockFlow() )
    27102710            || renderObject->style()->visibility() != VISIBLE)
    27112711            continue;
     
    27722772    // involves doing a relayout during findNextLineBreak and somehow overriding the containingBlockWidth method to return the
    27732773    // current remaining width on a line.
    2774     if (isInline() && !isHTMLMarquee() || !avoidsFloats())
     2774    if ((isInline() && !isHTMLMarquee()) || !avoidsFloats())
    27752775        return false;
    27762776
  • trunk/WebCore/rendering/RenderObject.h

    r41928 r42002  
    869869    // may depend on their contents.
    870870    return obj->isTextControl()
    871         || obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->style()->height().isIntrinsicOrAuto() && !obj->style()->height().isPercent() && !obj->isTableCell()
     871        || (obj->hasOverflowClip() && !obj->style()->width().isIntrinsicOrAuto() && !obj->style()->height().isIntrinsicOrAuto() && !obj->style()->height().isPercent() && !obj->isTableCell())
    872872#if ENABLE(SVG)
    873873           || obj->isSVGRoot()
  • trunk/WebCore/rendering/RenderTableCell.cpp

    r41531 r42002  
    170170    int top = max(borderHalfTop(true), outlineSize);
    171171    int bottom = max(borderHalfBottom(true), outlineSize);
    172     if (left && !rtl || right && rtl) {
     172    if ((left && !rtl) || (right && rtl)) {
    173173        if (RenderTableCell* before = table()->cellBefore(this)) {
    174174            top = max(top, before->borderHalfTop(true));
     
    176176        }
    177177    }
    178     if (left && rtl || right && !rtl) {
     178    if ((left && rtl) || (right && !rtl)) {
    179179        if (RenderTableCell* after = table()->cellAfter(this)) {
    180180            top = max(top, after->borderHalfTop(true));
  • trunk/WebCore/rendering/RenderText.cpp

    r41928 r42002  
    709709    }
    710710
    711     if (needsWordSpacing && len > 1 || ignoringSpaces && !firstWord)
     711    if ((needsWordSpacing && len > 1) || (ignoringSpaces && !firstWord))
    712712        currMaxWidth += wordSpacing;
    713713
  • trunk/WebCore/rendering/bidi.cpp

    r41988 r42002  
    11981198            if (RootInlineBox* prevRootBox = curr->prevRootBox()) {
    11991199                // We have a previous line.
    1200                 if (!dirtiedByFloat && (!prevRootBox->endsWithBreak() || prevRootBox->lineBreakObj()->isText() && prevRootBox->lineBreakPos() >= toRenderText(prevRootBox->lineBreakObj())->textLength()))
     1200                if (!dirtiedByFloat && (!prevRootBox->endsWithBreak() || (prevRootBox->lineBreakObj()->isText() && prevRootBox->lineBreakPos() >= toRenderText(prevRootBox->lineBreakObj())->textLength())))
    12011201                    // The previous line didn't break cleanly or broke at a newline
    12021202                    // that has been deleted, so treat it as dirty too.
     
    15581558static inline unsigned textWidth(RenderText* text, unsigned from, unsigned len, const Font& font, int xPos, bool isFixedPitch, bool collapseWhiteSpace)
    15591559{
    1560     if (isFixedPitch || !from && len == text->textLength())
     1560    if (isFixedPitch || (!from && len == text->textLength()))
    15611561        return text->width(from, len, font, xPos);
    15621562    return font.width(TextRun(text->characters() + from, len, !collapseWhiteSpace, xPos));
  • trunk/WebCore/rendering/style/RenderStyle.cpp

    r41725 r42002  
    396396        // does not, so these style differences can be width differences.
    397397        if (inherited_flags._border_collapse &&
    398             (borderTopStyle() == BHIDDEN && other->borderTopStyle() == BNONE ||
    399              borderTopStyle() == BNONE && other->borderTopStyle() == BHIDDEN ||
    400              borderBottomStyle() == BHIDDEN && other->borderBottomStyle() == BNONE ||
    401              borderBottomStyle() == BNONE && other->borderBottomStyle() == BHIDDEN ||
    402              borderLeftStyle() == BHIDDEN && other->borderLeftStyle() == BNONE ||
    403              borderLeftStyle() == BNONE && other->borderLeftStyle() == BHIDDEN ||
    404              borderRightStyle() == BHIDDEN && other->borderRightStyle() == BNONE ||
    405              borderRightStyle() == BNONE && other->borderRightStyle() == BHIDDEN))
     398            ((borderTopStyle() == BHIDDEN && other->borderTopStyle() == BNONE) ||
     399             (borderTopStyle() == BNONE && other->borderTopStyle() == BHIDDEN) ||
     400             (borderBottomStyle() == BHIDDEN && other->borderBottomStyle() == BNONE) ||
     401             (borderBottomStyle() == BNONE && other->borderBottomStyle() == BHIDDEN) ||
     402             (borderLeftStyle() == BHIDDEN && other->borderLeftStyle() == BNONE) ||
     403             (borderLeftStyle() == BNONE && other->borderLeftStyle() == BHIDDEN) ||
     404             (borderRightStyle() == BHIDDEN && other->borderRightStyle() == BNONE) ||
     405             (borderRightStyle() == BNONE && other->borderRightStyle() == BHIDDEN)))
    406406            return StyleDifferenceLayout;
    407407    }
  • trunk/WebCore/rendering/style/StyleInheritedData.cpp

    r36623 r42002  
    6767    if (c1 == c2)
    6868        return true;
    69     if (!c1 && c2 || c1 && !c2)
     69    if ((!c1 && c2) || (c1 && !c2))
    7070        return false;
    7171    return (*c1 == *c2);
  • trunk/WebCore/rendering/style/StyleRareInheritedData.cpp

    r36623 r42002  
    8686bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
    8787{
    88     if (!textShadow && o.textShadow || textShadow && !o.textShadow)
     88    if ((!textShadow && o.textShadow) || (textShadow && !o.textShadow))
    8989        return false;
    9090    if (textShadow && o.textShadow && (*textShadow != *o.textShadow))
  • trunk/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r41725 r42002  
    171171bool StyleRareNonInheritedData::shadowDataEquivalent(const StyleRareNonInheritedData& o) const
    172172{
    173     if (!m_boxShadow && o.m_boxShadow || m_boxShadow && !o.m_boxShadow)
     173    if ((!m_boxShadow && o.m_boxShadow) || (m_boxShadow && !o.m_boxShadow))
    174174        return false;
    175175    if (m_boxShadow && o.m_boxShadow && (*m_boxShadow != *o.m_boxShadow))
     
    191191bool StyleRareNonInheritedData::animationDataEquivalent(const StyleRareNonInheritedData& o) const
    192192{
    193     if (!m_animations && o.m_animations || m_animations && !o.m_animations)
     193    if ((!m_animations && o.m_animations) || (m_animations && !o.m_animations))
    194194        return false;
    195195    if (m_animations && o.m_animations && (*m_animations != *o.m_animations))
     
    200200bool StyleRareNonInheritedData::transitionDataEquivalent(const StyleRareNonInheritedData& o) const
    201201{
    202     if (!m_transitions && o.m_transitions || m_transitions && !o.m_transitions)
     202    if ((!m_transitions && o.m_transitions) || (m_transitions && !o.m_transitions))
    203203        return false;
    204204    if (m_transitions && o.m_transitions && (*m_transitions != *o.m_transitions))
Note: See TracChangeset for help on using the changeset viewer.