mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1163259. Make sure we don't look at the parent ref layer when looking for a layer with the frame metrics for a scrollbar. r=kats
The ref layer comes from the parent process, and hence a different scrollid space. If the scrollid on it's metrics happen to match a scrollbar from the child process we have a problem.
This commit is contained in:
parent
0080559c75
commit
943736bd0c
@ -881,14 +881,15 @@ FindScrolledLayerForScrollbar(Layer* aScrollbar, bool* aOutIsAncestor)
|
||||
{
|
||||
// First check if the scrolled layer is an ancestor of the scrollbar layer.
|
||||
LayerMetricsWrapper root(aScrollbar->Manager()->GetRoot());
|
||||
LayerMetricsWrapper scrollbar(aScrollbar);
|
||||
LayerMetricsWrapper prevAncestor(aScrollbar);
|
||||
for (LayerMetricsWrapper ancestor(aScrollbar); ancestor; ancestor = ancestor.GetParent()) {
|
||||
// Don't walk into remote layer trees; the scrollbar will always be in
|
||||
// the same layer space.
|
||||
if (ancestor.AsRefLayer()) {
|
||||
root = ancestor;
|
||||
root = prevAncestor;
|
||||
break;
|
||||
}
|
||||
prevAncestor = ancestor;
|
||||
|
||||
if (LayerIsScrollbarTarget(ancestor, aScrollbar)) {
|
||||
*aOutIsAncestor = true;
|
||||
|
Loading…
Reference in New Issue
Block a user