2009-03-06 Adele Peterson <adele@apple.com>
[WebKit-https.git] / WebCore / page / EventHandler.cpp
index 186ace4..54fc035 100644 (file)
@@ -1744,14 +1744,10 @@ static Node* eventTargetNodeForDocument(Document* doc)
     if (!doc)
         return 0;
     Node* node = doc->focusedNode();
-    if (!node) {
-        if (doc->isHTMLDocument())
-            node = doc->body();
-        else
-            node = doc->documentElement();
-        if (!node)
-            return 0;
-    }
+    if (!node && doc->isHTMLDocument())
+        node = doc->body();
+    if (!node)
+        node = doc->documentElement();
     return node;
 }