Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: Source/WebCore/dom/Element.cpp

Issue 14234005: CSP blocks style application in cloned nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CSP blocks style application in cloned nodes Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/dom/Element.h ('k') | Source/WebCore/dom/StyledElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/Element.cpp
diff --git a/Source/WebCore/dom/Element.cpp b/Source/WebCore/dom/Element.cpp
index ea2a15562fe5e4df63cb432bf92cd05773299e7c..1988682a2d368dde3c7cb48607da4f36b329be7c 100644
--- a/Source/WebCore/dom/Element.cpp
+++ b/Source/WebCore/dom/Element.cpp
@@ -831,7 +831,7 @@ static bool checkNeedsStyleInvalidationForIdChange(const AtomicString& oldId, co
return false;
}
-void Element::attributeChanged(const QualifiedName& name, const AtomicString& newValue)
+void Element::attributeChanged(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason)
{
if (ElementShadow* parentElementShadow = shadowOfParentForDistribution(this)) {
if (shouldInvalidateDistributionWhenAttributeChanged(parentElementShadow, name, newValue))
@@ -874,7 +874,7 @@ void Element::attributeChanged(const QualifiedName& name, const AtomicString& ne
cache->handleAttributeChanged(name, this);
}
-inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue)
+inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName& name, const AtomicString& newValue, AttributeModificationReason reason)
{
#if ENABLE(CUSTOM_ELEMENTS)
if (name == isAttr) {
@@ -882,7 +882,7 @@ inline void Element::attributeChangedFromParserOrByCloning(const QualifiedName&
registry->didGiveTypeExtension(this);
}
#endif
- attributeChanged(name, newValue);
+ attributeChanged(name, newValue, reason);
}
template <typename CharacterType>
@@ -1060,7 +1060,7 @@ void Element::parserSetAttributes(const Vector<Attribute>& attributeVector)
// Use attributeVector instead of m_elementData because attributeChanged might modify m_elementData.
for (unsigned i = 0; i < attributeVector.size(); ++i)
- attributeChangedFromParserOrByCloning(attributeVector[i].name(), attributeVector[i].value());
+ attributeChangedFromParserOrByCloning(attributeVector[i].name(), attributeVector[i].value(), ModifiedDirectly);
}
bool Element::hasAttributes() const
@@ -2859,7 +2859,7 @@ void Element::cloneAttributesFromElement(const Element& other)
for (unsigned i = 0; i < m_elementData->length(); ++i) {
const Attribute* attribute = const_cast<const ElementData*>(m_elementData.get())->attributeItem(i);
- attributeChangedFromParserOrByCloning(attribute->name(), attribute->value());
+ attributeChangedFromParserOrByCloning(attribute->name(), attribute->value(), ModifiedByCloning);
}
}
« no previous file with comments | « Source/WebCore/dom/Element.h ('k') | Source/WebCore/dom/StyledElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698