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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 { | 119 { |
120 ASSERT_NOT_REACHED(); | 120 ASSERT_NOT_REACHED(); |
121 return false; | 121 return false; |
122 } | 122 } |
123 | 123 |
124 void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI nvalidationState) | 124 void RenderSVGBlock::invalidateTreeIfNeeded(const PaintInvalidationState& paintI nvalidationState) |
125 { | 125 { |
126 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 126 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
127 return; | 127 return; |
128 | 128 |
129 if (paintInvalidationState.cachedOffsetsEnabled()) { | |
130 m_cachedPaintInvalidationTransform = paintInvalidationState.svgTransform (); | |
131 } else { | |
132 AffineTransform transform = localTransform(); | |
fs
2014/12/19 11:46:00
This shouldn't be included, because it's included
pdr.
2014/12/19 18:39:15
Done
| |
133 RenderObject* next = parent(); | |
134 while (!next->isSVGRoot()) { | |
135 transform = next->localToParentTransform() * transform; | |
136 next = next->parent(); | |
137 ASSERT(next); | |
138 } | |
139 m_cachedPaintInvalidationTransform = toRenderSVGRoot(next)->localToBorde rBoxTransform() * transform; | |
140 } | |
141 | |
129 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); | 142 ForceHorriblySlowRectMapping slowRectMapping(&paintInvalidationState); |
130 RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); | 143 RenderBlockFlow::invalidateTreeIfNeeded(paintInvalidationState); |
131 } | 144 } |
132 | 145 |
146 void RenderSVGBlock::updatePaintInfoRect(IntRect& rect) | |
147 { | |
148 if (rect != LayoutRect::infiniteRect()) { | |
149 AffineTransform transformToRoot = m_cachedPaintInvalidationTransform * l ocalTransform(); | |
150 rect = enclosingIntRect(transformToRoot.inverse().mapRect(FloatRect(rect ))); | |
151 } | |
133 } | 152 } |
153 | |
154 } | |
OLD | NEW |