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 73c1b65eae7e909e3c67d43e77b7aad96d22c5d4..97b32e477a00a30dedfff0058c6c180d65e6d1cf 100644 |
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp |
@@ -571,6 +571,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); |