Closed Bug 390426 Opened 17 years ago Closed 15 years ago

[spatial] Integer Overflow after new Units migration

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: romaxa, Assigned: romaxa)

References

()

Details

Attachments

(1 file)

Build spatial navigation for latest trunk (as I understand now it possible only for suite see bug 347731) add user_pref("snav.enabled", true); user_pref("snav.keyCode.modifier", 0); Open URL, Put focus on 'Kirjaudu sisään' top right press down Excepted result: Focus should go down on on "Linux" link under "Sponsorien linkit" Actual result: Focus go somewhere on middle of the page (very far)
Attached patch Bugfix (deleted) — Splinter Review
makeRectRelativeToGlobalView use very big coordinates, and distance calculation has been broken after migration to new units.. This bugfix with using new GetBoundingClientRect Interface.
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #274731 - Flags: review?(roc)
This was returning twips (now appunits). Your change makes it return pixels. Surely callers need to be changed to deal with this?
No, I guess it is not required, because makeRectRelativeToGlobalView it is almost the same as GetClientRect. I have just replace this function with using new API (probably this fix not very good for BUG summary ("Integer Overflow..")). Also operations with pixels should be enough here...
> No, I guess it is not required, because makeRectRelativeToGlobalView it is > almost the same as GetClientRect. How can that be, makeRectRelativeToGlobalView is returning twips/appunits and GetBoundingClientRect is returning pixels. That's a huge difference.
Comment on attachment 274731 [details] [diff] [review] Bugfix clearing request until question is answered
Attachment #274731 - Flags: review?(roc)
Attachment #274731 - Flags: superreview?(jst)
Attachment #274731 - Flags: review?(jst)
Blocks: 436084
Comment on attachment 274731 [details] [diff] [review] Bugfix Sorry for not getting to this earlier. Looks good to me, Doug should have a look too.
Attachment #274731 - Flags: superreview?(jst)
Attachment #274731 - Flags: superreview?(doug.turner)
Attachment #274731 - Flags: review?(jst)
Attachment #274731 - Flags: review+
Comment on attachment 274731 [details] [diff] [review] Bugfix i am wondering why you don't start using the js version we have in toolkit? http://mxr.mozilla.org/mozilla-central/source/toolkit/spatial-navigation/SpatialNavigation.js
Comment on attachment 274731 [details] [diff] [review] Bugfix this is unsupported in m-c. you need to ask for approval to check in from the tree owner.
Attachment #274731 - Flags: superreview?(doug.turner) → superreview+
C++ extension is dead, Closing as INVALID
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: