Changeset 265133 in webkit


Ignore:
Timestamp:
Jul 30, 2020 11:05:29 PM (4 years ago)
Author:
Simon Fraser
Message:

Minor RenderLayerCompositor::updateBackingAndHierarchy() cleanup
https://bugs.webkit.org/show_bug.cgi?id=215008

Reviewed by Zalan Bujtas.

Instead of setting child layers, and then adding another child (overflowControlLayer),
append overflowControlLayer to the vector and then set children.

No behavior change.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r265129 r265133  
     12020-07-30  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Minor RenderLayerCompositor::updateBackingAndHierarchy() cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=215008
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Instead of setting child layers, and then adding another child (overflowControlLayer),
     9        append overflowControlLayer to the vector and then set children.
     10
     11        No behavior change.
     12
     13        * rendering/RenderLayerCompositor.cpp:
     14        (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
     15
    1162020-07-30  Sam Weinig  <weinig@apple.com>
    217
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r263762 r265133  
    13551355                parented = parentFrameContentLayers(downcast<RenderWidget>(layer.renderer()));
    13561356
    1357             if (!parented)
     1357            if (!parented) {
     1358                // If the layer has a clipping layer the overflow controls layers will be siblings of the clipping layer.
     1359                // Otherwise, the overflow control layers are normal children.
     1360                if (!layerBacking->hasClippingLayer() && !layerBacking->hasScrollingLayer()) {
     1361                    if (auto* overflowControlLayer = layerBacking->overflowControlsContainer())
     1362                        layerChildren.append(*overflowControlLayer);
     1363                }
     1364
    13581365                layerBacking->parentForSublayers()->setChildren(WTFMove(layerChildren));
    1359 
    1360             // If the layer has a clipping layer the overflow controls layers will be siblings of the clipping layer.
    1361             // Otherwise, the overflow control layers are normal children.
    1362             if (!layerBacking->hasClippingLayer() && !layerBacking->hasScrollingLayer()) {
    1363                 if (auto* overflowControlLayer = layerBacking->overflowControlsContainer())
    1364                     layerBacking->parentForSublayers()->addChild(*overflowControlLayer);
    13651366            }
    13661367        }
Note: See TracChangeset for help on using the changeset viewer.