WebKit Bugzilla
Attachment 360880 Details for
Bug 194168
: [First paint] Adjust "finishedParsingMainDocument" flag by taking deferred and async scripts into account.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194168-20190201114330.patch (text/plain), 3.06 KB, created by
zalan
on 2019-02-01 11:43:30 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-02-01 11:43:30 PST
Size:
3.06 KB
patch
obsolete
>Subversion Revision: 240807 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 511461a9f89d279f171e509f76ef115508fc553e..95854396fec8cd4885dc495d02997df5ec35bca4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-01 Zalan Bujtas <zalan@apple.com> >+ >+ [First paint] Adjust "finishedParsingMainDocument" flag by taking deferred and async scripts into account. >+ https://bugs.webkit.org/show_bug.cgi?id=194168 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ First paint should not be block by async or deferred scripts. >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const): >+ > 2019-01-31 Justin Fan <justin_fan@apple.com> > > [WebGPU] WebGPUAdapterDescriptor -> GPURequestAdapterOptions and take powerPreference into account >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index d5c8897fe12ce6a4c81c75944870548fac1e9e83..ae42fe9f6d745da02b58b23b88acc420ecf418e0 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -4464,7 +4464,7 @@ bool FrameView::qualifiesAsVisuallyNonEmpty() const > if (frame().document()->styleScope().hasPendingSheetsBeforeBody()) > return false; > >- auto finishedParsingMainDocument = frame().loader().stateMachine().committedFirstRealDocumentLoad() && !frame().document()->parsing(); >+ auto finishedParsingMainDocument = frame().loader().stateMachine().committedFirstRealDocumentLoad() && (frame().document()->readyState() == Document::Interactive || frame().document()->readyState() == Document::Complete); > // Ensure that we always fire visually non-empty milestone eventually. > if (finishedParsingMainDocument && frame().loader().isComplete()) > return true; >@@ -4495,11 +4495,8 @@ bool FrameView::qualifiesAsVisuallyNonEmpty() const > return true; > > auto isMoreContentExpected = [&]() { >- // Pending css/javascript/font loading/processing means we should wait a little longer. >- auto hasPendingScriptExecution = frame().document()->scriptRunner().hasPendingScripts(); >- if (hasPendingScriptExecution) >- return true; >- >+ ASSERT(finishedParsingMainDocument); >+ // Pending css/font loading means we should wait a little longer. Classic non-async, non-defer scripts are all processed by now. > auto* documentLoader = frame().loader().documentLoader(); > if (!documentLoader) > return false; >@@ -4512,7 +4509,7 @@ bool FrameView::qualifiesAsVisuallyNonEmpty() const > for (auto& resource : resources) { > if (resource.value->isLoaded()) > continue; >- if (resource.value->type() == CachedResource::Type::CSSStyleSheet || resource.value->type() == CachedResource::Type::Script || resource.value->type() == CachedResource::Type::FontResource) >+ if (resource.value->type() == CachedResource::Type::CSSStyleSheet || resource.value->type() == CachedResource::Type::FontResource) > return true; > } > return false;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194168
:
360880
|
361091
|
361092