This commit is contained in:
dbaron%fas.harvard.edu 2002-02-19 03:06:00 +00:00
Родитель f059e0adae
Коммит 5e66f4b2c6
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -53,12 +53,16 @@
#include "inIBitmap.h"
#include "inLayoutUtils.h"
#include "nsIServiceManager.h"
static NS_DEFINE_CID(kInspectorCSSUtilsCID, NS_INSPECTORCSSUTILS_CID);
///////////////////////////////////////////////////////////////////////////////
inScreenCapturer::inScreenCapturer()
{
NS_INIT_REFCNT();
mCSSUtils = do_GetService(kInspectorCSSUtilsCID);
}
inScreenCapturer::~inScreenCapturer()
@ -90,7 +94,7 @@ inScreenCapturer::CaptureElement(nsIDOMElement *aElement, inIBitmap **_retval)
rect.y = screenpos.y;
// adjust rect for margins
inLayoutUtils::AdjustRectForMargins(aElement, rect);
mCSSUtils->AdjustRectForMargins(frame, rect);
// get scale for converting frame dimensions to pixels
nsCOMPtr<nsIPresContext> pcontext;

Просмотреть файл

@ -40,6 +40,7 @@
#define __inScreenCapturer_h__
#include "inIScreenCapturer.h"
#include "nsIInspectorCSSUtils.h"
#include <windows.h>
class inScreenCapturer : public inIScreenCapturer
@ -56,6 +57,8 @@ protected:
static NS_IMETHODIMP DoCopy16(PRUint8* aBits, HDC aHDC, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
static NS_IMETHODIMP DoCopy32(PRUint8* aBits, HDC aHDC, PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight);
nsCOMPtr<nsIInspectorCSSUtils> mCSSUtils;
};
#endif // __inScreenCapturer_h__