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

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentLoader.cpp

Issue 2710113002: DO NOT SUBMIT really old prototype of sprite recognition for image replacement
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 void DocumentLoader::setSubresourceFilter(std::unique_ptr<WebDocumentSubresource Filter> subresourceFilter) 165 void DocumentLoader::setSubresourceFilter(std::unique_ptr<WebDocumentSubresource Filter> subresourceFilter)
166 { 166 {
167 m_subresourceFilter = std::move(subresourceFilter); 167 m_subresourceFilter = std::move(subresourceFilter);
168 } 168 }
169 169
170 Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques t) 170 Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques t)
171 { 171 {
172 Resource* resource = nullptr; 172 Resource* resource = nullptr;
173 switch (type) { 173 switch (type) {
174 case Resource::Image: 174 case Resource::Image:
175 resource = ImageResource::fetch(request, fetcher()); 175 resource = ImageResource::fetch(request, fetcher(),
176 frame() && frame()->settings() && frame()->settings()->fetchImagePla ceholders()
177 ? ImageResource::PlaceholderRequestType::AllowPlaceholder
178 : ImageResource::PlaceholderRequestType::DisallowPlaceholder);
176 break; 179 break;
177 case Resource::Script: 180 case Resource::Script:
178 resource = ScriptResource::fetch(request, fetcher()); 181 resource = ScriptResource::fetch(request, fetcher());
179 break; 182 break;
180 case Resource::CSSStyleSheet: 183 case Resource::CSSStyleSheet:
181 resource = CSSStyleSheetResource::fetch(request, fetcher()); 184 resource = CSSStyleSheetResource::fetch(request, fetcher());
182 break; 185 break;
183 case Resource::Font: 186 case Resource::Font:
184 resource = FontResource::fetch(request, fetcher()); 187 resource = FontResource::fetch(request, fetcher());
185 break; 188 break;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 { 723 {
721 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 724 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
722 if (!source.isNull()) 725 if (!source.isNull())
723 m_writer->appendReplacingData(source); 726 m_writer->appendReplacingData(source);
724 endWriting(m_writer.get()); 727 endWriting(m_writer.get());
725 } 728 }
726 729
727 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 730 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
728 731
729 } // namespace blink 732 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.in ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698