Changeset 69192 in webkit


Ignore:
Timestamp:
Oct 6, 2010 7:53:54 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

Rename HitTestResult::rectFromPoint to rectForPoint
https://bugs.webkit.org/show_bug.cgi?id=47261

Patch by Antonio Gomes <agomes@rim.org> on 2010-10-06
Reviewed by Kenneth Rohde Christiansen.

As per Kenneth Christiansen request inhttps://bugs.webkit.org/show_bug.cgi?id=46336#c20.

  • WebCore.exp.in:
  • dom/Document.cpp:

(WebCore::Document::nodesFromRect):

  • rendering/EllipsisBox.cpp:

(WebCore::EllipsisBox::nodeAtPoint):

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::addNodeToRectBasedTestResult):
(WebCore::HitTestResult::rectForPoint):

  • rendering/HitTestResult.h:

(WebCore::HitTestResult::rectForPoint):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::nodeAtPoint):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::nodeAtPoint):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::hitTestColumns):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::nodeAtPoint):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestChildLayerColumns):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::nodeAtPoint):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::nodeAtPoint):

Location:
trunk/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69187 r69192  
     12010-10-06  Antonio Gomes  <agomes@rim.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Rename HitTestResult::rectFromPoint to rectForPoint
     6        https://bugs.webkit.org/show_bug.cgi?id=47261
     7
     8        As per Kenneth Christiansen request inhttps://bugs.webkit.org/show_bug.cgi?id=46336#c20.
     9
     10        * WebCore.exp.in:
     11        * dom/Document.cpp:
     12        (WebCore::Document::nodesFromRect):
     13        * rendering/EllipsisBox.cpp:
     14        (WebCore::EllipsisBox::nodeAtPoint):
     15        * rendering/HitTestResult.cpp:
     16        (WebCore::HitTestResult::addNodeToRectBasedTestResult):
     17        (WebCore::HitTestResult::rectForPoint):
     18        * rendering/HitTestResult.h:
     19        (WebCore::HitTestResult::rectForPoint):
     20        * rendering/InlineFlowBox.cpp:
     21        (WebCore::InlineFlowBox::nodeAtPoint):
     22        * rendering/InlineTextBox.cpp:
     23        (WebCore::InlineTextBox::nodeAtPoint):
     24        * rendering/RenderBlock.cpp:
     25        (WebCore::RenderBlock::nodeAtPoint):
     26        (WebCore::RenderBlock::hitTestColumns):
     27        * rendering/RenderBox.cpp:
     28        (WebCore::RenderBox::nodeAtPoint):
     29        * rendering/RenderLayer.cpp:
     30        (WebCore::RenderLayer::hitTestLayer):
     31        (WebCore::RenderLayer::hitTestChildLayerColumns):
     32        * rendering/RenderTable.cpp:
     33        (WebCore::RenderTable::nodeAtPoint):
     34        * rendering/RenderTableSection.cpp:
     35        (WebCore::RenderTableSection::nodeAtPoint):
     36
    1372010-10-06  Dirk Schulze  <krit@webkit.org>
    238
  • trunk/WebCore/WebCore.exp.in

    r68951 r69192  
    282282__ZN7WebCore13AXObjectCache21gAccessibilityEnabledE
    283283__ZN7WebCore13AXObjectCache42gAccessibilityEnhancedUserInterfaceEnabledE
    284 __ZN7WebCore13HitTestResult13rectFromPointERKNS_8IntPointEjjjj
    285284__ZN7WebCore13HitTestResultC1ERKS0_
    286285__ZN7WebCore13HitTestResultD1Ev
  • trunk/WebCore/dom/Document.cpp

    r69043 r69192  
    10701070    if (ignoreClipping)
    10711071        type |= HitTestRequest::IgnoreClipping;
    1072     else if (!frameView->visibleContentRect().intersects(HitTestResult::rectFromPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
     1072    else if (!frameView->visibleContentRect().intersects(HitTestResult::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
    10731073        return 0;
    10741074
  • trunk/WebCore/rendering/EllipsisBox.cpp

    r68177 r69192  
    115115
    116116    IntRect boundsRect = IntRect(tx, ty, m_logicalWidth, m_height);
    117     if (visibleToHitTesting() && boundsRect.intersects(result.rectFromPoint(x, y))) {
     117    if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(x, y))) {
    118118        renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
    119119        if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, boundsRect))
  • trunk/WebCore/rendering/HitTestResult.cpp

    r68854 r69192  
    532532    m_rectBasedTestResult.add(node);
    533533
    534     return !rect.contains(rectFromPoint(x, y));
     534    return !rect.contains(rectForPoint(x, y));
    535535}
    536536
     
    554554}
    555555
    556 IntRect HitTestResult::rectFromPoint(const IntPoint& point, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding)
     556IntRect HitTestResult::rectForPoint(const IntPoint& point, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding)
    557557{
    558558    IntPoint actualPoint(point);
  • trunk/WebCore/rendering/HitTestResult.h

    r68475 r69192  
    9999    // Rect-based hit test related methods.
    100100    bool isRectBasedTest() const { return m_isRectBased; }
    101     IntRect rectFromPoint(int x, int y) const;
    102     IntRect rectFromPoint(const IntPoint&) const;
    103     static IntRect rectFromPoint(const IntPoint&, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
     101    IntRect rectForPoint(int x, int y) const;
     102    IntRect rectForPoint(const IntPoint&) const;
     103    static IntRect rectForPoint(const IntPoint&, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
    104104    int topPadding() const { return m_topPadding; }
    105105    int rightPadding() const { return m_rightPadding; }
     
    135135};
    136136
    137 inline IntRect HitTestResult::rectFromPoint(int x, int y) const
     137inline IntRect HitTestResult::rectForPoint(int x, int y) const
    138138{
    139     return rectFromPoint(IntPoint(x, y), m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
     139    return rectForPoint(IntPoint(x, y), m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
    140140}
    141141
     
    145145// width = leftPadding + rightPadding + 1
    146146// height = topPadding + bottomPadding + 1
    147 inline IntRect HitTestResult::rectFromPoint(const IntPoint& point) const
     147inline IntRect HitTestResult::rectForPoint(const IntPoint& point) const
    148148{
    149     return rectFromPoint(point, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
     149    return rectForPoint(point, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
    150150}
    151151
  • trunk/WebCore/rendering/InlineFlowBox.cpp

    r68817 r69192  
    613613    IntRect overflowRect(visibleOverflowRect());
    614614    overflowRect.move(tx, ty);
    615     if (!overflowRect.intersects(result.rectFromPoint(x, y)))
     615    if (!overflowRect.intersects(result.rectForPoint(x, y)))
    616616        return false;
    617617
     
    626626    // Now check ourselves.
    627627    IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight());
    628     if (visibleToHitTesting() && rect.intersects(result.rectFromPoint(x, y))) {
     628    if (visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
    629629        renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty)); // Don't add in m_x or m_y here, we want coords in the containing block's space.
    630630        if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
  • trunk/WebCore/rendering/InlineTextBox.cpp

    r68817 r69192  
    288288
    289289    IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight());
    290     if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectFromPoint(x, y))) {
     290    if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
    291291        renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
    292292        if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
  • trunk/WebCore/rendering/RenderBlock.cpp

    r69184 r69192  
    39723972        IntRect overflowBox = visibleOverflowRect();
    39733973        overflowBox.move(tx, ty);
    3974         if (!overflowBox.intersects(result.rectFromPoint(_x, _y)))
     3974        if (!overflowBox.intersects(result.rectForPoint(_x, _y)))
    39753975            return false;
    39763976    }
     
    39863986    bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
    39873987    bool useClip = (hasControlClip() || useOverflowClip);
    3988     IntRect hitTestArea(result.rectFromPoint(_x, _y));
     3988    IntRect hitTestArea(result.rectForPoint(_x, _y));
    39893989    bool checkChildren = !useClip || (hasControlClip() ? controlClipRect(tx, ty).intersects(hitTestArea) : overflowClipRect(tx, ty).intersects(hitTestArea));
    39903990    if (checkChildren) {
     
    40154015    if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) {
    40164016        IntRect boundsRect(tx, ty, width(), height());
    4017         if (visibleToHitTesting() && boundsRect.intersects(result.rectFromPoint(_x, _y))) {
     4017        if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(_x, _y))) {
    40184018            updateHitTestResult(result, IntPoint(_x - tx, _y - ty));
    40194019            if (!result.addNodeToRectBasedTestResult(node(), _x, _y, boundsRect))
     
    40694069        colRect.move(tx, ty);
    40704070       
    4071         if (colRect.intersects(result.rectFromPoint(x, y))) {
     4071        if (colRect.intersects(result.rectForPoint(x, y))) {
    40724072            // The point is inside this column.
    40734073            // Adjust tx and ty to change where we hit test.
     
    40754075            int finalX = tx + currXOffset;
    40764076            int finalY = ty + currYOffset;
    4077             if (result.isRectBasedTest() && !colRect.contains(result.rectFromPoint(x, y)))
     4077            if (result.isRectBasedTest() && !colRect.contains(result.rectForPoint(x, y)))
    40784078                hitTestContents(request, result, x, y, finalX, finalY, hitTestAction);
    40794079            else
  • trunk/WebCore/rendering/RenderBox.cpp

    r68917 r69192  
    680680    // foreground phase (which is true for replaced elements like images).
    681681    IntRect boundsRect = IntRect(tx, ty, width(), height());
    682     if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectFromPoint(xPos, yPos))) {
     682    if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
    683683        updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
    684684        if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
  • trunk/WebCore/rendering/RenderLayer.cpp

    r68817 r69192  
    27792779#endif
    27802780
    2781     IntRect hitTestArea = result.rectFromPoint(hitTestPoint);
     2781    IntRect hitTestArea = result.rectForPoint(hitTestPoint);
    27822782
    27832783    // Apply a transform if we have one.
     
    30623062        localClipRect.intersect(colRect);
    30633063       
    3064         if (!localClipRect.isEmpty() && localClipRect.intersects(result.rectFromPoint(hitTestPoint))) {
     3064        if (!localClipRect.isEmpty() && localClipRect.intersects(result.rectForPoint(hitTestPoint))) {
    30653065            RenderLayer* hitLayer = 0;
    30663066            if (!columnIndex) {
  • trunk/WebCore/rendering/RenderTable.cpp

    r68817 r69192  
    11281128
    11291129    // Check kids first.
    1130     if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectFromPoint(xPos, yPos))) {
     1130    if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos))) {
    11311131        for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
    11321132            if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption) &&
     
    11401140    // Check our bounds next.
    11411141    IntRect boundsRect = IntRect(tx, ty, width(), height());
    1142     if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectFromPoint(xPos, yPos))) {
     1142    if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
    11431143        updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
    11441144        if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
  • trunk/WebCore/rendering/RenderTableSection.cpp

    r69161 r69192  
    11971197    ty += y();
    11981198
    1199     if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectFromPoint(xPos, yPos)))
     1199    if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos)))
    12001200        return false;
    12011201
Note: See TracChangeset for help on using the changeset viewer.