Skip to content

Commit

Permalink
don't show tab preview thumbnail placeholder when thumbnails are disa…
Browse files Browse the repository at this point in the history
…bled. r=tabbrowser-reviewers,dao
  • Loading branch information
Ponchale committed Dec 28, 2024
1 parent 6a7ed72 commit 4dcce58
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browser/components/tabbrowser/content/tab-hover-preview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,18 @@ export default class TabHoverPreviewPanel {

_hasValidThumbnailState(tab) {
return (
tab && tab.linkedBrowser && !tab.getAttribute("pending") && !tab.selected
this._prefDisplayThumbnail &&
tab &&
tab.linkedBrowser &&
!tab.getAttribute("pending") &&
!tab.selected
);
}

_maybeRequestThumbnail() {
let tab = this._tab;

if (!this._prefDisplayThumbnail || !this._hasValidThumbnailState(tab)) {
if (!this._hasValidThumbnailState(tab)) {
return;
}
let thumbnailCanvas = this._win.document.createElement("canvas");
Expand Down

0 comments on commit 4dcce58

Please sign in to comment.