Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1979183002: Remove OwnPtr::release() calls in core/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 value->setDouble("x", point.x()); 1180 value->setDouble("x", point.x());
1181 value->setDouble("y", point.y()); 1181 value->setDouble("y", point.y());
1182 value->endDictionary(); 1182 value->endDictionary();
1183 } 1183 }
1184 1184
1185 static PassOwnPtr<TracedValue> jsonObjectForPaintInvalidationInfo(const LayoutRe ct& rect, const String& invalidationReason) 1185 static PassOwnPtr<TracedValue> jsonObjectForPaintInvalidationInfo(const LayoutRe ct& rect, const String& invalidationReason)
1186 { 1186 {
1187 OwnPtr<TracedValue> value = TracedValue::create(); 1187 OwnPtr<TracedValue> value = TracedValue::create();
1188 addJsonObjectForRect(value.get(), "rect", rect); 1188 addJsonObjectForRect(value.get(), "rect", rect);
1189 value->setString("invalidation_reason", invalidationReason); 1189 value->setString("invalidation_reason", invalidationReason);
1190 return value.release(); 1190 return value;
1191 } 1191 }
1192 1192
1193 static void invalidatePaintRectangleOnWindow(const LayoutBoxModelObject& paintIn validationContainer, const IntRect& dirtyRect) 1193 static void invalidatePaintRectangleOnWindow(const LayoutBoxModelObject& paintIn validationContainer, const IntRect& dirtyRect)
1194 { 1194 {
1195 FrameView* frameView = paintInvalidationContainer.frameView(); 1195 FrameView* frameView = paintInvalidationContainer.frameView();
1196 ASSERT(paintInvalidationContainer.isLayoutView() && paintInvalidationContain er.layer()->compositingState() == NotComposited); 1196 ASSERT(paintInvalidationContainer.isLayoutView() && paintInvalidationContain er.layer()->compositingState() == NotComposited);
1197 if (!frameView || paintInvalidationContainer.document().printing()) 1197 if (!frameView || paintInvalidationContainer.document().printing())
1198 return; 1198 return;
1199 1199
1200 ASSERT(!frameView->frame().ownerLayoutObject()); 1200 ASSERT(!frameView->frame().ownerLayoutObject());
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 } 1331 }
1332 } 1332 }
1333 1333
1334 static PassOwnPtr<TracedValue> jsonObjectForOldAndNewRects(const LayoutRect& old Rect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoi nt& newLocation) 1334 static PassOwnPtr<TracedValue> jsonObjectForOldAndNewRects(const LayoutRect& old Rect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoi nt& newLocation)
1335 { 1335 {
1336 OwnPtr<TracedValue> value = TracedValue::create(); 1336 OwnPtr<TracedValue> value = TracedValue::create();
1337 addJsonObjectForRect(value.get(), "oldRect", oldRect); 1337 addJsonObjectForRect(value.get(), "oldRect", oldRect);
1338 addJsonObjectForPoint(value.get(), "oldLocation", oldLocation); 1338 addJsonObjectForPoint(value.get(), "oldLocation", oldLocation);
1339 addJsonObjectForRect(value.get(), "newRect", newRect); 1339 addJsonObjectForRect(value.get(), "newRect", newRect);
1340 addJsonObjectForPoint(value.get(), "newLocation", newLocation); 1340 addJsonObjectForPoint(value.get(), "newLocation", newLocation);
1341 return value.release(); 1341 return value;
1342 } 1342 }
1343 1343
1344 LayoutRect LayoutObject::selectionRectInViewCoordinates() const 1344 LayoutRect LayoutObject::selectionRectInViewCoordinates() const
1345 { 1345 {
1346 LayoutRect selectionRect = localSelectionRect(); 1346 LayoutRect selectionRect = localSelectionRect();
1347 if (!selectionRect.isEmpty()) 1347 if (!selectionRect.isEmpty())
1348 mapToVisualRectInAncestorSpace(view(), selectionRect); 1348 mapToVisualRectInAncestorSpace(view(), selectionRect);
1349 return selectionRect; 1349 return selectionRect;
1350 } 1350 }
1351 1351
(...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3689 const blink::LayoutObject* root = object1; 3689 const blink::LayoutObject* root = object1;
3690 while (root->parent()) 3690 while (root->parent())
3691 root = root->parent(); 3691 root = root->parent();
3692 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3692 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3693 } else { 3693 } else {
3694 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3694 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3695 } 3695 }
3696 } 3696 }
3697 3697
3698 #endif 3698 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGrid.cpp ('k') | third_party/WebKit/Source/core/layout/TracedLayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698