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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldS
tyle) | 294 void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldS
tyle) |
295 { | 295 { |
296 if (diff == StyleDifferenceLayout) | 296 if (diff == StyleDifferenceLayout) |
297 setNeedsBoundariesUpdate(); | 297 setNeedsBoundariesUpdate(); |
298 | 298 |
299 RenderReplaced::styleDidChange(diff, oldStyle); | 299 RenderReplaced::styleDidChange(diff, oldStyle); |
300 SVGResourcesCache::clientStyleChanged(this, diff, style()); | 300 SVGResourcesCache::clientStyleChanged(this, diff, style()); |
301 } | 301 } |
302 | 302 |
| 303 bool RenderSVGRoot::isChildAllowed(RenderObject* child, RenderStyle*) const |
| 304 { |
| 305 return child->isSVG() && !(child->isSVGInline() || child->isSVGInlineText())
; |
| 306 } |
| 307 |
303 void RenderSVGRoot::addChild(RenderObject* child, RenderObject* beforeChild) | 308 void RenderSVGRoot::addChild(RenderObject* child, RenderObject* beforeChild) |
304 { | 309 { |
305 RenderReplaced::addChild(child, beforeChild); | 310 RenderReplaced::addChild(child, beforeChild); |
306 SVGResourcesCache::clientWasAddedToTree(child, child->style()); | 311 SVGResourcesCache::clientWasAddedToTree(child, child->style()); |
307 } | 312 } |
308 | 313 |
309 void RenderSVGRoot::removeChild(RenderObject* child) | 314 void RenderSVGRoot::removeChild(RenderObject* child) |
310 { | 315 { |
311 SVGResourcesCache::clientWillBeRemovedFromTree(child); | 316 SVGResourcesCache::clientWillBeRemovedFromTree(child); |
312 RenderReplaced::removeChild(child); | 317 RenderReplaced::removeChild(child); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 | 443 |
439 bool RenderSVGRoot::hasRelativeLogicalHeight() const | 444 bool RenderSVGRoot::hasRelativeLogicalHeight() const |
440 { | 445 { |
441 SVGSVGElement* svg = toSVGSVGElement(node()); | 446 SVGSVGElement* svg = toSVGSVGElement(node()); |
442 ASSERT(svg); | 447 ASSERT(svg); |
443 | 448 |
444 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); | 449 return svg->intrinsicHeight(SVGSVGElement::IgnoreCSSProperties).isPercent(); |
445 } | 450 } |
446 | 451 |
447 } | 452 } |
OLD | NEW |