Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unreviewed, reverting r265603.
Reverting per commiter because commit caused consisent crash
with test.

Reverted changeset:

"Font loads quickly followed by navigations may fail
indefinitely"
https://bugs.webkit.org/show_bug.cgi?id=215435
https://trac.webkit.org/changeset/265603

Canonical link: https://commits.webkit.org/228347@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
karlrackler committed Aug 17, 2020
1 parent 6ffe355 commit 71c8ae7
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 88 deletions.
14 changes: 14 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
2020-08-17 Karl Rackler <rackler@apple.com>

Unreviewed, reverting r265603.

Reverting per commiter because commit caused consisent crash
with test.

Reverted changeset:

"Font loads quickly followed by navigations may fail
indefinitely"
https://bugs.webkit.org/show_bug.cgi?id=215435
https://trac.webkit.org/changeset/265603

2020-08-17 Said Abou-Hallawa <sabouhallawa@apple.com>

[ macOS iOS ] svg/animations/smil-leak-element-instances-noBaseValRef.svg is a flaky failure
Expand Down
14 changes: 0 additions & 14 deletions LayoutTests/fast/loader/font-load-timer-expected.html

This file was deleted.

22 changes: 0 additions & 22 deletions LayoutTests/fast/loader/font-load-timer.html

This file was deleted.

This file was deleted.

14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,17 @@
2020-08-17 Karl Rackler <rackler@apple.com>

Unreviewed, reverting r265603.

Reverting per commiter because commit caused consisent crash
with test.

Reverted changeset:

"Font loads quickly followed by navigations may fail
indefinitely"
https://bugs.webkit.org/show_bug.cgi?id=215435
https://trac.webkit.org/changeset/265603

2020-08-17 Chris Dumez <cdumez@apple.com>

AudioNode.disconnect() does not match the specification
Expand Down
23 changes: 1 addition & 22 deletions Source/WebCore/css/CSSFontSelector.cpp
Expand Up @@ -364,28 +364,7 @@ void CSSFontSelector::beginLoadingFontSoon(CachedFont& font)
// decrementRequestCount() in beginLoadTimerFired() and in clearDocument().
m_document->cachedResourceLoader().incrementRequestCount(font);

if (!m_fontLoadingTimerIsSuspended)
m_beginLoadingTimer.startOneShot(0_s);
}

void CSSFontSelector::suspendFontLoadingTimer()
{
if (m_fontLoadingTimerIsSuspended)
return;

m_beginLoadingTimer.cancel();
m_fontLoadingTimerIsSuspended = true;
}

void CSSFontSelector::restartFontLoadingTimer()
{
if (!m_fontLoadingTimerIsSuspended)
return;

if (!m_fontsToBeginLoading.isEmpty())
m_beginLoadingTimer.startOneShot(0_s);

m_fontLoadingTimerIsSuspended = false;
m_beginLoadingTimer.startOneShot(0_s);
}

void CSSFontSelector::beginLoadTimerFired()
Expand Down
3 changes: 0 additions & 3 deletions Source/WebCore/css/CSSFontSelector.h
Expand Up @@ -80,8 +80,6 @@ class CSSFontSelector final : public FontSelector, public CSSFontFaceSetClient,
Document* document() const { return m_document.get(); }

void beginLoadingFontSoon(CachedFont&);
void suspendFontLoadingTimer();
void restartFontLoadingTimer();

FontFaceSet* fontFaceSetIfExists();
FontFaceSet& fontFaceSet();
Expand Down Expand Up @@ -121,7 +119,6 @@ class CSSFontSelector final : public FontSelector, public CSSFontFaceSetClient,
unsigned m_computingRootStyleFontCount { 0 };
bool m_creatingFont { false };
bool m_buildIsUnderway { false };
bool m_fontLoadingTimerIsSuspended { false };
};

} // namespace WebCore
2 changes: 0 additions & 2 deletions Source/WebCore/dom/Document.cpp
Expand Up @@ -5449,8 +5449,6 @@ void Document::resume(ReasonForSuspension reason)
if (renderView())
renderView()->setIsInWindow(true);

fontSelector().restartFontLoadingTimer();

ASSERT(page());
page()->lockAllOverlayScrollbarsToHidden(false);

Expand Down
4 changes: 0 additions & 4 deletions Source/WebCore/loader/DocumentLoader.cpp
Expand Up @@ -33,7 +33,6 @@
#include "ApplicationCacheHost.h"
#include "Archive.h"
#include "ArchiveResourceCollection.h"
#include "CSSFontSelector.h"
#include "CachedPage.h"
#include "CachedRawResource.h"
#include "CachedResourceLoader.h"
Expand Down Expand Up @@ -314,9 +313,6 @@ void DocumentLoader::stopLoading()
// Always cancel multipart loaders
cancelAll(m_multipartSubresourceLoaders);

if (auto* document = m_frame->document())
document->fontSelector().suspendFontLoadingTimer();

// Appcache uses ResourceHandle directly, DocumentLoader doesn't count these loads.
m_applicationCacheHost->stopLoadingInFrame(*m_frame);

Expand Down

0 comments on commit 71c8ae7

Please sign in to comment.