Changeset 247195 in webkit


Ignore:
Timestamp:
Jul 6, 2019 5:20:03 PM (5 years ago)
Author:
Simon Fraser
Message:

Long hang when loading a cnn.com page on iOS
https://bugs.webkit.org/show_bug.cgi?id=199556

Reviewed by Zalan Bujtas.
Source/WebCore:

Loading https://edition.cnn.com/travel/article/brussels-airlines-flight-to-nowhere/index.html in the iOS 13 sim
results in a long hang under OverlapMapContainer::append(). We were creating pathological clipping scopes with
thousands of entries, because OverlapMapContainer::mergeClippingScopesRecursive() had a logic error where
it added 'sourceScope' to the child instead of 'sourceChildScope'. Add a new assertion to detect that case.

I wasn't able to create a testcase that caused a hang, but a number of existing tests would have
hit the assertion.

  • rendering/LayerOverlapMap.cpp:

(WebCore::OverlapMapContainer::ClippingScope::addChild):
(WebCore::OverlapMapContainer::mergeClippingScopesRecursive):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges): Drive-by fix: m_overflowControlsHostLayer is null on iOS, so use rootGraphicsLayer().

Tools:

Add code to load a page by default in MobileMiniBrowser so it's easy to hack it
to load a test page of your choice.

  • MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m:

(-[WebViewController viewDidLoad]):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r247191 r247195  
     12019-07-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Long hang when loading a cnn.com page on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=199556
     5
     6        Reviewed by Zalan Bujtas.
     7       
     8        Loading https://edition.cnn.com/travel/article/brussels-airlines-flight-to-nowhere/index.html in the iOS 13 sim
     9        results in a long hang under OverlapMapContainer::append(). We were creating pathological clipping scopes with
     10        thousands of entries, because OverlapMapContainer::mergeClippingScopesRecursive() had a logic error where
     11        it added 'sourceScope' to the child instead of 'sourceChildScope'. Add a new assertion to detect that case.
     12       
     13        I wasn't able to create a testcase that caused a hang, but a number of existing tests would have
     14        hit the assertion.
     15
     16        * rendering/LayerOverlapMap.cpp:
     17        (WebCore::OverlapMapContainer::ClippingScope::addChild):
     18        (WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
     19        * rendering/RenderLayerCompositor.cpp:
     20        (WebCore::RenderLayerCompositor::flushPendingLayerChanges): Drive-by fix: m_overflowControlsHostLayer is null on iOS, so use rootGraphicsLayer().
     21
    1222019-07-05  Youenn Fablet  <youenn@apple.com>
    223
  • trunk/Source/WebCore/rendering/LayerOverlapMap.cpp

    r245602 r247195  
    115115        ClippingScope* addChild(const ClippingScope& child)
    116116        {
     117            ASSERT(&layer != &child.layer);
    117118            children.append(child);
    118119            return &children.last();
     
    199200        } else {
    200201            // New child, just copy the whole subtree.
    201             destScope.addChild(sourceScope);
     202            destScope.addChild(sourceChildScope);
    202203        }
    203204    }
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r247129 r247195  
    524524        if (layersLogEnabled()) {
    525525            LOG(Layers, "RenderLayerCompositor::flushPendingLayerChanges");
    526             showGraphicsLayerTree(m_overflowControlsHostLayer.get());
     526            showGraphicsLayerTree(rootGraphicsLayer());
    527527        }
    528528#endif
  • trunk/Tools/ChangeLog

    r247180 r247195  
     12019-07-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Long hang when loading a cnn.com page on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=199556
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Add code to load a page by default in MobileMiniBrowser so it's easy to hack it
     9        to load a test page of your choice.
     10
     11        * MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m:
     12        (-[WebViewController viewDidLoad]):
     13
    1142019-07-05  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Tools/MobileMiniBrowser/MobileMiniBrowserFramework/WebViewController.m

    r205353 r247195  
    7676    self.tabViewController.modalPresentationStyle = UIModalPresentationPopover;
    7777
    78     [self setCurrentWebView:[self createWebView]];
     78    WKWebView *webView = [self createWebView];
     79    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://webkit.org"]]];
     80    [self setCurrentWebView:webView];
    7981}
    8082
Note: See TracChangeset for help on using the changeset viewer.