Changeset 86705 in webkit


Ignore:
Timestamp:
May 17, 2011 1:57:28 PM (13 years ago)
Author:
eae@chromium.org
Message:

2011-05-17 Emil A Eklund <eae@chromium.org>

Reviewed by Eric Seidel.

Change nodeAtPoint to take IntPoint instead of int x, int y
https://bugs.webkit.org/show_bug.cgi?id=60663

Change nodeAtPoint to take a single const IntPoint& instead of a pair of
ints for the location.

Covered by existing tests.

  • platform/graphics/FloatPoint.h: (WebCore::flooredIntPoint):
  • rendering/EllipsisBox.cpp: (WebCore::EllipsisBox::nodeAtPoint):
  • rendering/EllipsisBox.h:
  • rendering/InlineBox.cpp: (WebCore::InlineBox::nodeAtPoint):
  • rendering/InlineBox.h:
  • rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::nodeAtPoint):
  • rendering/InlineFlowBox.h:
  • rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::nodeAtPoint):
  • rendering/InlineTextBox.h:
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::nodeAtPoint): (WebCore::RenderBlock::hitTestContents):
  • rendering/RenderBlock.h:
  • rendering/RenderBox.cpp: (WebCore::RenderBox::nodeAtPoint):
  • rendering/RenderBox.h:
  • rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::nodeAtPoint):
  • rendering/RenderFrameSet.h:
  • rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint):
  • rendering/RenderImage.h:
  • rendering/RenderInline.cpp: (WebCore::RenderInline::nodeAtPoint):
  • rendering/RenderInline.h:
  • rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::hitTest):
  • rendering/RenderListBox.cpp: (WebCore::RenderListBox::nodeAtPoint):
  • rendering/RenderListBox.h:
  • rendering/RenderObject.cpp: (WebCore::RenderObject::hitTest): (WebCore::RenderObject::nodeAtPoint):
  • rendering/RenderObject.h:
  • rendering/RenderTable.cpp: (WebCore::RenderTable::nodeAtPoint):
  • rendering/RenderTable.h:
  • rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::nodeAtPoint):
  • rendering/RenderTableRow.h:
  • rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::nodeAtPoint):
  • rendering/RenderTableSection.h:
  • rendering/RenderText.h: (WebCore::RenderText::nodeAtPoint):
  • rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::nodeAtPoint):
  • rendering/RenderTextControlMultiLine.h:
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::nodeAtPoint):
  • rendering/RenderTextControlSingleLine.h:
  • rendering/RenderWidget.cpp: (WebCore::RenderWidget::nodeAtPoint):
  • rendering/RenderWidget.h:
  • rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::nodeAtPoint):
  • rendering/RootInlineBox.h:
  • rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): (WebCore::RenderSVGForeignObject::nodeAtPoint):
  • rendering/svg/RenderSVGForeignObject.h:
  • rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::nodeAtPoint):
  • rendering/svg/RenderSVGModelObject.h:
  • rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::nodeAtPoint):
  • rendering/svg/RenderSVGRoot.h:
  • rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::nodeAtFloatPoint): (WebCore::RenderSVGText::nodeAtPoint):
  • rendering/svg/RenderSVGText.h:
