| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are met: | 5 * modification, are permitted provided that the following conditions are met: |
| 6 * | 6 * |
| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 FontFace* fontFace, | 250 FontFace* fontFace, |
| 251 ExceptionState&) { | 251 ExceptionState&) { |
| 252 ASSERT(fontFace); | 252 ASSERT(fontFace); |
| 253 if (!inActiveDocumentContext()) | 253 if (!inActiveDocumentContext()) |
| 254 return this; | 254 return this; |
| 255 if (m_nonCSSConnectedFaces.contains(fontFace)) | 255 if (m_nonCSSConnectedFaces.contains(fontFace)) |
| 256 return this; | 256 return this; |
| 257 if (isCSSConnectedFontFace(fontFace)) | 257 if (isCSSConnectedFontFace(fontFace)) |
| 258 return this; | 258 return this; |
| 259 CSSFontSelector* fontSelector = document()->styleEngine().fontSelector(); | 259 CSSFontSelector* fontSelector = document()->styleEngine().fontSelector(); |
| 260 m_nonCSSConnectedFaces.add(fontFace); | 260 m_nonCSSConnectedFaces.insert(fontFace); |
| 261 fontSelector->fontFaceCache()->addFontFace(fontSelector, fontFace, false); | 261 fontSelector->fontFaceCache()->addFontFace(fontSelector, fontFace, false); |
| 262 if (fontFace->loadStatus() == FontFace::Loading) | 262 if (fontFace->loadStatus() == FontFace::Loading) |
| 263 addToLoadingFonts(fontFace); | 263 addToLoadingFonts(fontFace); |
| 264 fontSelector->fontFaceInvalidated(); | 264 fontSelector->fontFaceInvalidated(); |
| 265 return this; | 265 return this; |
| 266 } | 266 } |
| 267 | 267 |
| 268 void FontFaceSet::clearForBinding(ScriptState*, ExceptionState&) { | 268 void FontFaceSet::clearForBinding(ScriptState*, ExceptionState&) { |
| 269 if (!inActiveDocumentContext() || m_nonCSSConnectedFaces.isEmpty()) | 269 if (!inActiveDocumentContext() || m_nonCSSConnectedFaces.isEmpty()) |
| 270 return; | 270 return; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 visitor->trace(m_failedFonts); | 561 visitor->trace(m_failedFonts); |
| 562 visitor->trace(m_nonCSSConnectedFaces); | 562 visitor->trace(m_nonCSSConnectedFaces); |
| 563 visitor->trace(m_asyncRunner); | 563 visitor->trace(m_asyncRunner); |
| 564 EventTargetWithInlineData::trace(visitor); | 564 EventTargetWithInlineData::trace(visitor); |
| 565 Supplement<Document>::trace(visitor); | 565 Supplement<Document>::trace(visitor); |
| 566 SuspendableObject::trace(visitor); | 566 SuspendableObject::trace(visitor); |
| 567 FontFace::LoadFontCallback::trace(visitor); | 567 FontFace::LoadFontCallback::trace(visitor); |
| 568 } | 568 } |
| 569 | 569 |
| 570 } // namespace blink | 570 } // namespace blink |
| OLD | NEW |