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

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

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: Addressed nate's comments 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 c89c9bf12a1d58ade0791869e34ed9a1434eb641..6298cccc20af12de26e67e48019988f804d1746a 100644
--- a/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
+++ b/third_party/WebKit/Source/web/WebDataSourceImpl.cpp
@@ -161,6 +161,18 @@ void WebDataSourceImpl::setSubresourceFilter(
SubresourceFilter::create(this, 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