diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-18 14:03:11 +0200 |
commit | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (patch) | |
tree | cdca40d0353886b3ca52f33a2d7b8f1c0011aafc /Source/WebCore/dom/Element.h | |
parent | 1b914638db989aaa98631a1c1e02c7b2d44805d8 (diff) | |
download | qtwebkit-8d473cf9743f1d30a16a27114e93bd5af5648d23.tar.gz |
Imported WebKit commit 1350e72f7345ced9da2bd9980deeeb5a8d62fab4 (http://svn.webkit.org/repository/webkit/trunk@117578)
Weekly snapshot
Diffstat (limited to 'Source/WebCore/dom/Element.h')
-rw-r--r-- | Source/WebCore/dom/Element.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h index 8bd9cd810..e436f3481 100644 --- a/Source/WebCore/dom/Element.h +++ b/Source/WebCore/dom/Element.h @@ -241,7 +241,7 @@ public: NamedNodeMap* attributes() const; // This method is called whenever an attribute is added, changed or removed. - virtual void attributeChanged(Attribute*); + virtual void attributeChanged(const Attribute&); // Only called by the parser immediately after element construction. void parserSetAttributes(const Vector<Attribute>&, FragmentScriptingPermission); @@ -251,10 +251,15 @@ public: ElementAttributeData* updatedAttributeData() const; ElementAttributeData* ensureUpdatedAttributeData() const; - void setAttributesFromElement(const Element&); + // Clones attributes only. + void cloneAttributesFromElement(const Element&); + + // Clones all attribute-derived data, including subclass specifics (through copyNonAttributeProperties.) + void cloneDataFromElement(const Element&); + bool hasEquivalentAttributes(const Element* other) const; - virtual void copyNonAttributeProperties(const Element* source); + virtual void copyNonAttributePropertiesFromElement(const Element&) { } virtual void attach(); virtual void detach(); @@ -302,8 +307,8 @@ public: void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue); void willRemoveAttribute(const QualifiedName&, const AtomicString& value); - void didAddAttribute(Attribute*); - void didModifyAttribute(Attribute*); + void didAddAttribute(const Attribute&); + void didModifyAttribute(const Attribute&); void didRemoveAttribute(const QualifiedName&); LayoutSize minimumSizeForResizing() const; @@ -422,8 +427,9 @@ protected: virtual InsertionNotificationRequest insertedInto(Node*) OVERRIDE; virtual void removedFrom(Node*) OVERRIDE; virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); - virtual bool willRecalcStyle(StyleChange) { return true; } - virtual void didRecalcStyle(StyleChange) { } + + virtual bool willRecalcStyle(StyleChange); + virtual void didRecalcStyle(StyleChange); virtual PassRefPtr<RenderStyle> customStyleForRenderer(); virtual bool shouldRegisterAsNamedItem() const { return false; } @@ -561,12 +567,6 @@ inline ElementAttributeData* Element::ensureUpdatedAttributeData() const return ensureAttributeData(); } -inline void Element::setAttributesFromElement(const Element& other) -{ - if (ElementAttributeData* attributeData = other.updatedAttributeData()) - ensureUpdatedAttributeData()->setAttributes(*attributeData, this); -} - inline void Element::updateName(const AtomicString& oldName, const AtomicString& newName) { if (!inDocument()) |