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

Side by Side Diff: third_party/WebKit/Source/web/LocalFrameClientImpl.cpp

Issue 2702503002: Block renderer-initiated main frame navigations to data URLs (Closed)
Patch Set: Re-block data to data navigations, rebase, address nasko comments Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void LocalFrameClientImpl::didChangeScrollOffset() { 217 void LocalFrameClientImpl::didChangeScrollOffset() {
218 if (m_webFrame->client()) 218 if (m_webFrame->client())
219 m_webFrame->client()->didChangeScrollOffset(m_webFrame); 219 m_webFrame->client()->didChangeScrollOffset(m_webFrame);
220 } 220 }
221 221
222 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() { 222 void LocalFrameClientImpl::didUpdateCurrentHistoryItem() {
223 if (m_webFrame->client()) 223 if (m_webFrame->client())
224 m_webFrame->client()->didUpdateCurrentHistoryItem(); 224 m_webFrame->client()->didUpdateCurrentHistoryItem();
225 } 225 }
226 226
227 bool LocalFrameClientImpl::allowInsecureDataUrlNavigations(const KURL& url) {
228 if (RuntimeEnabledFeatures::allowInsecureDataUrlNavigationsEnabled())
229 return true;
230 if (m_webFrame->client())
231 return m_webFrame->client()->allowInsecureDataUrlNavigations(url);
232 return false;
233 }
234
227 bool LocalFrameClientImpl::hasWebView() const { 235 bool LocalFrameClientImpl::hasWebView() const {
228 return m_webFrame->viewImpl(); 236 return m_webFrame->viewImpl();
229 } 237 }
230 238
231 bool LocalFrameClientImpl::inShadowTree() const { 239 bool LocalFrameClientImpl::inShadowTree() const {
232 return m_webFrame->inShadowTree(); 240 return m_webFrame->inShadowTree();
233 } 241 }
234 242
235 Frame* LocalFrameClientImpl::opener() const { 243 Frame* LocalFrameClientImpl::opener() const {
236 return toCoreFrame(m_webFrame->opener()); 244 return toCoreFrame(m_webFrame->opener());
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 void LocalFrameClientImpl::abortClientNavigation() { 974 void LocalFrameClientImpl::abortClientNavigation() {
967 if (m_webFrame->client()) 975 if (m_webFrame->client())
968 m_webFrame->client()->abortClientNavigation(); 976 m_webFrame->client()->abortClientNavigation();
969 } 977 }
970 978
971 TextCheckerClient& LocalFrameClientImpl::textCheckerClient() const { 979 TextCheckerClient& LocalFrameClientImpl::textCheckerClient() const {
972 return m_webFrame->textCheckerClient(); 980 return m_webFrame->textCheckerClient();
973 } 981 }
974 982
975 } // namespace blink 983 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698