Closed Bug 1604780 Opened 4 years ago Closed 4 years ago

[Win] Site previews are not shown in the main window when hovered from the taskbar pin

Categories

(Firefox :: General, defect, P2)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
Firefox 74
Tracking Status
firefox-esr68 --- unaffected
firefox71 --- unaffected
firefox72 --- wontfix
firefox73 --- verified
firefox74 --- verified

People

(Reporter: csasca, Assigned: Gijs)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image Window Preview.gif

Affected versions

  • Firefox 72.0b8
  • Firefox 73.0a1

Affected platforms

  • Windows 10
  • Windows 8.1
  • Windows 7

Steps to reproduce

  1. Launch Firefox and go to about:config
  2. Activate the "Show tabs previews in the Windows Taskbar" option
  3. Open at least 3 random tabs, each with a different website loaded
  4. Hover over the previews in the pinned Firefox icon in taskbar

Expected result

  • The websites are shown in the main window

Actual result

  • A loading windows circle will appear spinning indefinitely

Regression range

  • I will see for a regression, on 71.0 the issue is not present

Additional notes

  • 71.0 is not affected
  • Maybe this was added as a protection enhancement, and if this is the case, it would be helpful to integrate a message telling the user that the content cannot be shown in the preview.
  • The actual issue can be seen in the attachment.
Has Regression Range: --- → no
Has STR: --- → yes

The priority flag is not set for this bug.
:dao, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(dao+bmo)

Any luck with the regression range?

Flags: needinfo?(dao+bmo) → needinfo?(catalin.sasca)
Priority: -- → P2

Regression range for this bug appears to be last good build 2019-11-06, first broken build 2019-11-07. From mozregression:

Narrowed inbound regression window from [4bf64cf3, 144a647f] (3 builds) to [4bf64cf3, 0a356399] (2 builds) (~1 steps left)
2020-01-07T13:52:12: DEBUG : Starting merge handling...
2020-01-07T13:52:12: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=0a35639905ee2a469a9acf5e6538411501b36ccd&full=1
2020-01-07T13:52:14: DEBUG : Found commit message:
Bug 1591495 - Update thumbnail tests to use more modern primitives, like add_task. r=Gijs

Depends on D50851

Differential Revision: https://phabricator.services.mozilla.com/D50852

Flags: needinfo?(catalin.sasca)

(In reply to mpj.5 from comment #3)

Regression range for this bug appears to be last good build 2019-11-06, first broken build 2019-11-07. From mozregression:

Narrowed inbound regression window from [4bf64cf3, 144a647f] (3 builds) to [4bf64cf3, 0a356399] (2 builds) (~1 steps left)
2020-01-07T13:52:12: DEBUG : Starting merge handling...
2020-01-07T13:52:12: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=0a35639905ee2a469a9acf5e6538411501b36ccd&full=1
2020-01-07T13:52:14: DEBUG : Found commit message:
Bug 1591495 - Update thumbnail tests to use more modern primitives, like add_task. r=Gijs

Depends on D50851

Differential Revision: https://phabricator.services.mozilla.com/D50852

That patch only touched tests so it doesn't seem possible for that to have caused this bug.

Flags: needinfo?(catalin.sasca)

(In reply to Dão Gottwald [::dao] from comment #4)

Differential Revision: https://phabricator.services.mozilla.com/D50852

That patch only touched tests so it doesn't seem possible for that to have caused this bug.

Bug 1576911 appears to have landed along with this so I'm guessing that's the culprit.

Component: Tabbed Browser → General
Flags: needinfo?(me)
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(catalin.sasca)
Regressed by: 1576911

Still digging. Two errors appear in the browser console when doing this:

IndexSizeError: Index or size is negative or greater than the allowed amount PageThumbs.jsm:259:27
_captureToCanvas resource://gre/modules/PageThumbs.jsm:259
InterpretGeneratorResume self-hosted:1157
AsyncFunctionNext self-hosted:696
(Async: async)
captureToCanvas resource://gre/modules/PageThumbs.jsm:203
updateCanvasPreview resource:///modules/WindowsPreviewPerTab.jsm:243
requestPreview resource:///modules/WindowsPreviewPerTab.jsm:295

and

TypeError: aPreviewCanvas is undefined - WindowsPreviewPerTab.jsm:322:1

I have a fix.

Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Flags: needinfo?(me)
Flags: needinfo?(gijskruitbosch+bugs)

In WindowsPreviewPerTab, requestPreview calls resetCanvasPreview and then updateCanvasPreview.
https://searchfox.org/mozilla-central/rev/a92ed79b0bc746159fc31af1586adbfa9e45e264/browser/modules/WindowsPreviewPerTab.jsm#294-295

The former sets the preview canvas' size to 0x0. In updateCanvasPreview, we then ask to captureToCanvas,
and we end up in _captureRemoteThumbnail, which uses the passed aWidth and aHeight to size the destination
canvas. Unfortunately, those are 0. We should ignore this size when the fullScale argument is passed, and
in that case just use the content width and height directly instead.

Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9f9b97aaa0f6
fix full size thumbnail functionality so we don't draw a 0x0 canvas, r=dao
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74

Please nominate this for Beta approval when you get a chance.

Flags: qe-verify+
Flags: needinfo?(gijskruitbosch+bugs)

Comment on attachment 9119273 [details]
Bug 1604780 - fix full size thumbnail functionality so we don't draw a 0x0 canvas, r?mconley

Beta/Release Uplift Approval Request

  • User impact if declined: Broken thumbnailing
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: n/a
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Straightforward fix to an edgecase in how one of the thumbnail APIs was called - plus it's early in beta still.
  • String changes made/needed: Nope
Flags: needinfo?(gijskruitbosch+bugs)
Attachment #9119273 - Flags: approval-mozilla-beta?

Managed to reproduce the issue on an affected build (Firefox 72.0a1 (2019-11-07)), using the steps to reproduce from Comment 0, on Windows 10.

The issue is no longer reproducible on Firefox 74.0a1 (2020-01-08).

QA Whiteboard: [qa-triaged]

Comment on attachment 9119273 [details]
Bug 1604780 - fix full size thumbnail functionality so we don't draw a 0x0 canvas, r?mconley

Windows thumbnail fix. Approved for 73.0b3.

Attachment #9119273 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

The issue is no longer reproducible on Firefox 73.0b3 and 74.0a1 (2020-01-09) under Windows 10 and 8.1.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Regressions: 1612030
No longer regressions: 1612030
You need to log in before you can comment on or make changes to this bug.