| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 invalidateBackgroundObscurationStatus(); | 208 invalidateBackgroundObscurationStatus(); |
| 209 | 209 |
| 210 clearNeedsLayout(); | 210 clearNeedsLayout(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 bool LayoutSVGRoot::shouldApplyViewportClip() const { | 213 bool LayoutSVGRoot::shouldApplyViewportClip() const { |
| 214 // the outermost svg is clipped if auto, and svg document roots are always | 214 // the outermost svg is clipped if auto, and svg document roots are always |
| 215 // clipped. When the svg is stand-alone (isDocumentElement() == true) the | 215 // clipped. When the svg is stand-alone (isDocumentElement() == true) the |
| 216 // viewport clipping should always be applied, noting that the window | 216 // viewport clipping should always be applied, noting that the window |
| 217 // scrollbars should be hidden if overflow=hidden. | 217 // scrollbars should be hidden if overflow=hidden. |
| 218 return style()->overflowX() == EOverflow::Hidden || | 218 return style()->overflowX() == EOverflow::kHidden || |
| 219 style()->overflowX() == EOverflow::Auto || | 219 style()->overflowX() == EOverflow::kAuto || |
| 220 style()->overflowX() == EOverflow::Scroll || this->isDocumentElement(); | 220 style()->overflowX() == EOverflow::kScroll || |
| 221 this->isDocumentElement(); |
| 221 } | 222 } |
| 222 | 223 |
| 223 LayoutRect LayoutSVGRoot::visualOverflowRect() const { | 224 LayoutRect LayoutSVGRoot::visualOverflowRect() const { |
| 224 LayoutRect rect = LayoutReplaced::selfVisualOverflowRect(); | 225 LayoutRect rect = LayoutReplaced::selfVisualOverflowRect(); |
| 225 if (!shouldApplyViewportClip()) | 226 if (!shouldApplyViewportClip()) |
| 226 rect.unite(contentsVisualOverflowRect()); | 227 rect.unite(contentsVisualOverflowRect()); |
| 227 return rect; | 228 return rect; |
| 228 } | 229 } |
| 229 | 230 |
| 230 LayoutRect LayoutSVGRoot::overflowClipRect(const LayoutPoint& location, | 231 LayoutRect LayoutSVGRoot::overflowClipRect(const LayoutPoint& location, |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 if (result.addNodeToListBasedTestResult(node(), locationInContainer, | 484 if (result.addNodeToListBasedTestResult(node(), locationInContainer, |
| 484 boundsRect) == StopHitTesting) | 485 boundsRect) == StopHitTesting) |
| 485 return true; | 486 return true; |
| 486 } | 487 } |
| 487 } | 488 } |
| 488 | 489 |
| 489 return false; | 490 return false; |
| 490 } | 491 } |
| 491 | 492 |
| 492 } // namespace blink | 493 } // namespace blink |
| OLD | NEW |