mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 625561 - Flickering due to late application of external CSS when loaded/reloaded; inconsistent across browser windows [r=ian, a=blocking2.0:final+]
This commit is contained in:
parent
6b25650d0d
commit
52c2fb7b58
@ -1349,16 +1349,12 @@ TabCanvas.prototype = {
|
||||
// thumbnail canvas.
|
||||
_calculateClippingRect: function TabCanvas__calculateClippingRect(origWidth, origHeight) {
|
||||
let win = this.tab.linkedBrowser.contentWindow;
|
||||
let body = win.document.body;
|
||||
|
||||
// TODO BUG 631593: retrieve actual scrollbar width
|
||||
// 25px is supposed to be width of the vertical scrollbar
|
||||
let maxWidth = win.innerWidth - 25;
|
||||
let maxHeight = win.innerHeight;
|
||||
|
||||
if (body) {
|
||||
maxWidth = Math.max(maxWidth, body.scrollWidth - win.scrollX);
|
||||
maxHeight = Math.max(maxHeight, body.scrollHeight - win.scrollY);
|
||||
}
|
||||
|
||||
let height = Math.min(maxHeight, Math.floor(origHeight * maxWidth / origWidth));
|
||||
let width = Math.floor(origWidth * height / origHeight);
|
||||
|
||||
|
@ -39,9 +39,9 @@ function test() {
|
||||
let tests = [{
|
||||
url: 'data:text/html,' + html1,
|
||||
colors: [
|
||||
{right: [0, 0, 255], bottom: [255, 255, 255]},
|
||||
{right: [0, 0, 255], bottom: [255, 255, 255]},
|
||||
{right: [0, 0, 255], bottom: [255, 255, 255]}
|
||||
{right: [255, 255, 255], bottom: [255, 255, 255]},
|
||||
{right: [255, 255, 255], bottom: [255, 255, 255]},
|
||||
{right: [255, 255, 255], bottom: [255, 255, 255]}
|
||||
]
|
||||
}, {
|
||||
url: 'about:blank',
|
||||
@ -54,7 +54,7 @@ function test() {
|
||||
url: 'data:text/html,' + html2,
|
||||
colors: [
|
||||
{right: [0, 0, 255], bottom: [0, 0, 255]},
|
||||
{right: [0, 0, 255], bottom: [255, 255, 255]},
|
||||
{right: [0, 0, 255], bottom: [0, 0, 255]},
|
||||
{right: [0, 0, 255], bottom: [0, 0, 255]}
|
||||
]
|
||||
}];
|
||||
|
Loading…
Reference in New Issue
Block a user