⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 269160 in webkit


Ignore:
Timestamp:
Oct 29, 2020, 12:15:49 PM (6 years ago)
Author:
sihui_liu@apple.com
Message:

Unreviewed, reverting r268192.

PLT regression - rdar://problem/70141350

Reverted changeset:

"Adjust heuristic for checking whether view reaches visually
non-empty state"
https://bugs.webkit.org/show_bug.cgi?id=217400
https://trac.webkit.org/changeset/268192

Location:
trunk
Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269159 r269160  
     12020-10-29  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Unreviewed, reverting r268192.
     4
     5        PLT regression - rdar://problem/70141350
     6
     7        Reverted changeset:
     8
     9        "Adjust heuristic for checking whether view reaches visually
     10        non-empty state"
     11        https://bugs.webkit.org/show_bug.cgi?id=217400
     12        https://trac.webkit.org/changeset/268192
     13
    1142020-10-29  Said Abou-Hallawa  <said@apple.com>
    215
  • trunk/Source/WebCore/page/FrameView.cpp

    r269144 r269160  
    45674567
    45684568            auto& resources = resourceLoader.allCachedResources();
    4569             bool shouldWaitForScriptIfEmpty = false;
    4570 #if ENABLE(INTERSECTION_OBSERVER)
    4571             shouldWaitForScriptIfEmpty = !document.numberOfIntersectionObservers();
    4572 #endif
    4573             bool isLoadingScript = false;
    45744569            for (auto& resource : resources) {
    45754570                if (resource.value->isLoaded())
    45764571                    continue;
    4577                 auto type = resource.value->type();
    4578                 if (type == CachedResource::Type::CSSStyleSheet || type == CachedResource::Type::FontResource)
     4572                if (resource.value->type() == CachedResource::Type::CSSStyleSheet || resource.value->type() == CachedResource::Type::FontResource)
    45794573                    return true;
    4580                 if (type == CachedResource::Type::Script)
    4581                     isLoadingScript = true;
    45824574            }
    4583 
    4584             if (shouldWaitForScriptIfEmpty && !m_visuallyNonEmptyPixelCount && isLoadingScript)
    4585                 return true;
    4586 
    45874575            return false;
    45884576        };
  • trunk/Tools/ChangeLog

    r269157 r269160  
     12020-10-29  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Unreviewed, reverting r268192.
     4
     5        PLT regression - rdar://problem/70141350
     6
     7        Reverted changeset:
     8
     9        "Adjust heuristic for checking whether view reaches visually
     10        non-empty state"
     11        https://bugs.webkit.org/show_bug.cgi?id=217400
     12        https://trac.webkit.org/changeset/268192
     13
    1142020-10-29  Sam Weinig  <weinig@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj

    r268878 r269160  
    797797                932AE53D1D371047005DFFAF /* focus-inputs.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93575C551D30366E000D604D /* focus-inputs.html */; };
    798798                933D631D1FCB76200032ECD6 /* Hasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933D631B1FCB76180032ECD6 /* Hasher.cpp */; };
    799                 93494FFE252E66BA0099F171 /* deferred-script-load-in-empty-document.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */; };
    800799                935786CC20F6A2700000CDFC /* IndexedDB.sqlite3-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C520F69FED0040DC1B /* IndexedDB.sqlite3-wal */; };
    801800                935786CD20F6A2910000CDFC /* IndexedDB.sqlite3 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C720F69FEE0040DC1B /* IndexedDB.sqlite3 */; };
     
    13631362                                F457A9D6202D68AF00F7E9D5 /* DataTransfer.html in Copy Resources */,
    13641363                                F4512E131F60C44600BB369E /* DataTransferItem-getAsEntry.html in Copy Resources */,
    1365                                 93494FFE252E66BA0099F171 /* deferred-script-load-in-empty-document.html in Copy Resources */,
    13661364                                118153442208B7AC00B2CCD2 /* deferred-script-load.html in Copy Resources */,
    13671365                                118153462208B7E500B2CCD2 /* deferred-script.js in Copy Resources */,
     
    23922390                9331407B17B4419000F083B1 /* DidNotHandleKeyDown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidNotHandleKeyDown.cpp; sourceTree = "<group>"; };
    23932391                933D631B1FCB76180032ECD6 /* Hasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Hasher.cpp; sourceTree = "<group>"; };
    2394                 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "deferred-script-load-in-empty-document.html"; sourceTree = "<group>"; };
    23952392                934FA5C520F69FED0040DC1B /* IndexedDB.sqlite3-wal */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDB.sqlite3-wal"; sourceTree = "<group>"; };
    23962393                934FA5C620F69FED0040DC1B /* IndexedDB.sqlite3-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDB.sqlite3-shm"; sourceTree = "<group>"; };
     
    42894286                                5C9E56861DF9148E00C9EE33 /* contentBlockerCheck.html */,
    42904287                                290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */,
    4291                                 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */,
    42924288                                118153432208B7AC00B2CCD2 /* deferred-script-load.html */,
    42934289                                118153452208B7E500B2CCD2 /* deferred-script.js */,
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm

    r268192 r269160  
    3838static bool didFirstVisuallyNonEmptyLayout;
    3939static bool receivedMessage;
    40 static bool receivedMessageBeforeFirstVisuallyNonEmptyLayout;
    4140
    4241@interface FirstPaintMessageHandler : NSObject <WKScriptMessageHandler>
     
    5655- (void)_webView:(WKWebView *)webView renderingProgressDidChange:(_WKRenderingProgressEvents)progressEvents
    5756{
    58     if (progressEvents & _WKRenderingProgressEventFirstVisuallyNonEmptyLayout) {
    59         receivedMessageBeforeFirstVisuallyNonEmptyLayout = receivedMessage;
     57    if (progressEvents & _WKRenderingProgressEventFirstVisuallyNonEmptyLayout)
    6058        didFirstVisuallyNonEmptyLayout = true;
    61     }
    6259}
    6360@end
     
    7572
    7673    receivedMessage = false;
    77     receivedMessageBeforeFirstVisuallyNonEmptyLayout = false;
    7874    didFirstVisuallyNonEmptyLayout = false;
    7975
     
    8278    TestWebKitAPI::Util::run(&receivedMessage);
    8379    EXPECT_TRUE(didFirstVisuallyNonEmptyLayout);
    84     EXPECT_FALSE(receivedMessageBeforeFirstVisuallyNonEmptyLayout);
    85 }
    86 
    87 TEST(WebKit, FirstVisuallyNonEmptyMilestoneWithDeferredScriptInEmptyDocument)
    88 {
    89     auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);
    90     auto messageHandler = adoptNS([[FirstPaintMessageHandler alloc] init]);
    91     [[webViewConfiguration userContentController] addScriptMessageHandler:messageHandler.get() name:@"firstpaint"];
    92 
    93     auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]);
    94 
    95     RetainPtr<RenderingProgressNavigationDelegate> delegate = adoptNS([[RenderingProgressNavigationDelegate alloc] init]);
    96     [webView setNavigationDelegate:delegate.get()];
    97 
    98     receivedMessage = false;
    99     receivedMessageBeforeFirstVisuallyNonEmptyLayout = false;
    100     didFirstVisuallyNonEmptyLayout = false;
    101 
    102     [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"deferred-script-load-in-empty-document" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
    103 
    104     TestWebKitAPI::Util::run(&didFirstVisuallyNonEmptyLayout);
    105     EXPECT_TRUE(receivedMessage);
    106     EXPECT_TRUE(receivedMessageBeforeFirstVisuallyNonEmptyLayout);
    10780}
    10881
Note: See TracChangeset for help on using the changeset viewer.