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

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

Issue 1829403002: Clean up font loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Resource_status
Patch Set: Another rebase! Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 resource = ImageResource::fetch(request, fetcher()); 172 resource = ImageResource::fetch(request, fetcher());
173 break; 173 break;
174 case Resource::Script: 174 case Resource::Script:
175 resource = ScriptResource::fetch(request, fetcher()); 175 resource = ScriptResource::fetch(request, fetcher());
176 break; 176 break;
177 case Resource::CSSStyleSheet: 177 case Resource::CSSStyleSheet:
178 resource = CSSStyleSheetResource::fetch(request, fetcher()); 178 resource = CSSStyleSheetResource::fetch(request, fetcher());
179 break; 179 break;
180 case Resource::Font: 180 case Resource::Font:
181 resource = FontResource::fetch(request, fetcher()); 181 resource = FontResource::fetch(request, fetcher());
182 // This is needed for fonts as loading doesn't start until there's usage .
183 if (resource)
184 toFontResource(resource)->beginLoadIfNeeded(fetcher());
185 break; 182 break;
186 case Resource::Media: 183 case Resource::Media:
187 resource = RawResource::fetchMedia(request, fetcher()); 184 resource = RawResource::fetchMedia(request, fetcher());
188 break; 185 break;
189 case Resource::TextTrack: 186 case Resource::TextTrack:
190 resource = RawResource::fetchTextTrack(request, fetcher()); 187 resource = RawResource::fetchTextTrack(request, fetcher());
191 break; 188 break;
192 case Resource::ImportResource: 189 case Resource::ImportResource:
193 resource = RawResource::fetchImport(request, fetcher()); 190 resource = RawResource::fetchImport(request, fetcher());
194 break; 191 break;
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 { 689 {
693 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 690 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
694 if (!source.isNull()) 691 if (!source.isNull())
695 m_writer->appendReplacingData(source); 692 m_writer->appendReplacingData(source);
696 endWriting(m_writer.get()); 693 endWriting(m_writer.get());
697 } 694 }
698 695
699 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 696 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
700 697
701 } // namespace blink 698 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698