mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 476729: Calculate a viewing rect relative to the canvas
This commit is contained in:
parent
62b48b4f47
commit
9fdc0f3080
@ -229,7 +229,7 @@ CanvasBrowser.prototype = {
|
||||
|
||||
viewportHandler: function(bounds, boundsSizeChanged) {
|
||||
let pageBounds = bounds.clone();
|
||||
let visibleBounds = ws.viewingRect;
|
||||
let visibleBounds = ws.viewportVisibleRect;
|
||||
pageBounds.top = Math.floor(this._screenToPage(bounds.top));
|
||||
pageBounds.left = Math.floor(this._screenToPage(bounds.left));
|
||||
pageBounds.bottom = Math.ceil(this._screenToPage(bounds.bottom));
|
||||
|
@ -469,8 +469,9 @@ WidgetStack.prototype = {
|
||||
state.widget.setAttribute("top", y);
|
||||
},
|
||||
|
||||
get viewingRect() {
|
||||
return this._viewingRect.clone();
|
||||
// we're relying on viewportBounds and viewingRect having the same origin
|
||||
get viewportVisibleRect () {
|
||||
return this._viewportBounds.intersect(this._viewingRect)
|
||||
},
|
||||
|
||||
// isWidgetVisible: return true if any portion of widget with id wid is
|
||||
|
Loading…
Reference in New Issue
Block a user