| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/html/canvas/CanvasFontCache.h" | 5 #include "core/html/canvas/CanvasFontCache.h" |
| 6 | 6 |
| 7 #include "core/css/parser/CSSParser.h" | 7 #include "core/css/parser/CSSParser.h" |
| 8 #include "core/css/resolver/StyleResolver.h" | 8 #include "core/css/resolver/StyleResolver.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/style/ComputedStyle.h" | 10 #include "core/style/ComputedStyle.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 , m_pruningScheduled(false) | 28 , m_pruningScheduled(false) |
| 29 { | 29 { |
| 30 FontFamily fontFamily; | 30 FontFamily fontFamily; |
| 31 fontFamily.setFamily(defaultFontFamily); | 31 fontFamily.setFamily(defaultFontFamily); |
| 32 FontDescription defaultFontDescription; | 32 FontDescription defaultFontDescription; |
| 33 defaultFontDescription.setFamily(fontFamily); | 33 defaultFontDescription.setFamily(fontFamily); |
| 34 defaultFontDescription.setSpecifiedSize(defaultFontSize); | 34 defaultFontDescription.setSpecifiedSize(defaultFontSize); |
| 35 defaultFontDescription.setComputedSize(defaultFontSize); | 35 defaultFontDescription.setComputedSize(defaultFontSize); |
| 36 m_defaultFontStyle = ComputedStyle::create(); | 36 m_defaultFontStyle = ComputedStyle::create(); |
| 37 m_defaultFontStyle->setFontDescription(defaultFontDescription); | 37 m_defaultFontStyle->setFontDescription(defaultFontDescription); |
| 38 m_defaultFontStyle->font().update(m_defaultFontStyle->font().fontSelector())
; | 38 m_defaultFontStyle->font().update(m_defaultFontStyle->font().getFontSelector
()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 CanvasFontCache::~CanvasFontCache() | 41 CanvasFontCache::~CanvasFontCache() |
| 42 { | 42 { |
| 43 m_mainCachePurgePreventer.clear(); | 43 m_mainCachePurgePreventer.clear(); |
| 44 if (m_pruningScheduled) { | 44 if (m_pruningScheduled) { |
| 45 Platform::current()->currentThread()->removeTaskObserver(this); | 45 Platform::current()->currentThread()->removeTaskObserver(this); |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 DEFINE_TRACE(CanvasFontCache) | 154 DEFINE_TRACE(CanvasFontCache) |
| 155 { | 155 { |
| 156 #if ENABLE(OILPAN) | 156 #if ENABLE(OILPAN) |
| 157 visitor->trace(m_fetchedFonts); | 157 visitor->trace(m_fetchedFonts); |
| 158 visitor->trace(m_document); | 158 visitor->trace(m_document); |
| 159 #endif | 159 #endif |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace blink | 162 } // namespace blink |
| OLD | NEW |