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

Side by Side Diff: Source/core/dom/Element.h

Issue 22508006: Refactor adding and removing named and IDed elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address review comments Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013 Appl e Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class Attr; 42 class Attr;
43 class Attribute; 43 class Attribute;
44 class ClientRect; 44 class ClientRect;
45 class ClientRectList; 45 class ClientRectList;
46 class DOMStringMap; 46 class DOMStringMap;
47 class DOMTokenList; 47 class DOMTokenList;
48 class Element; 48 class Element;
49 class ElementRareData; 49 class ElementRareData;
50 class ElementShadow; 50 class ElementShadow;
51 class ExceptionState; 51 class ExceptionState;
52 class HTMLDocument;
52 class Image; 53 class Image;
53 class InputMethodContext; 54 class InputMethodContext;
54 class IntSize; 55 class IntSize;
55 class Locale; 56 class Locale;
56 class MutableStylePropertySet; 57 class MutableStylePropertySet;
57 class PropertySetCSSStyleDeclaration; 58 class PropertySetCSSStyleDeclaration;
58 class PseudoElement; 59 class PseudoElement;
59 class RenderRegion; 60 class RenderRegion;
60 class ShadowRoot; 61 class ShadowRoot;
61 class ShareableElementData; 62 class ShareableElementData;
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 enum SynchronizationOfLazyAttribute { NotInSynchronizationOfLazyAttribute = 0, InSynchronizationOfLazyAttribute }; 717 enum SynchronizationOfLazyAttribute { NotInSynchronizationOfLazyAttribute = 0, InSynchronizationOfLazyAttribute };
717 718
718 void didAddAttribute(const QualifiedName&, const AtomicString&); 719 void didAddAttribute(const QualifiedName&, const AtomicString&);
719 void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue); 720 void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
720 void didModifyAttribute(const QualifiedName&, const AtomicString&); 721 void didModifyAttribute(const QualifiedName&, const AtomicString&);
721 void didRemoveAttribute(const QualifiedName&); 722 void didRemoveAttribute(const QualifiedName&);
722 723
723 void synchronizeAttribute(const QualifiedName&) const; 724 void synchronizeAttribute(const QualifiedName&) const;
724 void synchronizeAttribute(const AtomicString& localName) const; 725 void synchronizeAttribute(const AtomicString& localName) const;
725 726
727 void updateName(const AtomicString& oldName, const AtomicString& newName);
728 void updateNameForTreeScope(TreeScope*, const AtomicString& oldName, const A tomicString& newName);
729 void updateNameForDocument(HTMLDocument*, const AtomicString& oldName, const AtomicString& newName);
726 void updateId(const AtomicString& oldId, const AtomicString& newId); 730 void updateId(const AtomicString& oldId, const AtomicString& newId);
727 void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& new Id); 731 void updateIdForTreeScope(TreeScope*, const AtomicString& oldId, const Atomi cString& newId);
728 void updateName(const AtomicString& oldName, const AtomicString& newName); 732 void updateIdForDocument(HTMLDocument*, const AtomicString& oldId, const Ato micString& newId);
729 void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue); 733 void updateLabel(TreeScope*, const AtomicString& oldForAttributeValue, const AtomicString& newForAttributeValue);
730 734
731 void scrollByUnits(int units, ScrollGranularity); 735 void scrollByUnits(int units, ScrollGranularity);
732 736
733 virtual void setPrefix(const AtomicString&, ExceptionState&) OVERRIDE FINAL; 737 virtual void setPrefix(const AtomicString&, ExceptionState&) OVERRIDE FINAL;
734 virtual NodeType nodeType() const OVERRIDE FINAL; 738 virtual NodeType nodeType() const OVERRIDE FINAL;
735 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; 739 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL;
736 740
737 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt ring& value, SynchronizationOfLazyAttribute); 741 void setAttributeInternal(size_t index, const QualifiedName&, const AtomicSt ring& value, SynchronizationOfLazyAttribute);
738 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S ynchronizationOfLazyAttribute); 742 void addAttributeInternal(const QualifiedName&, const AtomicString& value, S ynchronizationOfLazyAttribute);
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1090
1087 inline const Attribute* ElementData::attributeItem(unsigned index) const 1091 inline const Attribute* ElementData::attributeItem(unsigned index) const
1088 { 1092 {
1089 RELEASE_ASSERT(index < length()); 1093 RELEASE_ASSERT(index < length());
1090 return attributeBase() + index; 1094 return attributeBase() + index;
1091 } 1095 }
1092 1096
1093 } // namespace 1097 } // namespace
1094 1098
1095 #endif 1099 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698