| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "core/layout/svg/SVGResourcesCache.h" | 29 #include "core/layout/svg/SVGResourcesCache.h" |
| 30 #include "core/svg/SVGElement.h" | 30 #include "core/svg/SVGElement.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 LayoutSVGBlock::LayoutSVGBlock(SVGElement* element) | 34 LayoutSVGBlock::LayoutSVGBlock(SVGElement* element) |
| 35 : LayoutBlockFlow(element) | 35 : LayoutBlockFlow(element) |
| 36 { | 36 { |
| 37 } | 37 } |
| 38 | 38 |
| 39 LayoutRect LayoutSVGBlock::visualOverflowRect() const | |
| 40 { | |
| 41 LayoutRect borderRect = borderBoxRect(); | |
| 42 | |
| 43 if (const ShadowList* textShadow = style()->textShadow()) | |
| 44 textShadow->adjustRectForShadow(borderRect); | |
| 45 | |
| 46 return borderRect; | |
| 47 } | |
| 48 | |
| 49 void LayoutSVGBlock::updateFromStyle() | 39 void LayoutSVGBlock::updateFromStyle() |
| 50 { | 40 { |
| 51 LayoutBlock::updateFromStyle(); | 41 LayoutBlock::updateFromStyle(); |
| 52 | 42 |
| 53 // LayoutSVGlock, used by Layout(SVGText|ForeignObject), is not allowed to c
all setHasOverflowClip(true). | 43 // LayoutSVGlock, used by Layout(SVGText|ForeignObject), is not allowed to c
all setHasOverflowClip(true). |
| 54 // LayoutBlock assumes a layer to be present when the overflow clip function
ality is requested. Both | 44 // LayoutBlock assumes a layer to be present when the overflow clip function
ality is requested. Both |
| 55 // Layout(SVGText|ForeignObject) return 'NoDeprecatedPaintLayer' on 'layerTy
peRequired'. Fine for LayoutSVGText. | 45 // Layout(SVGText|ForeignObject) return 'NoDeprecatedPaintLayer' on 'layerTy
peRequired'. Fine for LayoutSVGText. |
| 56 // | 46 // |
| 57 // If we want to support overflow rules for <foreignObject> we can choose be
tween two solutions: | 47 // If we want to support overflow rules for <foreignObject> we can choose be
tween two solutions: |
| 58 // a) make LayoutSVGForeignObject require layers and SVG layer aware | 48 // a) make LayoutSVGForeignObject require layers and SVG layer aware |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void LayoutSVGBlock::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalid
ationState) | 114 void LayoutSVGBlock::invalidateTreeIfNeeded(PaintInvalidationState& paintInvalid
ationState) |
| 125 { | 115 { |
| 126 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 116 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
| 127 return; | 117 return; |
| 128 | 118 |
| 129 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); | 119 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); |
| 130 LayoutBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); | 120 LayoutBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); |
| 131 } | 121 } |
| 132 | 122 |
| 133 } | 123 } |
| OLD | NEW |