Index: Source/core/editing/FrameSelection.cpp |
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp |
index 2ed84aac4e26e24e5a3b7ebbc8ed1c4142092392..b8da536a4a1c921caf3c24abe5365d20195a512c 100644 |
--- a/Source/core/editing/FrameSelection.cpp |
+++ b/Source/core/editing/FrameSelection.cpp |
@@ -1823,8 +1823,7 @@ void FrameSelection::setSelectionFromNone() |
Element* documentElement = document->documentElement(); |
if (!documentElement) |
return; |
- HTMLBodyElement* body = isHTMLBodyElement(*documentElement) ? toHTMLBodyElement(documentElement) : Traversal<HTMLBodyElement>::next(*documentElement); |
- if (body) |
+ if (HTMLBodyElement* body = Traversal<HTMLBodyElement>::firstChild(*documentElement)) |
setSelection(VisibleSelection(firstPositionInOrBeforeNode(body), DOWNSTREAM)); |
} |