mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
# User Timothy Guan-tin Chien <timdream@gmail.com>
Bug 780487 - [b2g] All |oveflow:hidden| became scrollable, r=roc
This commit is contained in:
parent
0dd87e66bc
commit
e89f951213
@ -117,12 +117,26 @@ const ContentPanning = {
|
||||
|
||||
let nodeContent = node.ownerDocument.defaultView;
|
||||
while (!(node instanceof Ci.nsIDOMHTMLBodyElement)) {
|
||||
if (node.scrollHeight > node.clientHeight ||
|
||||
node.scrollWidth > node.clientWidth ||
|
||||
('scrollLeftMax' in node && node.scrollLeftMax > 0) ||
|
||||
('scrollTopMax' in node && node.scrollTopMax > 0)) {
|
||||
let style = nodeContent.getComputedStyle(node, null);
|
||||
|
||||
let overflow = [style.getPropertyValue('overflow'),
|
||||
style.getPropertyValue('overflow-x'),
|
||||
style.getPropertyValue('overflow-y')];
|
||||
|
||||
let rect = node.getBoundingClientRect();
|
||||
let isAuto = (overflow.indexOf('auto') != -1 &&
|
||||
(rect.height < node.scrollHeight ||
|
||||
rect.width < node.scrollWidth));
|
||||
|
||||
let isScroll = (overflow.indexOf('scroll') != -1);
|
||||
|
||||
let isScrollableTextarea = (node.tagName == 'TEXTAREA' &&
|
||||
(node.scrollHeight > node.clientHeight ||
|
||||
node.scrollWidth > node.clientWidth ||
|
||||
('scrollLeftMax' in node && node.scrollLeftMax > 0) ||
|
||||
('scrollTopMax' in node && node.scrollTopMax > 0)));
|
||||
if (isScroll || isAuto || isScrollableTextarea)
|
||||
return [node, this._generateCallback(node)];
|
||||
}
|
||||
|
||||
node = node.parentNode;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user