Set as Desktop Background (wallpaper) gets zoomed (scaled) image dimensions instead of real ones

VERIFIED FIXED in Firefox 3 alpha1

Status

()

Firefox
General
--
minor
VERIFIED FIXED
14 years ago
10 years ago

People

(Reporter: Carlo 'Carcarlo' Carmagnini, Assigned: Adam Guthrie)

Tracking

({fixed1.8.1})

Trunk
Firefox 3 alpha1
fixed1.8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10
Build Identifier: Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10

Having set monitor to resolution 1024x768 (for example), opening a 1024x768
image with the option "resize large images to fit in the browser window"
enabled, makes Set As Wallpaper believing that image is smaller than it is.
The "Set As Wallpaper" function works right, the only problem is in the preview
window.

Reproducible: Always
Steps to Reproduce:
1. Set 1024x768 as your resolution (it's not related to the bug but only to make
this example work)
2. check Firefox preferences, the option "resize large images to fit in the
browser window" must be enabled.
3. open a 1024x768 image with Firefox and right click "Set As Wallpaper"
4. the browser misunderstands the real image measures and the preview shows a
wallpaper smaller than 1024x768 that doesn't fit the desktop.
Actual Results:  
I'll attach a screen capture that better explains the problem.
(Reporter)

Comment 1

14 years ago
Created attachment 160527 [details]
Screen capture showing the bug

This is the screen capture of the bug.
(Reporter)

Comment 2

13 years ago
Confirmed in 
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Comment 3

13 years ago
Confirmed in
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223
Firefox/1.0.1
(Reporter)

Comment 4

13 years ago
Confirmed in
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Comment 5

13 years ago
Confirmed in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4)
Gecko/20050721 Firefox/1.0+

I used the 1920x1200 version of tbtw and it's "scaled" version was shown in the
preview, even though it was set to "center".  When at original size in the
browser, the preview is much different, only showing the center of the large image.

Changing to WinXP (I would make it all but I don't know how it happens on
Linux/x86Mac) to show that it happens on the 'latest' version of windows as well.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → Windows XP
Version: unspecified → Trunk
Assignee: firefox → nobody
Summary: Set As Wallpaper gets zoomed image dimension instead of real ones → Set As Wallpaper gets zoomed (scaled) image dimensions instead of real ones
*** Bug 303768 has been marked as a duplicate of this bug. ***

Comment 7

13 years ago
With the change in terminology I suggest this bug be renamed to "Set as Desktop
Background gets zoomed..."
Summary: Set As Wallpaper gets zoomed (scaled) image dimensions instead of real ones → Set as Desktop Background (wallpaper) gets zoomed (scaled) image dimensions instead of real ones
(Assignee)

Comment 8

12 years ago
Created attachment 236021 [details] [diff] [review]
Use the actual size of the image when we're doing the preview

When we set the image as the desktop background we use the full size, but here |this._image.width/height| refers to the actual size of the image element (which might be scaled down). This uses the naturalHeight/Width of the image which is irrespective of whether the image is scaled in the browser window or not. (Thanks to biesi for helping with this.)
Assignee: nobody → ispiked
Status: NEW → ASSIGNED
Attachment #236021 - Flags: review?(bugs.mano)
Comment on attachment 236021 [details] [diff] [review]
Use the actual size of the image when we're doing the preview

r=mano.
Attachment #236021 - Flags: review?(bugs.mano) → review+
(Assignee)

Updated

12 years ago
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox 3 alpha1
Checking in setDesktopBackground.js;
/cvsroot/mozilla/browser/components/shell/content/setDesktopBackground.js,v  <--
  setDesktopBackground.js
new revision: 1.5; previous revision: 1.4
done

Checked in on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
(Assignee)

Comment 11

12 years ago
Comment on attachment 236021 [details] [diff] [review]
Use the actual size of the image when we're doing the preview

Low-risk patch for the Set As Desktop Background dialog that makes sure we always use the full height/width of an image when preview it.
Attachment #236021 - Flags: approval1.8.1?
Comment on attachment 236021 [details] [diff] [review]
Use the actual size of the image when we're doing the preview

a=mconnor on behalf of drivers, please get this in ASAP
Attachment #236021 - Flags: approval1.8.1? → approval1.8.1+
Checking in setDesktopBackground.js;
/cvsroot/mozilla/browser/components/shell/content/setDesktopBackground.js,v  <--
  setDesktopBackground.js
new revision: 1.3.4.2; previous revision: 1.3.4.1
done

Checked in on the 1.8.1 branch.
Keywords: fixed1.8.1

Updated

10 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.