зеркало из https://github.com/mozilla/gecko-dev.git
Bug 605668 - Page offset to the left after two-Finger page-up/down gesture on a zoomed-in right side of the page [r=mbrubeck]
This commit is contained in:
Родитель
ec97a6079e
Коммит
2cf2d8691b
|
@ -476,14 +476,24 @@ var Browser = {
|
||||||
return this._tabs.map(function(tab) { return tab.browser; });
|
return this._tabs.map(function(tab) { return tab.browser; });
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollContentToTop: function scrollContentToTop() {
|
scrollContentToTop: function scrollContentToTop(aOptions) {
|
||||||
this.contentScrollboxScroller.scrollTo(0, 0);
|
let x = {}, y = {};
|
||||||
|
this.contentScrollboxScroller.getPosition(x, y);
|
||||||
|
if (aOptions)
|
||||||
|
x.value = ("x" in aOptions ? aOptions.x : x.value);
|
||||||
|
|
||||||
|
this.contentScrollboxScroller.scrollTo(x.value, 0);
|
||||||
this.pageScrollboxScroller.scrollTo(0, 0);
|
this.pageScrollboxScroller.scrollTo(0, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
// cmd_scrollBottom does not work in Fennec (Bug 590535).
|
// cmd_scrollBottom does not work in Fennec (Bug 590535).
|
||||||
scrollContentToBottom: function scrollContentToBottom() {
|
scrollContentToBottom: function scrollContentToBottom(aOptions) {
|
||||||
this.contentScrollboxScroller.scrollTo(0, Number.MAX_VALUE);
|
let x = {}, y = {};
|
||||||
|
this.contentScrollboxScroller.getPosition(x, y);
|
||||||
|
if (aOptions)
|
||||||
|
x.value = ("x" in aOptions ? aOptions.x : x.value);
|
||||||
|
|
||||||
|
this.contentScrollboxScroller.scrollTo(x.value, Number.MAX_VALUE);
|
||||||
this.pageScrollboxScroller.scrollTo(0, Number.MAX_VALUE);
|
this.pageScrollboxScroller.scrollTo(0, Number.MAX_VALUE);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2318,7 +2328,7 @@ ProgressController.prototype = {
|
||||||
// We're about to have new page content, so scroll the content area
|
// We're about to have new page content, so scroll the content area
|
||||||
// to the top so the new paints will draw correctly.
|
// to the top so the new paints will draw correctly.
|
||||||
// (background tabs are delayed scrolled to top in _documentStop)
|
// (background tabs are delayed scrolled to top in _documentStop)
|
||||||
Browser.scrollContentToTop();
|
Browser.scrollContentToTop({ x: 0 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче