mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 618975 Mobile patch r=mfinkle a=blocking-fennec
This commit is contained in:
parent
83e118e1b7
commit
04b3e2145d
@ -301,11 +301,18 @@ let ContentScroll = {
|
||||
},
|
||||
|
||||
getScrollOffsetForElement: function(aElement) {
|
||||
return this.getScrollOffset(aElement.ownerDocument.defaultView);
|
||||
if (aElement.parentNode == aElement.ownerDocument)
|
||||
return this.getScrollOffset(aElement.ownerDocument.defaultView);
|
||||
return { x: aElement.scrollLeft, y: aElement.scrollTop };
|
||||
},
|
||||
|
||||
setScrollOffsetForElement: function(aElement, aLeft, aTop) {
|
||||
aElement.ownerDocument.defaultView.scrollTo(aLeft, aTop);
|
||||
if (aElement.parentNode == aElement.ownerDocument) {
|
||||
aElement.ownerDocument.defaultView.scrollTo(aLeft, aTop);
|
||||
} else {
|
||||
aElement.scrollLeft = aLeft;
|
||||
aElement.scrollTop = aTop;
|
||||
}
|
||||
},
|
||||
|
||||
receiveMessage: function(aMessage) {
|
||||
@ -347,7 +354,8 @@ let ContentScroll = {
|
||||
|
||||
let win = element.ownerDocument.defaultView;
|
||||
let winCwu = win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
winCwu.setDisplayPort(x, y, displayport.width, displayport.height);
|
||||
let winCwu20 = winCwu.QueryInterface(Ci.nsIDOMWindowUtils_MOZILLA_2_0_BRANCH);
|
||||
winCwu20.setDisplayPortForElement(x, y, displayport.width, displayport.height, element);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -419,7 +427,8 @@ let ContentActive = {
|
||||
case "Content:Deactivate":
|
||||
docShell.isActive = false;
|
||||
let cwu = content.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
cwu.setDisplayPort(0,0,0,0);
|
||||
let cwu20 = cwu.QueryInterface(Ci.nsIDOMWindowUtils_MOZILLA_2_0_BRANCH);
|
||||
cwu20.setDisplayPortForElement(0,0,0,0,content.document.documentElement);
|
||||
break;
|
||||
|
||||
case "Content:Activate":
|
||||
|
@ -950,7 +950,13 @@
|
||||
*/
|
||||
_updateCacheViewport: function() {
|
||||
// Do not update scroll values for content.
|
||||
this._sendDisplayportUpdate(-1, -1);
|
||||
if (this.isRoot())
|
||||
this._sendDisplayportUpdate(-1, -1);
|
||||
else {
|
||||
let contentView = this._contentView;
|
||||
this._sendDisplayportUpdate(contentView.scrollX,
|
||||
contentView.scrollY);
|
||||
}
|
||||
},
|
||||
|
||||
_getContentSize: function() {
|
||||
|
@ -1161,6 +1161,8 @@ Browser.MainDragger.prototype = {
|
||||
},
|
||||
|
||||
dragStop: function dragStop(dx, dy, scroller) {
|
||||
if (this._contentView && this._contentView._updateCacheViewport)
|
||||
this._contentView._updateCacheViewport();
|
||||
this._contentView = null;
|
||||
this.dragMove(Browser.snapSidebars(), 0, scroller);
|
||||
Browser.tryUnfloatToolbar();
|
||||
|
Loading…
Reference in New Issue
Block a user