Changeset 125159 in webkit
- Timestamp:
- Aug 9, 2012 12:47:55 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125158 r125159 1 2012-08-08 Arko Saha <arko@motorola.com> 2 3 Microdata: PropertyNodeList cache should be invalidated on id attribute change. 4 https://bugs.webkit.org/show_bug.cgi?id=93485 5 6 Reviewed by Ryosuke Niwa. 7 8 Added test to verify HTMLPropertiesCollection and PropertyNodeList interfaces 9 behavior on changing id attribute. 10 11 * fast/dom/MicroData/propertiescollection-on-changing-id-attr-expected.txt: Added. 12 * fast/dom/MicroData/propertiescollection-on-changing-id-attr.html: Added. 13 1 14 2012-08-09 Takashi Toyoshima <toyoshim@chromium.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r125157 r125159 1 2012-08-08 Arko Saha <arko@motorola.com> 2 3 Microdata: PropertyNodeList cache should be invalidated on id attribute change. 4 https://bugs.webkit.org/show_bug.cgi?id=93485 5 6 Reviewed by Ryosuke Niwa. 7 8 Invalidate PropertyNodeList cache when id attribute of an element changed/modified. 9 10 Test: fast/dom/MicroData/propertiescollection-on-changing-id-attr.html 11 12 * dom/DynamicNodeList.cpp: Moved ownerNodeHasItemRefAttribute() method to DynamicNodeList.h 13 (WebCore): 14 * dom/DynamicNodeList.h: 15 (WebCore): 16 (WebCore::DynamicNodeListCacheBase::isRootedAtDocument): Return true if owner has itemref 17 attribute specified with root type NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr. 18 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Return true if 19 attrName is id attribute in case of InvalidateOnItemAttrChange. 20 (WebCore::DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute): 21 1 22 2012-08-09 Arko Saha <arko@motorola.com> 2 23 -
trunk/Source/WebCore/dom/DynamicNodeList.cpp
r125157 r125159 48 48 49 49 return m_ownerNode.get(); 50 }51 52 ALWAYS_INLINE bool DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute() const53 {54 #if ENABLE(MICRODATA)55 if (m_rootType == NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr)56 return toElement(ownerNode())->fastHasAttribute(HTMLNames::itemrefAttr);57 #endif58 59 return false;60 50 } 61 51 -
trunk/Source/WebCore/dom/DynamicNodeList.h
r123434 r125159 27 27 #include "CollectionType.h" 28 28 #include "Document.h" 29 #include "Element.h" 29 30 #include "HTMLNames.h" 30 31 #include "NodeList.h" … … 33 34 34 35 namespace WebCore { 35 36 class Element;37 class Node;38 36 39 37 enum NodeListRootType { … … 71 69 72 70 public: 73 ALWAYS_INLINE bool isRootedAtDocument() const { return m_rootType == NodeListIsRootedAtDocument ; }71 ALWAYS_INLINE bool isRootedAtDocument() const { return m_rootType == NodeListIsRootedAtDocument || ownerNodeHasItemRefAttribute(); } 74 72 ALWAYS_INLINE NodeListInvalidationType invalidationType() const { return static_cast<NodeListInvalidationType>(m_invalidationType); } 75 73 ALWAYS_INLINE CollectionType type() const { return static_cast<CollectionType>(m_collectionType); } … … 167 165 case InvalidateOnItemAttrChange: 168 166 #if ENABLE(MICRODATA) 169 return attrName == HTMLNames::itemscopeAttr || attrName == HTMLNames::itempropAttr || attrName == HTMLNames::itemtypeAttr || attrName == HTMLNames::itemrefAttr; 167 return attrName == HTMLNames::itemscopeAttr || attrName == HTMLNames::itempropAttr 168 || attrName == HTMLNames::itemtypeAttr || attrName == HTMLNames::itemrefAttr || attrName == HTMLNames::idAttr; 170 169 #endif // Intentionally fall through 171 170 case DoNotInvalidateOnAttributeChanges: … … 174 173 return true; 175 174 } 175 return false; 176 } 177 178 ALWAYS_INLINE bool DynamicNodeListCacheBase::ownerNodeHasItemRefAttribute() const 179 { 180 #if ENABLE(MICRODATA) 181 if (m_rootType == NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr) 182 return toElement(ownerNode())->fastHasAttribute(HTMLNames::itemrefAttr); 183 #endif 184 176 185 return false; 177 186 }
Note: See TracChangeset
for help on using the changeset viewer.