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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 if (fontFace->hadBlankText()) | 539 if (fontFace->hadBlankText()) |
540 m_status = HadBlankText; | 540 m_status = HadBlankText; |
541 else if (m_status == NoWebFonts) | 541 else if (m_status == NoWebFonts) |
542 m_status = DidNotHaveBlankText; | 542 m_status = DidNotHaveBlankText; |
543 } | 543 } |
544 | 544 |
545 void FontFaceSet::FontLoadHistogram::record() | 545 void FontFaceSet::FontLoadHistogram::record() |
546 { | 546 { |
547 if (!m_recorded) { | 547 if (!m_recorded) { |
548 m_recorded = true; | 548 m_recorded = true; |
549 blink::Platform::current()->histogramCustomCounts("WebFont.WebFontsInPag
e", m_count, 1, 100, 50); | 549 Platform::current()->histogramCustomCounts("WebFont.WebFontsInPage", m_c
ount, 1, 100, 50); |
550 } | 550 } |
551 if (m_status == HadBlankText || m_status == DidNotHaveBlankText) { | 551 if (m_status == HadBlankText || m_status == DidNotHaveBlankText) { |
552 blink::Platform::current()->histogramEnumeration("WebFont.HadBlankText",
m_status == HadBlankText ? 1 : 0, 2); | 552 Platform::current()->histogramEnumeration("WebFont.HadBlankText", m_stat
us == HadBlankText ? 1 : 0, 2); |
553 m_status = Reported; | 553 m_status = Reported; |
554 } | 554 } |
555 } | 555 } |
556 | 556 |
557 static const char* supplementName() | 557 static const char* supplementName() |
558 { | 558 { |
559 return "FontFaceSet"; | 559 return "FontFaceSet"; |
560 } | 560 } |
561 | 561 |
562 PassRefPtrWillBeRawPtr<FontFaceSet> FontFaceSet::from(Document& document) | 562 PassRefPtrWillBeRawPtr<FontFaceSet> FontFaceSet::from(Document& document) |
(...skipping 21 matching lines...) Expand all Loading... |
584 visitor->trace(m_loadedFonts); | 584 visitor->trace(m_loadedFonts); |
585 visitor->trace(m_failedFonts); | 585 visitor->trace(m_failedFonts); |
586 visitor->trace(m_nonCSSConnectedFaces); | 586 visitor->trace(m_nonCSSConnectedFaces); |
587 WillBeHeapSupplement<Document>::trace(visitor); | 587 WillBeHeapSupplement<Document>::trace(visitor); |
588 #endif | 588 #endif |
589 EventTargetWithInlineData::trace(visitor); | 589 EventTargetWithInlineData::trace(visitor); |
590 ActiveDOMObject::trace(visitor); | 590 ActiveDOMObject::trace(visitor); |
591 } | 591 } |
592 | 592 |
593 } // namespace blink | 593 } // namespace blink |
OLD | NEW |