зеркало из https://github.com/mozilla/gecko-dev.git
Bug 754637 - Don't zoom in to list items or blockquotes on double-tap [r=mfinkle]
This commit is contained in:
Родитель
790701eabc
Коммит
12fd04ad22
|
@ -2680,8 +2680,7 @@ var BrowserEventHandler = {
|
|||
return;
|
||||
}
|
||||
|
||||
win = element.ownerDocument.defaultView;
|
||||
while (element && win.getComputedStyle(element,null).display == "inline")
|
||||
while (element && !this._shouldZoomToElement(element))
|
||||
element = element.parentNode;
|
||||
|
||||
if (!element) {
|
||||
|
@ -2725,6 +2724,17 @@ var BrowserEventHandler = {
|
|||
}
|
||||
},
|
||||
|
||||
_shouldZoomToElement: function(aElement) {
|
||||
let win = aElement.ownerDocument.defaultView;
|
||||
if (win.getComputedStyle(aElement, null).display == "inline")
|
||||
return false;
|
||||
if (aElement instanceof Ci.nsIDOMHTMLLIElement)
|
||||
return false;
|
||||
if (aElement instanceof Ci.nsIDOMHTMLQuoteElement)
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
|
||||
_firstScrollEvent: false,
|
||||
|
||||
_scrollableElement: null,
|
||||
|
|
Загрузка…
Ссылка в новой задаче