Example #1
0
void RemoteFontFaceSource::fontLoadShortLimitExceeded(FontResource*)
{
    if (m_display == FontDisplayFallback)
        switchToSwapPeriod();
    else if (m_display == FontDisplayOptional)
        switchToFailurePeriod();
}
Example #2
0
void RemoteFontFaceSource::fontLoadLongLimitExceeded(FontResource*)
{
    if (m_display == FontDisplayAuto || m_display == FontDisplayBlock)
        switchToSwapPeriod();
    else if (m_display == FontDisplayFallback)
        switchToFailurePeriod();
}
Example #3
0
void RemoteFontFaceSource::switchToFailurePeriod()
{
    if (m_period == BlockPeriod)
        switchToSwapPeriod();
    ASSERT(m_period == SwapPeriod);
    m_period = FailurePeriod;
}
Example #4
0
void RemoteFontFaceSource::fontLoadLongLimitExceeded(FontResource*) {
  if (m_font->isLoaded())
    return;

  if (m_display == FontDisplayBlock ||
      (!m_isInterventionTriggered && m_display == FontDisplayAuto))
    switchToSwapPeriod();
  else if (m_display == FontDisplayFallback)
    switchToFailurePeriod();

  m_histograms.longLimitExceeded(m_isInterventionTriggered);
}