зеркало из https://github.com/mozilla/gecko-dev.git
Bug 803327 - Provide window to viewportChanged in presenters. r=davidb
This commit is contained in:
Родитель
53bb206f98
Коммит
d749b432ac
|
@ -77,9 +77,17 @@ var EventManager = {
|
|||
case 'scroll':
|
||||
case 'resize':
|
||||
{
|
||||
// the target could be an element, document or window
|
||||
let window = null;
|
||||
if (aEvent.target instanceof Ci.nsIDOMWindow)
|
||||
window = aEvent.target;
|
||||
else if (aEvent.target instanceof Ci.nsIDOMDocument)
|
||||
window = aEvent.target.defaultView;
|
||||
else if (aEvent.target instanceof Ci.nsIDOMElement)
|
||||
window = aEvent.target.ownerDocument.defaultView;
|
||||
this.present(
|
||||
function(p) {
|
||||
return p.viewportChanged();;
|
||||
return p.viewportChanged(window);
|
||||
}
|
||||
);
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче