Changeset 87878 in webkit


Ignore:
Timestamp:
Jun 1, 2011 9:51:08 PM (13 years ago)
Author:
leviw@chromium.org
Message:

2011-06-01 Levi Weintraub <leviw@chromium.org>

Reviewed by Hajime Morita.

Add IntPoint + IntPoint operator
https://bugs.webkit.org/show_bug.cgi?id=61876

Adding an operator+ convenience method to IntPoint that sums two points
and returns the result as an IntPoint. Changing doImageDrag to use it
as a proof of concept.

No new tests since there is no change in behavior.

  • page/DragController.cpp: (WebCore::DragController::doImageDrag):
  • platform/graphics/IntPoint.h: (WebCore::operator+):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r87877 r87878  
     12011-06-01  Levi Weintraub  <leviw@chromium.org>
     2
     3        Reviewed by Hajime Morita.
     4
     5        Add IntPoint + IntPoint operator
     6        https://bugs.webkit.org/show_bug.cgi?id=61876
     7
     8        Adding an operator+ convenience method to IntPoint that sums two points
     9        and returns the result as an IntPoint. Changing doImageDrag to use it
     10        as a proof of concept.
     11
     12        No new tests since there is no change in behavior.
     13
     14        * page/DragController.cpp:
     15        (WebCore::DragController::doImageDrag):
     16        * platform/graphics/IntPoint.h:
     17        (WebCore::operator+):
     18
    1192011-06-01  Jaehun Lim  <ljaehun.lim@samsung.com>
    220
  • trunk/Source/WebCore/page/DragController.cpp

    r87366 r87878  
    826826    }
    827827
    828     dragImageOffset.setX(mouseDownPoint.x() + origin.x());
    829     dragImageOffset.setY(mouseDownPoint.y() + origin.y());
     828    dragImageOffset = mouseDownPoint + origin;
    830829    doSystemDrag(dragImage, dragImageOffset, dragOrigin, clipboard, frame, false);
    831830
  • trunk/Source/WebCore/platform/graphics/IntPoint.h

    r87865 r87878  
    188188}
    189189
     190inline IntPoint operator+(const IntPoint& a, const IntPoint& b)
     191{
     192    return IntPoint(a.x() + b.x(), a.y() + b.y());
     193}
     194
    190195inline IntSize operator-(const IntPoint& a, const IntPoint& b)
    191196{
Note: See TracChangeset for help on using the changeset viewer.