Bug 175135

Summary: ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll uses the wrong fixedPositionRect
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: FramesAssignee: Frédéric Wang (:fredw) <fred.wang>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, cmarcelo, jamesr, luiz, simon.fraser, tonikitoo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 154399, 180353    
Attachments:
Description Flags
Patch
simon.fraser: review+, buildbot: commit-queue-
Archive of layout-test-results from ews122 for ios-simulator-wk2 none

Description Frédéric Wang (:fredw) 2017-08-03 08:10:13 PDT
Extracted from bug 154399.
Comment 1 Frédéric Wang (:fredw) 2017-08-03 08:53:51 PDT
Created attachment 317124 [details]
Patch
Comment 2 Simon Fraser (smfr) 2017-08-03 10:18:05 PDT
Comment on attachment 317124 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=317124&action=review

> Source/WebCore/ChangeLog:11
> +        and RenderLayerCompositor. This allows to fix some flickering issues on iOS.

allows to fix => fixes

> Source/WebKit/ChangeLog:11
> +        and RenderLayerCompositor. This allows to fix some flickering issues on iOS.

ditto

> Source/WebKit/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:281
> +    if (frameNode && frameNode->parent())
> +        fixedPositionRect = frameNode->fixedPositionRect();
> +    else
> +        fixedPositionRect = scrollingTree().fixedPositionRect();

It's not clear why you check frameNode->parent() here. Is frameNode->fixedPositionRect() on the root frame node not the same as scrollingTree().fixedPositionRect()?
Comment 3 Build Bot 2017-08-03 10:25:15 PDT
Comment on attachment 317124 [details]
Patch

Attachment 317124 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4247126

New failing tests:
http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html
Comment 4 Build Bot 2017-08-03 10:25:17 PDT
Created attachment 317129 [details]
Archive of layout-test-results from ews122 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 5 Frédéric Wang (:fredw) 2017-08-03 11:06:04 PDT
(In reply to Simon Fraser (smfr) from comment #2)
> > Source/WebKit/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:281
> > +    if (frameNode && frameNode->parent())
> > +        fixedPositionRect = frameNode->fixedPositionRect();
> > +    else
> > +        fixedPositionRect = scrollingTree().fixedPositionRect();
> 
> It's not clear why you check frameNode->parent() here. Is
> frameNode->fixedPositionRect() on the root frame node not the same as
> scrollingTree().fixedPositionRect()?

I'm copying what is done for the ScrollingTreeFrameScrollingNodeIOS:

https://trac.webkit.org/browser/trunk/Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm#L171

At the end scrollingTree().fixedPositionRect() involves WebPageProxy::computeCustomFixedPositionRect which seems to do quite complex calculation. The fixedPositionRect() function I introduced here, only does the simple calculation of ScrollingTreeFrameScrollingNodeIOS.
Comment 6 Frédéric Wang (:fredw) 2017-08-04 01:07:58 PDT
(In reply to Build Bot from comment #3)
> Comment on attachment 317124 [details]
> Patch
> 
> Attachment 317124 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: http://webkit-queues.webkit.org/results/4247126
> 
> New failing tests:
> http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-
> https.html

This failure seems unrelated and the test passes locally for me.
Comment 7 Frédéric Wang (:fredw) 2017-08-04 01:08:25 PDT
Committed r220261: <http://trac.webkit.org/changeset/220261>
Comment 8 Radar WebKit Bug Importer 2017-08-04 01:09:20 PDT
<rdar://problem/33719582>