| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 26 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
| 27 #include "core/svg/SVGSVGElement.h" | 27 #include "core/svg/SVGSVGElement.h" |
| 28 #include "core/svg/animation/SMILTimeContainer.h" | 28 #include "core/svg/animation/SMILTimeContainer.h" |
| 29 #include "wtf/AutoReset.h" | 29 #include "wtf/AutoReset.h" |
| 30 #include "wtf/text/AtomicString.h" | 30 #include "wtf/text/AtomicString.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 SVGDocumentExtensions::SVGDocumentExtensions(Document* document) | 34 SVGDocumentExtensions::SVGDocumentExtensions(Document* document) |
| 35 : m_document(document) | 35 : m_document(document) |
| 36 #if ENABLE(ASSERT) | |
| 37 , | |
| 38 m_inRelativeLengthSVGRootsInvalidation(false) | |
| 39 #endif | |
| 40 { | 36 { |
| 41 } | 37 } |
| 42 | 38 |
| 43 SVGDocumentExtensions::~SVGDocumentExtensions() {} | 39 SVGDocumentExtensions::~SVGDocumentExtensions() {} |
| 44 | 40 |
| 45 void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element) { | 41 void SVGDocumentExtensions::addTimeContainer(SVGSVGElement* element) { |
| 46 m_timeContainers.add(element); | 42 m_timeContainers.add(element); |
| 47 } | 43 } |
| 48 | 44 |
| 49 void SVGDocumentExtensions::removeTimeContainer(SVGSVGElement* element) { | 45 void SVGDocumentExtensions::removeTimeContainer(SVGSVGElement* element) { |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 } | 248 } |
| 253 | 249 |
| 254 bool SVGDocumentExtensions::isSVGRootWithRelativeLengthDescendents( | 250 bool SVGDocumentExtensions::isSVGRootWithRelativeLengthDescendents( |
| 255 SVGSVGElement* svgRoot) const { | 251 SVGSVGElement* svgRoot) const { |
| 256 return m_relativeLengthSVGRoots.contains(svgRoot); | 252 return m_relativeLengthSVGRoots.contains(svgRoot); |
| 257 } | 253 } |
| 258 | 254 |
| 259 void SVGDocumentExtensions::invalidateSVGRootsWithRelativeLengthDescendents( | 255 void SVGDocumentExtensions::invalidateSVGRootsWithRelativeLengthDescendents( |
| 260 SubtreeLayoutScope* scope) { | 256 SubtreeLayoutScope* scope) { |
| 261 ASSERT(!m_inRelativeLengthSVGRootsInvalidation); | 257 ASSERT(!m_inRelativeLengthSVGRootsInvalidation); |
| 262 #if ENABLE(ASSERT) | 258 #if DCHECK_IS_ON() |
| 263 AutoReset<bool> inRelativeLengthSVGRootsChange( | 259 AutoReset<bool> inRelativeLengthSVGRootsChange( |
| 264 &m_inRelativeLengthSVGRootsInvalidation, true); | 260 &m_inRelativeLengthSVGRootsInvalidation, true); |
| 265 #endif | 261 #endif |
| 266 | 262 |
| 267 for (SVGSVGElement* element : m_relativeLengthSVGRoots) | 263 for (SVGSVGElement* element : m_relativeLengthSVGRoots) |
| 268 element->invalidateRelativeLengthClients(scope); | 264 element->invalidateRelativeLengthClients(scope); |
| 269 } | 265 } |
| 270 | 266 |
| 271 bool SVGDocumentExtensions::zoomAndPanEnabled() const { | 267 bool SVGDocumentExtensions::zoomAndPanEnabled() const { |
| 272 if (SVGSVGElement* svg = rootElement(*m_document)) | 268 if (SVGSVGElement* svg = rootElement(*m_document)) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 298 | 294 |
| 299 DEFINE_TRACE(SVGDocumentExtensions) { | 295 DEFINE_TRACE(SVGDocumentExtensions) { |
| 300 visitor->trace(m_document); | 296 visitor->trace(m_document); |
| 301 visitor->trace(m_timeContainers); | 297 visitor->trace(m_timeContainers); |
| 302 visitor->trace(m_webAnimationsPendingSVGElements); | 298 visitor->trace(m_webAnimationsPendingSVGElements); |
| 303 visitor->trace(m_relativeLengthSVGRoots); | 299 visitor->trace(m_relativeLengthSVGRoots); |
| 304 visitor->trace(m_pendingResources); | 300 visitor->trace(m_pendingResources); |
| 305 } | 301 } |
| 306 | 302 |
| 307 } // namespace blink | 303 } // namespace blink |
| OLD | NEW |