mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868742 - Use scroll(Left|Top)Max to detect scrollable elements. r=mfinkle
This commit is contained in:
parent
0ddc1881c1
commit
84bb4e09a9
@ -4388,8 +4388,7 @@ var BrowserEventHandler = {
|
||||
* - It's a select element showing multiple rows
|
||||
*/
|
||||
if (checkElem) {
|
||||
if (((elem.scrollHeight > elem.clientHeight) ||
|
||||
(elem.scrollWidth > elem.clientWidth)) &&
|
||||
if ((elem.scrollTopMax > 0 || elem.scrollLeftMax > 0) &&
|
||||
(this._hasScrollableOverflow(elem) ||
|
||||
elem.mozMatchesSelector("html, body, textarea")) ||
|
||||
(elem instanceof HTMLSelectElement && (elem.size > 1 || elem.multiple))) {
|
||||
@ -4420,10 +4419,10 @@ var BrowserEventHandler = {
|
||||
|
||||
_elementCanScroll: function(elem, x, y) {
|
||||
let scrollX = (x < 0 && elem.scrollLeft > 0)
|
||||
|| (x > 0 && elem.scrollLeft < (elem.scrollWidth - elem.clientWidth));
|
||||
|| (x > 0 && elem.scrollLeft < elem.scrollLeftMax);
|
||||
|
||||
let scrollY = (y < 0 && elem.scrollTop > 0)
|
||||
|| (y > 0 && elem.scrollTop < (elem.scrollHeight - elem.clientHeight));
|
||||
|| (y > 0 && elem.scrollTop < elem.scrollTopMax);
|
||||
|
||||
return scrollX || scrollY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user