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

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

Issue 2439903003: PlzNavigate: Allow frames to fallback to alternative content. (Closed)
Patch Set: Nit. Created 4 years, 1 month 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/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index fa8680ad832bbe4e3bc47c0a3548e81272aec089..baea0a18ba6866a6f7406441d7ed1c0486271933 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -2059,6 +2059,18 @@ void WebLocalFrameImpl::loadData(const WebData& data,
static_cast<HistoryLoadType>(webHistoryLoadType));
}
+bool WebLocalFrameImpl::maybeRenderFallbackContent(
+ const WebURLError& error) const {
+ DCHECK(frame());
+
+ if (!frame()->owner() || !frame()->owner()->canRenderFallbackContent())
+ return false;
+
+ FrameLoader& frameloader = frame()->loader();
+ frameloader.loadFailed(frameloader.documentLoader(), error);
+ return true;
+}
+
bool WebLocalFrameImpl::isLoading() const {
if (!frame() || !frame()->document())
return false;

Powered by Google App Engine
This is Rietveld 408576698