| 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #include "config.h" | 22 #include "config.h" |
| 23 | |
| 24 #include "core/rendering/svg/RenderSVGBlock.h" | 23 #include "core/rendering/svg/RenderSVGBlock.h" |
| 25 | 24 |
| 26 #include "core/rendering/RenderView.h" | 25 #include "core/rendering/RenderView.h" |
| 27 #include "core/rendering/style/ShadowList.h" | 26 #include "core/rendering/style/ShadowList.h" |
| 27 #include "core/rendering/svg/RenderSVGRoot.h" |
| 28 #include "core/rendering/svg/SVGRenderSupport.h" | 28 #include "core/rendering/svg/SVGRenderSupport.h" |
| 29 #include "core/rendering/svg/SVGResourcesCache.h" | 29 #include "core/rendering/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 RenderSVGBlock::RenderSVGBlock(SVGElement* element) | 34 RenderSVGBlock::RenderSVGBlock(SVGElement* element) |
| 35 : RenderBlockFlow(element) | 35 : RenderBlockFlow(element) |
| 36 { | 36 { |
| 37 } | 37 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 LayoutRect RenderSVGBlock::clippedOverflowRectForPaintInvalidation(const RenderL
ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint
InvalidationState) const | 99 LayoutRect RenderSVGBlock::clippedOverflowRectForPaintInvalidation(const RenderL
ayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paint
InvalidationState) const |
| 100 { | 100 { |
| 101 return SVGRenderSupport::clippedOverflowRectForPaintInvalidation(this, paint
InvalidationContainer, paintInvalidationState); | 101 return SVGRenderSupport::clippedOverflowRectForPaintInvalidation(this, paint
InvalidationContainer, paintInvalidationState); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void RenderSVGBlock::mapRectToPaintInvalidationBacking(const RenderLayerModelObj
ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState*
paintInvalidationState) const | 104 void RenderSVGBlock::mapRectToPaintInvalidationBacking(const RenderLayerModelObj
ect* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState*
paintInvalidationState) const |
| 105 { | 105 { |
| 106 FloatRect paintInvalidationRect = rect; | 106 FloatRect paintInvalidationRect = rect; |
| 107 paintInvalidationRect.inflate(style()->outlineWidth()); | 107 paintInvalidationRect.inflate(style()->outlineWidth()); |
| 108 computeFloatRectForPaintInvalidation(paintInvalidationContainer, paintInvali
dationRect, paintInvalidationState); | 108 const RenderSVGRoot* svgRoot = SVGRenderSupport::mapRectToSVGRootForPaintInv
alidation(this, paintInvalidationRect, rect); |
| 109 rect = enclosingLayoutRect(paintInvalidationRect); | 109 svgRoot->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect,
paintInvalidationState); |
| 110 } | |
| 111 | |
| 112 void RenderSVGBlock::computeFloatRectForPaintInvalidation(const RenderLayerModel
Object* paintInvalidationContainer, FloatRect& paintInvalidationRect, const Pain
tInvalidationState* paintInvalidationState) const | |
| 113 { | |
| 114 SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidati
onContainer, paintInvalidationRect, paintInvalidationState); | |
| 115 } | 110 } |
| 116 | 111 |
| 117 bool RenderSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi
tTestLocation&, const LayoutPoint&, HitTestAction) | 112 bool RenderSVGBlock::nodeAtPoint(const HitTestRequest&, HitTestResult&, const Hi
tTestLocation&, const LayoutPoint&, HitTestAction) |
| 118 { | 113 { |
| 119 ASSERT_NOT_REACHED(); | 114 ASSERT_NOT_REACHED(); |
| 120 return false; | 115 return false; |
| 121 } | 116 } |
| 122 | 117 |
| 123 void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI
nvalidationState) | 118 void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI
nvalidationState) |
| 124 { | 119 { |
| 125 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 120 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
| 126 return; | 121 return; |
| 127 | 122 |
| 128 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); | 123 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); |
| 129 RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); | 124 RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); |
| 130 } | 125 } |
| 131 | 126 |
| 132 } | 127 } |
| OLD | NEW |