| 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 "core/css/RemoteFontFaceSource.h" | 5 #include "core/css/RemoteFontFaceSource.h" |
| 6 | 6 |
| 7 #include "core/css/CSSCustomFontData.h" | 7 #include "core/css/CSSCustomFontData.h" |
| 8 #include "core/css/CSSFontFace.h" | 8 #include "core/css/CSSFontFace.h" |
| 9 #include "core/css/FontLoader.h" | 9 #include "core/css/FontLoader.h" |
| 10 #include "core/page/NetworkStateNotifier.h" | 10 #include "core/page/NetworkStateNotifier.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 for (const auto& item : m_fontDataTable) { | 62 for (const auto& item : m_fontDataTable) { |
| 63 SimpleFontData* fontData = item.value.get(); | 63 SimpleFontData* fontData = item.value.get(); |
| 64 if (fontData && fontData->customFontData()) | 64 if (fontData && fontData->customFontData()) |
| 65 fontData->customFontData()->clearFontFaceSource(); | 65 fontData->customFontData()->clearFontFaceSource(); |
| 66 } | 66 } |
| 67 m_fontDataTable.clear(); | 67 m_fontDataTable.clear(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool RemoteFontFaceSource::isLoading() const | 70 bool RemoteFontFaceSource::isLoading() const |
| 71 { | 71 { |
| 72 return !m_font->stillNeedsLoad() && !m_font->isLoaded(); | 72 return m_font->isLoading(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool RemoteFontFaceSource::isLoaded() const | 75 bool RemoteFontFaceSource::isLoaded() const |
| 76 { | 76 { |
| 77 return m_font->isLoaded(); | 77 return m_font->isLoaded(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 bool RemoteFontFaceSource::isValid() const | 80 bool RemoteFontFaceSource::isValid() const |
| 81 { | 81 { |
| 82 return !m_font->errorOccurred(); | 82 return !m_font->errorOccurred(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 interventionResult |= 1 << 0; | 291 interventionResult |= 1 << 0; |
| 292 if (triggered) | 292 if (triggered) |
| 293 interventionResult |= 1 << 1; | 293 interventionResult |= 1 << 1; |
| 294 const int boundary = 1 << 2; | 294 const int boundary = 1 << 2; |
| 295 | 295 |
| 296 DEFINE_STATIC_LOCAL(EnumerationHistogram, interventionHistogram, ("WebFont.I
nterventionResult", boundary)); | 296 DEFINE_STATIC_LOCAL(EnumerationHistogram, interventionHistogram, ("WebFont.I
nterventionResult", boundary)); |
| 297 interventionHistogram.count(interventionResult); | 297 interventionHistogram.count(interventionResult); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace blink | 300 } // namespace blink |
| OLD | NEW |