| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 m_overflow.reset(); | 167 m_overflow.reset(); |
| 168 addVisualEffectOverflow(); | 168 addVisualEffectOverflow(); |
| 169 | 169 |
| 170 if (!shouldApplyViewportClip()) { | 170 if (!shouldApplyViewportClip()) { |
| 171 FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVG
Coordinates(); | 171 FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVG
Coordinates(); |
| 172 contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(conte
ntPaintInvalidationRect); | 172 contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(conte
ntPaintInvalidationRect); |
| 173 addContentsVisualOverflow(enclosingLayoutRect(contentPaintInvalidationRe
ct)); | 173 addContentsVisualOverflow(enclosingLayoutRect(contentPaintInvalidationRe
ct)); |
| 174 } | 174 } |
| 175 | 175 |
| 176 updateLayerTransformAfterLayout(); | 176 updateLayerTransformAfterLayout(); |
| 177 m_hasBoxDecorationBackground = isDocumentElement() ? calculateHasBoxDecorati
ons() : hasBoxDecorationBackground(); | 177 m_hasBoxDecorationBackground = isDocumentElement() ? styleRef().hasBoxDecora
tionBackground() : hasBoxDecorationBackground(); |
| 178 invalidateBackgroundObscurationStatus(); | 178 invalidateBackgroundObscurationStatus(); |
| 179 | 179 |
| 180 clearNeedsLayout(); | 180 clearNeedsLayout(); |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool LayoutSVGRoot::shouldApplyViewportClip() const | 183 bool LayoutSVGRoot::shouldApplyViewportClip() const |
| 184 { | 184 { |
| 185 // the outermost svg is clipped if auto, and svg document roots are always c
lipped | 185 // the outermost svg is clipped if auto, and svg document roots are always c
lipped |
| 186 // When the svg is stand-alone (isDocumentElement() == true) the viewport cl
ipping should always | 186 // When the svg is stand-alone (isDocumentElement() == true) the viewport cl
ipping should always |
| 187 // be applied, noting that the window scrollbars should be hidden if overflo
w=hidden. | 187 // be applied, noting that the window scrollbars should be hidden if overflo
w=hidden. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 209 SVGResourcesCache::clientDestroyed(this); | 209 SVGResourcesCache::clientDestroyed(this); |
| 210 LayoutReplaced::willBeDestroyed(); | 210 LayoutReplaced::willBeDestroyed(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void LayoutSVGRoot::styleDidChange(StyleDifference diff, const ComputedStyle* ol
dStyle) | 213 void LayoutSVGRoot::styleDidChange(StyleDifference diff, const ComputedStyle* ol
dStyle) |
| 214 { | 214 { |
| 215 if (diff.needsFullLayout()) | 215 if (diff.needsFullLayout()) |
| 216 setNeedsBoundariesUpdate(); | 216 setNeedsBoundariesUpdate(); |
| 217 if (diff.needsPaintInvalidation()) { | 217 if (diff.needsPaintInvalidation()) { |
| 218 // Box decorations may have appeared/disappeared - recompute status. | 218 // Box decorations may have appeared/disappeared - recompute status. |
| 219 m_hasBoxDecorationBackground = calculateHasBoxDecorations(); | 219 m_hasBoxDecorationBackground = styleRef().hasBoxDecorationBackground(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 LayoutReplaced::styleDidChange(diff, oldStyle); | 222 LayoutReplaced::styleDidChange(diff, oldStyle); |
| 223 SVGResourcesCache::clientStyleChanged(this, diff, styleRef()); | 223 SVGResourcesCache::clientStyleChanged(this, diff, styleRef()); |
| 224 } | 224 } |
| 225 | 225 |
| 226 bool LayoutSVGRoot::isChildAllowed(LayoutObject* child, const ComputedStyle&) co
nst | 226 bool LayoutSVGRoot::isChildAllowed(LayoutObject* child, const ComputedStyle&) co
nst |
| 227 { | 227 { |
| 228 return child->isSVG() && !(child->isSVGInline() || child->isSVGInlineText()
|| child->isSVGGradientStop()); | 228 return child->isSVG() && !(child->isSVGInline() || child->isSVGInlineText()
|| child->isSVGGradientStop()); |
| 229 } | 229 } |
| (...skipping 188 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 |