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

Side by Side Diff: Source/core/fetch/FontResource.cpp

Issue 457273002: Webfonts should not block load event for more than one frame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
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 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 return PackageFormatSFNT; 69 return PackageFormatSFNT;
70 } 70 }
71 71
72 static void recordPackageFormatHistogram(FontPackageFormat format) 72 static void recordPackageFormatHistogram(FontPackageFormat format)
73 { 73 {
74 blink::Platform::current()->histogramEnumeration("WebFont.PackageFormat", fo rmat, PackageFormatEnumMax); 74 blink::Platform::current()->histogramEnumeration("WebFont.PackageFormat", fo rmat, PackageFormatEnumMax);
75 } 75 }
76 76
77 FontResource::FontResource(const ResourceRequest& resourceRequest) 77 FontResource::FontResource(const ResourceRequest& resourceRequest)
78 : Resource(resourceRequest, Font) 78 : Resource(resourceRequest, Font)
79 , m_loadScheduled(false)
79 , m_loadInitiated(false) 80 , m_loadInitiated(false)
80 , m_exceedsFontLoadWaitLimit(false) 81 , m_exceedsFontLoadWaitLimit(false)
81 , m_corsFailed(false) 82 , m_corsFailed(false)
82 , m_fontLoadWaitLimitTimer(this, &FontResource::fontLoadWaitLimitCallback) 83 , m_fontLoadWaitLimitTimer(this, &FontResource::fontLoadWaitLimitCallback)
83 { 84 {
84 } 85 }
85 86
86 FontResource::~FontResource() 87 FontResource::~FontResource()
87 { 88 {
88 } 89 }
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 230
230 void FontResource::checkNotify() 231 void FontResource::checkNotify()
231 { 232 {
232 m_fontLoadWaitLimitTimer.stop(); 233 m_fontLoadWaitLimitTimer.stop();
233 ResourceClientWalker<FontResourceClient> w(m_clients); 234 ResourceClientWalker<FontResourceClient> w(m_clients);
234 while (FontResourceClient* c = w.next()) 235 while (FontResourceClient* c = w.next())
235 c->fontLoaded(this); 236 c->fontLoaded(this);
236 } 237 }
237 238
238 } 239 }
OLDNEW
« Source/core/fetch/FontResource.h ('K') | « Source/core/fetch/FontResource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698