| OLD | NEW |
| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (LayoutSVGResourceFilter* filter = resources->filter()) | 359 if (LayoutSVGResourceFilter* filter = resources->filter()) |
| 360 paintInvalidationRect = filter->resourceBoundingBox(layoutObject); | 360 paintInvalidationRect = filter->resourceBoundingBox(layoutObject); |
| 361 | 361 |
| 362 if (LayoutSVGResourceClipper* clipper = resources->clipper()) | 362 if (LayoutSVGResourceClipper* clipper = resources->clipper()) |
| 363 paintInvalidationRect.intersect(clipper->resourceBoundingBox(layoutObjec
t)); | 363 paintInvalidationRect.intersect(clipper->resourceBoundingBox(layoutObjec
t)); |
| 364 | 364 |
| 365 if (LayoutSVGResourceMasker* masker = resources->masker()) | 365 if (LayoutSVGResourceMasker* masker = resources->masker()) |
| 366 paintInvalidationRect.intersect(masker->resourceBoundingBox(layoutObject
)); | 366 paintInvalidationRect.intersect(masker->resourceBoundingBox(layoutObject
)); |
| 367 } | 367 } |
| 368 | 368 |
| 369 bool SVGLayoutSupport::filtersForceContainerLayout(LayoutObject* object) | 369 bool SVGLayoutSupport::hasFilterResource(const LayoutObject& object) |
| 370 { | 370 { |
| 371 // If any of this container's children need to be laid out, and a filter is
applied | 371 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(
&object); |
| 372 // to the container, we need to issue paint invalidations the entire contain
er. | 372 return resources && resources->filter(); |
| 373 if (!object->normalChildNeedsLayout()) | |
| 374 return false; | |
| 375 | |
| 376 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(
object); | |
| 377 if (!resources || !resources->filter()) | |
| 378 return false; | |
| 379 | |
| 380 return true; | |
| 381 } | 373 } |
| 382 | 374 |
| 383 bool SVGLayoutSupport::pointInClippingArea(const LayoutObject* object, const Flo
atPoint& point) | 375 bool SVGLayoutSupport::pointInClippingArea(const LayoutObject* object, const Flo
atPoint& point) |
| 384 { | 376 { |
| 385 ASSERT(object); | 377 ASSERT(object); |
| 386 | 378 |
| 387 // We just take clippers into account to determine if a point is on the node
. The Specification may | 379 // We just take clippers into account to determine if a point is on the node
. The Specification may |
| 388 // change later and we also need to check maskers. | 380 // change later and we also need to check maskers. |
| 389 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(
object); | 381 SVGResources* resources = SVGResourcesCache::cachedResourcesForLayoutObject(
object); |
| 390 if (!resources) | 382 if (!resources) |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 | 580 |
| 589 return closestText; | 581 return closestText; |
| 590 } | 582 } |
| 591 | 583 |
| 592 LayoutObject* SVGLayoutSupport::findClosestLayoutSVGText(LayoutObject* layoutObj
ect, const FloatPoint& point) | 584 LayoutObject* SVGLayoutSupport::findClosestLayoutSVGText(LayoutObject* layoutObj
ect, const FloatPoint& point) |
| 593 { | 585 { |
| 594 return searchTreeForFindClosestLayoutSVGText(layoutObject, point).candidateL
ayoutObject; | 586 return searchTreeForFindClosestLayoutSVGText(layoutObject, point).candidateL
ayoutObject; |
| 595 } | 587 } |
| 596 | 588 |
| 597 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |