All overflow/scroll related functionality should be moved out of RenderLayer, to cleanup and simplify the layer code. This allows to optimize for the case where a layer is not scrollable: we no longer have to keep track of many scrolling related conditions/variables and save a good amount of memory per layer. Plan: 1) Introduce RenderLayerScrollableArea inheriting from ScrollableArea, with a back-reference to RenderLayer -- that mimics the design of RenderLayerFilters. 2) RenderLayer no longer needs to inherit from ScrollableArea, instead it stores a RenderLayerScrollableArea object. 3) Move all overflow/scroll/marquee/resize/... handling from RenderLayer to RenderLayerScrollableArea 4) Only create RenderLayerScrollableArea objects if necessary! This requires heavy testing of the regular and composited code paths, which I had to perform in the past weeks. -- This ticket adds a RenderLayerScrollableArea stub implementation and adds it to all build systems.
Created attachment 416061 [details] Patch
Created attachment 416067 [details] Patch
Comment on attachment 416067 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416067&action=review > Source/WebCore/rendering/RenderLayerScrollableArea.cpp:19 > + * of either the Mozilla Public License Version 1.1, found at This is a pretty odd license for WebKit, is it intentional? We tend to prefer BSD-2; https://webkit.org/licensing-webkit/ mentions the LGPL, and there is some LGPL code, but not sure about this MPL bit. I would check with someone to make sure this is right!
(In reply to Tim Horton from comment #3) > Comment on attachment 416067 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416067&action=review > > > Source/WebCore/rendering/RenderLayerScrollableArea.cpp:19 > > + * of either the Mozilla Public License Version 1.1, found at > > This is a pretty odd license for WebKit, is it intentional? We tend to > prefer BSD-2; https://webkit.org/licensing-webkit/ mentions the LGPL, and > there is some LGPL code, but not sure about this MPL bit. I would check with > someone to make sure this is right! I copy & pasted the license from RenderLayer, since RenderLayerScrollableArea will contain moved code from RenderLayer mostly, with slight adaptions (s/this/m_layer/). I assumed that I would need to preserve the original license, no? I'm not an expert on this topic, please enlighten me if that's incorrect.
(In reply to Nikolas Zimmermann from comment #4) > (In reply to Tim Horton from comment #3) > > Comment on attachment 416067 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=416067&action=review > > > > > Source/WebCore/rendering/RenderLayerScrollableArea.cpp:19 > > > + * of either the Mozilla Public License Version 1.1, found at > > > > This is a pretty odd license for WebKit, is it intentional? We tend to > > prefer BSD-2; https://webkit.org/licensing-webkit/ mentions the LGPL, and > > there is some LGPL code, but not sure about this MPL bit. I would check with > > someone to make sure this is right! > > I copy & pasted the license from RenderLayer, since > RenderLayerScrollableArea will contain moved code from RenderLayer mostly, > with slight adaptions (s/this/m_layer/). > > I assumed that I would need to preserve the original license, no? > I'm not an expert on this topic, please enlighten me if that's incorrect. Ah! In that case I think you probably want to pull the full copyright header along too.
(In reply to Tim Horton from comment #5) > Ah! In that case I think you probably want to pull the full copyright header > along too. Fair enough, will include that in the next variant -- this doesn't build with clang atm anyhow :-)
Created attachment 416108 [details] Patch
<rdar://problem/72484180>
Comment on attachment 416108 [details] Patch Clearing flags on attachment: 416108 Committed r271111: <https://trac.webkit.org/changeset/271111>
All reviewed patches have been landed. Closing bug.