Changeset 239150 in webkit


Ignore:
Timestamp:
Dec 12, 2018 8:46:25 PM (5 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r238090): CAPCHA UI jumps to the wrong location
https://bugs.webkit.org/show_bug.cgi?id=192651
rdar://problem/46531919

Reviewed by Zalan Bujtas.

Source/WebCore:

When a RenderLayer becomes non-composited because of a style change, we need to set a dirty
bit to say that descendants need their geometry updated (because they now have to
compute their positions relative to a different ancestor). This wasn't happening
in the layerStyleChanged() code path.

In the code path that did do this correctly (in the computeCompositingRequirements() tree walk),
we can address a FIXME and only dirty direct children, not all descendants (that code was
written before the child-only dirty bit existed).

Test: compositing/geometry/update-child-geometry-on-compositing-change.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::computeCompositingRequirements):
(WebCore::RenderLayerCompositor::layerStyleChanged):

LayoutTests:

Testcase that makes an intermediate layer non-composited (but still a RenderLayer).

  • compositing/geometry/update-child-geometry-on-compositing-change-expected.html: Added.
  • compositing/geometry/update-child-geometry-on-compositing-change.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r239149 r239150  
     12018-12-12  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r238090): CAPCHA UI jumps to the wrong location
     4        https://bugs.webkit.org/show_bug.cgi?id=192651
     5        rdar://problem/46531919
     6
     7        Reviewed by Zalan Bujtas.
     8       
     9        Testcase that makes an intermediate layer non-composited (but still a RenderLayer).
     10
     11        * compositing/geometry/update-child-geometry-on-compositing-change-expected.html: Added.
     12        * compositing/geometry/update-child-geometry-on-compositing-change.html: Added.
     13
    1142018-12-12  Ryosuke Niwa  <rniwa@webkit.org>
    215
  • trunk/Source/WebCore/ChangeLog

    r239149 r239150  
     12018-12-12  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r238090): CAPCHA UI jumps to the wrong location
     4        https://bugs.webkit.org/show_bug.cgi?id=192651
     5        rdar://problem/46531919
     6
     7        Reviewed by Zalan Bujtas.
     8       
     9        When a RenderLayer becomes non-composited because of a style change, we need to set a dirty
     10        bit to say that descendants need their geometry updated (because they now have to
     11        compute their positions relative to a different ancestor). This wasn't happening
     12        in the layerStyleChanged() code path.
     13       
     14        In the code path that did do this correctly (in the computeCompositingRequirements() tree walk),
     15        we can address a FIXME and only dirty direct children, not all descendants (that code was
     16        written before the child-only dirty bit existed).
     17
     18        Test: compositing/geometry/update-child-geometry-on-compositing-change.html
     19
     20        * rendering/RenderLayerCompositor.cpp:
     21        (WebCore::RenderLayerCompositor::computeCompositingRequirements):
     22        (WebCore::RenderLayerCompositor::layerStyleChanged):
     23
    1242018-12-13  Ryosuke Niwa  <rniwa@webkit.org>
    225
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r239146 r239150  
    987987    if (updateBacking(layer, queryData, CompositingChangeRepaintNow, willBeComposited ? BackingRequired::Yes : BackingRequired::No)) {
    988988        layer.setNeedsCompositingLayerConnection();
    989         // Child layers need to get a geometry update to recompute their position. FIXME: Ideally we'd only dirty direct children.
    990         layer.setDescendantsNeedUpdateBackingAndHierarchyTraversal();
     989        // Child layers need to get a geometry update to recompute their position.
     990        layer.setChildrenNeedCompositingGeometryUpdate();
    991991        // The composited bounds of enclosing layers depends on which descendants are composited, so they need a geometry update.
    992992        layer.setNeedsCompositingGeometryUpdateOnAncestors();
     
    13801380    bool layerChanged = updateBacking(layer, queryData, CompositingChangeRepaintNow);
    13811381    if (layerChanged) {
     1382        layer.setChildrenNeedCompositingGeometryUpdate();
    13821383        layer.setNeedsCompositingLayerConnection();
    13831384        layer.setSubsequentLayersNeedCompositingRequirementsTraversal();
Note: See TracChangeset for help on using the changeset viewer.