Simplify FormKeyGenerator::willDeleteForm
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2013 21:25:53 +0000 (21:25 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2013 21:25:53 +0000 (21:25 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117751

Reviewed by Antti Koivisto.

Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac

* html/FormController.cpp:
(WebCore::FormKeyGenerator::willDeleteForm):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151696 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/FormController.cpp

index 3fd54263cd86c3e03d3fb2bd4bc7b43ec1e5a835..60355b9e073775cd0b22e02553dad4962f2765e5 100644 (file)
@@ -1,3 +1,15 @@
+2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Simplify FormKeyGenerator::willDeleteForm
+        https://bugs.webkit.org/show_bug.cgi?id=117751
+
+        Reviewed by Antti Koivisto.
+
+        Merge https://chromium.googlesource.com/chromium/blink/+/c6399efb9da863eb1d1fc98b17ef925998b985ac
+
+        * html/FormController.cpp:
+        (WebCore::FormKeyGenerator::willDeleteForm):
+
 2013-06-18  Ryosuke Niwa  <rniwa@webkit.org>
 
         REGRESSION(r147602): Search text field doesn't render selection when it has some :focus rules
index 74353d87588d7e884c9b094dfdd7d198634268f3..b913c3c52453f55e0aab107a4fedf82d3ac83e6e 100644 (file)
@@ -368,12 +368,7 @@ AtomicString FormKeyGenerator::formKey(const HTMLFormControlElementWithState& co
 void FormKeyGenerator::willDeleteForm(HTMLFormElement* form)
 {
     ASSERT(form);
-    if (m_formToKeyMap.isEmpty())
-        return;
-    FormToKeyMap::iterator it = m_formToKeyMap.find(form);
-    if (it == m_formToKeyMap.end())
-        return;
-    m_formToKeyMap.remove(it);
+    m_formToKeyMap.remove(form);
 }
 
 // ----------------------------------------------------------------------------