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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 setNeedsBoundariesUpdate(); | 319 setNeedsBoundariesUpdate(); |
320 RenderReplaced::styleWillChange(diff, newStyle); | 320 RenderReplaced::styleWillChange(diff, newStyle); |
321 } | 321 } |
322 | 322 |
323 void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldS
tyle) | 323 void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldS
tyle) |
324 { | 324 { |
325 RenderReplaced::styleDidChange(diff, oldStyle); | 325 RenderReplaced::styleDidChange(diff, oldStyle); |
326 SVGResourcesCache::clientStyleChanged(this, diff, style()); | 326 SVGResourcesCache::clientStyleChanged(this, diff, style()); |
327 } | 327 } |
328 | 328 |
329 void RenderSVGRoot::updateFromElement() | 329 void RenderSVGRoot::addChild(RenderObject* child, RenderObject* beforeChild) |
330 { | 330 { |
331 RenderReplaced::updateFromElement(); | 331 RenderReplaced::addChild(child, beforeChild); |
332 SVGResourcesCache::clientUpdatedFromElement(this, style()); | 332 SVGResourcesCache::clientWasAddedToTree(child, child->style()); |
| 333 } |
| 334 |
| 335 void RenderSVGRoot::removeChild(RenderObject* child) |
| 336 { |
| 337 SVGResourcesCache::clientWillBeRemovedFromTree(child); |
| 338 RenderReplaced::removeChild(child); |
333 } | 339 } |
334 | 340 |
335 // RenderBox methods will expect coordinates w/o any transforms in coordinates | 341 // RenderBox methods will expect coordinates w/o any transforms in coordinates |
336 // relative to our borderBox origin. This method gives us exactly that. | 342 // relative to our borderBox origin. This method gives us exactly that. |
337 void RenderSVGRoot::buildLocalToBorderBoxTransform() | 343 void RenderSVGRoot::buildLocalToBorderBoxTransform() |
338 { | 344 { |
339 SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); | 345 SVGSVGElement* svg = static_cast<SVGSVGElement*>(node()); |
340 float scale = style()->effectiveZoom(); | 346 float scale = style()->effectiveZoom(); |
341 FloatPoint translate = svg->currentTranslate(); | 347 FloatPoint translate = svg->currentTranslate(); |
342 LayoutSize borderAndPadding(borderLeft() + paddingLeft(), borderTop() + padd
ingTop()); | 348 LayoutSize borderAndPadding(borderLeft() + paddingLeft(), borderTop() + padd
ingTop()); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 while (svgRoot && !svgRoot->isSVGRoot()) | 465 while (svgRoot && !svgRoot->isSVGRoot()) |
460 svgRoot = svgRoot->parent(); | 466 svgRoot = svgRoot->parent(); |
461 if (!svgRoot) | 467 if (!svgRoot) |
462 return; | 468 return; |
463 static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients.
add(resource); | 469 static_cast<RenderSVGRoot*>(svgRoot)->m_resourcesNeedingToInvalidateClients.
add(resource); |
464 } | 470 } |
465 | 471 |
466 } | 472 } |
467 | 473 |
468 #endif // ENABLE(SVG) | 474 #endif // ENABLE(SVG) |
OLD | NEW |