OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann |
3 * <zimmermann@kde.org> | 3 * <zimmermann@kde.org> |
4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> | 4 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> |
5 * Copyright (C) 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2008 Apple Inc. All rights reserved. |
6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 6 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 7 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
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 22 matching lines...) Expand all Loading... |
33 #include "core/animation/ElementAnimations.h" | 33 #include "core/animation/ElementAnimations.h" |
34 #include "core/animation/InterpolationEnvironment.h" | 34 #include "core/animation/InterpolationEnvironment.h" |
35 #include "core/animation/InvalidatableInterpolation.h" | 35 #include "core/animation/InvalidatableInterpolation.h" |
36 #include "core/animation/SVGInterpolationTypesMap.h" | 36 #include "core/animation/SVGInterpolationTypesMap.h" |
37 #include "core/css/resolver/StyleResolver.h" | 37 #include "core/css/resolver/StyleResolver.h" |
38 #include "core/dom/Document.h" | 38 #include "core/dom/Document.h" |
39 #include "core/dom/ElementTraversal.h" | 39 #include "core/dom/ElementTraversal.h" |
40 #include "core/dom/shadow/ShadowRoot.h" | 40 #include "core/dom/shadow/ShadowRoot.h" |
41 #include "core/events/Event.h" | 41 #include "core/events/Event.h" |
42 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
| 43 #include "core/frame/csp/ContentSecurityPolicy.h" |
43 #include "core/html/HTMLElement.h" | 44 #include "core/html/HTMLElement.h" |
44 #include "core/inspector/ConsoleMessage.h" | 45 #include "core/inspector/ConsoleMessage.h" |
45 #include "core/layout/LayoutObject.h" | 46 #include "core/layout/LayoutObject.h" |
46 #include "core/layout/svg/LayoutSVGResourceContainer.h" | 47 #include "core/layout/svg/LayoutSVGResourceContainer.h" |
47 #include "core/svg/SVGDocumentExtensions.h" | 48 #include "core/svg/SVGDocumentExtensions.h" |
48 #include "core/svg/SVGElementRareData.h" | 49 #include "core/svg/SVGElementRareData.h" |
49 #include "core/svg/SVGGraphicsElement.h" | 50 #include "core/svg/SVGGraphicsElement.h" |
50 #include "core/svg/SVGSVGElement.h" | 51 #include "core/svg/SVGSVGElement.h" |
51 #include "core/svg/SVGTitleElement.h" | 52 #include "core/svg/SVGTitleElement.h" |
52 #include "core/svg/SVGTreeScopeResources.h" | 53 #include "core/svg/SVGTreeScopeResources.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 matrix.PreMultiply(*SvgRareData()->AnimateMotionTransform()); | 401 matrix.PreMultiply(*SvgRareData()->AnimateMotionTransform()); |
401 | 402 |
402 return matrix; | 403 return matrix; |
403 } | 404 } |
404 | 405 |
405 Node::InsertionNotificationRequest SVGElement::InsertedInto( | 406 Node::InsertionNotificationRequest SVGElement::InsertedInto( |
406 ContainerNode* root_parent) { | 407 ContainerNode* root_parent) { |
407 Element::InsertedInto(root_parent); | 408 Element::InsertedInto(root_parent); |
408 UpdateRelativeLengthsInformation(); | 409 UpdateRelativeLengthsInformation(); |
409 BuildPendingResourcesIfNeeded(); | 410 BuildPendingResourcesIfNeeded(); |
| 411 |
| 412 if (hasAttribute(nonceAttr) && getAttribute(nonceAttr) != g_empty_atom) { |
| 413 setNonce(getAttribute(nonceAttr)); |
| 414 if (RuntimeEnabledFeatures::hideNonceContentAttributeEnabled() && |
| 415 InActiveDocument() && |
| 416 GetDocument().GetContentSecurityPolicy()->HasHeaderDeliveredPolicy()) { |
| 417 setAttribute(nonceAttr, g_empty_atom); |
| 418 } |
| 419 } |
| 420 |
410 return kInsertionDone; | 421 return kInsertionDone; |
411 } | 422 } |
412 | 423 |
413 void SVGElement::RemovedFrom(ContainerNode* root_parent) { | 424 void SVGElement::RemovedFrom(ContainerNode* root_parent) { |
414 bool was_in_document = root_parent->isConnected(); | 425 bool was_in_document = root_parent->isConnected(); |
415 | 426 |
416 if (was_in_document && HasRelativeLengths()) { | 427 if (was_in_document && HasRelativeLengths()) { |
417 // The root of the subtree being removed should take itself out from its | 428 // The root of the subtree being removed should take itself out from its |
418 // parent's relative length set. For the other nodes in the subtree we don't | 429 // parent's relative length set. For the other nodes in the subtree we don't |
419 // need to do anything: they will get their own removedFrom() notification | 430 // need to do anything: they will get their own removedFrom() notification |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 visitor->Trace(class_name_); | 1350 visitor->Trace(class_name_); |
1340 Element::Trace(visitor); | 1351 Element::Trace(visitor); |
1341 } | 1352 } |
1342 | 1353 |
1343 const AtomicString& SVGElement::EventParameterName() { | 1354 const AtomicString& SVGElement::EventParameterName() { |
1344 DEFINE_STATIC_LOCAL(const AtomicString, evt_string, ("evt")); | 1355 DEFINE_STATIC_LOCAL(const AtomicString, evt_string, ("evt")); |
1345 return evt_string; | 1356 return evt_string; |
1346 } | 1357 } |
1347 | 1358 |
1348 } // namespace blink | 1359 } // namespace blink |
OLD | NEW |