6aec805
diff -up qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp.cve-2010-0052-destroyed-input-cached qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp
6aec805
--- qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp.cve-2010-0052-destroyed-input-cached	2009-09-29 13:01:36.000000000 +0200
6aec805
+++ qt-x11-opensource-src-4.5.3/src/3rdparty/webkit/WebCore/html/HTMLInputElement.cpp	2010-02-04 17:50:07.931656712 +0100
6aec805
@@ -616,12 +616,15 @@ void HTMLInputElement::parseMappedAttrib
6aec805
             m_autocomplete = Off;
6aec805
             registerForActivationCallbackIfNeeded();
6aec805
         } else {
6aec805
-            if (m_autocomplete == Off)
6aec805
-                unregisterForActivationCallbackIfNeeded();
6aec805
+            bool needsToUnregister = m_autocomplete == Off;
6aec805
+
6aec805
             if (attr->isEmpty())
6aec805
                 m_autocomplete = Uninitialized;
6aec805
             else
6aec805
                 m_autocomplete = On;
6aec805
+
6aec805
+            if (needsToUnregister)
6aec805
+                unregisterForActivationCallbackIfNeeded();
6aec805
         }
6aec805
     } else if (attr->name() == typeAttr) {
6aec805
         setInputType(attr->value());