Closed Bug 1052246 Opened 10 years ago Closed 10 years ago

[Text Selection] Position of utility bubble is wrong in b2g desktop

Categories

(Core :: DOM: Selection, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: mtseng, Assigned: mtseng)

References

Details

Attachments

(1 file, 3 obsolete files)

Utility bubbles are not shown in b2g desktop. After some debugging, I found that the position of bubbles are always wrong.
Attached patch bug1052246 (obsolete) (deleted) — Splinter Review
I found 2 problems cause this bug. 1. In b2g-desktop, mozInnerScreen is "actual" window position. So that we will get incorrect value in b2g-desktop. So I subtract "window.mozInnerScreen" to get the correct window offset. 2. Since shell.js handle the offsets of <iframe mozbrowser> boundary [1], we shouldn't add <iframe mozbrowser> offsets to rect in BrowserElementChildPreload.js [2]. So I modified it to not cross <iframe mozbrowser> boundary. After those 2 modifications, utility bubbles show correctly. [1]: http://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/shell.js#524 [2]: http://dxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChildPreload.js#651
Attachment #8471321 - Flags: review?(fabrice)
Summary: [Text Selection] Utility bubble is wrong in b2g desktop → [Text Selection] Position of utility bubble is wrong in b2g desktop
Comment on attachment 8471321 [details] [diff] [review] bug1052246 Review of attachment 8471321 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense, thanks! ::: dom/browser-element/BrowserElementChildPreload.js @@ +643,5 @@ > reasons: e.reasons, > isCollapsed: (e.selectedText.length == 0), > }; > > + // Get correct geometry information if we have nested iframe nit: full stop at the end of comment.
Attachment #8471321 - Flags: review?(fabrice) → review+
Attached patch bug1052246 v2 (carry r+: fabrice) (obsolete) (deleted) — Splinter Review
Attachment #8471321 - Attachment is obsolete: true
Attached patch bug1052246 v3 (carry r+: fabrice) (obsolete) (deleted) — Splinter Review
Rebased.
Attachment #8472102 - Attachment is obsolete: true
oops uploaded wrong patch...
Upload correct patch.
Attachment #8472766 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: