WebKit Bugzilla
Attachment 357201 Details for
Bug 192651
: REGRESSION (r238090): CAPCHA UI jumps to the wrong location
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192651-20181212190030.patch (text/plain), 7.08 KB, created by
Simon Fraser (smfr)
on 2018-12-12 19:00:31 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-12-12 19:00:31 PST
Size:
7.08 KB
patch
obsolete
>Subversion Revision: 239042 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 1105081b9ac3b1ba3865c34d41c8f52b5dcebfbe..8597bb010fdc15dfe3b85b97f2c9ef18f22b948a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,26 @@ >+2018-12-12 Simon Fraser <simon.fraser@apple.com> >+ >+ REGRESSION (r238090): CAPCHA UI jumps to the wrong location >+ https://bugs.webkit.org/show_bug.cgi?id=192651 >+ rdar://problem/46531919 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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): >+ > 2018-12-10 Simon Fraser <simon.fraser@apple.com> > > Allow control over child order when adding nodes to the scrolling tree >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index 77b0120fbaed32236d03f7e858dcd7819fda505e..40a12e0a49c89d94d257da14b018f5504e042dca 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -986,8 +986,8 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor > // during post-order traversal (e.g. for clipping). > if (updateBacking(layer, queryData, CompositingChangeRepaintNow, willBeComposited ? BackingRequired::Yes : BackingRequired::No)) { > layer.setNeedsCompositingLayerConnection(); >- // Child layers need to get a geometry update to recompute their position. FIXME: Ideally we'd only dirty direct children. >- layer.setDescendantsNeedUpdateBackingAndHierarchyTraversal(); >+ // Child layers need to get a geometry update to recompute their position. >+ layer.setChildrenNeedCompositingGeometryUpdate(); > // The composited bounds of enclosing layers depends on which descendants are composited, so they need a geometry update. > layer.setNeedsCompositingGeometryUpdateOnAncestors(); > } >@@ -1377,6 +1377,7 @@ void RenderLayerCompositor::layerStyleChanged(StyleDifference diff, RenderLayer& > > bool layerChanged = updateBacking(layer, queryData, CompositingChangeRepaintNow); > if (layerChanged) { >+ layer.setChildrenNeedCompositingGeometryUpdate(); > layer.setNeedsCompositingLayerConnection(); > layer.setSubsequentLayersNeedCompositingRequirementsTraversal(); > // Ancestor layers that composited for indirect reasons (things listed in styleChangeMayAffectIndirectCompositingReasons()) need to get updated. >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 73e014f5feb9243020ca9d565f1b95f071244041..7da981f63e64a227e0111a32fee6627e87736d10 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-12 Simon Fraser <simon.fraser@apple.com> >+ >+ REGRESSION (r238090): CAPCHA UI jumps to the wrong location >+ https://bugs.webkit.org/show_bug.cgi?id=192651 >+ rdar://problem/46531919 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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. >+ > 2018-12-10 Rob Buis <rbuis@igalia.com> > > XMLHttpRequest removes spaces from content-types before processing >diff --git a/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html b/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..829566483067d2830eaaf22ad049d7e8da54882b >--- /dev/null >+++ b/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change-expected.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ .container { >+ position: relative; >+ margin: 20px; >+ width: 300px; >+ height: 300px; >+ border: 1px solid black; >+ } >+ .box { >+ position: absolute; >+ left: 50px; >+ top: 50px; >+ z-index: 0; >+ width: 200px; >+ height: 200px; >+ } >+ .middle { >+ background-color: red; >+ } >+ .child { >+ background-color: green; >+ top: 0; >+ left: 0; >+ } >+ .composited { >+ transform: translateZ(0); >+ } >+ </style> >+</head> >+<body> >+ <div class="composited container"> >+ <div id="target" class="middle box"> >+ <div class="child composited box"></div> >+ </div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html b/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f327e2e971fd28e0014ea2ec62e6cfed794b6859 >--- /dev/null >+++ b/LayoutTests/compositing/geometry/update-child-geometry-on-compositing-change.html >@@ -0,0 +1,52 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ .container { >+ position: relative; >+ margin: 20px; >+ width: 300px; >+ height: 300px; >+ border: 1px solid black; >+ } >+ .box { >+ position: absolute; >+ left: 50px; >+ top: 50px; >+ z-index: 0; >+ width: 200px; >+ height: 200px; >+ } >+ .middle { >+ background-color: red; >+ } >+ .child { >+ background-color: green; >+ top: 0; >+ left: 0; >+ } >+ .composited { >+ transform: translateZ(0); >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', () => { >+ requestAnimationFrame(() => { >+ document.getElementById('target').classList.remove('composited'); >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="composited container"> >+ <div id="target" class="middle composited box"> >+ <div class="child composited box"></div> >+ </div> >+ </div> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192651
: 357201