| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@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. | 5 * Copyright (C) 2009 Google, Inc. |
| 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 } | 334 } |
| 335 | 335 |
| 336 LayoutRect LayoutSVGRoot::localOverflowRectForPaintInvalidation() const | 336 LayoutRect LayoutSVGRoot::localOverflowRectForPaintInvalidation() const |
| 337 { | 337 { |
| 338 // This is an open-coded aggregate of SVGLayoutSupport::localOverflowRectFor
PaintInvalidation, | 338 // This is an open-coded aggregate of SVGLayoutSupport::localOverflowRectFor
PaintInvalidation, |
| 339 // and LayoutReplaced::localOverflowRectForPaintInvalidation. | 339 // and LayoutReplaced::localOverflowRectForPaintInvalidation. |
| 340 // The reason for this is to optimize/minimize the paint invalidation rect w
hen the box is not "decorated" | 340 // The reason for this is to optimize/minimize the paint invalidation rect w
hen the box is not "decorated" |
| 341 // (does not have background/border/etc., see LayoutSVGRootTest.OverflowRect
MappingWithViewportClipWithoutBorder). | 341 // (does not have background/border/etc., see LayoutSVGRootTest.OverflowRect
MappingWithViewportClipWithoutBorder). |
| 342 | 342 |
| 343 // Return early for any cases where we don't actually paint. | 343 // Return early for any cases where we don't actually paint. |
| 344 if (style()->visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent
()) | 344 if (style()->visibility() != EVisibility::Visible && !enclosingLayer()->hasV
isibleContent()) |
| 345 return LayoutRect(); | 345 return LayoutRect(); |
| 346 | 346 |
| 347 // Compute the paint invalidation rect of the content of the SVG in the bord
er-box coordinate space. | 347 // Compute the paint invalidation rect of the content of the SVG in the bord
er-box coordinate space. |
| 348 FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVGCoor
dinates(); | 348 FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVGCoor
dinates(); |
| 349 contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(contentPa
intInvalidationRect); | 349 contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(contentPa
intInvalidationRect); |
| 350 | 350 |
| 351 // Apply initial viewport clip, overflow:visible content is added to visualO
verflow | 351 // Apply initial viewport clip, overflow:visible content is added to visualO
verflow |
| 352 // but the most common case is that overflow is hidden, so always intersect. | 352 // but the most common case is that overflow is hidden, so always intersect. |
| 353 contentPaintInvalidationRect.intersect(pixelSnappedBorderBoxRect()); | 353 contentPaintInvalidationRect.intersect(pixelSnappedBorderBoxRect()); |
| 354 | 354 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 updateHitTestResult(result, pointInBorderBox); | 418 updateHitTestResult(result, pointInBorderBox); |
| 419 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
boundsRect) == StopHitTesting) | 419 if (result.addNodeToListBasedTestResult(node(), locationInContainer,
boundsRect) == StopHitTesting) |
| 420 return true; | 420 return true; |
| 421 } | 421 } |
| 422 } | 422 } |
| 423 | 423 |
| 424 return false; | 424 return false; |
| 425 } | 425 } |
| 426 | 426 |
| 427 } // namespace blink | 427 } // namespace blink |
| OLD | NEW |