WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
199514
Clean up ScrollingTreeFixedNode::applyLayerPositions
https://bugs.webkit.org/show_bug.cgi?id=199514
Summary
Clean up ScrollingTreeFixedNode::applyLayerPositions
Antti Koivisto
Reported
2019-07-05 06:02:53 PDT
Avoid is<FooNode> tests.
Attachments
patch
(14.31 KB, patch)
2019-07-05 06:16 PDT
,
Antti Koivisto
no flags
Details
Formatted Diff
Diff
patch
(14.41 KB, patch)
2019-07-05 06:18 PDT
,
Antti Koivisto
koivisto
: review?
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Antti Koivisto
Comment 1
2019-07-05 06:16:04 PDT
Created
attachment 373490
[details]
patch
EWS Watchlist
Comment 2
2019-07-05 06:18:53 PDT
Attachment 373490
[details]
did not pass style-queue: ERROR: Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:60: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antti Koivisto
Comment 3
2019-07-05 06:18:55 PDT
Created
attachment 373491
[details]
patch
EWS Watchlist
Comment 4
2019-07-05 06:21:48 PDT
Attachment 373491
[details]
did not pass style-queue: ERROR: Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:60: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 5
2019-07-05 08:49:44 PDT
Comment on
attachment 373491
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=373491&action=review
Isn't it a bit late to be making refactoring changes like this?
> Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm:74 > + if (!children() || children()->size() != 1) > + return true;
I don't understand this test. Why does the number of children affect behavior; can't a positioned node have any number of descendant fixed or sticky or scrolling nodes?
> Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm:76 > + // In there is a child node for the same layer then this node exits for scroll propagationg
"If there". propagationg -> propagation?
> Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm:83 > + if (is<ScrollingTreeStickyNode>(child)) > + return downcast<ScrollingTreeStickyNode>(child).layer() != m_layer; > + if (is<ScrollingTreeFixedNode>(child)) > + return downcast<ScrollingTreeFixedNode>(child).layer() != m_layer;
Whether it's the same layer seems like implementation detail. I might make more layers in RenderLayerBacking and break this.
Antti Koivisto
Comment 6
2019-07-05 10:39:34 PDT
> I don't understand this test. Why does the number of children affect > behavior; can't a positioned node have any number of descendant fixed or > sticky or scrolling nodes?
This check...
> > Source/WebCore/page/scrolling/cocoa/ScrollingTreePositionedNode.mm:83 > > + if (is<ScrollingTreeStickyNode>(child)) > > + return downcast<ScrollingTreeStickyNode>(child).layer() != m_layer; > > + if (is<ScrollingTreeFixedNode>(child)) > > + return downcast<ScrollingTreeFixedNode>(child).layer() != m_layer; > > Whether it's the same layer seems like implementation detail. I might make > more layers in RenderLayerBacking and break this.
...along with these matches the tower build in RenderLayerCompositor::updateScrollCoordinationForLayer where we can have multiple scrolling tree nodes for the same layer. In this case the PositionedNode doesn't do any positioning, the sticky/fixed child node does. However it is still needed so that the scroll updates propagate correctly and that we can establish scrolling relations in UI process. This is obviously not a good way to do things. I think we should combine Fixed/Sticky/Absolute into a single class and never have more than one node per layer.
Antti Koivisto
Comment 7
2019-07-05 11:06:53 PDT
Comment on
attachment 373491
[details]
patch Lets do this later.
Antti Koivisto
Comment 8
2019-09-10 06:26:36 PDT
Comment on
attachment 373491
[details]
patch How about now?
Simon Fraser (smfr)
Comment 9
2019-09-10 16:39:36 PDT
Comment on
attachment 373491
[details]
patch My previous comments are still relevant.
Antti Koivisto
Comment 10
2019-09-10 22:28:51 PDT
> My previous comments are still relevant.
I thought I answered it. Which part is still unclear?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug