Changeset 17426 in webkit


Ignore:
Timestamp:
Oct 29, 2006, 2:07:47 PM (19 years ago)
Author:
bdakin
Message:

Rubber stamped by Geoff.

This is a followup to my HitTestResult checkin. Most of the
HitTestResult local variables in the code were named i or info for
when the class was named NodeInfo. This patch renames all of these
local variables to result.

Location:
trunk/WebCore
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r17425 r17426  
     12006-10-29  Beth Dakin  <bdakin@apple.com>
     2
     3        Rubber stamped by Geoff.
     4
     5        This is a followup to my HitTestResult checkin. Most of the
     6        HitTestResult local variables in the code were named i or info for
     7        when the class was named NodeInfo. This patch renames all of these
     8        local variables to result.
     9
     10        * dom/Document.cpp:
     11        (WebCore::Document::prepareMouseEvent):
     12        * html/HTMLAreaElement.cpp:
     13        (WebCore::HTMLAreaElement::mapMouseEvent):
     14        * html/HTMLMapElement.cpp:
     15        (WebCore::HTMLMapElement::mapMouseEvent):
     16        * rendering/EllipsisBox.cpp:
     17        (WebCore::EllipsisBox::nodeAtPoint):
     18        * rendering/EllipsisBox.h:
     19        * rendering/InlineBox.cpp:
     20        (WebCore::InlineBox::nodeAtPoint):
     21        * rendering/InlineFlowBox.cpp:
     22        (WebCore::InlineFlowBox::nodeAtPoint):
     23        * rendering/InlineTextBox.cpp:
     24        (WebCore::InlineTextBox::nodeAtPoint):
     25        * rendering/RenderBlock.cpp:
     26        (WebCore::RenderBlock::isPointInScrollbar):
     27        (WebCore::RenderBlock::nodeAtPoint):
     28        * rendering/RenderBlock.h:
     29        * rendering/RenderBox.cpp:
     30        (WebCore::RenderBox::nodeAtPoint):
     31        * rendering/RenderBox.h:
     32        * rendering/RenderFlow.cpp:
     33        (WebCore::RenderFlow::hitTestLines):
     34        * rendering/RenderFlow.h:
     35        * rendering/RenderForeignObject.cpp:
     36        (WebCore::RenderForeignObject::nodeAtPoint):
     37        * rendering/RenderFrameSet.cpp:
     38        (WebCore::RenderFrameSet::nodeAtPoint):
     39        * rendering/RenderImage.cpp:
     40        (WebCore::RenderImage::nodeAtPoint):
     41        * rendering/RenderInline.cpp:
     42        (WebCore::RenderInline::nodeAtPoint):
     43        * rendering/RenderInline.h:
     44        * rendering/RenderLayer.cpp:
     45        (WebCore::RenderLayer::autoscroll):
     46        (WebCore::RenderLayer::hitTest):
     47        (WebCore::RenderLayer::hitTestLayer):
     48        (WebCore::RenderLayer::updateHoverActiveState):
     49        * rendering/RenderListBox.cpp:
     50        (WebCore::RenderListBox::isPointInScrollbar):
     51        * rendering/RenderObject.cpp:
     52        (WebCore::RenderObject::hitTest):
     53        (WebCore::RenderObject::setInnerNode):
     54        (WebCore::RenderObject::nodeAtPoint):
     55        * rendering/RenderObject.h:
     56        * rendering/RenderPath.cpp:
     57        (WebCore::RenderPath::nodeAtPoint):
     58        * rendering/RenderSVGImage.cpp:
     59        (WebCore::RenderSVGImage::nodeAtPoint):
     60        * rendering/RenderSVGText.cpp:
     61        (WebCore::RenderSVGText::nodeAtPoint):
     62        * rendering/RenderTableRow.cpp:
     63        (WebCore::RenderTableRow::nodeAtPoint):
     64        * rendering/RenderTableRow.h:
     65        * rendering/RenderTableSection.cpp:
     66        (WebCore::RenderTableSection::nodeAtPoint):
     67        * rendering/RenderTableSection.h:
     68        * rendering/RenderTextControl.cpp:
     69        (WebCore::RenderTextControl::nodeAtPoint):
     70        * rendering/RootInlineBox.cpp:
     71        (WebCore::RootInlineBox::nodeAtPoint):
     72        * rendering/RootInlineBox.h:
     73
    1742006-10-29  Adam Roben  <aroben@apple.com>
    275
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r17415 r17426  
    1050310503                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
    1050410504                        projectDirPath = "";
    10505                         projectRoot = "";
    1050610505                        targets = (
    1050710506                                93F198A508245E59001E9ABC /* WebCore */,
  • trunk/WebCore/dom/Document.cpp

    r17405 r17426  
    16741674
    16751675    assert(renderer()->isRenderView());
    1676     HitTestResult renderInfo(point, readonly, active, mouseMove);
    1677     renderer()->layer()->hitTest(renderInfo);
     1676    HitTestResult result(point, readonly, active, mouseMove);
     1677    renderer()->layer()->hitTest(result);
    16781678
    16791679    if (!readonly)
    16801680        updateRendering();
    16811681
    1682     bool isOverLink = renderInfo.URLElement() && !renderInfo.URLElement()->getAttribute(hrefAttr).isNull();
    1683     return MouseEventWithHitTestResults(event, renderInfo.innerNode(), renderInfo.scrollbar(), isOverLink);
     1682    bool isOverLink = result.URLElement() && !result.URLElement()->getAttribute(hrefAttr).isNull();
     1683    return MouseEventWithHitTestResults(event, result.innerNode(), result.scrollbar(), isOverLink);
    16841684}
    16851685
  • trunk/WebCore/html/HTMLAreaElement.cpp

    r17399 r17426  
    7070}
    7171
    72 bool HTMLAreaElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& info)
     72bool HTMLAreaElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& result)
    7373{
    7474    if (m_lastSize != size) {
     
    8080        return false;
    8181   
    82     info.setInnerNode(this);
    83     info.setURLElement(this);
     82    result.setInnerNode(this);
     83    result.setURLElement(this);
    8484    return true;
    8585}
  • trunk/WebCore/html/HTMLMapElement.cpp

    r17399 r17426  
    5353}
    5454
    55 bool HTMLMapElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& info)
     55bool HTMLMapElement::mapMouseEvent(int x, int y, const IntSize& size, HitTestResult& result)
    5656{
    5757    HTMLAreaElement* defaultArea = 0;
     
    6363                if (!defaultArea)
    6464                    defaultArea = areaElt;
    65             } else if (areaElt->mapMouseEvent(x, y, size, info))
     65            } else if (areaElt->mapMouseEvent(x, y, size, result))
    6666                return true;
    6767        }
     
    6969   
    7070    if (defaultArea) {
    71         info.setInnerNode(defaultArea);
    72         info.setURLElement(defaultArea);
     71        result.setInnerNode(defaultArea);
     72        result.setURLElement(defaultArea);
    7373    }
    7474    return defaultArea;
  • trunk/WebCore/rendering/EllipsisBox.cpp

    r17399 r17426  
    6262}
    6363
    64 bool EllipsisBox::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty)
     64bool EllipsisBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
    6565{
    6666    tx += m_x;
     
    7171        int mtx = tx + m_width - m_markupBox->xPos();
    7272        int mty = ty + m_baseline - (m_markupBox->yPos() + m_markupBox->baseline());
    73         if (m_markupBox->nodeAtPoint(info, x, y, mtx, mty)) {
    74             object()->setInnerNode(info);
     73        if (m_markupBox->nodeAtPoint(result, x, y, mtx, mty)) {
     74            object()->setInnerNode(result);
    7575            return true;
    7676        }
     
    7878
    7979    if (object()->style()->visibility() == VISIBLE && IntRect(tx, ty, m_width, m_height).contains(x, y)) {
    80         object()->setInnerNode(info);
     80        object()->setInnerNode(result);
    8181        return true;
    8282    }
  • trunk/WebCore/rendering/EllipsisBox.h

    r17399 r17426  
    3939    }
    4040   
    41     virtual void paint(RenderObject::PaintInfo& i, int _tx, int _ty);
    42     virtual bool nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty);
     41    virtual void paint(RenderObject::PaintInfo&, int _tx, int _ty);
     42    virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty);
    4343
    4444private:
  • trunk/WebCore/rendering/InlineBox.cpp

    r17399 r17426  
    150150}
    151151
    152 bool InlineBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
     152bool InlineBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
    153153{
    154154    // Hit test all phases of replaced elements atomically, as though the replaced element established its
    155155    // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
    156156    // specification.)
    157     return object()->hitTest(i, x, y, tx, ty);
     157    return object()->hitTest(result, x, y, tx, ty);
    158158}
    159159
  • trunk/WebCore/rendering/InlineFlowBox.cpp

    r17399 r17426  
    524524}
    525525
    526 bool InlineFlowBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
     526bool InlineFlowBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
    527527{
    528528    // Check children first.
    529529    for (InlineBox* curr = lastChild(); curr; curr = curr->prevOnLine()) {
    530         if (!curr->object()->layer() && curr->nodeAtPoint(i, x, y, tx, ty)) {
    531             object()->setInnerNode(i);
     530        if (!curr->object()->layer() && curr->nodeAtPoint(result, x, y, tx, ty)) {
     531            object()->setInnerNode(result);
    532532            return true;
    533533        }
     
    537537    IntRect rect(tx + m_x, ty + m_y, m_width, m_height);
    538538    if (object()->style()->visibility() == VISIBLE && rect.contains(x, y)) {
    539         object()->setInnerNode(i);
     539        object()->setInnerNode(result);
    540540        return true;
    541541    }
  • trunk/WebCore/rendering/InlineTextBox.cpp

    r17399 r17426  
    221221}
    222222
    223 bool InlineTextBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
     223bool InlineTextBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
    224224{
    225225    if (isLineBreak())
     
    228228    IntRect rect(tx + m_x, ty + m_y, m_width, m_height);
    229229    if (m_truncation != cFullTruncation && object()->style()->visibility() == VISIBLE && rect.contains(x, y)) {
    230         object()->setInnerNode(i);
     230        object()->setInnerNode(result);
    231231        return true;
    232232    }
  • trunk/WebCore/rendering/RenderBlock.cpp

    r17399 r17426  
    25002500}
    25012501
    2502 bool RenderBlock::isPointInScrollbar(HitTestResult& info, int _x, int _y, int _tx, int _ty)
     2502bool RenderBlock::isPointInScrollbar(HitTestResult& result, int _x, int _y, int _tx, int _ty)
    25032503{
    25042504    if (!scrollsOverflow())
     
    25112511                       height() + borderTopExtra() + borderBottomExtra() - borderTop() - borderBottom() -  m_layer->horizontalScrollbarHeight());
    25122512        if (vertRect.contains(_x, _y)) {
    2513             info.setScrollbar(m_layer->verticalScrollbarWidget());
     2513            result.setScrollbar(m_layer->verticalScrollbarWidget());
    25142514            return true;
    25152515        }
     
    25222522                        m_layer->horizontalScrollbarHeight());
    25232523        if (horizRect.contains(_x, _y)) {
    2524             info.setScrollbar(m_layer->horizontaScrollbarWidget());
     2524            result.setScrollbar(m_layer->horizontaScrollbarWidget());
    25252525            return true;
    25262526        }
     
    25302530}
    25312531
    2532 bool RenderBlock::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     2532bool RenderBlock::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    25332533{
    25342534    bool inlineFlow = isInlineFlow();
     
    25532553    }
    25542554
    2555     if (isPointInScrollbar(info, _x, _y, tx, ty)) {
     2555    if (isPointInScrollbar(result, _x, _y, tx, ty)) {
    25562556        if (hitTestAction == HitTestBlockBackground) {
    2557             setInnerNode(info);
     2557            setInnerNode(result);
    25582558            return true;
    25592559        }
     
    25682568    if (childrenInline() && !isTable()) {
    25692569        // We have to hit-test our line boxes.
    2570         if (hitTestLines(info, _x, _y, scrolledX, scrolledY, hitTestAction)) {
    2571             setInnerNode(info);
     2570        if (hitTestLines(result, _x, _y, scrolledX, scrolledY, hitTestAction)) {
     2571            setInnerNode(result);
    25722572            return true;
    25732573        }
     
    25812581            // FIXME: We have to skip over inline flows, since they can show up inside RenderTables at the moment (a demoted inline <form> for example).  If we ever implement a
    25822582            // table-specific hit-test method (which we should do for performance reasons anyway), then we can remove this check.
    2583             if (!child->layer() && !child->isFloating() && !child->isInlineFlow() && child->nodeAtPoint(info, _x, _y, scrolledX, scrolledY, childHitTest)) {
    2584                 setInnerNode(info);
     2583            if (!child->layer() && !child->isFloating() && !child->isInlineFlow() && child->nodeAtPoint(result, _x, _y, scrolledX, scrolledY, childHitTest)) {
     2584                setInnerNode(result);
    25852585                return true;
    25862586            }
     
    25972597        DeprecatedPtrListIterator<FloatingObject> it(*m_floatingObjects);
    25982598        for (it.toLast(); (o = it.current()); --it)
    2599             if (!o->noPaint && !o->node->layer() && o->node->hitTest(info, _x, _y,
     2599            if (!o->noPaint && !o->node->layer() && o->node->hitTest(result, _x, _y,
    26002600                                     scrolledX + o->left + o->node->marginLeft() - o->node->xPos(),
    26012601                                     scrolledY + o->startY + o->node->marginTop() - o->node->yPos())) {
    2602                 setInnerNode(info);
     2602                setInnerNode(result);
    26032603                return true;
    26042604            }
     
    26102610        IntRect boundsRect(tx, ty - topExtra, m_width, m_height + topExtra + borderBottomExtra());
    26112611        if (style()->visibility() == VISIBLE && boundsRect.contains(_x, _y)) {
    2612             setInnerNode(info);
     2612            setInnerNode(result);
    26132613            return true;
    26142614        }
  • trunk/WebCore/rendering/RenderBlock.h

    r17399 r17426  
    199199    int leftOffset(int y) const { return leftRelOffset(y, leftOffset(), true); }
    200200
    201     virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty,
    202                              HitTestAction hitTestAction);
    203 
    204     virtual bool isPointInScrollbar(HitTestResult& info, int x, int y, int tx, int ty);
     201    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction hitTestAction);
     202
     203    virtual bool isPointInScrollbar(HitTestResult&, int x, int y, int tx, int ty);
    205204
    206205    virtual VisiblePosition positionForCoordinates(int x, int y);
  • trunk/WebCore/rendering/RenderBox.cpp

    r17399 r17426  
    255255
    256256// Hit Testing
    257 bool RenderBox::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action)
     257bool RenderBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
    258258{
    259259    tx += m_x;
     
    266266        // table-specific hit-test method (which we should do for performance reasons anyway),
    267267        // then we can remove this check.
    268         if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(info, x, y, tx, ty, action)) {
    269             setInnerNode(info);
     268        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(result, x, y, tx, ty, action)) {
     269            setInnerNode(result);
    270270            return true;
    271271        }
     
    275275    // foreground phase (which is true for replaced elements like images).
    276276    if (action == HitTestForeground && IntRect(tx, ty, m_width, m_height).contains(x, y)) {
    277         setInnerNode(info);
     277        setInnerNode(result);
    278278        return true;
    279279    }
  • trunk/WebCore/rendering/RenderBox.h

    r17399 r17426  
    4343
    4444    virtual void setStyle(RenderStyle*);
    45     virtual void paint(PaintInfo& i, int _tx, int _ty);
    46     virtual bool nodeAtPoint(HitTestResult& i, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction);
     45    virtual void paint(PaintInfo&, int _tx, int _ty);
     46    virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
    4747
    4848    virtual void destroy();
  • trunk/WebCore/rendering/RenderFlow.cpp

    r17399 r17426  
    417417}
    418418
    419 bool RenderFlow::hitTestLines(HitTestResult& i, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     419bool RenderFlow::hitTestLines(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    420420{
    421421    if (hitTestAction != HitTestForeground)
     
    442442    for (InlineFlowBox* curr = lastLineBox(); curr; curr = curr->prevFlowBox()) {
    443443        if (y >= ty + curr->root()->topOverflow() && y < ty + curr->root()->bottomOverflow()) {
    444             bool inside = curr->nodeAtPoint(i, x, y, tx, ty);
     444            bool inside = curr->nodeAtPoint(result, x, y, tx, ty);
    445445            if (inside) {
    446                 setInnerNode(i);
     446                setInnerNode(result);
    447447                return true;
    448448            }
  • trunk/WebCore/rendering/RenderFlow.h

    r17399 r17426  
    7676    virtual void dirtyLineBoxes(bool fullLayout, bool isRootLineBox = false);
    7777   
    78     void paintLines(PaintInfo& i, int _tx, int _ty);
    79     bool hitTestLines(HitTestResult& i, int x, int y, int tx, int ty, HitTestAction hitTestAction);
     78    void paintLines(PaintInfo&, int _tx, int _ty);
     79    bool hitTestLines(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    8080
    8181    virtual IntRect getAbsoluteRepaintRect();
  • trunk/WebCore/rendering/RenderForeignObject.cpp

    r17399 r17426  
    119119}
    120120
    121 bool RenderForeignObject::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     121bool RenderForeignObject::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    122122{
    123123    AffineTransform totalTransform = absoluteTransform();
     
    125125    double localX, localY;
    126126    totalTransform.invert().map(x, y, &localX, &localY);
    127     return RenderBlock::nodeAtPoint(info, (int)localX, (int)localY, tx, ty, hitTestAction);
     127    return RenderBlock::nodeAtPoint(result, (int)localX, (int)localY, tx, ty, hitTestAction);
    128128}
    129129
  • trunk/WebCore/rendering/RenderFrameSet.cpp

    r17399 r17426  
    7676}
    7777
    78 bool RenderFrameSet::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
     78bool RenderFrameSet::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty,
    7979                                 HitTestAction hitTestAction)
    8080{
     
    8282        return false;
    8383
    84     bool inside = RenderContainer::nodeAtPoint(info, _x, _y, _tx, _ty, hitTestAction) ||
     84    bool inside = RenderContainer::nodeAtPoint(result, _x, _y, _tx, _ty, hitTestAction) ||
    8585                  m_resizing || canResize(_x, _y);
    86     if (inside && element() && !element()->noResize() && !info.readonly() && !info.innerNode()) {
    87         info.setInnerNode(element());
    88         info.setInnerNonSharedNode(element());
     86    if (inside && element() && !element()->noResize() && !result.readonly() && !result.innerNode()) {
     87        result.setInnerNode(element());
     88        result.setInnerNonSharedNode(element());
    8989    }
    9090
  • trunk/WebCore/rendering/RenderImage.cpp

    r17399 r17426  
    312312}
    313313
    314 bool RenderImage::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    315 {
    316     bool inside = RenderReplaced::nodeAtPoint(info, _x, _y, _tx, _ty, hitTestAction);
     314bool RenderImage::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     315{
     316    bool inside = RenderReplaced::nodeAtPoint(result, _x, _y, _tx, _ty, hitTestAction);
    317317
    318318    if (inside && element()) {
     
    323323        if (map) {
    324324            // we're a client side image map
    325             inside = map->mapMouseEvent(_x - tx, _y - ty, IntSize(contentWidth(), contentHeight()), info);
    326             info.setInnerNonSharedNode(element());
     325            inside = map->mapMouseEvent(_x - tx, _y - ty, IntSize(contentWidth(), contentHeight()), result);
     326            result.setInnerNonSharedNode(element());
    327327        }
    328328    }
  • trunk/WebCore/rendering/RenderInline.cpp

    r17399 r17426  
    336336}
    337337
    338 bool RenderInline::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
     338bool RenderInline::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty,
    339339                               HitTestAction hitTestAction)
    340340{
    341     return hitTestLines(info, _x, _y, _tx, _ty, hitTestAction);
     341    return hitTestLines(result, _x, _y, _tx, _ty, hitTestAction);
    342342}
    343343
  • trunk/WebCore/rendering/RenderInline.h

    r17399 r17426  
    5858    virtual void layout() {} // Do nothing for layout()
    5959   
    60     virtual void paint(PaintInfo& i, int tx, int ty);
     60    virtual void paint(PaintInfo&, int tx, int ty);
    6161
    62     virtual bool nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
    63                              HitTestAction hitTestAction);
     62    virtual bool nodeAtPoint(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction);
    6463   
    6564    virtual void calcMinMaxWidth();
  • trunk/WebCore/rendering/RenderLayer.cpp

    r17402 r17426  
    866866   
    867867    if (currentFrame->mouseDownMayStartSelect()) {
    868         HitTestResult renderInfo(currentPos, true, false, true);
    869         if (hitTest(renderInfo)) {
    870             VisiblePosition pos(renderInfo.innerNode()->renderer()->positionForPoint(currentPos));
     868        HitTestResult result(currentPos, true, false, true);
     869        if (hitTest(result)) {
     870            VisiblePosition pos(result.innerNode()->renderer()->positionForPoint(currentPos));
    871871            currentFrame->updateSelectionForMouseDragOverPosition(pos);
    872872        }
     
    14721472}
    14731473
    1474 bool RenderLayer::hitTest(HitTestResult& info)
     1474bool RenderLayer::hitTest(HitTestResult& result)
    14751475{
    14761476    renderer()->document()->updateLayout();
     
    14791479    boundsRect.intersect(frameVisibleRect(renderer()));
    14801480
    1481     RenderLayer* insideLayer = hitTestLayer(this, info, boundsRect);
     1481    RenderLayer* insideLayer = hitTestLayer(this, result, boundsRect);
    14821482
    14831483    // Now determine if the result is inside an anchor; make sure an image map wins if
    14841484    // it already set URLElement and only use the innermost.
    1485     Node* node = info.innerNode();
     1485    Node* node = result.innerNode();
    14861486    while (node) {
    1487         if (node->isLink() && !info.URLElement())
    1488             info.setURLElement(static_cast<Element*>(node));
     1487        if (node->isLink() && !result.URLElement())
     1488            result.setURLElement(static_cast<Element*>(node));
    14891489        node = node->parentNode();
    14901490    }
    14911491
    14921492    // Next set up the correct :hover/:active state along the new chain.
    1493     updateHoverActiveState(info);
     1493    updateHoverActiveState(result);
    14941494   
    14951495    // Now return whether we were inside this layer (this will always be true for the root
     
    14981498}
    14991499
    1500 RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& info, const IntRect& hitTestRect)
     1500RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, HitTestResult& result, const IntRect& hitTestRect)
    15011501{
    15021502    // Calculate the clip rects we should use.
     
    15191519    if (m_posZOrderList) {
    15201520        for (int i = m_posZOrderList->size() - 1; i >= 0; --i) {
    1521             insideLayer = m_posZOrderList->at(i)->hitTestLayer(rootLayer, info, hitTestRect);
     1521            insideLayer = m_posZOrderList->at(i)->hitTestLayer(rootLayer, result, hitTestRect);
    15221522            if (insideLayer)
    15231523                return insideLayer;
     
    15281528    if (m_overflowList) {
    15291529        for (int i = m_overflowList->size() - 1; i >= 0; --i) {
    1530             insideLayer = m_overflowList->at(i)->hitTestLayer(rootLayer, info, hitTestRect);
     1530            insideLayer = m_overflowList->at(i)->hitTestLayer(rootLayer, result, hitTestRect);
    15311531            if (insideLayer)
    15321532                return insideLayer;
     
    15351535
    15361536    // Next we want to see if the mouse pos is inside the child RenderObjects of the layer.
    1537     if (fgRect.contains(info.point()) &&
    1538         renderer()->hitTest(info, info.point().x(), info.point().y(),
     1537    if (fgRect.contains(result.point()) &&
     1538        renderer()->hitTest(result, result.point().x(), result.point().y(),
    15391539                            layerBounds.x() - renderer()->xPos(),
    15401540                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(), HitTestDescendants)) {
     
    15431543        // the content in the layer has an element. So just walk up
    15441544        // the tree.
    1545         if (!info.innerNode()) {
     1545        if (!result.innerNode()) {
    15461546            for (RenderObject *r = renderer(); r != NULL; r = r->parent()) {
    15471547                if (r->element()) {
    1548                     info.setInnerNode(r->element());
     1548                    result.setInnerNode(r->element());
    15491549                    break;
    15501550                }
     
    15521552        }
    15531553
    1554         if (!info.innerNonSharedNode()) {
     1554        if (!result.innerNonSharedNode()) {
    15551555             for (RenderObject *r = renderer(); r != NULL; r = r->parent()) {
    15561556                 if (r->element()) {
    1557                      info.setInnerNonSharedNode(r->element());
     1557                     result.setInnerNonSharedNode(r->element());
    15581558                     break;
    15591559                 }
     
    15661566    if (m_negZOrderList) {
    15671567        for (int i = m_negZOrderList->size() - 1; i >= 0; --i) {
    1568             insideLayer = m_negZOrderList->at(i)->hitTestLayer(rootLayer, info, hitTestRect);
     1568            insideLayer = m_negZOrderList->at(i)->hitTestLayer(rootLayer, result, hitTestRect);
    15691569            if (insideLayer)
    15701570                return insideLayer;
     
    15761576    // contain the point so mouse move events keep getting delivered when dragging outside the
    15771577    // window.
    1578     if (bgRect.contains(info.point()) &&
    1579         renderer()->hitTest(info, info.point().x(), info.point().y(),
     1578    if (bgRect.contains(result.point()) &&
     1579        renderer()->hitTest(result, result.point().x(), result.point().y(),
    15801580                            layerBounds.x() - renderer()->xPos(),
    15811581                            layerBounds.y() - renderer()->yPos() + m_object->borderTopExtra(),
     
    15851585    // We didn't hit any layer.  However if the mouse is down, we must always at least be inside
    15861586    // the render view.
    1587     if (info.active() && renderer()->isRenderView()) {
    1588         renderer()->setInnerNode(info);
     1587    if (result.active() && renderer()->isRenderView()) {
     1588        renderer()->setInnerNode(result);
    15891589        return this;
    15901590    }
     
    18301830}
    18311831
    1832 void RenderLayer::updateHoverActiveState(HitTestResult& info)
    1833 {
    1834     // We don't update :hover/:active state when the info is marked as readonly.
    1835     if (info.readonly())
     1832void RenderLayer::updateHoverActiveState(HitTestResult& result)
     1833{
     1834    // We don't update :hover/:active state when the result is marked as readonly.
     1835    if (result.readonly())
    18361836        return;
    18371837
     
    18401840
    18411841    Node* activeNode = doc->activeNode();
    1842     if (activeNode && !info.active()) {
     1842    if (activeNode && !result.active()) {
    18431843        // We are clearing the :active chain because the mouse has been released.
    18441844        for (RenderObject* curr = activeNode->renderer(); curr; curr = curr->parent()) {
     
    18481848        doc->setActiveNode(0);
    18491849    } else {
    1850         Node* newActiveNode = info.innerNode();
    1851         if (!activeNode && newActiveNode && info.active()) {
     1850        Node* newActiveNode = result.innerNode();
     1851        if (!activeNode && newActiveNode && result.active()) {
    18521852            // We are setting the :active chain and freezing it. If future moves happen, they
    18531853            // will need to reference this chain.
     
    18641864    // :hover/:active to only apply to elements that are in the :active chain that we froze
    18651865    // at the time the mouse went down.
    1866     bool mustBeInActiveChain = info.active() && info.mouseMove();
     1866    bool mustBeInActiveChain = result.active() && result.mouseMove();
    18671867
    18681868    // Check to see if the hovered node has changed.  If not, then we don't need to
    18691869    // do anything. 
    18701870    Node* oldHoverNode = doc->hoverNode();
    1871     Node* newHoverNode = info.innerNode();
     1871    Node* newHoverNode = result.innerNode();
    18721872
    18731873    // Update our current hover node.
     
    18941894    for (RenderObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) {
    18951895        if (curr->element() && !curr->isText() && (!mustBeInActiveChain || curr->element()->inActiveChain())) {
    1896             curr->element()->setActive(info.active());
     1896            curr->element()->setActive(result.active());
    18971897            curr->element()->setHovered(true);
    18981898        }
  • trunk/WebCore/rendering/RenderListBox.cpp

    r17399 r17426  
    327327}
    328328
    329 bool RenderListBox::isPointInScrollbar(HitTestResult& info, int _x, int _y, int _tx, int _ty)
     329bool RenderListBox::isPointInScrollbar(HitTestResult& result, int _x, int _y, int _tx, int _ty)
    330330{
    331331    if (!m_vBar)
     
    338338
    339339    if (vertRect.contains(_x, _y)) {
    340         info.setScrollbar(m_vBar->isWidget() ? static_cast<PlatformScrollbar*>(m_vBar) : 0);
     340        result.setScrollbar(m_vBar->isWidget() ? static_cast<PlatformScrollbar*>(m_vBar) : 0);
    341341        return true;
    342342    }
  • trunk/WebCore/rendering/RenderObject.cpp

    r17405 r17426  
    25352535}
    25362536
    2537 bool RenderObject::hitTest(HitTestResult& info, int x, int y, int tx, int ty, HitTestFilter hitTestFilter)
     2537bool RenderObject::hitTest(HitTestResult& result, int x, int y, int tx, int ty, HitTestFilter hitTestFilter)
    25382538{
    25392539    bool inside = false;
    25402540    if (hitTestFilter != HitTestSelf) {
    25412541        // First test the foreground layer (lines and inlines).
    2542         inside = nodeAtPoint(info, x, y, tx, ty, HitTestForeground);
     2542        inside = nodeAtPoint(result, x, y, tx, ty, HitTestForeground);
    25432543       
    25442544        // Test floats next.
    25452545        if (!inside)
    2546             inside = nodeAtPoint(info, x, y, tx, ty, HitTestFloat);
     2546            inside = nodeAtPoint(result, x, y, tx, ty, HitTestFloat);
    25472547
    25482548        // Finally test to see if the mouse is in the background (within a child block's background).
    25492549        if (!inside)
    2550             inside = nodeAtPoint(info, x, y, tx, ty, HitTestChildBlockBackgrounds);
     2550            inside = nodeAtPoint(result, x, y, tx, ty, HitTestChildBlockBackgrounds);
    25512551    }
    25522552   
    25532553    // See if the mouse is inside us but not any of our descendants
    25542554    if (hitTestFilter != HitTestDescendants && !inside)
    2555         inside = nodeAtPoint(info, x, y, tx, ty, HitTestBlockBackground);
     2555        inside = nodeAtPoint(result, x, y, tx, ty, HitTestBlockBackground);
    25562556       
    25572557    return inside;
    25582558}
    25592559
    2560 void RenderObject::setInnerNode(HitTestResult& info)
    2561 {
    2562     if (info.innerNode())
     2560void RenderObject::setInnerNode(HitTestResult& result)
     2561{
     2562    if (result.innerNode())
    25632563        return;
    25642564
     
    25732573         
    25742574    if (node) {
    2575         info.setInnerNode(node);
    2576         if (!info.innerNonSharedNode())
    2577             info.setInnerNonSharedNode(node);
    2578     }
    2579 }
    2580 
    2581 bool RenderObject::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty,
     2575        result.setInnerNode(node);
     2576        if (!result.innerNonSharedNode())
     2577            result.setInnerNonSharedNode(node);
     2578    }
     2579}
     2580
     2581bool RenderObject::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty,
    25822582                               HitTestAction hitTestAction)
    25832583{
  • trunk/WebCore/rendering/RenderObject.h

    r17399 r17426  
    501501    };
    502502   
    503     bool hitTest(HitTestResult& info, int x, int y, int tx, int ty, HitTestFilter hitTestFilter = HitTestAll);
    504     virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty,
    505                              HitTestAction hitTestAction);
    506     void setInnerNode(HitTestResult& info);
     503    bool hitTest(HitTestResult&, int x, int y, int tx, int ty, HitTestFilter hitTestFilter = HitTestAll);
     504    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     505    void setInnerNode(HitTestResult&);
    507506
    508507    virtual VisiblePosition positionForCoordinates(int x, int y);
  • trunk/WebCore/rendering/RenderPath.cpp

    r17399 r17426  
    284284}
    285285
    286 bool RenderPath::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     286bool RenderPath::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    287287{
    288288    // We only draw in the forground phase, so we only hit-test then.
     
    296296        if ((hitRules.canHitStroke && (style()->svgStyle()->hasStroke() || !hitRules.requireStroke) && strokeContains(hitPoint, hitRules.requireStroke))
    297297            || (hitRules.canHitFill && (style()->svgStyle()->hasFill() || !hitRules.requireFill) && fillContains(hitPoint, hitRules.requireFill))) {
    298             setInnerNode(info);
     298            setInnerNode(result);
    299299            return true;
    300300        }
  • trunk/WebCore/rendering/RenderSVGImage.cpp

    r17399 r17426  
    206206}
    207207
    208 bool RenderSVGImage::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     208bool RenderSVGImage::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    209209{
    210210    AffineTransform totalTransform = absoluteTransform();
     
    212212    double localX, localY;
    213213    totalTransform.invert().map(_x + _tx, _y + _ty, &localX, &localY);
    214     return RenderImage::nodeAtPoint(info, (int)localX, (int)localY, 0, 0, hitTestAction);
     214    return RenderImage::nodeAtPoint(result, (int)localX, (int)localY, 0, 0, hitTestAction);
    215215}
    216216
  • trunk/WebCore/rendering/RenderSVGText.cpp

    r17399 r17426  
    9696}
    9797
    98 bool RenderSVGText::nodeAtPoint(HitTestResult& info, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
     98bool RenderSVGText::nodeAtPoint(HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    9999{
    100100    AffineTransform totalTransform = absoluteTransform();
    101101    double localX, localY;
    102102    totalTransform.invert().map(_x, _y, &localX, &localY);
    103     return RenderBlock::nodeAtPoint(info, (int)localX, (int)localY, _tx, _ty, hitTestAction);
     103    return RenderBlock::nodeAtPoint(result, (int)localX, (int)localY, _tx, _ty, hitTestAction);
    104104}
    105105
  • trunk/WebCore/rendering/RenderTableRow.cpp

    r17399 r17426  
    139139
    140140// Hit Testing
    141 bool RenderTableRow::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action)
     141bool RenderTableRow::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
    142142{
    143143    // Table rows cannot ever be hit tested.  Effectively they do not exist.
     
    148148        // table-specific hit-test method (which we should do for performance reasons anyway),
    149149        // then we can remove this check.
    150         if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(info, x, y, tx, ty, action)) {
    151             setInnerNode(info);
     150        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(result, x, y, tx, ty, action)) {
     151            setInnerNode(result);
    152152            return true;
    153153        }
  • trunk/WebCore/rendering/RenderTableRow.h

    r17399 r17426  
    4646    virtual void layout();
    4747    virtual IntRect getAbsoluteRepaintRect();
    48     virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action);
     48    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    4949
    5050    // The only time rows get a layer is when they have transparency.
  • trunk/WebCore/rendering/RenderTableSection.cpp

    r17399 r17426  
    987987
    988988// Hit Testing
    989 bool RenderTableSection::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action)
     989bool RenderTableSection::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
    990990{
    991991    // Table sections cannot ever be hit tested.  Effectively they do not exist.
     
    999999        // table-specific hit-test method (which we should do for performance reasons anyway),
    10001000        // then we can remove this check.
    1001         if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(info, x, y, tx, ty, action)) {
    1002             setInnerNode(info);
     1001        if (!child->layer() && !child->isInlineFlow() && child->nodeAtPoint(result, x, y, tx, ty, action)) {
     1002            setInnerNode(result);
    10031003            return true;
    10041004        }
  • trunk/WebCore/rendering/RenderTableSection.h

    r17399 r17426  
    112112    virtual RenderObject* removeChildNode(RenderObject* child);
    113113
    114     virtual bool nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction action);
     114    virtual bool nodeAtPoint(HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
    115115
    116116    // this gets a cell grid data structure. changing the number of
  • trunk/WebCore/rendering/RenderTextControl.cpp

    r17399 r17426  
    346346}
    347347
    348 bool RenderTextControl::nodeAtPoint(HitTestResult& info, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     348bool RenderTextControl::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    349349{
    350350    // If we're within the text control, we want to act as if we've hit the inner div, incase the point
    351351    // was on the control but not on the div (see Radar 4617841).
    352     if (RenderFlexibleBox::nodeAtPoint(info, x, y, tx, ty, hitTestAction)) {
    353         info.setInnerNode(m_div.get());
     352    if (RenderFlexibleBox::nodeAtPoint(result, x, y, tx, ty, hitTestAction)) {
     353        result.setInnerNode(m_div.get());
    354354        return true;
    355355    } 
  • trunk/WebCore/rendering/RootInlineBox.cpp

    r17399 r17426  
    143143}
    144144
    145 bool RootInlineBox::nodeAtPoint(HitTestResult& i, int x, int y, int tx, int ty)
     145bool RootInlineBox::nodeAtPoint(HitTestResult& result, int x, int y, int tx, int ty)
    146146{
    147147    if (m_ellipsisBox && object()->style()->visibility() == VISIBLE) {
    148         if (m_ellipsisBox->nodeAtPoint(i, x, y, tx, ty)) {
    149             object()->setInnerNode(i);
     148        if (m_ellipsisBox->nodeAtPoint(result, x, y, tx, ty)) {
     149            object()->setInnerNode(result);
    150150            return true;
    151151        }
    152152    }
    153     return InlineFlowBox::nodeAtPoint(i, x, y, tx, ty);
     153    return InlineFlowBox::nodeAtPoint(result, x, y, tx, ty);
    154154}
    155155
  • trunk/WebCore/rendering/RootInlineBox.h

    r17399 r17426  
    8989    EllipsisBox* ellipsisBox() const { return m_ellipsisBox; }
    9090
    91     void paintEllipsisBox(RenderObject::PaintInfo& i, int _tx, int _ty) const;
    92     bool hitTestEllipsisBox(HitTestResult& info, int _x, int _y, int _tx, int _ty,
    93                             HitTestAction hitTestAction, bool inBox);
     91    void paintEllipsisBox(RenderObject::PaintInfo&, int _tx, int _ty) const;
     92    bool hitTestEllipsisBox(HitTestResult&, int _x, int _y, int _tx, int _ty, HitTestAction, bool);
    9493   
    9594    virtual void clearTruncation();
Note: See TracChangeset for help on using the changeset viewer.