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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor cleanup. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 331b34cbb75a2ab2b59c197deadf093c1ff9ed16..3e857c4f356e82835673d5f78856f219c4e439b3 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -82,7 +82,7 @@ namespace WebCore {
using namespace HTMLNames;
-class ListAttributeTargetObserver : IdTargetObserver {
+class ListAttributeTargetObserver : public IdTargetObserver {
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<ListAttributeTargetObserver> create(const AtomicString& id, HTMLInputElement*);
@@ -1516,12 +1516,19 @@ bool HTMLInputElement::hasValidDataListOptions() const
return false;
}
+void HTMLInputElement::setListAttributeTargetObserver(PassOwnPtr<ListAttributeTargetObserver> newObserver)
+{
+ if (m_listAttributeTargetObserver)
+ m_listAttributeTargetObserver->unregister();
+ m_listAttributeTargetObserver = newObserver;
+}
+
void HTMLInputElement::resetListAttributeTargetObserver()
{
if (inDocument())
- m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this);
+ setListAttributeTargetObserver(ListAttributeTargetObserver::create(fastGetAttribute(listAttr), this));
else
- m_listAttributeTargetObserver = nullptr;
+ setListAttributeTargetObserver(nullptr);
}
void HTMLInputElement::listAttributeTargetChanged()

Powered by Google App Engine
This is Rietveld 408576698