OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/css/FontLoader.h" | 6 #include "core/css/FontLoader.h" |
7 | 7 |
8 #include "core/css/CSSFontSelector.h" | 8 #include "core/css/CSSFontSelector.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/dom/IncrementLoadEventDelayCount.h" | 10 #include "core/dom/IncrementLoadEventDelayCount.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 void FontLoader::addFontToBeginLoading(FontResource* fontResource) | 55 void FontLoader::addFontToBeginLoading(FontResource* fontResource) |
56 { | 56 { |
57 if (!m_document || !fontResource->stillNeedsLoad() || fontResource->loadSche
duled()) | 57 if (!m_document || !fontResource->stillNeedsLoad() || fontResource->loadSche
duled()) |
58 return; | 58 return; |
59 | 59 |
60 m_fontsToBeginLoading.append(FontToLoad::create(fontResource, *m_document)); | 60 m_fontsToBeginLoading.append(FontToLoad::create(fontResource, *m_document)); |
61 fontResource->didScheduleLoad(); | 61 fontResource->didScheduleLoad(); |
62 if (!m_beginLoadingTimer.isActive()) | 62 if (!m_beginLoadingTimer.isActive()) |
63 m_beginLoadingTimer.startOneShot(0, FROM_HERE); | 63 m_beginLoadingTimer.startOneShot(0, BLINK_FROM_HERE); |
64 } | 64 } |
65 | 65 |
66 void FontLoader::beginLoadTimerFired(Timer<blink::FontLoader>*) | 66 void FontLoader::beginLoadTimerFired(Timer<blink::FontLoader>*) |
67 { | 67 { |
68 loadPendingFonts(); | 68 loadPendingFonts(); |
69 } | 69 } |
70 | 70 |
71 void FontLoader::loadPendingFonts() | 71 void FontLoader::loadPendingFonts() |
72 { | 72 { |
73 ASSERT(m_document); | 73 ASSERT(m_document); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 m_fontsToBeginLoading.clear(); | 124 m_fontsToBeginLoading.clear(); |
125 } | 125 } |
126 | 126 |
127 DEFINE_TRACE(FontLoader) | 127 DEFINE_TRACE(FontLoader) |
128 { | 128 { |
129 visitor->trace(m_document); | 129 visitor->trace(m_document); |
130 visitor->trace(m_fontSelector); | 130 visitor->trace(m_fontSelector); |
131 } | 131 } |
132 | 132 |
133 } // namespace blink | 133 } // namespace blink |
OLD | NEW |