WebKit Bugzilla
Attachment 359724 Details for
Bug 193665
: [iOS] Tiles not created in large scrollable iframes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
frame-scroll-tile-update.patch (text/plain), 9.42 KB, created by
Antti Koivisto
on 2019-01-22 01:13:41 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-01-22 01:13:41 PST
Size:
9.42 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 240249) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,31 @@ >+2019-01-22 Antti Koivisto <antti@apple.com> >+ >+ [iOS] Tiles not created in large scrollable iframes >+ https://bugs.webkit.org/show_bug.cgi?id=193665 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test by Frédéric Wang. >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::unscrolledPositionForRootContentLayer): >+ >+ Make static version of this function (only used by Mac) to be about unscrolled position. >+ >+ (WebCore::FrameView::positionForRootContentLayer const): >+ >+ The content layer moves when using (UIScrollView based) async scrolling so include the scroll position. >+ >+ (WebCore::FrameView::positionForRootContentLayer): Deleted. >+ * page/FrameView.h: >+ * page/scrolling/AsyncScrollingCoordinator.cpp: >+ (WebCore::AsyncScrollingCoordinator::reconcileScrollingState): >+ >+ Don't move the scroll layer in this case. >+ >+ * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: >+ (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition): >+ > 2019-01-21 Antti Koivisto <antti@apple.com> > > [iOS] Handle hit testing for subframes >Index: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 240249) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -1866,14 +1866,20 @@ float FrameView::yPositionForFooterLayer > return yPositionForHeaderLayer(scrollPosition, topContentInset) + totalContentsHeight - footerHeight; > } > >-FloatPoint FrameView::positionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight) >+FloatPoint FrameView::unscrolledPositionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight) > { > return FloatPoint(0, yPositionForHeaderLayer(scrollPosition, topContentInset) + headerHeight) - toFloatSize(scrollOrigin); > } > > FloatPoint FrameView::positionForRootContentLayer() const > { >- return positionForRootContentLayer(scrollPosition(), scrollOrigin(), topContentInset(), headerHeight()); >+ auto position = unscrolledPositionForRootContentLayer(scrollPosition(), scrollOrigin(), topContentInset(), headerHeight()); >+#if PLATFORM(IOS_FAMILY) >+ auto* scrollLayer = layerForScrolling(); >+ if (scrollLayer && scrollLayer->type() == GraphicsLayer::Type::Scrolling) >+ position -= toFloatSize(scrollPosition()); >+#endif >+ return position; > } > > #if PLATFORM(IOS_FAMILY) >Index: Source/WebCore/page/FrameView.h >=================================================================== >--- Source/WebCore/page/FrameView.h (revision 240249) >+++ Source/WebCore/page/FrameView.h (working copy) >@@ -315,7 +315,7 @@ public: > // These layers are positioned differently when there is a topContentInset, a header, or a footer. These value need to be computed > // on both the main thread and the scrolling thread. > static float yPositionForInsetClipLayer(const FloatPoint& scrollPosition, float topContentInset); >- WEBCORE_EXPORT static FloatPoint positionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight); >+ WEBCORE_EXPORT static FloatPoint unscrolledPositionForRootContentLayer(const FloatPoint& scrollPosition, const FloatPoint& scrollOrigin, float topContentInset, float headerHeight); > WEBCORE_EXPORT FloatPoint positionForRootContentLayer() const; > > static float yPositionForHeaderLayer(const FloatPoint& scrollPosition, float topContentInset); >Index: Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp >=================================================================== >--- Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (revision 240249) >+++ Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (working copy) >@@ -433,7 +433,8 @@ void AsyncScrollingCoordinator::reconcil > FrameView::yPositionForFooterLayer(scrollPosition, topContentInset, frameView.totalContentsSize().height(), frameView.footerHeight())); > > if (programmaticScroll || scrollingLayerPositionAction == ScrollingLayerPositionAction::Set) { >- scrollLayer->setPosition(-frameView.scrollPosition()); >+ if (scrollLayer->type() != GraphicsLayer::Type::Scrolling) >+ scrollLayer->setPosition(-frameView.scrollPosition()); > if (counterScrollingLayer) > counterScrollingLayer->setPosition(scrollPositionForFixed); > if (insetClipLayer) >@@ -447,7 +448,8 @@ void AsyncScrollingCoordinator::reconcil > if (footerLayer) > footerLayer->setPosition(positionForFooterLayer); > } else { >- scrollLayer->syncPosition(-frameView.scrollPosition()); >+ if (scrollLayer->type() != GraphicsLayer::Type::Scrolling) >+ scrollLayer->syncPosition(-frameView.scrollPosition()); > if (counterScrollingLayer) > counterScrollingLayer->syncPosition(scrollPositionForFixed); > if (insetClipLayer) >Index: Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm >=================================================================== >--- Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (revision 240249) >+++ Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm (working copy) >@@ -441,7 +441,7 @@ void ScrollingTreeFrameScrollingNodeMac: > float topContentInset = this->topContentInset(); > if (m_insetClipLayer && m_scrolledContentsLayer && topContentInset) { > m_insetClipLayer.get().position = FloatPoint(m_insetClipLayer.get().position.x, FrameView::yPositionForInsetClipLayer(position, topContentInset)); >- m_scrolledContentsLayer.get().position = FrameView::positionForRootContentLayer(position, scrollOrigin(), topContentInset, headerHeight()); >+ m_scrolledContentsLayer.get().position = FrameView::unscrolledPositionForRootContentLayer(position, scrollOrigin(), topContentInset, headerHeight()); > if (m_contentShadowLayer) > m_contentShadowLayer.get().position = m_scrolledContentsLayer.get().position; > } >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 240249) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2019-01-22 Antti Koivisto <antti@apple.com> >+ >+ [iOS] Tiles not created in large scrollable iframes >+ https://bugs.webkit.org/show_bug.cgi?id=193665 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test by Frédéric Wang. >+ >+ * fast/scrolling/ios/scroll-iframe-expected.html: >+ * fast/scrolling/ios/scroll-iframe.html: >+ > 2019-01-21 Antti Koivisto <antti@apple.com> > > [iOS] Handle hit testing for subframes >Index: LayoutTests/fast/scrolling/ios/scroll-iframe-expected.html >=================================================================== >--- LayoutTests/fast/scrolling/ios/scroll-iframe-expected.html (revision 240249) >+++ LayoutTests/fast/scrolling/ios/scroll-iframe-expected.html (working copy) >@@ -18,6 +18,7 @@ > <div class=testdiv></div> > <div class=testdiv></div> > <div class=testdiv></div> >+ <div class=testdiv></div> > </div> > </body> > </html> >Index: LayoutTests/fast/scrolling/ios/scroll-iframe.html >=================================================================== >--- LayoutTests/fast/scrolling/ios/scroll-iframe.html (revision 240249) >+++ LayoutTests/fast/scrolling/ios/scroll-iframe.html (working copy) >@@ -24,18 +24,24 @@ > var c = centerOf("maxScrollX"); > await touchAndDragFromPointToPoint(c.x, c.y, c.x - 150, c.y); > await liftUpAtPoint(c.x - 150, c.y); >+ > c = centerOf("maxScrollY"); > await touchAndDragFromPointToPoint(c.x, c.y, c.x, c.y - 150); > await liftUpAtPoint(c.x, c.y - 150); >+ > c = centerOf("maxScrollXY"); > await touchAndDragFromPointToPoint(c.x, c.y, c.x - 150, c.y - 150); > await liftUpAtPoint(c.x - 150, c.y - 150); > >+ c = centerOf("largeContent"); >+ await touchAndDragFromPointToPoint(c.x, c.y, c.x, c.y - 2000); >+ await liftUpAtPoint(c.x, c.y - 2000); >+ > // Wait for scrolling to stabilize and for scrollbars to disappear. > setTimeout(() => {testRunner.notifyDone(); }, 2000); > } > >- var frameToLoadCount = 3; >+ var frameToLoadCount = 4; > function newFrameLoaded() { > frameToLoadCount--; > if (frameToLoadCount == 0) >@@ -70,6 +76,15 @@ > <div style='left: 100px; top: 100px; position: absolute; width: 100px; height: 100px; background: green;'></div> > </body>" onload="newFrameLoaded()"> > </iframe> >+ <iframe id="largeContent" scrolling="yes" srcdoc=" >+ <body style='margin: 0;'> >+ <div style='width: 100px; height: 500px; background: red;'></div> >+ <div style='width: 100px; height: 500px; background: blue;'></div> >+ <div style='width: 100px; height: 500px; background: red;'></div> >+ <div style='width: 100px; height: 500px; background: blue;'></div> >+ <div style='width: 100px; height: 500px; background: green;'></div> >+ </body>" onload="newFrameLoaded()"> >+ </iframe> > </div> > </body> > </html>
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 193665
:
359724
|
359729
|
359730
|
360596
|
360604
|
361002
|
361006
|
361010
|
361020
|
361040