| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2014 Google, Inc. | 5 * Copyright (C) 2014 Google, Inc. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 attrName == SVGNames::yAttr) { | 258 attrName == SVGNames::yAttr) { |
| 259 updateRelativeLengthsOrViewBox = true; | 259 updateRelativeLengthsOrViewBox = true; |
| 260 updateRelativeLengthsInformation(); | 260 updateRelativeLengthsInformation(); |
| 261 invalidateRelativeLengthClients(); | 261 invalidateRelativeLengthClients(); |
| 262 | 262 |
| 263 // At the SVG/HTML boundary (aka LayoutSVGRoot), the width and | 263 // At the SVG/HTML boundary (aka LayoutSVGRoot), the width and |
| 264 // height attributes can affect the replaced size so we need | 264 // height attributes can affect the replaced size so we need |
| 265 // to mark it for updating. | 265 // to mark it for updating. |
| 266 if (widthOrHeightChanged) { | 266 if (widthOrHeightChanged) { |
| 267 LayoutObject* layoutObject = this->layoutObject(); | 267 LayoutObject* layoutObject = this->layoutObject(); |
| 268 if (layoutObject && layoutObject->isSVGRoot()) { | 268 // If the element is not attached, we cannot be sure if it is (going to |
| 269 // be) an outermost root, so always mark presentation attributes dirty in |
| 270 // that case. |
| 271 if (!layoutObject || layoutObject->isSVGRoot()) { |
| 269 invalidateSVGPresentationAttributeStyle(); | 272 invalidateSVGPresentationAttributeStyle(); |
| 270 setNeedsStyleRecalc(LocalStyleChange, | 273 setNeedsStyleRecalc(LocalStyleChange, |
| 271 StyleChangeReasonForTracing::create( | 274 StyleChangeReasonForTracing::create( |
| 272 StyleChangeReason::SVGContainerSizeChange)); | 275 StyleChangeReason::SVGContainerSizeChange)); |
| 273 } | 276 } |
| 274 } else { | 277 } else { |
| 275 invalidateSVGPresentationAttributeStyle(); | 278 invalidateSVGPresentationAttributeStyle(); |
| 276 setNeedsStyleRecalc(LocalStyleChange, | 279 setNeedsStyleRecalc(LocalStyleChange, |
| 277 StyleChangeReasonForTracing::fromAttribute(attrName)); | 280 StyleChangeReasonForTracing::fromAttribute(attrName)); |
| 278 } | 281 } |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 visitor->trace(m_width); | 727 visitor->trace(m_width); |
| 725 visitor->trace(m_height); | 728 visitor->trace(m_height); |
| 726 visitor->trace(m_translation); | 729 visitor->trace(m_translation); |
| 727 visitor->trace(m_timeContainer); | 730 visitor->trace(m_timeContainer); |
| 728 visitor->trace(m_viewSpec); | 731 visitor->trace(m_viewSpec); |
| 729 SVGGraphicsElement::trace(visitor); | 732 SVGGraphicsElement::trace(visitor); |
| 730 SVGFitToViewBox::trace(visitor); | 733 SVGFitToViewBox::trace(visitor); |
| 731 } | 734 } |
| 732 | 735 |
| 733 } // namespace blink | 736 } // namespace blink |
| OLD | NEW |