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

Unified Diff: third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp

Issue 2215333002: Fix element visibility check for validation bubbles and SELECT popups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename to visibleBoundsInVisualViewport(), etc. Created 4 years, 4 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/web/ValidationMessageClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp b/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
index 0285b5414a94a7c4f19a3b7d226ec20f0658ed40..2d24c2cd72c65e2b8c721bd725dceb7d760e7c15 100644
--- a/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp
@@ -118,14 +118,7 @@ void ValidationMessageClientImpl::checkAnchorStatus(TimerBase*)
return;
}
- // Check the visibility of the element.
- // FIXME: Can we check invisibility by scrollable non-frame elements?
- IntRect newAnchorRectInViewport = currentView()->contentsToViewport(m_currentAnchor->pixelSnappedBoundingBox());
-
- // FIXME: This intersection eliminates the part of the rect outside the root view.
- // If this is meant as a visiblity test, intersecting it against the viewport rect
- // likely makes more sense.
- newAnchorRectInViewport = intersection(currentView()->convertToRootFrame(currentView()->boundsRect()), newAnchorRectInViewport);
+ IntRect newAnchorRectInViewport = m_currentAnchor->visibleBoundsInVisualViewport();
if (newAnchorRectInViewport.isEmpty()) {
hideValidationMessage(*m_currentAnchor);
return;
« no previous file with comments | « third_party/WebKit/Source/web/PopupMenuImpl.cpp ('k') | third_party/WebKit/Source/web/tests/VisualViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698