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

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

Issue 2279823002: Use LayoutSVGResourceClipper::resourceBoundingBox() in ClipPathClipper (Closed)
Patch Set: Rebase Created 4 years, 3 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) 2007, 2008 Rob Buis <buis@kde.org> 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2009 Google, Inc. All rights reserved. 5 * Copyright (C) 2009 Google, Inc. All rights reserved.
6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 ASSERT(layoutObject); 349 ASSERT(layoutObject);
350 350
351 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject( layoutObject); 351 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject( layoutObject);
352 if (!resources) 352 if (!resources)
353 return; 353 return;
354 354
355 if (LayoutSVGResourceFilter* filter = resources->filter()) 355 if (LayoutSVGResourceFilter* filter = resources->filter())
356 paintInvalidationRect = filter->resourceBoundingBox(layoutObject); 356 paintInvalidationRect = filter->resourceBoundingBox(layoutObject);
357 357
358 if (LayoutSVGResourceClipper* clipper = resources->clipper()) 358 if (LayoutSVGResourceClipper* clipper = resources->clipper())
359 paintInvalidationRect.intersect(clipper->resourceBoundingBox(layoutObjec t)); 359 paintInvalidationRect.intersect(clipper->resourceBoundingBox(layoutObjec t->objectBoundingBox()));
360 360
361 if (LayoutSVGResourceMasker* masker = resources->masker()) 361 if (LayoutSVGResourceMasker* masker = resources->masker())
362 paintInvalidationRect.intersect(masker->resourceBoundingBox(layoutObject )); 362 paintInvalidationRect.intersect(masker->resourceBoundingBox(layoutObject ));
363 } 363 }
364 364
365 bool SVGLayoutSupport::hasFilterResource(const LayoutObject& object) 365 bool SVGLayoutSupport::hasFilterResource(const LayoutObject& object)
366 { 366 {
367 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject( &object); 367 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject( &object);
368 return resources && resources->filter(); 368 return resources && resources->filter();
369 } 369 }
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 574
575 return closestText; 575 return closestText;
576 } 576 }
577 577
578 LayoutObject* SVGLayoutSupport::findClosestLayoutSVGText(LayoutObject* layoutObj ect, const FloatPoint& point) 578 LayoutObject* SVGLayoutSupport::findClosestLayoutSVGText(LayoutObject* layoutObj ect, const FloatPoint& point)
579 { 579 {
580 return searchTreeForFindClosestLayoutSVGText(layoutObject, point).candidateL ayoutObject; 580 return searchTreeForFindClosestLayoutSVGText(layoutObject, point).candidateL ayoutObject;
581 } 581 }
582 582
583 } // namespace blink 583 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698