OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 source->setFontFace(this); | 43 source->setFontFace(this); |
44 m_sources.append(source); | 44 m_sources.append(source); |
45 } | 45 } |
46 | 46 |
47 void CSSFontFace::setSegmentedFontFace(CSSSegmentedFontFace* segmentedFontFace) | 47 void CSSFontFace::setSegmentedFontFace(CSSSegmentedFontFace* segmentedFontFace) |
48 { | 48 { |
49 ASSERT(!m_segmentedFontFace); | 49 ASSERT(!m_segmentedFontFace); |
50 m_segmentedFontFace = segmentedFontFace; | 50 m_segmentedFontFace = segmentedFontFace; |
51 } | 51 } |
52 | 52 |
53 CSSFontSelector* CSSFontFace::fontSelector() const | |
54 { | |
55 return m_segmentedFontFace ? m_segmentedFontFace->fontSelector() : 0; | |
56 } | |
57 | |
58 void CSSFontFace::didBeginLoad() | 53 void CSSFontFace::didBeginLoad() |
59 { | 54 { |
60 if (loadStatus() == FontFace::Unloaded) | 55 if (loadStatus() == FontFace::Unloaded) |
61 setLoadStatus(FontFace::Loading); | 56 setLoadStatus(FontFace::Loading); |
62 } | 57 } |
63 | 58 |
64 void CSSFontFace::fontLoaded(RemoteFontFaceSource* source) | 59 void CSSFontFace::fontLoaded(RemoteFontFaceSource* source) |
65 { | 60 { |
66 if (m_segmentedFontFace) | 61 if (m_segmentedFontFace) |
67 m_segmentedFontFace->fontSelector()->fontFaceInvalidated(); | 62 m_segmentedFontFace->fontSelector()->fontFaceInvalidated(); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 238 } |
244 | 239 |
245 void CSSFontFace::trace(Visitor* visitor) | 240 void CSSFontFace::trace(Visitor* visitor) |
246 { | 241 { |
247 visitor->trace(m_segmentedFontFace); | 242 visitor->trace(m_segmentedFontFace); |
248 visitor->trace(m_sources); | 243 visitor->trace(m_sources); |
249 visitor->trace(m_fontFace); | 244 visitor->trace(m_fontFace); |
250 } | 245 } |
251 | 246 |
252 } | 247 } |
OLD | NEW |