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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 | 373 |
374 LayoutRect LayoutSVGRoot::localVisualRect() const { | 374 LayoutRect LayoutSVGRoot::localVisualRect() const { |
375 // This is an open-coded aggregate of SVGLayoutSupport::localVisualRect | 375 // This is an open-coded aggregate of SVGLayoutSupport::localVisualRect |
376 // and LayoutReplaced::localVisualRect. The reason for this is to optimize/ | 376 // and LayoutReplaced::localVisualRect. The reason for this is to optimize/ |
377 // minimize the visual rect when the box is not "decorated" (does not have | 377 // minimize the visual rect when the box is not "decorated" (does not have |
378 // background/border/etc., see | 378 // background/border/etc., see |
379 // LayoutSVGRootTest.VisualRectMappingWithViewportClipWithoutBorder). | 379 // LayoutSVGRootTest.VisualRectMappingWithViewportClipWithoutBorder). |
380 | 380 |
381 // Return early for any cases where we don't actually paint. | 381 // Return early for any cases where we don't actually paint. |
382 if (style()->visibility() != EVisibility::Visible && | 382 if (style()->visibility() != EVisibility::kVisible && |
383 !enclosingLayer()->hasVisibleContent()) | 383 !enclosingLayer()->hasVisibleContent()) |
384 return LayoutRect(); | 384 return LayoutRect(); |
385 | 385 |
386 // Compute the visual rect of the content of the SVG in the border-box | 386 // Compute the visual rect of the content of the SVG in the border-box |
387 // coordinate space. | 387 // coordinate space. |
388 FloatRect contentVisualRect = visualRectInLocalSVGCoordinates(); | 388 FloatRect contentVisualRect = visualRectInLocalSVGCoordinates(); |
389 contentVisualRect = m_localToBorderBoxTransform.mapRect(contentVisualRect); | 389 contentVisualRect = m_localToBorderBoxTransform.mapRect(contentVisualRect); |
390 | 390 |
391 // Apply initial viewport clip, overflow:visible content is added to | 391 // Apply initial viewport clip, overflow:visible content is added to |
392 // visualOverflow but the most common case is that overflow is hidden, so | 392 // visualOverflow but the most common case is that overflow is hidden, so |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 if (result.addNodeToListBasedTestResult(node(), locationInContainer, | 483 if (result.addNodeToListBasedTestResult(node(), locationInContainer, |
484 boundsRect) == StopHitTesting) | 484 boundsRect) == StopHitTesting) |
485 return true; | 485 return true; |
486 } | 486 } |
487 } | 487 } |
488 | 488 |
489 return false; | 489 return false; |
490 } | 490 } |
491 | 491 |
492 } // namespace blink | 492 } // namespace blink |
OLD | NEW |