Closed Bug 515455 Opened 15 years ago Closed 15 years ago

Backward compatibility when layout.css.devPixelsPerPx is an integer

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
mozilla1.9.2b1

People

(Reporter: sylvain.pasche, Unassigned)

References

Details

Attachments

(1 file)

Attached patch patch, v1Splinter Review
Should prevent issues for apps that haven't migrated the pref (such as bug 515424).

I also don't do the atof if the string is empty, which might have prevented the Fennec issue.
Attachment #399544 - Flags: review?(roc)
Status: NEW → ASSIGNED
Keywords: checkin-needed
Assignee: nobody → sylvain.pasche
pushed http://hg.mozilla.org/mozilla-central/rev/e4abfec25e38
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2b1
reopening because we're not actually backwards compatible due to all.js setting the pref as a string.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I tested the patch by modifying all.js to either an int or a string. That works in this case, but unfortunately that's not helping for scenarios like bug 515424.
Blocks: 517218
I propose to back out my patch because it doesn't address the real issue.

One way to fix this correctly would be to make nsIPrefBranch::getPrefType return the type set at the application level (and interpret the value accordingly). For instance when a preference is set in all.js as a string and the application overrides it with an int, getPrefType and getIntPref should return int and the int value respectively. If the preference system would behave this way, the patch here would fix the compatibility problem.

I'll leave this bug open for the real fix. Now that bug 513439 has landed on 1.9.2, this would only be an issue for an application that:
1. Needs to override layout.css.devPixelsPerPx
2. Has to support both 1.9.1 and 1.9.2 XRE with the same application package.
I believe this affects very few consumers, if any.

I've opened bug 517218 for the back out.
imho, we simply shouldn't be changing pref values, and should instead create a new pref name
I guess this is WONTFIX now?
yeah, in theory it could still be an issue for some applications (see comment 4), but that shouldn't be worth fixing unless someone is affected by this and wants to work on it.
Assignee: sylvain.pasche → nobody
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: