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

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

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: PlzNavigate: preserve SourceLocation when navigating Created 3 years, 10 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/WebDataSourceImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebDataSourceImpl.cpp b/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
index 0934e36da9c6152bde203cbf5f60b3d4fe9129a0..856fa7b117d016af4c5f75fe5e706f33afb6eb61 100644
--- a/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
+++ b/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
@@ -159,6 +159,18 @@ void WebDataSourceImpl::setSubresourceFilter(
DocumentLoader::setSubresourceFilter(WTF::wrapUnique(subresourceFilter));
}
+void WebDataSourceImpl::setSourceLocation(
+ const WebSourceLocation& sourceLocation) {
+ std::unique_ptr<SourceLocation> location =
+ SourceLocation::create(sourceLocation.url, sourceLocation.lineNumber,
+ sourceLocation.columnNumber, nullptr);
+ DocumentLoader::setSourceLocation(std::move(location));
+}
+
+void WebDataSourceImpl::resetSourceLocation() {
+ DocumentLoader::setSourceLocation(nullptr);
+}
+
DEFINE_TRACE(WebDataSourceImpl) {
DocumentLoader::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698