Changeset 44096 in webkit
- Timestamp:
- May 23, 2009 9:39:34 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r44095 r44096 1 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 3 Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr 4 5 <https://bugs.webkit.org/show_bug.cgi?id=25495> 6 7 Reviewed by Oliver Hunt. 8 9 No test cases added since there is no change in behavior. 10 11 * WebCore.base.exp: Updated export for 12 HistoryItem::setRedirectURLs() which now takes a PassOwnPtr. 13 * dom/Node.cpp: 14 (WebCore::Node::childNodes): Use NodeListsNodeData::create() 15 instead of new NodeListsNodeData. 16 (WebCore::Node::registerDynamicNodeList): Ditto. 17 (WebCore::Node::getElementsByTagNameNS): Ditto. 18 (WebCore::Node::getElementsByName): Ditto. 19 (WebCore::Node::getElementsByClassName): Ditto. 20 * dom/NodeRareData.h: 21 (WebCore::NodeListsNodeData::create): Added. Implements 22 create() pattern popularized by RefCounted classes. 23 (WebCore::NodeListsNodeData::NodeListsNodeData): Declared 24 private constructor. 25 (WebCore::NodeRareData::setNodeLists): Now takes a PassOwnPtr<> 26 instead of an auto_ptr<>. 27 * history/HistoryItem.cpp: 28 (WebCore::HistoryItem::setRedirectURLs): Ditto. 29 * history/HistoryItem.h: 30 (WebCore::HistoryItem::setRedirectURLs): Ditto. 31 * html/CanvasRenderingContext2D.cpp: 32 (WebCore::CanvasRenderingContext2D::drawTextInternal): Use 33 OwnPtr<> instead of auto_ptr<> for stack variable. 34 * html/HTMLCanvasElement.cpp: 35 (WebCore::HTMLCanvasElement::createImageBuffer): Updated to use 36 assignment operator now that ImageBuffer::create() returns a 37 PassOwnPtr<>. 38 * loader/EmptyClients.h: 39 (WebCore::EmptyChromeClient::createHTMLParserQuirks): Return a 40 PassOwnPtr<> instead of a raw HTMLParserQuirks pointer. 41 * page/ChromeClient.h: 42 (WebCore::ChromeClient::createHTMLParserQuirks): Ditto. 43 * platform/graphics/GeneratedImage.cpp: 44 (WebCore::GeneratedImage::drawPattern): Use OwnPtr<> instead of 45 auto_ptr<> for stack variable. 46 * platform/graphics/ImageBuffer.h: 47 (WebCore::ImageBuffer::create): Return PassOwnPtr<> instead of 48 auto_ptr<>. Use OwnPtr<> instead of auto_ptr<> for stack 49 variable. 50 * platform/mac/ScrollbarThemeMac.mm: 51 (WebCore::ScrollbarThemeMac::paint): Use OwnPtr<> instead of 52 auto_ptr<> for stack variable. 53 * platform/text/TextCodec.h: 54 (WebCore::NewTextCodecFunction): Return PassOwnPtr<> instead of 55 auto_ptr<>. 56 * platform/text/TextCodecICU.cpp: 57 (WebCore::newTextCodecICU): Ditto. 58 * platform/text/TextCodecLatin1.cpp: 59 (WebCore::newStreamingTextDecoderWindowsLatin1): Ditto. 60 * platform/text/TextCodecUTF16.cpp: 61 (WebCore::newStreamingTextDecoderUTF16LE): Ditto. 62 (WebCore::newStreamingTextDecoderUTF16BE): Ditto. 63 * platform/text/TextCodecUserDefined.cpp: 64 (WebCore::newStreamingTextDecoderUserDefined): Ditto. 65 * platform/text/TextEncodingRegistry.cpp: 66 (WebCore::newTextCodec): Ditto. 67 * platform/text/TextEncodingRegistry.h: 68 (WebCore::newTextCodec): Ditto. 69 * platform/text/mac/TextCodecMac.cpp: 70 (WebCore::newTextCodecMac): Ditto. 71 * rendering/RenderBoxModelObject.cpp: 72 (WebCore::RenderBoxModelObject::paintFillLayerExtended): Use 73 OwnPtr<> instead of auto_ptr<> for stack variable. 74 * svg/SVGMaskElement.cpp: 75 (WebCore::SVGMaskElement::drawMaskerContent): Ditto. Return 76 OwnPtr<> instead of auto_ptr<>. 77 * svg/SVGMaskElement.h: 78 (WebCore::SVGMaskElement::drawMaskerContent): Return OwnPtr<> 79 instead of auto_ptr<>. 80 * svg/SVGPatternElement.cpp: 81 (WebCore::SVGPatternElement::buildPattern): Use OwnPtr<> instead 82 of auto_ptr<> for stack variable. 83 * svg/graphics/SVGImage.cpp: 84 (WebCore::SVGImage::nativeImageForCurrentFrame): Updated to use 85 assignment operator now that ImageBuffer::create() returns a 86 PassOwnPtr<>. 87 * svg/graphics/SVGPaintServerGradient.cpp: 88 (WebCore::createMaskAndSwapContextForTextGradient): Use OwnPtr<> 89 instead of auto_ptr<> for stack variable. 90 * svg/graphics/SVGPaintServerPattern.cpp: 91 (WebCore::SVGPaintServerPattern::setTile): Updated to take a 92 PassOwnPtr<> instead of an auto_ptr<>. 93 (WebCore::SVGPaintServerPattern::setup): Use OwnPtr<> instead of 94 auto_ptr<> for stack variable. 95 * svg/graphics/SVGPaintServerPattern.h: 96 (WebCore::SVGPaintServerPattern::setTile): Updated to take a 97 PassOwnPtr<> instead of an auto_ptr<>. 98 * svg/graphics/SVGResourceMasker.cpp: 99 (WebCore::SVGResourceMasker::applyMask): Updated to use 100 assignment operator now that SVGMaskElement::drawMaskerContent() 101 returns a PassOwnPtr<>. Use OwnPtr<> instead of auto_ptr<> for 102 stack variable. 103 1 104 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 105 -
trunk/WebCore/WebCore.base.exp
r44048 r44096 198 198 __ZN7WebCore11HistoryItem14setScrollPointERKNS_8IntPointE 199 199 __ZN7WebCore11HistoryItem15setIsTargetItemEb 200 __ZN7WebCore11HistoryItem15setRedirectURLsE St8auto_ptrIN3WTF6VectorINS_6StringELm0EEEE200 __ZN7WebCore11HistoryItem15setRedirectURLsEN3WTF10PassOwnPtrINS1_6VectorINS_6StringELm0EEEEE 201 201 __ZN7WebCore11HistoryItem16adoptVisitCountsERN3WTF6VectorIiLm0EEES4_ 202 202 __ZN7WebCore11HistoryItem17setAlternateTitleERKNS_6StringE -
trunk/WebCore/dom/Node.cpp
r43913 r44096 79 79 #include "htmlediting.h" 80 80 #include <wtf/HashSet.h> 81 #include <wtf/PassOwnPtr.h> 81 82 #include <wtf/RefCountedLeakCounter.h> 82 83 #include <wtf/UnusedParam.h> … … 507 508 NodeRareData* data = ensureRareData(); 508 509 if (!data->nodeLists()) { 509 data->setNodeLists( auto_ptr<NodeListsNodeData>(new NodeListsNodeData));510 data->setNodeLists(NodeListsNodeData::create()); 510 511 document()->addNodeListCache(); 511 512 } … … 780 781 NodeRareData* data = ensureRareData(); 781 782 if (!data->nodeLists()) { 782 data->setNodeLists( auto_ptr<NodeListsNodeData>(new NodeListsNodeData));783 data->setNodeLists(NodeListsNodeData::create()); 783 784 document()->addNodeListCache(); 784 785 } else if (!m_document->hasNodeListCaches()) { … … 1474 1475 NodeRareData* data = ensureRareData(); 1475 1476 if (!data->nodeLists()) { 1476 data->setNodeLists( auto_ptr<NodeListsNodeData>(new NodeListsNodeData));1477 data->setNodeLists(NodeListsNodeData::create()); 1477 1478 document()->addNodeListCache(); 1478 1479 } … … 1495 1496 NodeRareData* data = ensureRareData(); 1496 1497 if (!data->nodeLists()) { 1497 data->setNodeLists( auto_ptr<NodeListsNodeData>(new NodeListsNodeData));1498 data->setNodeLists(NodeListsNodeData::create()); 1498 1499 document()->addNodeListCache(); 1499 1500 } … … 1510 1511 NodeRareData* data = ensureRareData(); 1511 1512 if (!data->nodeLists()) { 1512 data->setNodeLists( auto_ptr<NodeListsNodeData>(new NodeListsNodeData));1513 data->setNodeLists(NodeListsNodeData::create()); 1513 1514 document()->addNodeListCache(); 1514 1515 } -
trunk/WebCore/dom/NodeRareData.h
r39563 r44096 29 29 #include "QualifiedName.h" 30 30 #include <wtf/HashSet.h> 31 #include <wtf/PassOwnPtr.h> 31 32 #include <wtf/OwnPtr.h> 32 33 … … 45 46 typedef HashMap<QualifiedName, DynamicNodeList::Caches*> TagCacheMap; 46 47 TagCacheMap m_tagNodeListCaches; 47 48 49 static PassOwnPtr<NodeListsNodeData> create() { 50 return new NodeListsNodeData; 51 } 52 48 53 ~NodeListsNodeData() 49 54 { … … 56 61 void invalidateCachesThatDependOnAttributes(); 57 62 bool isEmpty() const; 63 64 private: 65 NodeListsNodeData() { } 58 66 }; 59 67 … … 82 90 83 91 void clearNodeLists() { m_nodeLists.clear(); } 84 void setNodeLists( std::auto_ptr<NodeListsNodeData> lists) { m_nodeLists.set(lists.release()); }92 void setNodeLists(PassOwnPtr<NodeListsNodeData> lists) { m_nodeLists = lists; } 85 93 NodeListsNodeData* nodeLists() const { return m_nodeLists.get(); } 86 94 -
trunk/WebCore/history/HistoryItem.cpp
r42158 r44096 493 493 } 494 494 495 void HistoryItem::setRedirectURLs( std::auto_ptr<Vector<String> > redirectURLs)496 { 497 m_redirectURLs .adopt(redirectURLs);495 void HistoryItem::setRedirectURLs(PassOwnPtr<Vector<String> > redirectURLs) 496 { 497 m_redirectURLs = redirectURLs; 498 498 } 499 499 -
trunk/WebCore/history/HistoryItem.h
r42158 r44096 30 30 #include "PlatformString.h" 31 31 #include <wtf/OwnPtr.h> 32 #include <wtf/PassOwnPtr.h> 32 33 33 34 #if PLATFORM(MAC) … … 143 144 void addRedirectURL(const String&); 144 145 Vector<String>* redirectURLs() const; 145 void setRedirectURLs( std::auto_ptr<Vector<String> >);146 void setRedirectURLs(PassOwnPtr<Vector<String> >); 146 147 147 148 bool isCurrentDocument(Document*) const; -
trunk/WebCore/html/CanvasRenderingContext2D.cpp
r43187 r44096 61 61 #include <wtf/ByteArray.h> 62 62 #include <wtf/MathExtras.h> 63 #include <wtf/OwnPtr.h> 63 64 64 65 using namespace std; … … 1437 1438 IntRect maskRect = enclosingIntRect(textRect); 1438 1439 1439 auto_ptr<ImageBuffer> maskImage = ImageBuffer::create(maskRect.size(), false);1440 1440 OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(maskRect.size(), false); 1441 1441 1442 GraphicsContext* maskImageContext = maskImage->context(); 1442 1443 -
trunk/WebCore/html/HTMLCanvasElement.cpp
r43678 r44096 260 260 return; 261 261 262 m_imageBuffer .set(ImageBuffer::create(size, false).release());262 m_imageBuffer = ImageBuffer::create(size, false); 263 263 // The convertLogicalToDevice MaxCanvasArea check should prevent common cases 264 264 // where ImageBuffer::create() returns NULL, however we could still be low on memory. -
trunk/WebCore/loader/EmptyClients.h
r43980 r44096 138 138 virtual void formStateDidChange(const Node*) { } 139 139 140 virtual HTMLParserQuirks*createHTMLParserQuirks() { return 0; }140 virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 141 141 142 142 virtual bool setCursor(PlatformCursorHandle) { return false; } -
trunk/WebCore/page/ChromeClient.h
r43918 r44096 25 25 #include "FocusDirection.h" 26 26 #include "GraphicsContext.h" 27 #include "HTMLParserQuirks.h" 27 28 #include "HostWindow.h" 28 29 #include "ScrollTypes.h" 29 30 #include <wtf/Forward.h> 31 #include <wtf/PassOwnPtr.h> 30 32 #include <wtf/Vector.h> 31 33 … … 168 170 virtual void formStateDidChange(const Node*) = 0; 169 171 170 virtual HTMLParserQuirks*createHTMLParserQuirks() = 0;172 virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() = 0; 171 173 172 174 #if USE(ACCELERATED_COMPOSITING) -
trunk/WebCore/platform/graphics/GeneratedImage.cpp
r39635 r44096 52 52 { 53 53 // Create a BitmapImage and call drawPattern on it. 54 auto_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(m_size, false);54 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(m_size, false); 55 55 ASSERT(imageBuffer.get()); 56 56 -
trunk/WebCore/platform/graphics/ImageBuffer.h
r39635 r44096 1 1 /* 2 2 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.3 * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without … … 33 33 #include "ImageBufferData.h" 34 34 #include <wtf/OwnPtr.h> 35 #include <wtf/PassOwnPtr.h> 35 36 #include <wtf/PassRefPtr.h> 36 #include <memory>37 37 38 38 namespace WebCore { … … 47 47 public: 48 48 // Will return a null pointer on allocation failure. 49 static std::auto_ptr<ImageBuffer> create(const IntSize& size, bool grayScale)49 static PassOwnPtr<ImageBuffer> create(const IntSize& size, bool grayScale) 50 50 { 51 51 bool success = false; 52 std::auto_ptr<ImageBuffer> buf(new ImageBuffer(size, grayScale, success));52 OwnPtr<ImageBuffer> buf(new ImageBuffer(size, grayScale, success)); 53 53 if (success) 54 return buf ;55 return std::auto_ptr<ImageBuffer>();54 return buf.release(); 55 return 0; 56 56 } 57 57 … … 81 81 mutable RefPtr<Image> m_image; 82 82 83 // This constructor will place its succes into the given out-variable83 // This constructor will place its success into the given out-variable 84 84 // so that create() knows when it should return failure. 85 85 ImageBuffer(const IntSize&, bool grayScale, bool& success); -
trunk/WebCore/platform/mac/ScrollbarThemeMac.mm
r39806 r44096 394 394 bufferRect.move(-scrollbar->frameRect().x(), -scrollbar->frameRect().y()); 395 395 396 auto_ptr<ImageBuffer> imageBuffer = ImageBuffer::create(bufferRect.size(), false);397 if (!imageBuffer .get())396 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(bufferRect.size(), false); 397 if (!imageBuffer) 398 398 return true; 399 399 -
trunk/WebCore/platform/text/TextCodec.h
r33380 r44096 30 30 #include <memory> 31 31 #include <wtf/Noncopyable.h> 32 #include <wtf/PassOwnPtr.h> 32 33 #include <wtf/Vector.h> 33 34 #include <wtf/unicode/Unicode.h> … … 77 78 typedef void (*EncodingNameRegistrar)(const char* alias, const char* name); 78 79 79 typedef std::auto_ptr<TextCodec> (*NewTextCodecFunction)(const TextEncoding&, const void* additionalData);80 typedef PassOwnPtr<TextCodec> (*NewTextCodecFunction)(const TextEncoding&, const void* additionalData); 80 81 typedef void (*TextCodecRegistrar)(const char* name, NewTextCodecFunction, const void* additionalData); 81 82 -
trunk/WebCore/platform/text/TextCodecICU.cpp
r41807 r44096 35 35 #include <unicode/ucnv_cb.h> 36 36 #include <wtf/Assertions.h> 37 #include <wtf/PassOwnPtr.h> 37 38 #include <wtf/StringExtras.h> 38 39 #include <wtf/Threading.h> 39 40 40 using std::auto_ptr;41 41 using std::min; 42 42 … … 56 56 } 57 57 58 static auto_ptr<TextCodec> newTextCodecICU(const TextEncoding& encoding, const void*)59 { 60 return auto_ptr<TextCodec>(new TextCodecICU(encoding));58 static PassOwnPtr<TextCodec> newTextCodecICU(const TextEncoding& encoding, const void*) 59 { 60 return new TextCodecICU(encoding); 61 61 } 62 62 -
trunk/WebCore/platform/text/TextCodecLatin1.cpp
r31316 r44096 31 31 #include "StringBuffer.h" 32 32 #include <stdio.h> 33 34 using std::auto_ptr; 33 #include <wtf/PassOwnPtr.h> 35 34 36 35 namespace WebCore { … … 105 104 } 106 105 107 static auto_ptr<TextCodec> newStreamingTextDecoderWindowsLatin1(const TextEncoding&, const void*)106 static PassOwnPtr<TextCodec> newStreamingTextDecoderWindowsLatin1(const TextEncoding&, const void*) 108 107 { 109 return auto_ptr<TextCodec>(new TextCodecLatin1);108 return new TextCodecLatin1; 110 109 } 111 110 -
trunk/WebCore/platform/text/TextCodecUTF16.cpp
r39601 r44096 30 30 #include "PlatformString.h" 31 31 #include "StringBuffer.h" 32 33 using std::auto_ptr; 32 #include <wtf/PassOwnPtr.h> 34 33 35 34 namespace WebCore { … … 50 49 } 51 50 52 static auto_ptr<TextCodec> newStreamingTextDecoderUTF16LE(const TextEncoding&, const void*)51 static PassOwnPtr<TextCodec> newStreamingTextDecoderUTF16LE(const TextEncoding&, const void*) 53 52 { 54 return auto_ptr<TextCodec>(new TextCodecUTF16(true));53 return new TextCodecUTF16(true); 55 54 } 56 55 57 static auto_ptr<TextCodec> newStreamingTextDecoderUTF16BE(const TextEncoding&, const void*)56 static PassOwnPtr<TextCodec> newStreamingTextDecoderUTF16BE(const TextEncoding&, const void*) 58 57 { 59 return auto_ptr<TextCodec>(new TextCodecUTF16(false));58 return new TextCodecUTF16(false); 60 59 } 61 60 -
trunk/WebCore/platform/text/TextCodecUserDefined.cpp
r31316 r44096 31 31 #include "StringBuffer.h" 32 32 #include <stdio.h> 33 34 using std::auto_ptr; 33 #include <wtf/PassOwnPtr.h> 35 34 36 35 namespace WebCore { … … 41 40 } 42 41 43 static auto_ptr<TextCodec> newStreamingTextDecoderUserDefined(const TextEncoding&, const void*)42 static PassOwnPtr<TextCodec> newStreamingTextDecoderUserDefined(const TextEncoding&, const void*) 44 43 { 45 return auto_ptr<TextCodec>(new TextCodecUserDefined);44 return new TextCodecUserDefined; 46 45 } 47 46 -
trunk/WebCore/platform/text/TextEncodingRegistry.cpp
r44050 r44096 210 210 } 211 211 212 std::auto_ptr<TextCodec> newTextCodec(const TextEncoding& encoding)212 PassOwnPtr<TextCodec> newTextCodec(const TextEncoding& encoding) 213 213 { 214 214 MutexLocker lock(encodingRegistryMutex()); -
trunk/WebCore/platform/text/TextEncodingRegistry.h
r41551 r44096 28 28 29 29 #include <memory> 30 #include <wtf/PassOwnPtr.h> 30 31 #include <wtf/unicode/Unicode.h> 31 32 … … 37 38 // Use TextResourceDecoder::decode to decode resources, since it handles BOMs. 38 39 // Use TextEncoding::encode to encode, since it takes care of normalization. 39 std::auto_ptr<TextCodec> newTextCodec(const TextEncoding&);40 PassOwnPtr<TextCodec> newTextCodec(const TextEncoding&); 40 41 41 42 // Only TextEncoding should use this function directly. -
trunk/WebCore/platform/text/mac/TextCodecMac.cpp
r39465 r44096 34 34 #include "ThreadGlobalData.h" 35 35 #include <wtf/Assertions.h> 36 #include <wtf/PassOwnPtr.h> 36 37 #include <wtf/Threading.h> 37 38 38 using std::auto_ptr;39 39 using std::min; 40 40 … … 65 65 } 66 66 67 static auto_ptr<TextCodec> newTextCodecMac(const TextEncoding&, const void* additionalData)68 { 69 return auto_ptr<TextCodec>(new TextCodecMac(*static_cast<const TECTextEncodingID*>(additionalData)));67 static PassOwnPtr<TextCodec> newTextCodecMac(const TextEncoding&, const void* additionalData) 68 { 69 return new TextCodecMac(*static_cast<const TECTextEncodingID*>(additionalData)); 70 70 } 71 71 -
trunk/WebCore/rendering/RenderBoxModelObject.cpp
r43813 r44096 337 337 338 338 // Now create the mask. 339 auto_ptr<ImageBuffer> maskImage = ImageBuffer::create(maskRect.size(), false);340 if (!maskImage .get())339 OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(maskRect.size(), false); 340 if (!maskImage) 341 341 return; 342 342 -
trunk/WebCore/svg/SVGMaskElement.cpp
r43209 r44096 126 126 } 127 127 128 auto_ptr<ImageBuffer> SVGMaskElement::drawMaskerContent(const FloatRect& targetRect, FloatRect& maskDestRect) const128 PassOwnPtr<ImageBuffer> SVGMaskElement::drawMaskerContent(const FloatRect& targetRect, FloatRect& maskDestRect) const 129 129 { 130 130 // Determine specified mask size … … 155 155 heightValue = imageSize.height(); 156 156 157 auto_ptr<ImageBuffer> maskImage = ImageBuffer::create(imageSize, false);158 if (!maskImage .get())159 return maskImage;157 OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(imageSize, false); 158 if (!maskImage) 159 return 0; 160 160 161 161 maskDestRect = FloatRect(xValue, yValue, widthValue, heightValue); … … 194 194 195 195 maskImageContext->restore(); 196 return maskImage ;196 return maskImage.release(); 197 197 } 198 198 -
trunk/WebCore/svg/SVGMaskElement.h
r35248 r44096 30 30 #include "SVGTests.h" 31 31 #include "SVGURIReference.h" 32 #include <wtf/PassOwnPtr.h> 32 33 33 34 namespace WebCore { … … 52 53 virtual SVGResource* canvasResource(); 53 54 54 std::auto_ptr<ImageBuffer> drawMaskerContent(const FloatRect& targetRect, FloatRect& maskRect) const;55 PassOwnPtr<ImageBuffer> drawMaskerContent(const FloatRect& targetRect, FloatRect& maskRect) const; 55 56 56 57 protected: -
trunk/WebCore/svg/SVGPatternElement.cpp
r43209 r44096 215 215 clampImageBufferSizeToViewport(document()->view(), imageSize); 216 216 217 auto_ptr<ImageBuffer> patternImage = ImageBuffer::create(imageSize, false);218 219 if (!patternImage .get())217 OwnPtr<ImageBuffer> patternImage = ImageBuffer::create(imageSize, false); 218 219 if (!patternImage) 220 220 return; 221 221 … … 252 252 m_resource->setPatternTransform(attributes.patternTransform()); 253 253 m_resource->setPatternBoundaries(patternBoundaries); 254 m_resource->setTile(patternImage );254 m_resource->setTile(patternImage.release()); 255 255 } 256 256 -
trunk/WebCore/svg/graphics/SVGImage.cpp
r42590 r44096 206 206 // having a tiled drawing callback (hopefully non-virtual). 207 207 if (!m_frameCache) { 208 m_frameCache .set(ImageBuffer::create(size(), false).release());208 m_frameCache = ImageBuffer::create(size(), false); 209 209 if (!m_frameCache) // failed to allocate image 210 210 return 0; -
trunk/WebCore/svg/graphics/SVGPaintServerGradient.cpp
r43209 r44096 138 138 clampImageBufferSizeToViewport(object->view()->frameView(), maskSize); 139 139 140 auto_ptr<ImageBuffer> maskImage = ImageBuffer::create(maskSize, false);141 142 if (!maskImage .get())140 OwnPtr<ImageBuffer> maskImage = ImageBuffer::create(maskSize, false); 141 142 if (!maskImage) 143 143 return false; 144 144 -
trunk/WebCore/svg/graphics/SVGPaintServerPattern.cpp
r43269 r44096 69 69 } 70 70 71 void SVGPaintServerPattern::setTile( auto_ptr<ImageBuffer> tile)71 void SVGPaintServerPattern::setTile(PassOwnPtr<ImageBuffer> tile) 72 72 { 73 m_tile .set(tile.release());73 m_tile = tile; 74 74 } 75 75 … … 119 119 int tileWidth = static_cast<int>(patternBoundaries().width() + 0.5f); 120 120 int tileHeight = static_cast<int>(patternBoundaries().height() + 0.5f); 121 std::auto_ptr<ImageBuffer> tileImage = ImageBuffer::create(IntSize(tileWidth, tileHeight), false);121 OwnPtr<ImageBuffer> tileImage = ImageBuffer::create(IntSize(tileWidth, tileHeight), false); 122 122 123 123 GraphicsContext* tileImageContext = tileImage->context(); -
trunk/WebCore/svg/graphics/SVGPaintServerPattern.h
r40088 r44096 37 37 38 38 #include <wtf/OwnPtr.h> 39 #include <wtf/PassOwnPtr.h> 39 40 40 41 namespace WebCore { … … 57 58 58 59 ImageBuffer* tile() const; 59 void setTile( std::auto_ptr<ImageBuffer>);60 void setTile(PassOwnPtr<ImageBuffer>); 60 61 61 62 TransformationMatrix patternTransform() const; -
trunk/WebCore/svg/graphics/SVGResourceMasker.cpp
r41266 r44096 64 64 { 65 65 if (!m_mask) 66 m_mask .set(m_ownerElement->drawMaskerContent(boundingBox, m_maskRect).release());66 m_mask = m_ownerElement->drawMaskerContent(boundingBox, m_maskRect); 67 67 68 68 if (!m_mask) … … 73 73 74 74 // Create new ImageBuffer to apply luminance 75 auto_ptr<ImageBuffer> luminancedImage(ImageBuffer::create(imageSize, false));76 if (!luminancedImage .get())75 OwnPtr<ImageBuffer> luminancedImage = ImageBuffer::create(imageSize, false); 76 if (!luminancedImage) 77 77 return; 78 78 -
trunk/WebKit/gtk/ChangeLog
r44077 r44096 1 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 3 Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr 4 5 <https://bugs.webkit.org/show_bug.cgi?id=25495> 6 7 Reviewed by Oliver Hunt. 8 9 * WebCoreSupport/ChromeClientGtk.h: 10 (WebKit::ChromeClient::createHTMLParserQuirks): Return a 11 PassOwnPtr<> instead of a raw HTMLParserQuirks pointer. 12 1 13 2009-05-22 Gustavo Noronha Silva <gns@gnome.org> 2 14 -
trunk/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
r43918 r44096 105 105 virtual void formStateDidChange(const WebCore::Node*) { } 106 106 107 virtual WebCore::HTMLParserQuirks*createHTMLParserQuirks() { return 0; }107 virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 108 108 109 109 virtual bool setCursor(WebCore::PlatformCursorHandle); -
trunk/WebKit/mac/ChangeLog
r44095 r44096 1 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 3 Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr 4 5 <https://bugs.webkit.org/show_bug.cgi?id=25495> 6 7 Reviewed by Oliver Hunt. 8 9 * History/WebHistory.mm: 10 (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Return 11 0 instead of an empty auto_ptr<>. 12 * History/WebHistoryItem.mm: 13 (-[WebHistoryItem initFromDictionaryRepresentation:]): Use 14 OwnPtr<> instead of auto_ptr<> for stack variable. 15 * WebCoreSupport/WebChromeClient.h: 16 (WebChromeClient::createHTMLParserQuirks): Return a PassOwnPtr<> 17 instead of a raw HTMLParserQuirks pointer. 18 1 19 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/WebKit/mac/History/WebHistory.mm
r43937 r44096 801 801 item->setLastVisitWasHTTPNonGet([method caseInsensitiveCompare:@"GET"] && (![[url scheme] caseInsensitiveCompare:@"http"] || ![[url scheme] caseInsensitiveCompare:@"https"])); 802 802 803 item->setRedirectURLs( auto_ptr<Vector<String> >());803 item->setRedirectURLs(0); 804 804 805 805 NSArray *entries = [[NSArray alloc] initWithObjects:entry, nil]; -
trunk/WebKit/mac/History/WebHistoryItem.mm
r42824 r44096 383 383 if (NSArray *redirectURLs = [dict _webkit_arrayForKey:redirectURLsKey]) { 384 384 NSUInteger size = [redirectURLs count]; 385 std::auto_ptr<Vector<String> > redirectURLsVector(new Vector<String>(size));385 OwnPtr<Vector<String> > redirectURLsVector(new Vector<String>(size)); 386 386 for (NSUInteger i = 0; i < size; ++i) 387 387 (*redirectURLsVector)[i] = String([redirectURLs _webkit_stringAtIndex:i]); 388 core(_private)->setRedirectURLs(redirectURLsVector );388 core(_private)->setRedirectURLs(redirectURLsVector.release()); 389 389 } 390 390 -
trunk/WebKit/mac/WebCoreSupport/WebChromeClient.h
r43921 r44096 136 136 virtual void formStateDidChange(const WebCore::Node*) { } 137 137 138 virtual WebCore::HTMLParserQuirks*createHTMLParserQuirks() { return 0; }138 virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 139 139 140 140 #if USE(ACCELERATED_COMPOSITING) -
trunk/WebKit/qt/ChangeLog
r44090 r44096 1 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 3 Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr 4 5 <https://bugs.webkit.org/show_bug.cgi?id=25495> 6 7 Reviewed by Oliver Hunt. 8 9 * WebCoreSupport/ChromeClientQt.h: 10 (WebCore::ChromeClientQt::createHTMLParserQuirks): Return a 11 PassOwnPtr<> instead of a raw HTMLParserQuirks pointer. 12 1 13 2009-05-23 Jakob Truelsen <antialize@gmail.com> 2 14 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r43918 r44096 121 121 virtual void formStateDidChange(const Node*) { } 122 122 123 virtual HTMLParserQuirks*createHTMLParserQuirks() { return 0; }123 virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 124 124 125 125 virtual bool setCursor(PlatformCursorHandle); -
trunk/WebKit/win/ChangeLog
r44073 r44096 1 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 3 Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr 4 5 <https://bugs.webkit.org/show_bug.cgi?id=25495> 6 7 Reviewed by Oliver Hunt. 8 9 * WebCoreSupport/WebChromeClient.h: 10 (WebChromeClient::createHTMLParserQuirks): Return a PassOwnPtr<> 11 instead of a raw HTMLParserQuirks pointer. 12 1 13 2009-05-22 Brent Fulgham <bfulgham@webkit.org> 2 14 -
trunk/WebKit/win/WebCoreSupport/WebChromeClient.h
r43918 r44096 125 125 virtual void formStateDidChange(const WebCore::Node*) { } 126 126 127 virtual WebCore::HTMLParserQuirks*createHTMLParserQuirks() { return 0; }127 virtual PassOwnPtr<WebCore::HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 128 128 129 129 virtual void scrollRectIntoView(const WebCore::IntRect&, const WebCore::ScrollView*) const {} -
trunk/WebKit/wx/ChangeLog
r44060 r44096 1 2009-05-23 David Kilzer <ddkilzer@apple.com> 2 3 Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr 4 5 <https://bugs.webkit.org/show_bug.cgi?id=25495> 6 7 Reviewed by Oliver Hunt. 8 9 * WebKitSupport/ChromeClientWx.h: 10 (WebCore::ChromeClientWx::createHTMLParserQuirks): Return a 11 PassOwnPtr<> instead of a raw HTMLParserQuirks pointer. 12 1 13 2009-05-22 Kevin Watters <kevinwatters@gmail.com> 2 14 -
trunk/WebKit/wx/WebKitSupport/ChromeClientWx.h
r43918 r44096 120 120 virtual void formStateDidChange(const Node*) { } 121 121 122 virtual HTMLParserQuirks*createHTMLParserQuirks() { return 0; }122 virtual PassOwnPtr<HTMLParserQuirks> createHTMLParserQuirks() { return 0; } 123 123 124 124 virtual bool setCursor(PlatformCursorHandle);
Note: See TracChangeset
for help on using the changeset viewer.