mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 511982: handle pages scrolling themselves by causing the appropriate redraw (fixes acid2), r=froystig
This commit is contained in:
parent
cb16e9bd73
commit
c8a00b5633
@ -391,6 +391,7 @@ BrowserView.prototype = {
|
||||
|
||||
if (currentBrowser) {
|
||||
currentBrowser.removeEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
|
||||
currentBrowser.removeEventListener("scroll", this.handlePageScroll, false);
|
||||
|
||||
// !!! --- RESIZE HACK BEGIN -----
|
||||
// change to the real event type and perhaps refactor the handler function name
|
||||
@ -411,6 +412,7 @@ BrowserView.prototype = {
|
||||
this.beginBatchOperation();
|
||||
|
||||
browser.addEventListener("MozAfterPaint", this.handleMozAfterPaint, false);
|
||||
browser.addEventListener("scroll", this.handlePageScroll, false);
|
||||
|
||||
// !!! --- RESIZE HACK BEGIN -----
|
||||
// change to the real event type and perhaps refactor the handler function name
|
||||
@ -463,6 +465,16 @@ BrowserView.prototype = {
|
||||
tm.dirtyRects(rects, this.isRendering());
|
||||
},
|
||||
|
||||
handlePageScroll: function handlePageScroll(aEvent) {
|
||||
if (aEvent.target != this._browser.contentDocument)
|
||||
return;
|
||||
|
||||
let [scrollX, scrollY] = BrowserView.Util.getContentScrollValues(this._browser);
|
||||
Browser.contentScrollboxScroller.scrollTo(this.browserToViewport(scrollX),
|
||||
this.browserToViewport(scrollY));
|
||||
this.onAfterVisibleMove();
|
||||
},
|
||||
|
||||
// !!! --- RESIZE HACK BEGIN -----
|
||||
simulateMozAfterSizeChange: function simulateMozAfterSizeChange() {
|
||||
let [w, h] = BrowserView.Util.getBrowserDimensions(this._browser);
|
||||
|
Loading…
Reference in New Issue
Block a user