Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2797173002: Document::hoverNode() is always an Element. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 04a9e59ab897a410fd1e9b8242982f2741754e3a..26f5c71a9600befe391470f95ef37c3d882d2c2d 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1471,16 +1471,16 @@ void EventHandler::updateGestureHoverActiveState(const HitTestRequest& request,
: nullptr;
}
- Node* oldHoverNodeInCurDoc = m_frame->document()->hoverNode();
- Node* newInnermostHoverNode = innerElement;
+ Element* oldHoverElementInCurDoc = m_frame->document()->hoverElement();
+ Element* newInnermostHoverElement = innerElement;
- if (newInnermostHoverNode != oldHoverNodeInCurDoc) {
+ if (newInnermostHoverElement != oldHoverElementInCurDoc) {
size_t indexFrameChain = newHoverFrameChain.size();
// Clear the hover state on any frames which are no longer in the frame
// chain of the hovered element.
- while (oldHoverNodeInCurDoc &&
- oldHoverNodeInCurDoc->isFrameOwnerElement()) {
+ while (oldHoverElementInCurDoc &&
+ oldHoverElementInCurDoc->isFrameOwnerElement()) {
LocalFrame* newHoverFrame = nullptr;
// If we can't get the frame from the new hover frame chain,
// the newHoverFrame will be null and the old hover state will be cleared.
@@ -1488,7 +1488,7 @@ void EventHandler::updateGestureHoverActiveState(const HitTestRequest& request,
newHoverFrame = newHoverFrameChain[--indexFrameChain];
HTMLFrameOwnerElement* owner =
- toHTMLFrameOwnerElement(oldHoverNodeInCurDoc);
+ toHTMLFrameOwnerElement(oldHoverElementInCurDoc);
if (!owner->contentFrame() || !owner->contentFrame()->isLocalFrame())
break;
@@ -1497,7 +1497,7 @@ void EventHandler::updateGestureHoverActiveState(const HitTestRequest& request,
if (!doc)
break;
- oldHoverNodeInCurDoc = doc->hoverNode();
+ oldHoverElementInCurDoc = doc->hoverElement();
// If the old hovered frame is different from the new hovered frame.
// we should clear the old hovered node from the old hovered frame.
Manuel Rego 2017/04/05 15:16:13 Nit: Update the comment "the old hovered node".
rune 2017/04/05 19:43:27 Fixed another instance as well.
if (newHoverFrame != oldHoverFrame)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698