Location:
trunk/Source/WebCore
Files:
48 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r86704 r86705  
     12011-05-17  Emil A Eklund  <eae@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Change nodeAtPoint to take IntPoint instead of int x, int y
     6        https://bugs.webkit.org/show_bug.cgi?id=60663
     7
     8        Change nodeAtPoint to take a single const IntPoint& instead of a pair of
     9        ints for the location.
     10
     11        Covered by existing tests.
     12
     13        * platform/graphics/FloatPoint.h:
     14        (WebCore::flooredIntPoint):
     15        * rendering/EllipsisBox.cpp:
     16        (WebCore::EllipsisBox::nodeAtPoint):
     17        * rendering/EllipsisBox.h:
     18        * rendering/InlineBox.cpp:
     19        (WebCore::InlineBox::nodeAtPoint):
     20        * rendering/InlineBox.h:
     21        * rendering/InlineFlowBox.cpp:
     22        (WebCore::InlineFlowBox::nodeAtPoint):
     23        * rendering/InlineFlowBox.h:
     24        * rendering/InlineTextBox.cpp:
     25        (WebCore::InlineTextBox::nodeAtPoint):
     26        * rendering/InlineTextBox.h:
     27        * rendering/RenderBlock.cpp:
     28        (WebCore::RenderBlock::nodeAtPoint):
     29        (WebCore::RenderBlock::hitTestContents):
     30        * rendering/RenderBlock.h:
     31        * rendering/RenderBox.cpp:
     32        (WebCore::RenderBox::nodeAtPoint):
     33        * rendering/RenderBox.h:
     34        * rendering/RenderFrameSet.cpp:
     35        (WebCore::RenderFrameSet::nodeAtPoint):
     36        * rendering/RenderFrameSet.h:
     37        * rendering/RenderImage.cpp:
     38        (WebCore::RenderImage::nodeAtPoint):
     39        * rendering/RenderImage.h:
     40        * rendering/RenderInline.cpp:
     41        (WebCore::RenderInline::nodeAtPoint):
     42        * rendering/RenderInline.h:
     43        * rendering/RenderLineBoxList.cpp:
     44        (WebCore::RenderLineBoxList::hitTest):
     45        * rendering/RenderListBox.cpp:
     46        (WebCore::RenderListBox::nodeAtPoint):
     47        * rendering/RenderListBox.h:
     48        * rendering/RenderObject.cpp:
     49        (WebCore::RenderObject::hitTest):
     50        (WebCore::RenderObject::nodeAtPoint):
     51        * rendering/RenderObject.h:
     52        * rendering/RenderTable.cpp:
     53        (WebCore::RenderTable::nodeAtPoint):
     54        * rendering/RenderTable.h:
     55        * rendering/RenderTableRow.cpp:
     56        (WebCore::RenderTableRow::nodeAtPoint):
     57        * rendering/RenderTableRow.h:
     58        * rendering/RenderTableSection.cpp:
     59        (WebCore::RenderTableSection::nodeAtPoint):
     60        * rendering/RenderTableSection.h:
     61        * rendering/RenderText.h:
     62        (WebCore::RenderText::nodeAtPoint):
     63        * rendering/RenderTextControlMultiLine.cpp:
     64        (WebCore::RenderTextControlMultiLine::nodeAtPoint):
     65        * rendering/RenderTextControlMultiLine.h:
     66        * rendering/RenderTextControlSingleLine.cpp:
     67        (WebCore::RenderTextControlSingleLine::nodeAtPoint):
     68        * rendering/RenderTextControlSingleLine.h:
     69        * rendering/RenderWidget.cpp:
     70        (WebCore::RenderWidget::nodeAtPoint):
     71        * rendering/RenderWidget.h:
     72        * rendering/RootInlineBox.cpp:
     73        (WebCore::RootInlineBox::nodeAtPoint):
     74        * rendering/RootInlineBox.h:
     75        * rendering/svg/RenderSVGForeignObject.cpp:
     76        (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
     77        (WebCore::RenderSVGForeignObject::nodeAtPoint):
     78        * rendering/svg/RenderSVGForeignObject.h:
     79        * rendering/svg/RenderSVGModelObject.cpp:
     80        (WebCore::RenderSVGModelObject::nodeAtPoint):
     81        * rendering/svg/RenderSVGModelObject.h:
     82        * rendering/svg/RenderSVGRoot.cpp:
     83        (WebCore::RenderSVGRoot::nodeAtPoint):
     84        * rendering/svg/RenderSVGRoot.h:
     85        * rendering/svg/RenderSVGText.cpp:
     86        (WebCore::RenderSVGText::nodeAtFloatPoint):
     87        (WebCore::RenderSVGText::nodeAtPoint):
     88        * rendering/svg/RenderSVGText.h:
     89
    1902011-05-17  Andrew Wilson  <atwilson@chromium.org>
    291
  • trunk/Source/WebCore/platform/graphics/FloatPoint.h

    r84273 r86705  
    203203}
    204204
     205inline IntPoint flooredIntPoint(const FloatPoint& p)
     206{
     207    return IntPoint(static_cast<int>(p.x()), static_cast<int>(p.y()));
     208}
     209
    205210float findSlope(const FloatPoint& p1, const FloatPoint& p2, float& c);
    206211
  • trunk/Source/WebCore/rendering/EllipsisBox.cpp

    r85143 r86705  
    102102}
    103103
    104 bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, int lineTop, int lineBottom)
     104bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom)
    105105{
    106106    tx += m_x;
     
    112112        int mtx = tx + m_logicalWidth - m_markupBox->x();
    113113        int mty = ty + style->fontMetrics().ascent() - (m_markupBox->y() + m_markupBox->renderer()->style(m_firstLine)->fontMetrics().ascent());
    114         if (m_markupBox->nodeAtPoint(request, result, x, y, mtx, mty, lineTop, lineBottom)) {
    115             renderer()->updateHitTestResult(result, IntPoint(x - mtx, y - mty));
     114        if (m_markupBox->nodeAtPoint(request, result, pointInContainer, mtx, mty, lineTop, lineBottom)) {
     115            renderer()->updateHitTestResult(result, pointInContainer - IntSize(mtx, mty));
    116116            return true;
    117117        }
     
    119119
    120120    IntRect boundsRect = IntRect(tx, ty, m_logicalWidth, m_height);
    121     if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(x, y))) {
    122         renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
    123         if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, boundsRect))
     121    if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(pointInContainer))) {
     122        renderer()->updateHitTestResult(result, pointInContainer - IntSize(tx, ty));
     123        if (!result.addNodeToRectBasedTestResult(renderer()->node(), pointInContainer.x(), pointInContainer.y(), boundsRect))
    124124            return true;
    125125    }
  • trunk/Source/WebCore/rendering/EllipsisBox.h

    r82611 r86705  
    4141
    4242    virtual void paint(PaintInfo&, int tx, int ty, int lineTop, int lineBottom);
    43     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, int lineTop, int lineBottom);
     43    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom);
    4444    void setSelectionState(RenderObject::SelectionState s) { m_selectionState = s; }
    4545    IntRect selectionRect(int tx, int ty);
  • trunk/Source/WebCore/rendering/InlineBox.cpp

    r85512 r86705  
    222222}
    223223
    224 bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, int /* lineTop */, int /*lineBottom*/)
     224bool InlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, int /* lineTop */, int /*lineBottom*/)
    225225{
    226226    // Hit test all phases of replaced elements atomically, as though the replaced element established its
    227227    // own stacking context.  (See Appendix E.2, section 6.4 on inline block/table elements in the CSS2.1
    228228    // specification.)
    229     return renderer()->hitTest(request, result, IntPoint(x, y), tx, ty);
     229    return renderer()->hitTest(request, result, pointInContainer, tx, ty);
    230230}
    231231
  • trunk/Source/WebCore/rendering/InlineBox.h

    r85512 r86705  
    131131
    132132    virtual void paint(PaintInfo&, int tx, int ty, int lineTop, int lineBottom);
    133     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, int lineTop, int lineBottom);
     133    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom);
    134134
    135135    InlineBox* next() const { return m_next; }
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r86384 r86705  
    899899}
    900900
    901 bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, int lineTop, int lineBottom)
     901bool InlineFlowBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom)
    902902{
    903903    IntRect overflowRect(visualOverflowRect(lineTop, lineBottom));
    904904    flipForWritingMode(overflowRect);
    905905    overflowRect.move(tx, ty);
    906     if (!overflowRect.intersects(result.rectForPoint(x, y)))
     906    if (!overflowRect.intersects(result.rectForPoint(pointInContainer)))
    907907        return false;
    908908
    909909    // Check children first.
    910910    for (InlineBox* curr = lastChild(); curr; curr = curr->prevOnLine()) {
    911         if ((curr->renderer()->isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) && curr->nodeAtPoint(request, result, x, y, tx, ty, lineTop, lineBottom)) {
    912             renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
     911        if ((curr->renderer()->isText() || !curr->boxModelObject()->hasSelfPaintingLayer()) && curr->nodeAtPoint(request, result, pointInContainer, tx, ty, lineTop, lineBottom)) {
     912            renderer()->updateHitTestResult(result, pointInContainer - IntSize(tx, ty));
    913913            return true;
    914914        }
     
    938938    rect.move(tx, ty);
    939939
    940     if (visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
    941         renderer()->updateHitTestResult(result, flipForWritingMode(IntPoint(x - tx, y - ty))); // Don't add in m_x or m_y here, we want coords in the containing block's space.
    942         if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
     940    if (visibleToHitTesting() && rect.intersects(result.rectForPoint(pointInContainer))) {
     941        renderer()->updateHitTestResult(result, flipForWritingMode(pointInContainer - IntSize(tx, ty))); // Don't add in m_x or m_y here, we want coords in the containing block's space.
     942        if (!result.addNodeToRectBasedTestResult(renderer()->node(), pointInContainer.x(), pointInContainer.y(), rect))
    943943            return true;
    944944    }
  • trunk/Source/WebCore/rendering/InlineFlowBox.h

    r86384 r86705  
    110110    void paintBoxShadow(GraphicsContext*, RenderStyle*, ShadowStyle, const IntRect&);
    111111    virtual void paint(PaintInfo&, int tx, int ty, int lineTop, int lineBottom);
    112     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, int lineTop, int lineBottom);
     112    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom);
    113113
    114114    virtual RenderLineBoxList* rendererLineBoxes() const;
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r86704 r86705  
    345345}
    346346
    347 bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, int x, int y, int tx, int ty, int /* lineTop */, int /*lineBottom*/)
     347bool InlineTextBox::nodeAtPoint(const HitTestRequest&, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, int /* lineTop */, int /*lineBottom*/)
    348348{
    349349    if (isLineBreak())
     
    353353    boxOrigin.move(tx, ty);
    354354    FloatRect rect(boxOrigin, IntSize(width(), height()));
    355     if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
    356         renderer()->updateHitTestResult(result, flipForWritingMode(IntPoint(x - tx, y - ty)));
    357         if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
     355    if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(pointInContainer))) {
     356        renderer()->updateHitTestResult(result, flipForWritingMode(pointInContainer - IntSize(tx, ty)));
     357        if (!result.addNodeToRectBasedTestResult(renderer()->node(), pointInContainer.x(), pointInContainer.y(), rect))
    358358            return true;
    359359    }
  • trunk/Source/WebCore/rendering/InlineTextBox.h

    r86197 r86705  
    108108protected:
    109109    virtual void paint(PaintInfo&, int tx, int ty, int lineTop, int lineBottom);
    110     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, int lineTop, int lineBottom);
     110    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom);
    111111
    112112public:
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r86698 r86705  
    38983898}
    38993899
    3900 bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int _x, int _y, int _tx, int _ty, HitTestAction hitTestAction)
    3901 {
    3902     int tx = _tx + x();
    3903     int ty = _ty + y();
     3900bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
     3901{
     3902    IntSize localOffset(tx + x(), ty + y());
    39043903
    39053904    if (!isRenderView()) {
    39063905        // Check if we need to do anything at all.
    39073906        IntRect overflowBox = visualOverflowRect();
    3908         overflowBox.move(tx, ty);
    3909         if (!overflowBox.intersects(result.rectForPoint(_x, _y)))
     3907        overflowBox.move(localOffset);
     3908        if (!overflowBox.intersects(result.rectForPoint(pointInContainer)))
    39103909            return false;
    39113910    }
    39123911
    3913     if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && isPointInOverflowControl(result, _x, _y, tx, ty)) {
    3914         updateHitTestResult(result, IntPoint(_x - tx, _y - ty));
     3912    if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && isPointInOverflowControl(result, pointInContainer.x(), pointInContainer.y(), localOffset.width(), localOffset.height())) {
     3913        updateHitTestResult(result, pointInContainer - localOffset);
    39153914        // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet.
    3916         if (!result.addNodeToRectBasedTestResult(node(), _x, _y))
     3915        if (!result.addNodeToRectBasedTestResult(node(), pointInContainer.x(), pointInContainer.y()))
    39173916           return true;
    39183917    }
     
    39213920    bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
    39223921    bool useClip = (hasControlClip() || useOverflowClip);
    3923     IntRect hitTestArea(result.rectForPoint(_x, _y));
    3924     bool checkChildren = !useClip || (hasControlClip() ? controlClipRect(tx, ty).intersects(hitTestArea) : overflowClipRect(tx, ty, IncludeOverlayScrollbarSize).intersects(hitTestArea));
     3922    IntRect hitTestArea(result.rectForPoint(pointInContainer));
     3923    bool checkChildren = !useClip || (hasControlClip() ? controlClipRect(localOffset.width(), localOffset.height()).intersects(hitTestArea) : overflowClipRect(localOffset.width(), localOffset.height(), IncludeOverlayScrollbarSize).intersects(hitTestArea));
    39253924    if (checkChildren) {
    39263925        // Hit test descendants first.
    3927         int scrolledX = tx;
    3928         int scrolledY = ty;
     3926        IntSize scrolledOffset(localOffset);
    39293927        if (hasOverflowClip()) {
    3930             IntSize offset = layer()->scrolledContentOffset();
    3931             scrolledX -= offset.width();
    3932             scrolledY -= offset.height();
     3928            scrolledOffset -= layer()->scrolledContentOffset();
    39333929        }
    39343930
    39353931        // Hit test contents if we don't have columns.
    39363932        if (!hasColumns()) {
    3937             if (hitTestContents(request, result, _x, _y, scrolledX, scrolledY, hitTestAction)) {
    3938                 updateHitTestResult(result, IntPoint(_x - tx, _y - ty));
     3933            if (hitTestContents(request, result, pointInContainer.x(), pointInContainer.y(), scrolledOffset.width(), scrolledOffset.height(), hitTestAction)) {
     3934                updateHitTestResult(result, pointInContainer - localOffset);
    39393935                return true;
    39403936            }
    3941             if (hitTestAction == HitTestFloat && hitTestFloats(request, result, _x, _y, scrolledX, scrolledY))
     3937            if (hitTestAction == HitTestFloat && hitTestFloats(request, result, pointInContainer.x(), pointInContainer.y(), scrolledOffset.width(), scrolledOffset.height()))
    39423938                return true;
    3943         } else if (hitTestColumns(request, result, _x, _y, scrolledX, scrolledY, hitTestAction)) {
    3944             updateHitTestResult(result, IntPoint(_x - tx, _y - ty));
     3939        } else if (hitTestColumns(request, result, pointInContainer.x(), pointInContainer.y(), scrolledOffset.width(), scrolledOffset.height(), hitTestAction)) {
     3940            updateHitTestResult(result, pointInContainer - localOffset);
    39453941            return true;
    39463942        }
     
    39493945    // Now hit test our background
    39503946    if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) {
    3951         IntRect boundsRect(tx, ty, width(), height());
    3952         if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(_x, _y))) {
    3953             updateHitTestResult(result, flipForWritingMode(IntPoint(_x - tx, _y - ty)));
    3954             if (!result.addNodeToRectBasedTestResult(node(), _x, _y, boundsRect))
     3947        IntRect boundsRect(localOffset.width(), localOffset.height(), width(), height());
     3948        if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(pointInContainer))) {
     3949            updateHitTestResult(result, flipForWritingMode(pointInContainer - localOffset));
     3950            if (!result.addNodeToRectBasedTestResult(node(), pointInContainer.x(), pointInContainer.y(), boundsRect))
    39553951                return true;
    39563952        }
     
    40494045        for (RenderBox* child = lastChildBox(); child; child = child->previousSiblingBox()) {
    40504046            IntPoint childPoint = flipForWritingMode(child, IntPoint(tx, ty), ParentToChildFlippingAdjustment);
    4051             if (!child->hasSelfPaintingLayer() && !child->isFloating() && child->nodeAtPoint(request, result, x, y, childPoint.x(), childPoint.y(), childHitTest))
     4047            if (!child->hasSelfPaintingLayer() && !child->isFloating() && child->nodeAtPoint(request, result, IntPoint(x, y), childPoint.x(), childPoint.y(), childHitTest))
    40524048                return true;
    40534049        }
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r86698 r86705  
    287287    virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
    288288
    289     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     289    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    290290
    291291    virtual void computePreferredLogicalWidths();
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r86632 r86705  
    741741
    742742// Hit Testing
    743 bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int xPos, int yPos, int tx, int ty, HitTestAction action)
     743bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction action)
    744744{
    745745    tx += x();
     
    748748    // Check kids first.
    749749    for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
    750         if (!child->hasLayer() && child->nodeAtPoint(request, result, xPos, yPos, tx, ty, action)) {
    751             updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
     750        if (!child->hasLayer() && child->nodeAtPoint(request, result, pointInContainer, tx, ty, action)) {
     751            updateHitTestResult(result, pointInContainer - IntSize(tx, ty));
    752752            return true;
    753753        }
     
    757757    // foreground phase (which is true for replaced elements like images).
    758758    IntRect boundsRect = IntRect(tx, ty, width(), height());
    759     if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
    760         updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
    761         if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
     759    if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectForPoint(pointInContainer))) {
     760        updateHitTestResult(result, pointInContainer - IntSize(tx, ty));
     761        if (!result.addNodeToRectBasedTestResult(node(), pointInContainer.x(), pointInContainer.y(), boundsRect))
    762762            return true;
    763763    }
  • trunk/Source/WebCore/rendering/RenderBox.h

    r86395 r86705  
    240240    virtual void layout();
    241241    virtual void paint(PaintInfo&, int tx, int ty);
    242     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     242    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    243243
    244244    virtual void destroy();
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r86395 r86705  
    159159
    160160bool RenderFrameSet::nodeAtPoint(const HitTestRequest& request, HitTestResult& result,
    161     int x, int y, int tx, int ty, HitTestAction action)
     161    const IntPoint& pointInContainer, int tx, int ty, HitTestAction action)
    162162{
    163163    if (action != HitTestForeground)
    164164        return false;
    165165
    166     bool inside = RenderBox::nodeAtPoint(request, result, x, y, tx, ty, action)
     166    bool inside = RenderBox::nodeAtPoint(request, result, pointInContainer, tx, ty, action)
    167167        || m_isResizing;
    168168
  • trunk/Source/WebCore/rendering/RenderFrameSet.h

    r86390 r86705  
    9797
    9898    virtual void layout();
    99     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     99    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    100100    virtual void paint(PaintInfo&, int tx, int ty);
    101101    virtual bool isChildAllowed(RenderObject*, RenderStyle*) const;
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r86197 r86705  
    394394}
    395395
    396 bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     396bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
    397397{
    398398    HitTestResult tempResult(result.point(), result.topPadding(), result.rightPadding(), result.bottomPadding(), result.leftPadding());
    399     bool inside = RenderReplaced::nodeAtPoint(request, tempResult, x, y, tx, ty, hitTestAction);
     399    bool inside = RenderReplaced::nodeAtPoint(request, tempResult, pointInContainer, tx, ty, hitTestAction);
    400400
    401401    if (tempResult.innerNode() && node()) {
     
    403403            IntRect contentBox = contentBoxRect();
    404404            float zoom = style()->effectiveZoom();
    405             int mapX = lroundf((x - tx - this->x() - contentBox.x()) / zoom);
    406             int mapY = lroundf((y - ty - this->y() - contentBox.y()) / zoom);
     405            int mapX = lroundf((pointInContainer.x() - tx - this->x() - contentBox.x()) / zoom);
     406            int mapY = lroundf((pointInContainer.y() - ty - this->y() - contentBox.y()) / zoom);
    407407            if (map->mapMouseEvent(mapX, mapY, contentBox.size(), tempResult))
    408408                tempResult.setInnerNonSharedNode(node());
  • trunk/Source/WebCore/rendering/RenderImage.h

    r77313 r86705  
    8282
    8383    virtual void notifyFinished(CachedResource*);
    84     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     84    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    8585
    8686    virtual int computeReplacedLogicalWidth(bool includeMaxWidth = true) const;
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r86413 r86705  
    713713
    714714bool RenderInline::nodeAtPoint(const HitTestRequest& request, HitTestResult& result,
    715                                 int x, int y, int tx, int ty, HitTestAction hitTestAction)
    716 {
    717     return m_lineBoxes.hitTest(this, request, result, x, y, tx, ty, hitTestAction);
     715                                const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
     716{
     717    return m_lineBoxes.hitTest(this, request, result, pointInContainer.x(), pointInContainer.y(), tx, ty, hitTestAction);
    718718}
    719719
  • trunk/Source/WebCore/rendering/RenderInline.h

    r86314 r86705  
    118118    virtual void paint(PaintInfo&, int tx, int ty);
    119119
    120     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     120    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    121121
    122122    virtual bool requiresLayer() const { return isRelPositioned() || isTransparent() || hasMask(); }
  • trunk/Source/WebCore/rendering/RenderLineBoxList.cpp

    r86176 r86705  
    302302        RootInlineBox* root = curr->root();
    303303        if (rangeIntersectsRect(renderer, curr->logicalTopVisualOverflow(root->lineTop()), curr->logicalBottomVisualOverflow(root->lineBottom()), rect, tx, ty)) {
    304             bool inside = curr->nodeAtPoint(request, result, x, y, tx, ty, root->lineTop(), root->lineBottom());
     304            bool inside = curr->nodeAtPoint(request, result, IntPoint(x, y), tx, ty, root->lineTop(), root->lineBottom());
    305305            if (inside) {
    306306                renderer->updateHitTestResult(result, IntPoint(x - tx, y - ty));
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r86325 r86705  
    667667}
    668668
    669 bool RenderListBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    670 {
    671     if (!RenderBlock::nodeAtPoint(request, result, x, y, tx, ty, hitTestAction))
     669bool RenderListBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
     670{
     671    if (!RenderBlock::nodeAtPoint(request, result, pointInContainer, tx, ty, hitTestAction))
    672672        return false;
    673673    const Vector<Element*>& listItems = toSelectElement(static_cast<Element*>(node()))->listItems();
     
    676676    ty += this->y();
    677677    for (int i = 0; i < size; ++i) {
    678         if (itemBoundingBoxRect(tx, ty, i).contains(x, y)) {
     678        if (itemBoundingBoxRect(tx, ty, i).contains(pointInContainer)) {
    679679            if (Element* node = listItems[i]) {
    680680                result.setInnerNode(node);
    681681                if (!result.innerNonSharedNode())
    682682                    result.setInnerNonSharedNode(node);
    683                 result.setLocalPoint(IntPoint(x - tx, y - ty));
     683                result.setLocalPoint(pointInContainer - IntSize(tx, ty));
    684684                break;
    685685            }
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r83820 r86705  
    9797    virtual void setScrollTop(int);
    9898
    99     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     99    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    100100
    101101    // ScrollableArea interface.
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r86413 r86705  
    21332133}
    21342134
    2135 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const IntPoint& point, int tx, int ty, HitTestFilter hitTestFilter)
     2135bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestFilter hitTestFilter)
    21362136{
    21372137    bool inside = false;
    21382138    if (hitTestFilter != HitTestSelf) {
    21392139        // First test the foreground layer (lines and inlines).
    2140         inside = nodeAtPoint(request, result, point.x(), point.y(), tx, ty, HitTestForeground);
     2140        inside = nodeAtPoint(request, result, pointInContainer, tx, ty, HitTestForeground);
    21412141
    21422142        // Test floats next.
    21432143        if (!inside)
    2144             inside = nodeAtPoint(request, result, point.x(), point.y(), tx, ty, HitTestFloat);
     2144            inside = nodeAtPoint(request, result, pointInContainer, tx, ty, HitTestFloat);
    21452145
    21462146        // Finally test to see if the mouse is in the background (within a child block's background).
    21472147        if (!inside)
    2148             inside = nodeAtPoint(request, result, point.x(), point.y(), tx, ty, HitTestChildBlockBackgrounds);
     2148            inside = nodeAtPoint(request, result, pointInContainer, tx, ty, HitTestChildBlockBackgrounds);
    21492149    }
    21502150
    21512151    // See if the mouse is inside us but not any of our descendants
    21522152    if (hitTestFilter != HitTestDescendants && !inside)
    2153         inside = nodeAtPoint(request, result, point.x(), point.y(), tx, ty, HitTestBlockBackground);
     2153        inside = nodeAtPoint(request, result, pointInContainer, tx, ty, HitTestBlockBackground);
    21542154
    21552155    return inside;
     
    21702170}
    21712171
    2172 bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int /*x*/, int /*y*/, int /*tx*/, int /*ty*/, HitTestAction)
     2172bool RenderObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& /*pointInContainer*/, int /*tx*/, int /*ty*/, HitTestAction)
    21732173{
    21742174    return false;
  • trunk/Source/WebCore/rendering/RenderObject.h

    r86400 r86705  
    547547
    548548    bool hitTest(const HitTestRequest&, HitTestResult&, const IntPoint&, int tx, int ty, HitTestFilter = HitTestAll);
    549     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     549    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    550550    virtual void updateHitTestResult(HitTestResult&, const IntPoint&);
    551551
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r86400 r86705  
    11991199}
    12001200
    1201 bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int xPos, int yPos, int tx, int ty, HitTestAction action)
     1201bool RenderTable::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction action)
    12021202{
    12031203    tx += x();
     
    12051205
    12061206    // Check kids first.
    1207     if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos))) {
     1207    if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectForPoint(pointInContainer))) {
    12081208        for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
    12091209            if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption)) {
    12101210                IntPoint childPoint = flipForWritingMode(toRenderBox(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);
    1211                 if (child->nodeAtPoint(request, result, xPos, yPos, childPoint.x(), childPoint.y(), action)) {
    1212                     updateHitTestResult(result, IntPoint(xPos - childPoint.x(), yPos - childPoint.y()));
     1211                if (child->nodeAtPoint(request, result, pointInContainer, childPoint.x(), childPoint.y(), action)) {
     1212                    updateHitTestResult(result, toPoint(pointInContainer - childPoint));
    12131213                    return true;
    12141214                }
     
    12191219    // Check our bounds next.
    12201220    IntRect boundsRect = IntRect(tx, ty, width(), height());
    1221     if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
    1222         updateHitTestResult(result, flipForWritingMode(IntPoint(xPos - tx, yPos - ty)));
    1223         if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
     1221    if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(pointInContainer))) {
     1222        updateHitTestResult(result, flipForWritingMode(pointInContainer - IntSize(tx, ty)));
     1223        if (!result.addNodeToRectBasedTestResult(node(), pointInContainer.x(), pointInContainer.y(), boundsRect))
    12241224            return true;
    12251225    }
  • trunk/Source/WebCore/rendering/RenderTable.h

    r86377 r86705  
    221221    virtual void layout();
    222222    virtual void computePreferredLogicalWidths();
    223     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int xPos, int yPos, int tx, int ty, HitTestAction);
     223    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    224224   
    225225    virtual int firstLineBoxBaseline() const;
  • trunk/Source/WebCore/rendering/RenderTableRow.cpp

    r83255 r86705  
    188188
    189189// Hit Testing
    190 bool RenderTableRow::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
     190bool RenderTableRow::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction action)
    191191{
    192192    // Table rows cannot ever be hit tested.  Effectively they do not exist.
     
    199199        if (child->isTableCell() && !toRenderBox(child)->hasSelfPaintingLayer()) {
    200200            IntPoint cellPoint = flipForWritingMode(toRenderTableCell(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);
    201             if (child->nodeAtPoint(request, result, x, y, cellPoint.x(), cellPoint.y(), action)) {
    202                 updateHitTestResult(result, IntPoint(x - cellPoint.x(), y - cellPoint.y()));
     201            if (child->nodeAtPoint(request, result, pointInContainer, cellPoint.x(), cellPoint.y(), action)) {
     202                updateHitTestResult(result, pointInContainer - IntSize(cellPoint.x(), cellPoint.y()));
    203203                return true;
    204204            }
  • trunk/Source/WebCore/rendering/RenderTableRow.h

    r83255 r86705  
    5555    virtual void layout();
    5656    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
    57     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     57    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    5858
    5959    // The only time rows get a layer is when they have transparency.
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r86395 r86705  
    11431143
    11441144// Hit Testing
    1145 bool RenderTableSection::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int xPos, int yPos, int tx, int ty, HitTestAction action)
     1145bool RenderTableSection::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction action)
    11461146{
    11471147    // If we have no children then we have nothing to do.
     
    11541154    ty += y();
    11551155
    1156     if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos)))
     1156    if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectForPoint(pointInContainer)))
    11571157        return false;
    11581158
     
    11651165            if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer()) {
    11661166                IntPoint childPoint = flipForWritingMode(toRenderBox(child), IntPoint(tx, ty), ParentToChildFlippingAdjustment);
    1167                 if (child->nodeAtPoint(request, result, xPos, yPos, childPoint.x(), childPoint.y(), action)) {
    1168                     updateHitTestResult(result, IntPoint(xPos - childPoint.x(), yPos - childPoint.y()));
     1167                if (child->nodeAtPoint(request, result, pointInContainer, childPoint.x(), childPoint.y(), action)) {
     1168                    updateHitTestResult(result, toPoint(pointInContainer - childPoint));
    11691169                    return true;
    11701170                }
     
    11741174    }
    11751175
    1176     IntPoint location = IntPoint(xPos - tx, yPos - ty);
     1176    IntPoint location = pointInContainer - IntSize(tx, ty);
    11771177    if (style()->isFlippedBlocksWritingMode()) {
    11781178        if (style()->isHorizontalWritingMode())
     
    12091209        RenderTableCell* cell = current.cells[i];
    12101210        IntPoint cellPoint = flipForWritingMode(cell, IntPoint(tx, ty), ParentToChildFlippingAdjustment);
    1211         if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, xPos, yPos, cellPoint.x(), cellPoint.y(), action)) {
    1212             updateHitTestResult(result, IntPoint(xPos - cellPoint.x(), yPos - cellPoint.y()));
     1211        if (static_cast<RenderObject*>(cell)->nodeAtPoint(request, result, pointInContainer, cellPoint.x(), cellPoint.y(), action)) {
     1212            updateHitTestResult(result, toPoint(pointInContainer - cellPoint));
    12131213            return true;
    12141214        }
  • trunk/Source/WebCore/rendering/RenderTableSection.h

    r76276 r86705  
    139139    virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
    140140
    141     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     141    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    142142
    143143    bool ensureRows(int);
  • trunk/Source/WebCore/rendering/RenderText.h

    r83075 r86705  
    150150    virtual void paint(PaintInfo&, int, int) { ASSERT_NOT_REACHED(); }
    151151    virtual void layout() { ASSERT_NOT_REACHED(); }
    152     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction) { ASSERT_NOT_REACHED(); return false; }
     152    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, IntPoint, int, int, HitTestAction) { ASSERT_NOT_REACHED(); return false; }
    153153
    154154    void deleteTextBoxes();
  • trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp

    r80412 r86705  
    5858}
    5959
    60 bool RenderTextControlMultiLine::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
     60bool RenderTextControlMultiLine::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
    6161{
    62     if (!RenderTextControl::nodeAtPoint(request, result, x, y, tx, ty, hitTestAction))
     62    if (!RenderTextControl::nodeAtPoint(request, result, pointInContainer, tx, ty, hitTestAction))
    6363        return false;
    6464
    6565    if (result.innerNode() == node() || result.innerNode() == innerTextElement())
    66         hitInnerTextElement(result, x, y, tx, ty);
     66        hitInnerTextElement(result, pointInContainer.x(), pointInContainer.y(), tx, ty);
    6767
    6868    return true;
  • trunk/Source/WebCore/rendering/RenderTextControlMultiLine.h

    r73572 r86705  
    3939    virtual void subtreeHasChanged();
    4040
    41     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     41    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    4242
    4343    virtual float getAvgCharWidth(AtomicString family);
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r86451 r86705  
    334334}
    335335
    336 bool RenderTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int xPos, int yPos, int tx, int ty, HitTestAction hitTestAction)
     336bool RenderTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
    337337{
    338338    // If we're within the text control, we want to act as if we've hit the inner text block element, in case the point
     
    342342    // and act as if we've hit the close block if we're to the right of the inner text block.
    343343
    344     if (!RenderTextControl::nodeAtPoint(request, result, xPos, yPos, tx, ty, hitTestAction))
     344    if (!RenderTextControl::nodeAtPoint(request, result, pointInContainer, tx, ty, hitTestAction))
    345345        return false;
    346346
     
    349349    // inner text element so that it gains focus.
    350350    if (result.innerNode()->isDescendantOf(innerTextElement()) || result.innerNode() == node())
    351         hitInnerTextElement(result, xPos, yPos, tx, ty);
     351        hitInnerTextElement(result, pointInContainer.x(), pointInContainer.y(), tx, ty);
    352352
    353353    // If we found a spin button, we're done.
     
    372372
    373373    int textLeft = tx + x() + innerBlockRenderer->x() + innerTextRenderer->x();
    374     if (m_resultsButton && m_resultsButton->renderer() && xPos < textLeft)
     374    if (m_resultsButton && m_resultsButton->renderer() && pointInContainer.x() < textLeft)
    375375        innerNode = m_resultsButton.get();
    376376
     
    378378    if (!innerNode && m_speechButton && m_speechButton->renderer()) {
    379379        int buttonLeft = tx + x() + innerBlockRenderer->x() + innerBlockRenderer->width() - m_speechButton->renderBox()->width();
    380         if (xPos >= buttonLeft)
     380        if (pointInContainer.x() >= buttonLeft)
    381381            innerNode = m_speechButton.get();
    382382    }
     
    385385    if (!innerNode) {
    386386        int textRight = textLeft + innerTextRenderer->width();
    387         if (m_cancelButton && m_cancelButton->renderer() && xPos > textRight)
     387        if (m_cancelButton && m_cancelButton->renderer() && pointInContainer.x() > textRight)
    388388            innerNode = m_cancelButton.get();
    389389    }
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h

    r85998 r86705  
    7272    virtual void layout();
    7373
    74     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     74    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    7575
    7676    virtual void autoscroll();
  • trunk/Source/WebCore/rendering/RenderWidget.cpp

    r86451 r86705  
    392392}
    393393
    394 bool RenderWidget::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction action)
     394bool RenderWidget::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction action)
    395395{
    396396    bool hadResult = result.innerNode();
    397     bool inside = RenderReplaced::nodeAtPoint(request, result, x, y, tx, ty, action);
     397    bool inside = RenderReplaced::nodeAtPoint(request, result, pointInContainer, tx, ty, action);
    398398   
    399399    // Check to see if we are really over the widget itself (and not just in the border/padding area).
  • trunk/Source/WebCore/rendering/RenderWidget.h

    r75897 r86705  
    6868    virtual void destroy();
    6969    virtual void setSelectionState(SelectionState);
    70     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     70    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    7171    virtual void setOverlapTestResult(bool);
    7272
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r86197 r86705  
    190190}
    191191
    192 bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, int lineTop, int lineBottom)
     192bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom)
    193193{
    194194    if (hasEllipsisBox() && visibleToHitTesting()) {
    195         if (ellipsisBox()->nodeAtPoint(request, result, x, y, tx, ty, lineTop, lineBottom)) {
    196             renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
     195        if (ellipsisBox()->nodeAtPoint(request, result, pointInContainer, tx, ty, lineTop, lineBottom)) {
     196            renderer()->updateHitTestResult(result, pointInContainer - IntSize(tx, ty));
    197197            return true;
    198198        }
    199199    }
    200     return InlineFlowBox::nodeAtPoint(request, result, x, y, tx, ty, lineTop, lineBottom);
     200    return InlineFlowBox::nodeAtPoint(request, result, pointInContainer, tx, ty, lineTop, lineBottom);
    201201}
    202202
  • trunk/Source/WebCore/rendering/RootInlineBox.h

    r86197 r86705  
    9797
    9898    virtual void paint(PaintInfo&, int tx, int ty, int lineTop, int lineBottom);
    99     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, int lineTop, int lineBottom);
     99    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, int lineTop, int lineBottom);
    100100
    101101    bool hasSelectedChildren() const { return m_hasSelectedChildrenOrCanHaveLeadingExpansion; }
  • trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp

    r84504 r86705  
    150150
    151151    IntPoint roundedLocalPoint = roundedIntPoint(localPoint);
    152     return RenderBlock::nodeAtPoint(request, result, roundedLocalPoint.x(), roundedLocalPoint.y(), 0, 0, hitTestAction);
     152    return RenderBlock::nodeAtPoint(request, result, roundedLocalPoint, 0, 0, hitTestAction);
    153153}
    154154
    155 bool RenderSVGForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction)
     155bool RenderSVGForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint&, int, int, HitTestAction)
    156156{
    157157    ASSERT_NOT_REACHED();
  • trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.h

    r75351 r86705  
    5151
    5252    virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
    53     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     53    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    5454    virtual bool isSVGForeignObject() const { return true; }
    5555
  • trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp

    r75350 r86705  
    107107}
    108108
    109 bool RenderSVGModelObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction)
     109bool RenderSVGModelObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint&, int, int, HitTestAction)
    110110{
    111111    ASSERT_NOT_REACHED();
  • trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.h

    r75350 r86705  
    6868private:
    6969    // This method should never be called, SVG uses a different nodeAtPoint method
    70     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int xInContainer, int yInContainer, int dxParentToContainer, int dyParentToContainer, HitTestAction);
     70    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int dxParentToContainer, int dyParentToContainer, HitTestAction);
    7171};
    7272
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp

    r86400 r86705  
    316316}
    317317
    318 bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, int x, int y, int tx, int ty, HitTestAction hitTestAction)
    319 {
    320     IntPoint pointInContainer(x, y);
     318bool RenderSVGRoot::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)
     319{
    321320    IntSize containerToParentOffset(tx, ty);
    322321
     
    336335            updateHitTestResult(result, pointInBorderBox);
    337336            // FIXME: nodeAtFloatPoint() doesn't handle rect-based hit tests yet.
    338             result.addNodeToRectBasedTestResult(child->node(), x, y);
     337            result.addNodeToRectBasedTestResult(child->node(), pointInContainer.x(), pointInContainer.y());
    339338            return true;
    340339        }
  • trunk/Source/WebCore/rendering/svg/RenderSVGRoot.h

    r75350 r86705  
    7474    virtual FloatRect repaintRectInLocalCoordinates() const { return m_repaintBoundingBox; }
    7575
    76     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     76    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    7777
    7878    virtual IntRect clippedOverflowRectForRepaint(RenderBoxModelObject* repaintContainer);
  • trunk/Source/WebCore/rendering/svg/RenderSVGText.cpp

    r84504 r86705  
    195195                return false;       
    196196
    197             return RenderBlock::nodeAtPoint(request, result, (int)localPoint.x(), (int)localPoint.y(), 0, 0, hitTestAction);
     197            return RenderBlock::nodeAtPoint(request, result, flooredIntPoint(localPoint), 0, 0, hitTestAction);
    198198        }
    199199    }
     
    202202}
    203203
    204 bool RenderSVGText::nodeAtPoint(const HitTestRequest&, HitTestResult&, int, int, int, int, HitTestAction)
     204bool RenderSVGText::nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint&, int, int, HitTestAction)
    205205{
    206206    ASSERT_NOT_REACHED();
  • trunk/Source/WebCore/rendering/svg/RenderSVGText.h

    r84085 r86705  
    5454
    5555    virtual void paint(PaintInfo&, int tx, int ty);
    56     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
     56    virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);
    5757    virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
    5858    virtual VisiblePosition positionForPoint(const IntPoint&);
Note: See TracChangeset for help on using the changeset viewer.