Changeset 19713 in webkit


Ignore:
Timestamp:
Feb 19, 2007 3:32:12 PM (17 years ago)
Author:
andersca
Message:

Reviewed by Oliver.

Make DragController::maxDragImageSize a function to get rid of the global initializer.


  • page/DragController.cpp: (WebCore::DragController::doImageDrag):
  • page/DragController.h:
  • page/mac/DragControllerMac.mm: (WebCore::DragController::maxDragImageSize):
  • page/qt/DragControllerQt.cpp: (WebCore::DragController::maxDragImageSize):
Location:
trunk/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r19710 r19713  
     12007-02-19  Anders Carlsson  <acarlsson@apple.com>
     2
     3        Reviewed by Oliver.
     4
     5        Make DragController::maxDragImageSize a function to get rid of the global initializer.
     6       
     7        * page/DragController.cpp:
     8        (WebCore::DragController::doImageDrag):
     9        * page/DragController.h:
     10        * page/mac/DragControllerMac.mm:
     11        (WebCore::DragController::maxDragImageSize):
     12        * page/qt/DragControllerQt.cpp:
     13        (WebCore::DragController::maxDragImageSize):
     14
    1152007-02-19  Darin Adler  <darin@apple.com>
    216
  • trunk/WebCore/page/DragController.cpp

    r19699 r19713  
    634634        IntSize newSize;
    635635        if (dragImage) {
    636             dragImage = fitDragImageToMaxSize(dragImage, MaxDragImageSize);
     636            dragImage = fitDragImageToMaxSize(dragImage, maxDragImageSize());
    637637            dragImage = dissolveDragImageToFraction(dragImage, DragImageAlpha);
    638638            newSize = dragImageSize(dragImage);
  • trunk/WebCore/page/DragController.h

    r19689 r19713  
    8383       
    8484        bool startDrag(Frame* src, Clipboard*, DragOperation srcOp, const PlatformMouseEvent& dragEvent, const IntPoint& dragOrigin, bool isDHTMLDrag);
     85        static const IntSize& maxDragImageSize();
    8586       
    8687        static const int LinkDragBorderInset;
    87         static const IntSize MaxDragImageSize;
    8888        static const int MaxOriginalImageArea;
    8989        static const int DragIconRightInset;
  • trunk/WebCore/page/mac/DragControllerMac.mm

    r19689 r19713  
    3636const int DragController::LinkDragBorderInset = -2;
    3737
    38 const IntSize DragController::MaxDragImageSize(400, 400);
    3938const int DragController::MaxOriginalImageArea = 1500 * 1500;
    4039const int DragController::DragIconRightInset = 7;
     
    6160}
    6261
     62const IntSize& DragController::maxDragImageSize()
     63{
     64    static const IntSize maxDragImageSize(400, 400);
     65   
     66    return maxDragImageSize;
    6367}
     68
     69}
  • trunk/WebCore/page/qt/DragControllerQt.cpp

    r19689 r19713  
    3838// little correlation with Qt standards...
    3939const int DragController::LinkDragBorderInset = 2;
    40 const IntSize DragController::MaxDragImageSize(400, 400);
    4140const int DragController::MaxOriginalImageArea = 1500 * 1500;
    4241const int DragController::DragIconRightInset = 7;
     
    6059}
    6160
     61const IntSize& DragController::maxDragImageSize()
     62{
     63    static const IntSize maxDragImageSize(400, 400);
     64   
     65    return maxDragImageSize;
    6266}
     67
     68}
Note: See TracChangeset for help on using the changeset viewer.