WebKit Bugzilla
Attachment 360039 Details for
Bug 193741
: DidFirstVisuallyNonEmptyLayout milestone should always fire at some point.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193741-20190124143055.patch (text/plain), 9.40 KB, created by
zalan
on 2019-01-24 14:31:00 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-01-24 14:31:00 PST
Size:
9.40 KB
patch
obsolete
>Subversion Revision: 239927 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2870e6b8095f05a11adae1efb068f71a2f7dea95..61481365985b4bd5a389333994c1f160d56a677d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2019-01-23 Zalan Bujtas <zalan@apple.com> >+ >+ DidFirstVisuallyNonEmptyLayout milestone should always fire at some point. >+ https://bugs.webkit.org/show_bug.cgi?id=193741 >+ <rdar://problem/47135030> >+ >+ Reviewed by Antti Koivisto and Simon Fraser. >+ >+ fireLayoutRelatedMilestonesIfNeeded() is part of the post-layout tasks. In certain cases when >+ 1. the received data is not "contentful" yet >+ 2. and we are expecting some more (loading is not complete yet) >+ 3. but no layout is initiated anymore >+ nothing triggers the milestone firing. >+ >+ This patch ensures that we fire the DidFirstVisuallyNonEmptyLayout when the frame load is complete unless we already did. >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::FrameView): >+ (WebCore::FrameView::loadProgressingStatusChanged): >+ > 2019-01-14 Zan Dobersek <zdobersek@igalia.com> > > DOMCacheStorage: use-after-move in doSequentialMatch() >diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp >index d25a7e61a7ae34cb257e14f0e525c73982282de9..f3f3d9733a810ba3e76372b1a7f663f7077d5f03 100644 >--- a/Source/WebCore/page/FrameView.cpp >+++ b/Source/WebCore/page/FrameView.cpp >@@ -2841,6 +2841,9 @@ void FrameView::disableLayerFlushThrottlingTemporarilyForInteraction() > > void FrameView::loadProgressingStatusChanged() > { >+ auto hasPendingVisuallyNonEmptyCallback = m_firstVisuallyNonEmptyLayoutCallbackPending && !m_isVisuallyNonEmpty; >+ if (hasPendingVisuallyNonEmptyCallback && frame().loader().isComplete()) >+ fireLayoutRelatedMilestonesIfNeeded(); > updateLayerFlushThrottling(); > adjustTiledBackingCoverage(); > } >@@ -5185,8 +5188,11 @@ void FrameView::fireLayoutRelatedMilestonesIfNeeded() > milestonesAchieved.add(DidRenderSignificantAmountOfText); > } > >- if (milestonesAchieved && frame().isMainFrame()) >+ if (milestonesAchieved && frame().isMainFrame()) { >+ if (milestonesAchieved.contains(DidFirstVisuallyNonEmptyLayout)) >+ RELEASE_LOG_IF_ALLOWED("fireLayoutRelatedMilestonesIfNeeded() - firing first visually non-empty layout milestone on the main frame"); > frame().loader().didReachLayoutMilestone(milestonesAchieved); >+ } > } > > void FrameView::firePaintRelatedMilestonesIfNeeded() >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 79e58efbd47bcbc9c6ecdccfbb9b6e53fb98aa6e..388a5949f99568c9a0e6ec0efcbd44909b1c1d8b 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,15 @@ >+2019-01-23 Zalan Bujtas <zalan@apple.com> >+ >+ DidFirstVisuallyNonEmptyLayout milestone should always fire at some point. >+ https://bugs.webkit.org/show_bug.cgi?id=193741 >+ <rdar://problem/47135030> >+ >+ Reviewed by Antti Koivisto and Simon Fraser. >+ >+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: >+ * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: >+ (TestWebKitAPI::TEST): >+ > 2019-01-14 Zalan Bujtas <zalan@apple.com> > > [LFC][BFC] Add basic box-sizing support. >diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >index fe27e4993725782621fef804fad076d8c0c55e97..8a96ec4d637904f219beb0b28032afc4c3d7e495 100644 >--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >@@ -51,6 +51,7 @@ > 115EB3431EE0BA03003C2C0A /* ViewportSizeForViewportUnits.mm in Sources */ = {isa = PBXBuildFile; fileRef = 115EB3421EE0B720003C2C0A /* ViewportSizeForViewportUnits.mm */; }; > 1171B24F219F49CD00CB897D /* FirstMeaningfulPaintMilestone_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */; }; > 11B7FD28219F47110069B27F /* FirstMeaningfulPaintMilestone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */; }; >+ 11C2598D21FA6324004C9E23 /* async-script-load.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 11C2598C21FA618D004C9E23 /* async-script-load.html */; }; > 143DDE9820C9018B007F76FA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 574F55D0204D471C002948C6 /* Security.framework */; }; > 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; }; > 1A3524AE1D63A4FB0031729B /* Scope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3524AC1D63A4FB0031729B /* Scope.cpp */; }; >@@ -1000,6 +1001,7 @@ > 5C9E59421D3EB5AC00E3C62E /* ApplicationCache.db-shm in Copy Resources */, > 5C9E59431D3EB5AC00E3C62E /* ApplicationCache.db-wal in Copy Resources */, > F6B7BE9717469B96008A3445 /* associate-form-controls.html in Copy Resources */, >+ 11C2598D21FA6324004C9E23 /* async-script-load.html in Copy Resources */, > F4856CA31E649EA8009D7EE7 /* attachment-element.html in Copy Resources */, > B55F11B71517D03300915916 /* attributedStringCustomFont.html in Copy Resources */, > 7C9ED98B17A19F4B00E4DC33 /* attributedStringStrikethrough.html in Copy Resources */, >@@ -1324,6 +1326,7 @@ > 115EB3421EE0B720003C2C0A /* ViewportSizeForViewportUnits.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewportSizeForViewportUnits.mm; sourceTree = "<group>"; }; > 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FirstMeaningfulPaintMilestone_Bundle.cpp; sourceTree = "<group>"; }; > 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FirstMeaningfulPaintMilestone.cpp; sourceTree = "<group>"; }; >+ 11C2598C21FA618D004C9E23 /* async-script-load.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "async-script-load.html"; sourceTree = "<group>"; }; > 14464012167A8305000BD218 /* LayoutUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutUnit.cpp; sourceTree = "<group>"; }; > 14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SaturatedArithmeticOperations.cpp; sourceTree = "<group>"; }; > 1A02C84B125D4A5E00E3F4BD /* find.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = find.html; sourceTree = "<group>"; }; >@@ -3263,6 +3266,7 @@ > 1C2B81851C89252300A5529F /* Ahem.ttf */, > 93D3D19B17B1A7B000C7C415 /* all-content-in-one-iframe.html */, > F6B7BE9617469B7E008A3445 /* associate-form-controls.html */, >+ 11C2598C21FA618D004C9E23 /* async-script-load.html */, > C9C9A91A21DED24D00FDE96E /* audio-with-play-button.html */, > 76E182DE15475A8300F1FADD /* auto-submitting-form.html */, > C9C60E631E53A9BA006DA181 /* autoplay-check-frame.html */, >diff --git a/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp b/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp >index 47cdd4bab097cd8b686fbbd09b0ab97728b47f41..5cf826096b65e6cf7b96565313c6b08b1d937bce 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp >@@ -117,6 +117,28 @@ TEST(WebKit, FirstVisuallyNonEmptyLayoutAfterPageCacheRestore) > didNavigate = false; > } > >+TEST(WebKit, FirstVisuallyNonEmptyMilestoneWithLoadComplete) >+{ >+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreateWithConfiguration(nullptr)); >+ PlatformWebView webView(context.get()); >+ >+ WKPageNavigationClientV3 loaderClient; >+ memset(&loaderClient, 0, sizeof(loaderClient)); >+ >+ loaderClient.base.version = 3; >+ loaderClient.base.clientInfo = &webView; >+ loaderClient.renderingProgressDidChange = renderingProgressDidChange; >+ >+ WKPageSetPageNavigationClient(webView.page(), &loaderClient.base); >+ didFirstVisuallyNonEmptyLayout = false; >+ >+ WKPageListenForLayoutMilestones(webView.page(), WKPageRenderingProgressEventFirstVisuallyNonEmptyLayout); >+ WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("async-script-load", "html")).get()); >+ >+ Util::run(&didFirstVisuallyNonEmptyLayout); >+ EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); >+} >+ > } // namespace TestWebKitAPI > > #endif >diff --git a/Tools/TestWebKitAPI/Tests/WebKit/async-script-load.html b/Tools/TestWebKitAPI/Tests/WebKit/async-script-load.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a38f858661694951588c6f71ee0a0334d7eccbad >--- /dev/null >+++ b/Tools/TestWebKitAPI/Tests/WebKit/async-script-load.html >@@ -0,0 +1,16 @@ >+<head> >+<style> >+@font-face { >+ font-family: 'FontAwesome'; >+ src: url("font1.woff2") format("woff2"); >+ font-weight: normal; >+ font-style: normal >+} >+ >+.foobar { >+ font: normal normal normal 14px / 1 FontAwesome; >+} >+</style> >+</head> >+<body>foobar<script>document.body.offsetHeight</script> >+<script async="true" src="foobar.js"></script> >\ No newline at end of file
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 193741
:
359960
|
359983
|
360014
|
360020
|
360022
|
360034
| 360039