Changeset 64705 in webkit


Ignore:
Timestamp:
Aug 4, 2010 8:27:56 PM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-08-04 Antonio Gomes <tonikitoo@webkit.org>

Reviewed by Daniel Bates.

Remove superfluous non-negative checks in HitTestResult:padding{Width|Height}
https://bugs.webkit.org/show_bug.cgi?id=43534

As pointed out by Steve Block in https://bugs.webkit.org/show_bug.cgi?id=40197#c54 ,
the non-negative checks present in both paddingWidth and paddingHeight methods of
HitTestResults class are superflous, after we changed the rect based hit testing logic
of invalid padding from IntSize(-1, -1) to IntSize(0, 0). Patch addresses this issue.

No new tests needed.

  • rendering/HitTestResult.h: (WebCore::HitTestResult::paddingWidth): (WebCore::HitTestResult::paddingHeight):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64704 r64705  
     12010-08-04  Antonio Gomes  <tonikitoo@webkit.org>
     2
     3        Reviewed by Daniel Bates.
     4
     5        Remove superfluous non-negative checks in HitTestResult:padding{Width|Height}
     6        https://bugs.webkit.org/show_bug.cgi?id=43534
     7
     8        As pointed out by Steve Block in https://bugs.webkit.org/show_bug.cgi?id=40197#c54 ,
     9        the non-negative checks present in both paddingWidth and paddingHeight methods of
     10        HitTestResults class are superflous, after we changed the rect based hit testing logic
     11        of invalid padding from IntSize(-1, -1) to IntSize(0, 0). Patch addresses this issue.
     12
     13        No new tests needed.
     14
     15        * rendering/HitTestResult.h:
     16        (WebCore::HitTestResult::paddingWidth):
     17        (WebCore::HitTestResult::paddingHeight):
     18
    1192010-08-04  Sheriff Bot  <webkit.review.bot@gmail.com>
    220
  • trunk/WebCore/rendering/HitTestResult.h

    r64272 r64705  
    8787    IntRect rectFromPoint(const IntPoint&) const;
    8888    IntSize padding() const { return m_padding; }
    89     int paddingWidth() const { return m_padding.width() >= 0 ? m_padding.width() : 0; }
    90     int paddingHeight() const { return m_padding.height() >= 0 ? m_padding.height() : 0; }
     89    int paddingWidth() const { return m_padding.width(); }
     90    int paddingHeight() const { return m_padding.height(); }
    9191    // Returns true if it is rect-based hit test and needs to continue until the rect is fully
    9292    // enclosed by the boundaries of a node.
Note: See TracChangeset for help on using the changeset viewer.