Status

Fennec Graveyard
General
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: wesj, Assigned: wesj)

Tracking

Trunk
Firefox 7

Details

(Whiteboard: QA?)

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

7 years ago
Created attachment 538165 [details] [diff] [review]
Patch

I've been implementing touch events, and noticed 3 or 4 getDPI calls coming across the AndroidBridge for every tap. Since this shouldn't ever change, we might as well cache it.
(Assignee)

Updated

7 years ago
Attachment #538165 - Flags: review?(mbrubeck)
Comment on attachment 538165 [details] [diff] [review]
Patch

># HG changeset patch
># Parent b9354cf9282d8b4f8fae3bf43144e3bcf0e6c592
>
>+++ b/mobile/chrome/content/Util.js

>+  get displayDPI() function() {
>+    delete this.displayDPI;
>+    return this.displayDPI = this.getWindowUtils(window).displayDPI;
>   }
> };

Perhaps add a comment that this will only work in the parent process.

>+++ b/mobile/chrome/content/browser.js
>@@ -1112,7 +1112,7 @@
>     if (prefValue > 0)
>       return prefValue / 100;
> 
>+    let dpi = Utils.displayDPI;
>     if (dpi < 200) // Includes desktop displays, and LDPI and MDPI Android devices
>       return 1;

s/Utils/Util/

>   updateCanCancel: function(aX, aY) {
>+    let dpi = Utils.displayDPI;
> 
>     const kSafetyX = Services.prefs.getIntPref("dom.w3c_touch_events.safetyX") / 240 * dpi;
>     const kSafetyY = Services.prefs.getIntPref("dom.w3c_touch_events.safetyY") / 240 * dpi;

here too
Attachment #538165 - Attachment is patch: true
Attachment #538165 - Flags: review?(mbrubeck) → review+
Assignee: nobody → wjohnston
Status: NEW → ASSIGNED
(Assignee)

Updated

7 years ago
Whiteboard: [inbound]
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 7
(Assignee)

Comment 3

7 years ago
backed out due to general bustage;

http://hg.mozilla.org/mozilla-central/rev/46dbe6bfd8fe
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 4

7 years ago
Created attachment 538566 [details] [diff] [review]
Patch v2

Sorry about that. This fixes the errors (missed Utils->Util and getter returning a function). I've been browsing around with this for a bit and things that depend on dpi adjustments seem to be working fine.
Attachment #538165 - Attachment is obsolete: true
Attachment #538566 - Flags: review?(mbrubeck)
Attachment #538566 - Flags: review?(mbrubeck) → review+
(Assignee)

Updated

7 years ago
Whiteboard: [inbound]

Comment 5

7 years ago
http://hg.mozilla.org/mozilla-central/rev/b36ae2b20ae1
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]

Updated

6 years ago
Whiteboard: QA?
You need to log in before you can comment on or make changes to this bug.