| Index: sky/engine/core/dom/Element.cpp
|
| diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
|
| index 34ca67d1a418b866317057b4a9d5f2e5ff6030c2..3bfb444170bc6c376b96a160bd22ca2a24b44e9b 100644
|
| --- a/sky/engine/core/dom/Element.cpp
|
| +++ b/sky/engine/core/dom/Element.cpp
|
| @@ -32,7 +32,6 @@
|
| #include "sky/engine/bindings/exception_state.h"
|
| #include "sky/engine/core/animation/AnimationTimeline.h"
|
| #include "sky/engine/core/animation/css/CSSAnimations.h"
|
| -#include "sky/engine/core/css/CSSImageValue.h"
|
| #include "sky/engine/core/css/CSSStyleSheet.h"
|
| #include "sky/engine/core/css/CSSValuePool.h"
|
| #include "sky/engine/core/css/PropertySetCSSStyleDeclaration.h"
|
| @@ -1430,39 +1429,9 @@ void Element::willModifyAttribute(const QualifiedName& name, const AtomicString&
|
| recipients->enqueueMutationRecord(MutationRecord::createAttributes(this, name, oldValue));
|
| }
|
|
|
| -static bool needsURLResolutionForInlineStyle(const Element& element, const Document& oldDocument, const Document& newDocument)
|
| -{
|
| - if (oldDocument == newDocument)
|
| - return false;
|
| - if (oldDocument.baseURL() == newDocument.baseURL())
|
| - return false;
|
| - const StylePropertySet* style = element.inlineStyle();
|
| - if (!style)
|
| - return false;
|
| - for (unsigned i = 0; i < style->propertyCount(); ++i) {
|
| - // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSCursorImageValue, etc.
|
| - if (style->propertyAt(i).value()->isImageValue())
|
| - return true;
|
| - }
|
| - return false;
|
| -}
|
| -
|
| -static void reResolveURLsInInlineStyle(const Document& document, MutableStylePropertySet& style)
|
| -{
|
| - for (unsigned i = 0; i < style.propertyCount(); ++i) {
|
| - StylePropertySet::PropertyReference property = style.propertyAt(i);
|
| - // FIXME: Should handle all URL-based properties: CSSImageSetValue, CSSCursorImageValue, etc.
|
| - if (property.value()->isImageValue())
|
| - toCSSImageValue(property.value())->reResolveURL(document);
|
| - }
|
| -}
|
| -
|
| void Element::didMoveToNewDocument(Document& oldDocument)
|
| {
|
| Node::didMoveToNewDocument(oldDocument);
|
| -
|
| - if (needsURLResolutionForInlineStyle(*this, oldDocument, document()))
|
| - reResolveURLsInInlineStyle(document(), ensureMutableInlineStyle());
|
| }
|
|
|
| void Element::cloneAttributesFromElement(const Element& other)
|
| @@ -1484,7 +1453,7 @@ void Element::cloneAttributesFromElement(const Element& other)
|
| if (other.m_elementData->isUnique())
|
| const_cast<Element&>(other).m_elementData = toUniqueElementData(other.m_elementData)->makeShareableCopy();
|
|
|
| - if (!other.m_elementData->isUnique() && !needsURLResolutionForInlineStyle(other, other.document(), document()))
|
| + if (!other.m_elementData->isUnique())
|
| m_elementData = other.m_elementData;
|
| else
|
| m_elementData = other.m_elementData->makeUniqueCopy();
|
|
|