| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 44 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
| 45 #include "core/svg/SVGAnimateElement.h" | 45 #include "core/svg/SVGAnimateElement.h" |
| 46 #include "core/svg/SVGCursorElement.h" | 46 #include "core/svg/SVGCursorElement.h" |
| 47 #include "core/svg/SVGDocumentExtensions.h" | 47 #include "core/svg/SVGDocumentExtensions.h" |
| 48 #include "core/svg/SVGElementRareData.h" | 48 #include "core/svg/SVGElementRareData.h" |
| 49 #include "core/svg/SVGGraphicsElement.h" | 49 #include "core/svg/SVGGraphicsElement.h" |
| 50 #include "core/svg/SVGSVGElement.h" | 50 #include "core/svg/SVGSVGElement.h" |
| 51 #include "core/svg/SVGTitleElement.h" | 51 #include "core/svg/SVGTitleElement.h" |
| 52 #include "core/svg/SVGUseElement.h" | 52 #include "core/svg/SVGUseElement.h" |
| 53 #include "core/svg/properties/SVGProperty.h" | 53 #include "core/svg/properties/SVGProperty.h" |
| 54 #include "wtf/TemporaryChange.h" | 54 #include "wtf/AutoReset.h" |
| 55 #include "wtf/Threading.h" | 55 #include "wtf/Threading.h" |
| 56 | 56 |
| 57 namespace blink { | 57 namespace blink { |
| 58 | 58 |
| 59 using namespace HTMLNames; | 59 using namespace HTMLNames; |
| 60 using namespace SVGNames; | 60 using namespace SVGNames; |
| 61 | 61 |
| 62 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru
ctionType constructionType) | 62 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru
ctionType constructionType) |
| 63 : Element(tagName, &document, constructionType) | 63 : Element(tagName, &document, constructionType) |
| 64 #if ENABLE(ASSERT) | 64 #if ENABLE(ASSERT) |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 | 443 |
| 444 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope
) | 444 void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope
) |
| 445 { | 445 { |
| 446 if (!isConnected()) | 446 if (!isConnected()) |
| 447 return; | 447 return; |
| 448 | 448 |
| 449 ASSERT(!m_inRelativeLengthClientsInvalidation); | 449 ASSERT(!m_inRelativeLengthClientsInvalidation); |
| 450 #if ENABLE(ASSERT) | 450 #if ENABLE(ASSERT) |
| 451 TemporaryChange<bool> inRelativeLengthClientsInvalidationChange(m_inRelative
LengthClientsInvalidation, true); | 451 AutoReset<bool> inRelativeLengthClientsInvalidationChange(&m_inRelativeLengt
hClientsInvalidation, true); |
| 452 #endif | 452 #endif |
| 453 | 453 |
| 454 if (LayoutObject* layoutObject = this->layoutObject()) { | 454 if (LayoutObject* layoutObject = this->layoutObject()) { |
| 455 if (hasRelativeLengths() && layoutObject->isSVGResourceContainer()) | 455 if (hasRelativeLengths() && layoutObject->isSVGResourceContainer()) |
| 456 toLayoutSVGResourceContainer(layoutObject)->invalidateCacheAndMarkFo
rLayout(layoutScope); | 456 toLayoutSVGResourceContainer(layoutObject)->invalidateCacheAndMarkFo
rLayout(layoutScope); |
| 457 else if (selfHasRelativeLengths()) | 457 else if (selfHasRelativeLengths()) |
| 458 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReason::Unknown, MarkContainerChain, layoutScope); | 458 layoutObject->setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidat
ionReason::Unknown, MarkContainerChain, layoutScope); |
| 459 } | 459 } |
| 460 | 460 |
| 461 for (SVGElement* element : m_elementsWithRelativeLengths) { | 461 for (SVGElement* element : m_elementsWithRelativeLengths) { |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 Element::trace(visitor); | 1169 Element::trace(visitor); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 const AtomicString& SVGElement::eventParameterName() | 1172 const AtomicString& SVGElement::eventParameterName() |
| 1173 { | 1173 { |
| 1174 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); | 1174 DEFINE_STATIC_LOCAL(const AtomicString, evtString, ("evt")); |
| 1175 return evtString; | 1175 return evtString; |
| 1176 } | 1176 } |
| 1177 | 1177 |
| 1178 } // namespace blink | 1178 } // namespace blink |
| OLD | NEW |