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 882665e0c43537f07136788ccf66274647ccb951..62addb17c6802340eaf0aec4d78e4553f18adab8 100644 |
--- a/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/ValidationMessageClientImpl.cpp |
@@ -29,6 +29,7 @@ |
#include "core/dom/TaskRunnerHelper.h" |
#include "core/exported/WebViewBase.h" |
#include "core/frame/FrameView.h" |
+#include "core/frame/LocalFrame.h" |
#include "core/page/ChromeClient.h" |
#include "platform/PlatformChromeClient.h" |
#include "platform/wtf/CurrentTime.h" |
@@ -74,8 +75,8 @@ void ValidationMessageClientImpl::ShowValidationMessage( |
IntRect anchor_in_viewport = |
CurrentView()->ContentsToViewport(anchor.PixelSnappedBoundingBox()); |
last_anchor_rect_in_screen_ = |
- CurrentView()->GetChromeClient()->ViewportToScreen(anchor_in_viewport, |
- CurrentView()); |
+ CurrentView()->GetChromeClient()->ViewportToScreen( |
+ anchor_in_viewport, current_anchor_->GetDocument().GetFrame()); |
last_page_scale_factor_ = web_view_.PageScaleFactor(); |
message_ = message; |
const double kMinimumSecondToShowValidationMessage = 5.0; |
@@ -141,7 +142,8 @@ void ValidationMessageClientImpl::CheckAnchorStatus(TimerBase*) { |
IntRect new_anchor_rect_in_viewport_in_screen = |
CurrentView()->GetChromeClient()->ViewportToScreen( |
- new_anchor_rect_in_viewport, CurrentView()); |
+ new_anchor_rect_in_viewport, |
+ current_anchor_->GetDocument().GetFrame()); |
if (new_anchor_rect_in_viewport_in_screen == last_anchor_rect_in_screen_ && |
web_view_.PageScaleFactor() == last_page_scale_factor_) |
return; |