Changeset 88385 in webkit


Ignore:
Timestamp:
Jun 8, 2011 2:15:25 PM (13 years ago)
Author:
eae@chromium.org
Message:

2011-06-08 Emil A Eklund <eae@chromium.org>

Reviewed by Eric Seidel.

Convert RenderBlock::isPointInOverflowControl to IntPoint
https://bugs.webkit.org/show_bug.cgi?id=62312

Covered by existing tests.

  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::isPointInOverflowControl): (WebCore::RenderBlock::nodeAtPoint):
  • rendering/RenderBlock.h:
  • rendering/RenderListBox.cpp: (WebCore::RenderListBox::isPointInOverflowControl):
  • rendering/RenderListBox.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88382 r88385  
     12011-06-08  Emil A Eklund  <eae@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Convert RenderBlock::isPointInOverflowControl to IntPoint
     6        https://bugs.webkit.org/show_bug.cgi?id=62312
     7
     8        Covered by existing tests.
     9
     10        * rendering/RenderBlock.cpp:
     11        (WebCore::RenderBlock::isPointInOverflowControl):
     12        (WebCore::RenderBlock::nodeAtPoint):
     13        * rendering/RenderBlock.h:
     14        * rendering/RenderListBox.cpp:
     15        (WebCore::RenderListBox::isPointInOverflowControl):
     16        * rendering/RenderListBox.h:
     17
    1182011-06-08  James Simonsen  <simonjam@chromium.org>
    219
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r88319 r88385  
    38883888}
    38893889
    3890 bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty)
     3890bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset)
    38913891{
    38923892    if (!scrollsOverflow())
    38933893        return false;
    38943894
    3895     return layer()->hitTestOverflowControls(result, pointInContainer - IntSize(tx, ty));
     3895    return layer()->hitTestOverflowControls(result, pointInContainer - toSize(accumulatedOffset));
    38963896}
    38973897
     
    39093909    }
    39103910
    3911     if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && isPointInOverflowControl(result, pointInContainer, localOffset.width(), localOffset.height())) {
     3911    if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && isPointInOverflowControl(result, pointInContainer, adjustedLocation)) {
    39123912        updateHitTestResult(result, pointInContainer - localOffset);
    39133913        // FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet.
  • trunk/Source/WebCore/rendering/RenderBlock.h

    r88319 r88385  
    593593    bool hitTestFloats(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);
    594594
    595     virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, int tx, int ty);
     595    virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);
    596596
    597597    void computeInlinePreferredLogicalWidths();
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r88319 r88385  
    438438}
    439439
    440 bool RenderListBox::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty)
     440bool RenderListBox::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset)
    441441{
    442442    if (!m_vBar)
    443443        return false;
    444444
    445     IntRect vertRect(tx + width() - borderRight() - m_vBar->width(),
    446                      ty + borderTop(),
     445    IntRect vertRect(accumulatedOffset.x() + width() - borderRight() - m_vBar->width(),
     446                     accumulatedOffset.y() + borderTop(),
    447447                     m_vBar->width(),
    448448                     height() - borderTop() - borderBottom());
  • trunk/Source/WebCore/rendering/RenderListBox.h

    r88319 r88385  
    6969    virtual IntRect controlClipRect(const IntPoint&) const;
    7070
    71     virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, int tx, int ty);
     71    virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);
    7272
    7373    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
Note: See TracChangeset for help on using the changeset viewer.