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

Unified Diff: third_party/WebKit/Source/core/dom/Element.h

Issue 2586143004: Blur immediately if an attribute change made an element unfocasable. (Closed)
Patch Set: Update comments and a function name Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.h
diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h
index 11609296c0342b452b9a1a758c2dc39cc0702cd3..e2690fe9ff02dfaa8eeb833a46e4bf58eec57ae6 100644
--- a/third_party/WebKit/Source/core/dom/Element.h
+++ b/third_party/WebKit/Source/core/dom/Element.h
@@ -356,13 +356,24 @@ class CORE_EXPORT Element : public ContainerNode {
// For exposing to DOM only.
NamedNodeMap* attributesForBindings() const;
- enum AttributeModificationReason { ModifiedDirectly, ModifiedByCloning };
-
- // This method is called whenever an attribute is added, changed or removed.
+ enum class AttributeModificationReason { kDirectly, kByParser, kByCloning };
+
+ // |attributeChanged| is called whenever an attribute is added, changed or
+ // removed. It handles very common attributes such as id, class, name, style,
+ // and slot.
+ //
+ // While the owner document is parsed, this function is called after all
+ // attributes in a start tag were added to the element.
virtual void attributeChanged(const QualifiedName&,
const AtomicString& oldValue,
const AtomicString& newValue,
- AttributeModificationReason = ModifiedDirectly);
+ AttributeModificationReason);
+
+ // |parseAttribute| is called by |attributeChanged|. If an element
+ // implementation needs to check an attribute update, override this function.
+ //
+ // While the owner document is parsed, this function is called after all
+ // attributes in a start tag were added to the element.
virtual void parseAttribute(const QualifiedName&,
const AtomicString& oldValue,
const AtomicString& newValue);
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698