Changeset 85405 in webkit
- Timestamp:
- Apr 30, 2011 9:16:34 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r85404 r85405 1 2011-04-30 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 Enable strict OwnPtr for GTK 6 https://bugs.webkit.org/show_bug.cgi?id=59861 7 8 * wtf/OwnPtr.h: 9 1 10 2011-04-30 Gavin Barraclough <barraclough@apple.com> 2 11 -
trunk/Source/JavaScriptCore/wtf/OwnPtr.h
r85343 r85405 30 30 31 31 // Remove this once we make all WebKit code compatible with stricter rules about OwnPtr. 32 #if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(QT) 32 #if !PLATFORM(MAC) && !PLATFORM(CHROMIUM) && !PLATFORM(QT) && !PLATFORM(GTK) 33 33 #define LOOSE_OWN_PTR 34 34 #endif -
trunk/Source/WebCore/ChangeLog
r85402 r85405 1 2011-04-30 Martin Robinson <mrobinson@igalia.com> 2 3 Reviewed by Adam Barth. 4 5 Enable strict mode for OwnPtr and PassOwnPtr 6 https://bugs.webkit.org/show_bug.cgi?id=59428 7 8 Fix assignments and .set() calls with OwnPtr to use adoptPtr. Have GeolocationService 9 factory methods return a PassOwnPtr. 10 11 No new tests. This should not change functionality. 12 13 * platform/GeolocationService.cpp: 14 (WebCore::createGeolocationServiceNull): 15 (WebCore::GeolocationService::create): 16 * platform/GeolocationService.h: 17 * platform/android/GeolocationServiceAndroid.cpp: 18 (WebCore::GeolocationServiceAndroid::create): 19 * platform/android/GeolocationServiceAndroid.h: 20 * platform/efl/GeolocationServiceEfl.cpp: 21 (WebCore::GeolocationServiceEfl::create): 22 * platform/efl/GeolocationServiceEfl.h: 23 * platform/graphics/cairo/CairoUtilities.cpp: 24 (WebCore::appendPathToCairoContext): 25 * platform/graphics/cairo/GraphicsContextCairo.cpp: 26 (WebCore::drawPathShadow): 27 (WebCore::GraphicsContext::clip): 28 * platform/graphics/cairo/ImageBufferCairo.cpp: 29 (WebCore::ImageBuffer::ImageBuffer): 30 * platform/graphics/cairo/OwnPtrCairo.h: 31 * platform/graphics/cairo/PathCairo.cpp: 32 (WebCore::Path::Path): 33 (WebCore::Path::operator=): 34 (WebCore::Path::apply): 35 * platform/gtk/GeolocationServiceGtk.cpp: 36 (WebCore::GeolocationServiceGtk::create): 37 * platform/gtk/GeolocationServiceGtk.h: 38 * platform/mock/GeolocationServiceMock.cpp: 39 (WebCore::GeolocationServiceMock::create): 40 * platform/mock/GeolocationServiceMock.h: 41 1 42 2011-04-30 Pavel Feldman <pfeldman@chromium.org> 2 43 -
trunk/Source/WebCore/platform/GeolocationService.cpp
r59779 r85405 37 37 38 38 #if !ENABLE(GEOLOCATION) || ENABLE(CLIENT_BASED_GEOLOCATION) 39 static GeolocationService*createGeolocationServiceNull(GeolocationServiceClient*)39 static PassOwnPtr<GeolocationService> createGeolocationServiceNull(GeolocationServiceClient*) 40 40 { 41 41 return 0; … … 48 48 #endif 49 49 50 GeolocationService*GeolocationService::create(GeolocationServiceClient* client)50 PassOwnPtr<GeolocationService> GeolocationService::create(GeolocationServiceClient* client) 51 51 { 52 52 return (*s_factoryFunction)(client); -
trunk/Source/WebCore/platform/GeolocationService.h
r79028 r85405 28 28 29 29 #include <wtf/Noncopyable.h> 30 #include <wtf/PassOwnPtr.h> 30 31 31 32 namespace WebCore { … … 46 47 WTF_MAKE_NONCOPYABLE(GeolocationService); 47 48 public: 48 static GeolocationService*create(GeolocationServiceClient*);49 static PassOwnPtr<GeolocationService> create(GeolocationServiceClient*); 49 50 virtual ~GeolocationService() { } 50 51 … … 62 63 63 64 static void useMock(); 64 typedef GeolocationService*(FactoryFunction)(GeolocationServiceClient*);65 typedef PassOwnPtr<GeolocationService> (FactoryFunction)(GeolocationServiceClient*); 65 66 static void setCustomMockFactory(FactoryFunction); 66 67 -
trunk/Source/WebCore/platform/android/GeolocationServiceAndroid.cpp
r71602 r85405 48 48 // register with the platform location service. It is the platform service that 49 49 // handles making sure that updates are passed to all Geolocation objects. 50 GeolocationService*GeolocationServiceAndroid::create(GeolocationServiceClient* client)50 PassOwnPtr<GeolocationService> GeolocationServiceAndroid::create(GeolocationServiceClient* client) 51 51 { 52 52 return new GeolocationServiceAndroid(client); -
trunk/Source/WebCore/platform/android/GeolocationServiceAndroid.h
r51071 r85405 42 42 class GeolocationServiceAndroid : public GeolocationService { 43 43 public: 44 static GeolocationService*create(GeolocationServiceClient*);44 static PassOwnPtr<GeolocationService> create(GeolocationServiceClient*); 45 45 46 46 virtual ~GeolocationServiceAndroid() { }; -
trunk/Source/WebCore/platform/efl/GeolocationServiceEfl.cpp
r81556 r85405 31 31 GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &GeolocationServiceEfl::create; 32 32 33 GeolocationService*GeolocationServiceEfl::create(GeolocationServiceClient* client)33 PassOwnPtr<GeolocationService> GeolocationServiceEfl::create(GeolocationServiceClient* client) 34 34 { 35 35 return new GeolocationServiceEfl(client); -
trunk/Source/WebCore/platform/efl/GeolocationServiceEfl.h
r81556 r85405 32 32 class GeolocationServiceEfl : public GeolocationService { 33 33 public: 34 static GeolocationService*create(GeolocationServiceClient*);34 static PassOwnPtr<GeolocationService> create(GeolocationServiceClient*); 35 35 ~GeolocationServiceEfl(); 36 36 -
trunk/Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp
r83945 r85405 66 66 void appendPathToCairoContext(cairo_t* to, cairo_t* from) 67 67 { 68 OwnPtr<cairo_path_t> cairoPath (cairo_copy_path(from));68 OwnPtr<cairo_path_t> cairoPath = adoptPtr(cairo_copy_path(from)); 69 69 cairo_append_path(to, cairoPath.get()); 70 70 } -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
r85279 r85405 151 151 // Calculate the extents of the rendered solid paths. 152 152 cairo_t* cairoContext = context->platformContext()->cr(); 153 OwnPtr<cairo_path_t> path (cairo_copy_path(cairoContext));153 OwnPtr<cairo_path_t> path = adoptPtr(cairo_copy_path(cairoContext)); 154 154 155 155 FloatRect solidFigureExtents; … … 1033 1033 1034 1034 cairo_t* cr = platformContext()->cr(); 1035 OwnPtr<cairo_path_t> p (cairo_copy_path(path.platformPath()->context()));1036 cairo_append_path(cr, p .get());1035 OwnPtr<cairo_path_t> pathCopy = adoptPtr(cairo_copy_path(path.platformPath()->context())); 1036 cairo_append_path(cr, pathCopy.get()); 1037 1037 cairo_fill_rule_t savedFillRule = cairo_get_fill_rule(cr); 1038 1038 cairo_set_fill_rule(cr, CAIRO_FILL_RULE_WINDING); -
trunk/Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
r83932 r85405 85 85 RefPtr<cairo_t> cr = adoptRef(cairo_create(m_data.m_surface)); 86 86 m_data.m_platformContext.setCr(cr.get()); 87 m_context .set(new GraphicsContext(&m_data.m_platformContext));87 m_context = adoptPtr(new GraphicsContext(&m_data.m_platformContext)); 88 88 success = true; 89 89 } -
trunk/Source/WebCore/platform/graphics/cairo/OwnPtrCairo.h
r80744 r85405 22 22 23 23 #include "OwnPtr.h" 24 #include "PassOwnPtr.h" 24 25 25 26 #if USE(FREETYPE) -
trunk/Source/WebCore/platform/graphics/cairo/PathCairo.cpp
r83945 r85405 54 54 { 55 55 cairo_t* cr = platformPath()->context(); 56 OwnPtr<cairo_path_t> p (cairo_copy_path(other.platformPath()->context()));57 cairo_append_path(cr, p .get());56 OwnPtr<cairo_path_t> pathCopy = adoptPtr(cairo_copy_path(other.platformPath()->context())); 57 cairo_append_path(cr, pathCopy.get()); 58 58 } 59 59 … … 65 65 clear(); 66 66 cairo_t* cr = platformPath()->context(); 67 OwnPtr<cairo_path_t> p (cairo_copy_path(other.platformPath()->context()));68 cairo_append_path(cr, p .get());67 OwnPtr<cairo_path_t> pathCopy = adoptPtr(cairo_copy_path(other.platformPath()->context())); 68 cairo_append_path(cr, pathCopy.get()); 69 69 return *this; 70 70 } … … 320 320 { 321 321 cairo_t* cr = platformPath()->context(); 322 OwnPtr<cairo_path_t> path (cairo_copy_path(cr));322 OwnPtr<cairo_path_t> pathCopy = adoptPtr(cairo_copy_path(cr)); 323 323 cairo_path_data_t* data; 324 324 PathElement pelement; … … 326 326 pelement.points = points; 327 327 328 for (int i = 0; i < path ->num_data; i += path->data[i].header.length) {329 data = &path ->data[i];328 for (int i = 0; i < pathCopy->num_data; i += pathCopy->data[i].header.length) { 329 data = &pathCopy->data[i]; 330 330 switch (data->header.type) { 331 331 case CAIRO_PATH_MOVE_TO: -
trunk/Source/WebCore/platform/gtk/GeolocationServiceGtk.cpp
r66887 r85405 39 39 namespace WebCore { 40 40 41 GeolocationService*GeolocationServiceGtk::create(GeolocationServiceClient* client)41 PassOwnPtr<GeolocationService> GeolocationServiceGtk::create(GeolocationServiceClient* client) 42 42 { 43 43 return new GeolocationServiceGtk(client); -
trunk/Source/WebCore/platform/gtk/GeolocationServiceGtk.h
r66887 r85405 33 33 class GeolocationServiceGtk : public GeolocationService { 34 34 public: 35 static GeolocationService*create(GeolocationServiceClient*);35 static PassOwnPtr<GeolocationService> create(GeolocationServiceClient*); 36 36 ~GeolocationServiceGtk(); 37 37 -
trunk/Source/WebCore/platform/mock/GeolocationServiceMock.cpp
r56781 r85405 41 41 RefPtr<PositionError>* GeolocationServiceMock::s_lastError; 42 42 43 GeolocationService*GeolocationServiceMock::create(GeolocationServiceClient* client)43 PassOwnPtr<GeolocationService> GeolocationServiceMock::create(GeolocationServiceClient* client) 44 44 { 45 45 initStatics(); -
trunk/Source/WebCore/platform/mock/GeolocationServiceMock.h
r48144 r85405 42 42 class GeolocationServiceMock : public GeolocationService { 43 43 public: 44 static GeolocationService*create(GeolocationServiceClient*);44 static PassOwnPtr<GeolocationService> create(GeolocationServiceClient*); 45 45 46 46 GeolocationServiceMock(GeolocationServiceClient*);
Note: See TracChangeset
for help on using the changeset viewer.