mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 824472 - Traverse containing frames when looking for scrollable content for browser elements. r=schien
This commit is contained in:
parent
122785b394
commit
d9e184597f
@ -338,6 +338,10 @@ const ContentPanning = {
|
||||
return nodeContent;
|
||||
}
|
||||
|
||||
if (nodeContent.frameElement) {
|
||||
return this._findPannable(nodeContent.frameElement);
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
@ -383,9 +387,19 @@ const ContentPanning = {
|
||||
return false;
|
||||
};
|
||||
|
||||
function targetParent(node) {
|
||||
if (node.parentNode) {
|
||||
return node.parentNode;
|
||||
}
|
||||
if (node.frameElement) {
|
||||
return node.frameElement;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function scroll(delta) {
|
||||
for (target = content; target;
|
||||
target = ContentPanning._findPannable(target.parentNode)) {
|
||||
target = ContentPanning._findPannable(targetParent(target))) {
|
||||
isScrolling = doScroll(target, delta);
|
||||
if (isScrolling || !firstScroll) {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user