Changeset 85433 in webkit
- Timestamp:
- May 1, 2011 3:28:12 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85428 r85433 1 2011-05-01 Patrick Gansterer <paroga@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 [WINCE] Fix OwnPtr strict issues 6 https://bugs.webkit.org/show_bug.cgi?id=59898 7 8 * page/wince/FrameWinCE.cpp: 9 (WebCore::imageFromSelection): 10 * platform/graphics/wince/FontPlatformData.cpp: 11 (WebCore::FixedSizeFontData::create): 12 (WebCore::FontPlatformPrivateData::FontPlatformData::hfont): 13 (WebCore::FontPlatformPrivateData::FontPlatformData::getScaledFontHandle): 14 (WebCore::FontPlatformPrivateData::FontPlatformData::discardFontHandle): 15 * platform/graphics/wince/GraphicsContextWinCE.cpp: 16 (WebCore::GraphicsContext::strokeArc): 17 (WebCore::GraphicsContext::fillRect): 18 (WebCore::GraphicsContext::clip): 19 (WebCore::GraphicsContext::fillRoundedRect): 20 (WebCore::GraphicsContext::drawRoundCorner): 21 (WebCore::GraphicsContext::drawText): 22 * platform/graphics/wince/ImageBufferWinCE.cpp: 23 (WebCore::ImageBuffer::ImageBuffer): 24 * platform/graphics/wince/ImageWinCE.cpp: 25 (WebCore::BitmapImage::getHBITMAPOfSize): 26 * platform/graphics/wince/SharedBitmap.cpp: 27 (WebCore::SharedBitmap::SharedBitmap): 28 1 29 2011-05-01 Ryosuke Niwa <rniwa@webkit.org> 2 30 -
trunk/Source/WebCore/page/wince/FrameWinCE.cpp
r77438 r85433 129 129 } 130 130 131 OwnPtr<HDC> bmpDC (CreateCompatibleDC(g_screenDC));131 OwnPtr<HDC> bmpDC = adoptPtr(CreateCompatibleDC(g_screenDC)); 132 132 HBITMAP hBmp = CreateCompatibleBitmap(g_screenDC, w, h); 133 133 if (!hBmp) -
trunk/Source/WebCore/platform/graphics/wince/FontPlatformData.cpp
r81548 r85433 263 263 winFont.lfFaceName[len] = L'\0'; 264 264 265 fontData->m_hfont .set(CreateFontIndirect(&winFont));265 fontData->m_hfont = adoptPtr(CreateFontIndirect(&winFont)); 266 266 267 267 HGDIOBJ oldFont = SelectObject(g_screenDC, fontData->m_hfont.get()); … … 395 395 396 396 if (!m_private->m_rootFontData->m_hfont) 397 m_private->m_rootFontData->m_hfont .set(CreateFontIndirect(&m_private->m_rootFontData->m_font));397 m_private->m_rootFontData->m_hfont = adoptPtr(CreateFontIndirect(&m_private->m_rootFontData->m_font)); 398 398 399 399 return m_private->m_rootFontData->m_hfont.get(); … … 411 411 font.lfHeight = -height; 412 412 font.lfWidth = width; 413 m_private->m_hfontScaled .set(CreateFontIndirect(&font));413 m_private->m_hfontScaled = adoptPtr(CreateFontIndirect(&font)); 414 414 } 415 415 … … 423 423 424 424 if (m_private->m_rootFontData->m_hfont) { 425 m_private->m_rootFontData->m_hfont .set(0);425 m_private->m_rootFontData->m_hfont = nullptr; 426 426 return true; 427 427 } 428 428 429 429 if (m_private->m_hfontScaled) { 430 m_private->m_hfontScaled .set(0);430 m_private->m_hfontScaled = nullptr; 431 431 return true; 432 432 } -
trunk/Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
r83216 r85433 832 832 } 833 833 834 OwnPtr<HRGN> clipRgn (CreateRectRgn(0, 0, 0, 0));834 OwnPtr<HRGN> clipRgn = adoptPtr(CreateRectRgn(0, 0, 0, 0)); 835 835 bool newClip; 836 836 if (GetClipRgn(dc, clipRgn.get()) <= 0) { 837 837 newClip = true; 838 clipRgn .set(CreateRectRgn(clipRect.left, clipRect.top, clipRect.right, clipRect.bottom));838 clipRgn = adoptPtr(CreateRectRgn(clipRect.left, clipRect.top, clipRect.right, clipRect.bottom)); 839 839 SelectClipRgn(dc, clipRgn.get()); 840 840 } else { … … 949 949 return; 950 950 951 OwnPtr<HBRUSH> hbrush (CreateSolidBrush(RGB(color.red(), color.green(), color.blue())));951 OwnPtr<HBRUSH> hbrush = adoptPtr(CreateSolidBrush(RGB(color.red(), color.green(), color.blue()))); 952 952 FillRect(transparentDC.hdc(), &transparentDC.rect(), hbrush.get()); 953 953 } … … 963 963 IntRect trRect = enclosingIntRect(m_data->mapRect(rect)); 964 964 965 OwnPtr<HRGN> clipRgn (CreateRectRgn(0, 0, 0, 0));965 OwnPtr<HRGN> clipRgn = adoptPtr(CreateRectRgn(0, 0, 0, 0)); 966 966 if (GetClipRgn(m_data->m_dc, clipRgn.get()) > 0) 967 967 IntersectClipRect(m_data->m_dc, trRect.x(), trRect.y(), trRect.maxX(), trRect.maxY()); 968 968 else { 969 clipRgn .set(CreateRectRgn(trRect.x(), trRect.y(), trRect.maxX(), trRect.maxY()));969 clipRgn = adoptPtr(CreateRectRgn(trRect.x(), trRect.y(), trRect.maxX(), trRect.maxY())); 970 970 SelectClipRgn(m_data->m_dc, clipRgn.get()); 971 971 } … … 1253 1253 clipRect.bottom = centerPoint.y(); 1254 1254 1255 OwnPtr<HRGN> clipRgn (CreateRectRgn(0, 0, 0, 0));1255 OwnPtr<HRGN> clipRgn = adoptPtr(CreateRectRgn(0, 0, 0, 0)); 1256 1256 bool needsNewClip = (GetClipRgn(dc, clipRgn.get()) <= 0); 1257 1257 … … 1288 1288 return; 1289 1289 1290 OwnPtr<HRGN> clipRgn (CreateRectRgn(0, 0, 0, 0));1291 if (needsNewClip) 1292 clipRgn .set(CreateRectRgn(clipRect.left, clipRect.top, clipRect.right, clipRect.bottom));1290 OwnPtr<HRGN> clipRgn = adoptPtr(CreateRectRgn(0, 0, 0, 0)); 1291 if (needsNewClip) { 1292 clipRgn = adoptPtr(CreateRectRgn(clipRect.left, clipRect.top, clipRect.right, clipRect.bottom)); 1293 1293 SelectClipRgn(dc, clipRgn.get()); 1294 } else 1294 } else 1295 1295 IntersectClipRect(dc, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom); 1296 1296 1297 1297 ::RoundRect(dc, rectWin.left , rectWin.top , rectWin.right , rectWin.bottom , width, height); 1298 1298 1299 1299 SelectClipRgn(dc, needsNewClip ? 0 : clipRgn.get()); 1300 1300 } … … 1623 1623 offset += width; 1624 1624 1625 OwnPtr<HPEN> hPen (CreatePen(PS_DASH, 1, fontColor));1625 OwnPtr<HPEN> hPen = adoptPtr(CreatePen(PS_DASH, 1, fontColor)); 1626 1626 HGDIOBJ oldPen = SelectObject(m_data->m_dc, hPen.get()); 1627 1627 -
trunk/Source/WebCore/platform/graphics/wince/ImageBufferWinCE.cpp
r76371 r85433 80 80 UNUSED_PARAM(colorSpace); 81 81 82 m_context .set(new GraphicsContext(0));82 m_context = adoptPtr(new GraphicsContext(0)); 83 83 m_context->setBitmap(m_data.m_bitmap); 84 84 success = true; -
trunk/Source/WebCore/platform/graphics/wince/ImageWinCE.cpp
r75748 r85433 71 71 int bufferSize = bmpInfo.bmWidthBytes * bmpInfo.bmHeight; 72 72 73 OwnPtr<HDC> hdc (CreateCompatibleDC(0));73 OwnPtr<HDC> hdc = adoptPtr(CreateCompatibleDC(0)); 74 74 HGDIOBJ hOldBmp = SelectObject(hdc.get(), bmp); 75 75 -
trunk/Source/WebCore/platform/graphics/wince/SharedBitmap.cpp
r77785 r85433 67 67 , m_hasAlpha(false) 68 68 , m_validHeight(abs(size.height())) 69 , m_hbitmap(0)70 69 { 71 70 #ifndef NDEBUG
Note: See TracChangeset
for help on using the changeset viewer.