Index: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp |
index 6d50696d85e1d6b79dc869674c6a5deff572ea12..bae944f4642d6ab65773a301c6107f60aed527fb 100644 |
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp |
@@ -574,6 +574,14 @@ NavigationPolicy LocalFrameClientImpl::decidePolicyForNavigation( |
if (form) |
navigationInfo.form = WebFormElement(form); |
+ std::unique_ptr<SourceLocation> sourceLocation = |
+ SourceLocation::capture(m_webFrame->frame()->document()); |
+ if (sourceLocation && !sourceLocation->isUnknown()) { |
+ navigationInfo.sourceLocation.url = sourceLocation->url(); |
+ navigationInfo.sourceLocation.lineNumber = sourceLocation->lineNumber(); |
+ navigationInfo.sourceLocation.columnNumber = sourceLocation->columnNumber(); |
+ } |
+ |
WebNavigationPolicy webPolicy = |
m_webFrame->client()->decidePolicyForNavigation(navigationInfo); |
return static_cast<NavigationPolicy>(webPolicy); |