diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-18 15:53:33 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-18 15:53:33 +0200 |
commit | 6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (patch) | |
tree | d9c68d1cca0b3e352f1e438561f3e504e641a08f /Source/WebCore/dom/StyledElement.cpp | |
parent | d0424a769059c84ae20beb3c217812792ea6726b (diff) | |
download | qtwebkit-6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2.tar.gz |
Imported WebKit commit c7503cef7ecb236730d1309676ab9fc723fd061d (http://svn.webkit.org/repository/webkit/trunk@128886)
New snapshot with various build fixes
Diffstat (limited to 'Source/WebCore/dom/StyledElement.cpp')
-rw-r--r-- | Source/WebCore/dom/StyledElement.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/WebCore/dom/StyledElement.cpp b/Source/WebCore/dom/StyledElement.cpp index 12feb2af4..eff9a9e70 100644 --- a/Source/WebCore/dom/StyledElement.cpp +++ b/Source/WebCore/dom/StyledElement.cpp @@ -139,7 +139,8 @@ StyledElement::StyledElement(const QualifiedName& name, Document* document, Cons StyledElement::~StyledElement() { - destroyInlineStyle(); + if (attributeData() && attributeData()->isMutable()) + mutableAttributeData()->detachCSSOMWrapperIfNeeded(this); } CSSStyleDeclaration* StyledElement::style() @@ -163,8 +164,8 @@ void StyledElement::styleAttributeChanged(const AtomicString& newStyleString, Sh WTF::OrdinalNumber startLineNumber = WTF::OrdinalNumber::beforeFirst(); if (document() && document()->scriptableDocumentParser() && !document()->isInDocumentWrite()) startLineNumber = document()->scriptableDocumentParser()->lineNumber(); - if (newStyleString.isNull()) - destroyInlineStyle(); + if (newStyleString.isNull() && attributeData()) + mutableAttributeData()->destroyInlineStyle(this); else if (document()->contentSecurityPolicy()->allowInlineStyle(document()->url(), startLineNumber)) ensureAttributeData()->updateInlineStyleAvoidingMutation(this, newStyleString); setIsStyleAttributeValid(); @@ -266,7 +267,7 @@ static unsigned computePresentationAttributeCacheHash(const PresentationAttribut return 0; ASSERT(key.attributesAndValues.size()); unsigned attributeHash = StringHasher::hashMemory(key.attributesAndValues.data(), key.attributesAndValues.size() * sizeof(key.attributesAndValues[0])); - return WTF::intHash((static_cast<uint64_t>(key.tagName->existingHash()) << 32 | attributeHash)); + return WTF::pairIntHash(key.tagName->existingHash(), attributeHash); } void StyledElement::updateAttributeStyle() |