HitTestResult should have innerNonSharedElement
https://bugs.webkit.org/show_bug.cgi?id=120579

Reviewed by Andreas Kling.

* editing/Editor.cpp:
(WebCore::Editor::copyImage): Call HitTestResult member function version of
innerNonSharedElement instead of a local function that does it.

* page/Chrome.cpp:
(WebCore::Chrome::setToolTip): Use innerNonSharedElement instead of getting
the node and checking if it's an input element. Also added some missing braces.

* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromHitTestResult): Use targetNode for
local variables instead of innerNode to match the HitTestResult function name.
(WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent): Ditto.
(WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
(WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
(WebCore::EventHandler::handleMousePressEvent): Ditto.

* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::innerElement): Rewrote so there there is no loop.
(WebCore::HitTestResult::innerNonSharedElement): Ditto.

* rendering/HitTestResult.h: Added innerNonSharedElement. Generally speaking,
we'd like to avoid using Node unless there is some real need.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix a mistake in my recent pasteboard/editor refactoring that was causing tests to fail.

* editing/mac/EditorMac.mm:
(WebCore::getImage): One place this said cachedImage but it should have said tentativeCachedImage.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154946 268f45cc-cd09-0410-ab3c-d52691b4dbfc
EventHandler::m_frame should be a Frame&.
<https://webkit.org/b/120580>

Reviewed by Darin Adler.

EventHandler is tied to the lifetime of its frame, so let m_frame be a Frame&.
A handful of null checks and assertions removed.

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