Fix crash when scrolling to the bottom of an iframe with --root-layer-scrolls
This commit is contained in:
parent
f5be340d57
commit
90ba67d8ea
|
@ -251,4 +251,11 @@ patches = [
|
||||||
'name': 'render_view_host_impl_1392',
|
'name': 'render_view_host_impl_1392',
|
||||||
'path': '../content/browser/renderer_host/',
|
'path': '../content/browser/renderer_host/',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Fix crash when scrolling to the bottom of an iframe with
|
||||||
|
# --root-layer-scrolls
|
||||||
|
# https://codereview.chromium.org/2150153002
|
||||||
|
'name': 'viewport_2150153002',
|
||||||
|
'path': '../',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git cc/layers/viewport.cc cc/layers/viewport.cc
|
||||||
|
index d80d40c..30984592 100644
|
||||||
|
--- cc/layers/viewport.cc
|
||||||
|
+++ cc/layers/viewport.cc
|
||||||
|
@@ -36,6 +36,9 @@ Viewport::ScrollResult Viewport::ScrollBy(const gfx::Vector2dF& delta,
|
||||||
|
const gfx::Point& viewport_point,
|
||||||
|
bool is_direct_manipulation,
|
||||||
|
bool affect_top_controls) {
|
||||||
|
+ if (!OuterScrollLayer())
|
||||||
|
+ return ScrollResult();
|
||||||
|
+
|
||||||
|
gfx::Vector2dF content_delta = delta;
|
||||||
|
|
||||||
|
if (affect_top_controls && ShouldTopControlsConsumeScroll(delta))
|
||||||
|
@@ -74,6 +77,9 @@ bool Viewport::ShouldAnimateViewport(const gfx::Vector2dF& viewport_delta,
|
||||||
|
}
|
||||||
|
|
||||||
|
gfx::Vector2dF Viewport::ScrollAnimated(const gfx::Vector2dF& delta) {
|
||||||
|
+ if (!OuterScrollLayer())
|
||||||
|
+ return gfx::Vector2dF(0, 0);
|
||||||
|
+
|
||||||
|
ScrollTree& scroll_tree =
|
||||||
|
host_impl_->active_tree()->property_trees()->scroll_tree;
|
||||||
|
|
Loading…
Reference in New Issue