Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 | 184 |
| 185 const KURL& DocumentLoader::Url() const { | 185 const KURL& DocumentLoader::Url() const { |
| 186 return request_.Url(); | 186 return request_.Url(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 Resource* DocumentLoader::StartPreload(Resource::Type type, | 189 Resource* DocumentLoader::StartPreload(Resource::Type type, |
| 190 FetchParameters& params) { | 190 FetchParameters& params) { |
| 191 Resource* resource = nullptr; | 191 Resource* resource = nullptr; |
| 192 switch (type) { | 192 switch (type) { |
| 193 case Resource::kImage: | 193 case Resource::kImage: |
| 194 if (frame_) | 194 if (frame_ && frame_->GetSettings() && |
| 195 frame_->GetSettings()->GetFetchImagePlaceholders()) { | |
|
sclittle
2017/06/13 00:28:27
Could you remove the Settings checks here? They're
rajendrant
2017/06/21 19:00:58
Done.
| |
| 195 frame_->MaybeAllowImagePlaceholder(params); | 196 frame_->MaybeAllowImagePlaceholder(params); |
| 197 } | |
| 196 resource = ImageResource::Fetch(params, Fetcher()); | 198 resource = ImageResource::Fetch(params, Fetcher()); |
| 197 break; | 199 break; |
| 198 case Resource::kScript: | 200 case Resource::kScript: |
| 199 resource = ScriptResource::Fetch(params, Fetcher()); | 201 resource = ScriptResource::Fetch(params, Fetcher()); |
| 200 break; | 202 break; |
| 201 case Resource::kCSSStyleSheet: | 203 case Resource::kCSSStyleSheet: |
| 202 resource = CSSStyleSheetResource::Fetch(params, Fetcher()); | 204 resource = CSSStyleSheetResource::Fetch(params, Fetcher()); |
| 203 break; | 205 break; |
| 204 case Resource::kFont: | 206 case Resource::kFont: |
| 205 resource = FontResource::Fetch(params, Fetcher()); | 207 resource = FontResource::Fetch(params, Fetcher()); |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1091 InstallNewDocumentReason::kJavascriptURL, | 1093 InstallNewDocumentReason::kJavascriptURL, |
| 1092 kForceSynchronousParsing, KURL()); | 1094 kForceSynchronousParsing, KURL()); |
| 1093 if (!source.IsNull()) | 1095 if (!source.IsNull()) |
| 1094 writer_->AppendReplacingData(source); | 1096 writer_->AppendReplacingData(source); |
| 1095 EndWriting(); | 1097 EndWriting(); |
| 1096 } | 1098 } |
| 1097 | 1099 |
| 1098 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 1100 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 1099 | 1101 |
| 1100 } // namespace blink | 1102 } // namespace blink |
| OLD | NEW |