Changeset 88400 in webkit


Ignore:
Timestamp:
Jun 8, 2011 4:00:04 PM (13 years ago)
Author:
eae@chromium.org
Message:

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

Reviewed by Eric Seidel.

RenderEmbeddedObject::getReplacementTextGeometry
https://bugs.webkit.org/show_bug.cgi?id=62313

Replace the last use of tx, ty with IntPoint.

Covered by existing tests.

  • platform/graphics/FloatRect.h: (WebCore::FloatRect::move): (WebCore::FloatRect::moveBy):
  • rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::paintReplaced): (WebCore::RenderEmbeddedObject::getReplacementTextGeometry): (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator):
  • rendering/RenderEmbeddedObject.h:
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r88398 r88400  
     12011-06-08  Emil A Eklund  <eae@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        RenderEmbeddedObject::getReplacementTextGeometry
     6        https://bugs.webkit.org/show_bug.cgi?id=62313
     7
     8        Replace the last use of tx, ty with IntPoint.
     9
     10        Covered by existing tests.
     11
     12        * platform/graphics/FloatRect.h:
     13        (WebCore::FloatRect::move):
     14        (WebCore::FloatRect::moveBy):
     15        * rendering/RenderEmbeddedObject.cpp:
     16        (WebCore::RenderEmbeddedObject::paintReplaced):
     17        (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
     18        (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator):
     19        * rendering/RenderEmbeddedObject.h:
     20
    1212011-06-08  Tim Horton  <timothy_horton@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/FloatRect.h

    r84101 r88400  
    7171
    7272class IntRect;
     73class IntPoint;
    7374
    7475class FloatRect {
     
    106107
    107108    void move(const FloatSize& delta) { m_location += delta; }
    108     void move(float dx, float dy) { m_location.move(dx, dy); }
     109    void move(float dx, float dy) { m_location.move(dx, dy); }
     110    void moveBy(const FloatPoint& delta) { m_location.move(delta.x(), delta.y()); }
    109111
    110112    bool intersects(const FloatRect&) const;
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r88250 r88400  
    164164    TextRun run("");
    165165    float textWidth;
    166     if (!getReplacementTextGeometry(paintOffset.x(), paintOffset.y(), contentRect, path, replacementTextRect, font, run, textWidth))
     166    if (!getReplacementTextGeometry(paintOffset, contentRect, path, replacementTextRect, font, run, textWidth))
    167167        return;
    168168   
     
    181181}
    182182
    183 bool RenderEmbeddedObject::getReplacementTextGeometry(int tx, int ty, FloatRect& contentRect, Path& path, FloatRect& replacementTextRect, Font& font, TextRun& run, float& textWidth)
     183bool RenderEmbeddedObject::getReplacementTextGeometry(const IntPoint& accumulatedOffset, FloatRect& contentRect, Path& path, FloatRect& replacementTextRect, Font& font, TextRun& run, float& textWidth)
    184184{
    185185    contentRect = contentBoxRect();
    186     contentRect.move(tx, ty);
     186    contentRect.moveBy(accumulatedOffset);
    187187   
    188188    FontDescription fontDescription;
     
    258258    TextRun run("");
    259259    float textWidth;
    260     if (!getReplacementTextGeometry(0, 0, contentRect, path, replacementTextRect, font, run, textWidth))
     260    if (!getReplacementTextGeometry(IntPoint(), contentRect, path, replacementTextRect, font, run, textWidth))
    261261        return false;
    262262   
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.h

    r88250 r88400  
    6969    void setMissingPluginIndicatorIsPressed(bool);
    7070    bool isInMissingPluginIndicator(MouseEvent*);
    71     bool getReplacementTextGeometry(int tx, int ty, FloatRect& contentRect, Path&, FloatRect& replacementTextRect, Font&, TextRun&, float& textWidth);
     71    bool getReplacementTextGeometry(const IntPoint& accumulatedOffset, FloatRect& contentRect, Path&, FloatRect& replacementTextRect, Font&, TextRun&, float& textWidth);
    7272
    7373    String m_replacementText;
Note: See TracChangeset for help on using the changeset viewer.