RESOLVED FIXED 216192
REGRESSION (r260571): Scrolling on weather.com in Safari causes the gradient background to flicker (fixed backgrounds)
https://bugs.webkit.org/show_bug.cgi?id=216192
Summary REGRESSION (r260571): Scrolling on weather.com in Safari causes the gradient ...
Simon Fraser (smfr)
Reported 2020-09-04 14:36:52 PDT
REGRESSION (r260571): Scrolling on weather.com in Safari causes the gradient background to flicker (fixed backgrounds)
Attachments
Patch (4.14 KB, patch)
2020-09-04 14:39 PDT, Simon Fraser (smfr)
thorton: review+
Simon Fraser (smfr)
Comment 1 2020-09-04 14:39:35 PDT
Simon Fraser (smfr)
Comment 2 2020-09-04 14:39:37 PDT
Darin Adler
Comment 3 2020-09-04 17:01:50 PDT
Comment on attachment 408025 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408025&action=review > Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:124 > + if (auto* rootNode = this->rootNode()) > + return !rootNode->hasSynchronousScrollingReasons(); > + > + return true; Here’s how I would write this: auto rootNode = this->rootNode(); return !rootNode || !rootNode->hasSynchronousScrollingReasons(); I actually find this easier to reason about than the return-based one. Not sure others agree. Another option would be: auto rootNode = this->rootNode(); return rootNode && rootNode->hasSynchronousScrollingReasons(); A plus for using auto rather than auto* is that we can switch to returning RefPtr from rootNode if we want to for object lifetime safety without modifying this call site.
Simon Fraser (smfr)
Comment 4 2020-09-04 18:49:11 PDT
(In reply to Darin Adler from comment #3) > Comment on attachment 408025 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=408025&action=review > > > Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp:124 > > + if (auto* rootNode = this->rootNode()) > > + return !rootNode->hasSynchronousScrollingReasons(); > > + > > + return true; > > Here’s how I would write this: > > auto rootNode = this->rootNode(); > return !rootNode || !rootNode->hasSynchronousScrollingReasons(); > > I actually find this easier to reason about than the return-based one. Not > sure others agree. Another option would be: > > auto rootNode = this->rootNode(); > return rootNode && rootNode->hasSynchronousScrollingReasons(); I think you mean !(rootNode && rootNode->hasSynchronousScrollingReasons()); I tried both previous versions as I was writing the patch. > A plus for using auto rather than auto* is that we can switch to returning > RefPtr from rootNode if we want to for object lifetime safety without > modifying this call site. I'm not a fan of 'auto' hiding the fact that it's a pointer.
Simon Fraser (smfr)
Comment 5 2020-09-05 10:56:24 PDT
Note You need to log in before you can comment on or make changes to this bug.