зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1684689 - Fix usage of createImageData in devtools. r=jdescottes
This fixes the DAMP failures and effectively preserves behavior. Differential Revision: https://phabricator.services.mozilla.com/D100623
This commit is contained in:
Родитель
df5f73e1b8
Коммит
1903289616
|
@ -59,8 +59,10 @@ class WaterfallBackground {
|
|||
}
|
||||
|
||||
// Nuke the context.
|
||||
const canvasWidth = (this.canvas.width =
|
||||
state.waterfallWidth - REQUESTS_WATERFALL.LABEL_WIDTH);
|
||||
const canvasWidth = (this.canvas.width = Math.max(
|
||||
state.waterfallWidth - REQUESTS_WATERFALL.LABEL_WIDTH,
|
||||
1
|
||||
));
|
||||
// Awww yeah, 1px, repeats on Y axis.
|
||||
const canvasHeight = (this.canvas.height = 1);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ function drawWaterfallBackground(doc, dataScale, waterfallWidth) {
|
|||
const ctx = canvas.getContext("2d");
|
||||
|
||||
// Nuke the context.
|
||||
const canvasWidth = (canvas.width = waterfallWidth);
|
||||
const canvasWidth = (canvas.width = Math.max(waterfallWidth, 1));
|
||||
// Awww yeah, 1px, repeats on Y axis.
|
||||
const canvasHeight = (canvas.height = 1);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче