| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@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. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 6 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 toRenderSVGText(child)->setNeedsTextMetricsUpdate(); | 235 toRenderSVGText(child)->setNeedsTextMetricsUpdate(); |
| 236 toRenderSVGText(child)->setNeedsPositioningValuesUpdate(
); | 236 toRenderSVGText(child)->setNeedsPositioningValuesUpdate(
); |
| 237 } | 237 } |
| 238 | 238 |
| 239 needsLayout = true; | 239 needsLayout = true; |
| 240 } | 240 } |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 SubtreeLayoutScope layoutScope(child); | 244 SubtreeLayoutScope layoutScope(child); |
| 245 if (needsLayout) | 245 if (needsLayout && !child->isSVGResourceContainer()) |
| 246 layoutScope.setNeedsLayout(child); | 246 layoutScope.setNeedsLayout(child); |
| 247 | 247 |
| 248 if (child->needsLayout()) { | 248 if (child->needsLayout()) { |
| 249 // Layout child resources. |
| 250 if (SVGResources* resources = SVGResourcesCache::cachedResourcesForR
enderObject(child)) |
| 251 resources->layoutIfNeeded(); |
| 252 |
| 249 child->layout(); | 253 child->layout(); |
| 250 // Renderers are responsible for repainting themselves when changing
, except | 254 // Renderers are responsible for repainting themselves when changing
, except |
| 251 // for the initial paint to avoid potential double-painting caused b
y non-sensical "old" bounds. | 255 // for the initial paint to avoid potential double-painting caused b
y non-sensical "old" bounds. |
| 252 // We could handle this in the individual objects, but for now it's
easier to have | 256 // We could handle this in the individual objects, but for now it's
easier to have |
| 253 // parent containers call repaint(). (RenderBlock::layout* has simi
lar logic.) | 257 // parent containers call repaint(). (RenderBlock::layout* has simi
lar logic.) |
| 254 if (!childEverHadLayout) | 258 if (!childEverHadLayout) |
| 255 child->repaint(); | 259 child->repaint(); |
| 256 } else if (layoutSizeChanged) | 260 } else if (layoutSizeChanged) |
| 257 notlayoutedObjects.add(child); | 261 notlayoutedObjects.add(child); |
| 258 } | 262 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 395 |
| 392 bool SVGRenderSupport::isEmptySVGInlineText(const RenderObject* object) | 396 bool SVGRenderSupport::isEmptySVGInlineText(const RenderObject* object) |
| 393 { | 397 { |
| 394 // RenderSVGInlineText performs whitespace filtering in order to support xml
:space | 398 // RenderSVGInlineText performs whitespace filtering in order to support xml
:space |
| 395 // (http://www.w3.org/TR/SVG/struct.html#LangSpaceAttrs), and can end up wit
h an empty string | 399 // (http://www.w3.org/TR/SVG/struct.html#LangSpaceAttrs), and can end up wit
h an empty string |
| 396 // even when its original constructor argument is non-empty. | 400 // even when its original constructor argument is non-empty. |
| 397 return object->isSVGInlineText() && toRenderSVGInlineText(object)->hasEmptyT
ext(); | 401 return object->isSVGInlineText() && toRenderSVGInlineText(object)->hasEmptyT
ext(); |
| 398 } | 402 } |
| 399 | 403 |
| 400 } | 404 } |
| OLD | NEW |