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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2784313002: Change hittest node to be scrollbar's parent when hittest include a scrollbar (Closed)
Patch Set: fix tests and add test Created 3 years, 9 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a1481a308f4261799da7bd1290155e90156eb33d..f290214adc9ed07f5b3ca940cea4988146dfadb4 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -6183,18 +6183,7 @@ void Document::updateHoverActiveState(const HitTestRequest& request,
if (request.active() && m_frame)
m_frame->eventHandler().notifyElementActivated();
- Element* innerElementInDocument = hitScrollbar ? nullptr : innerElement;
- // Replace the innerElementInDocument to be srollbar's parent when hit
- // scrollbar
- if (hitScrollbar) {
- ScrollableArea* scrollableArea = hitScrollbar->getScrollableArea();
- if (scrollableArea && scrollableArea->layoutBox() &&
- scrollableArea->layoutBox()->node() &&
- scrollableArea->layoutBox()->node()->isElementNode()) {
- innerElementInDocument =
- toElement(hitScrollbar->getScrollableArea()->layoutBox()->node());
- }
- }
+ Element* innerElementInDocument = innerElement;
while (innerElementInDocument && innerElementInDocument->document() != this) {
innerElementInDocument->document().updateHoverActiveState(

Powered by Google App Engine
This is Rietveld 408576698