Closed
Bug 1049367
Opened 10 years ago
Closed 10 years ago
[Text Selection] We should remove fake pressing function from js marionette
Categories
(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gduan, Assigned: gduan)
References
Details
(Whiteboard: [p=3])
Attachments
(1 file, 1 obsolete file)
We should remove press function in faketextselectionapp.js since gecko has landed.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → gduan
Assignee | ||
Updated•10 years ago
|
Whiteboard: [p=3]
Target Milestone: --- → 2.1 S2 (15aug)
Assignee | ||
Comment 1•10 years ago
|
||
Set dependency on bug 1052246, since the position reported by b2g-desktop is not correct.
Assignee | ||
Comment 2•10 years ago
|
||
Although bug 1052246 has been resolved, current available b2g still not work well since the position is not correct.
Updated•10 years ago
|
Blocks: CopyPasteLegacy
Updated•10 years ago
|
Priority: -- → P1
Assignee | ||
Updated•10 years ago
|
Summary: [Text Selection] update press method since gecko has landed → [Text Selection] The position reported by b2g-desktop is not correct
Assignee | ||
Updated•10 years ago
|
Summary: [Text Selection] The position reported by b2g-desktop is not correct → [Text Selection] The zoomfactor reported by b2g-desktop is not correct
Assignee | ||
Comment 4•10 years ago
|
||
Hi TingYu,
I just found out that the zoomfactor that reported from gecko is not correct. And the value is different by screen type ... that's why cause my calculation not correct.
you can test with my commit and check the zoom value,
https://github.com/cctuan/gaia/commit/21007d98d90eb4db4f7a814e420df67599582ad7
I'm not sure if DEBUG=1 would fix this zoomFactor issue. We'll set prefs as below when DEBUG=1.
https://github.com/mozilla-b2g/gaia/blob/master/build/preferences.js#L252-L299
Flags: needinfo?(tlin)
Comment 5•10 years ago
|
||
I've just found that DEBUG=1 has docshell.device_size_is_page_size=true. The zoomfactor is correct when the pref is on. Investigating for the cause.
[1] https://github.com/mozilla-b2g/gaia/blob/master/build/preferences.js#L253
Comment 6•10 years ago
|
||
Hi George,
The zoomFactor in gecko in calculated here [1].
Currently, Gaia non-debug build running on B2G Desktop does not set docshell.device_size_is_page_size to true, so the screen.width will be the real device size (mine is 1280), not the width of the B2G desktop (320). I think we should set "this.userPrefs['docshell.device_size_is_page_size'] = true;" in [2] for B2G Desktop to make the screen.width correct.
[1] http://hg.mozilla.org/mozilla-central/file/776fa9cf70cd/dom/browser-element/BrowserElementChildPreload.js#l635
[2] https://github.com/mozilla-b2g/gaia/blob/master/build/preferences.js#L184
Flags: needinfo?(tlin)
Flags: needinfo?(mtseng)
Flags: needinfo?(gduan)
Assignee | ||
Comment 7•10 years ago
|
||
Update the title.
This bug still dep on bug 1063266, the displaying keyboard will trigger the app window resizing.
Summary: [Text Selection] The zoomfactor reported by b2g-desktop is not correct → [Text Selection] We should remove fake pressing function from js marionette
Assignee | ||
Updated•10 years ago
|
Target Milestone: 2.1 S2 (15aug) → ---
Assignee | ||
Comment 8•10 years ago
|
||
WIP: https://github.com/cctuan/gaia/commit/54b6c189c4514ca1c95b53788d8e0e6cc9b47144
I add below three prefs for comment 5, enable selectioncaret and disable keyboard.
'selectioncaret.enabled': true,
'dom.mozInputMethod.enabled': false,
'docshell.device_size_is_page_size': true
However, after longPress is called from marionette, there's no mouseup reason from selectionchange event...I'm not sure the reason yet.
Long press contains press, wait and release cmd and there should be a mouseup after release.
https://github.com/mozilla-b2g/marionette-js-client/blob/master/lib/marionette/actions.js#L228
I only saw log as below....
[marionette log] app://system.gaiamobile.org/js/text_selection_dialog.js:66 [Dump: TextSelectionDialog]"{\"rect\":{\"width\":81.01666259765625,\"height\":14,\"top\":235,\"bottom\":249,\"left\":87,\"right\":168.01666259765625},\"commands\":{\"canSelectAll\":true,\"canCut\":true,\"canCopy\":true,\"canPaste\":true},\"zoomFactor\":1,\"reasons\":[\"drag\",\"mousedown\"],\"isCollapsed\":false,\"msg_name\":\"selectionchange\",\"offsetX\":0,\"offsetY\":0}"
[marionette log] app://system.gaiamobile.org/js/text_selection_dialog.js:66 [Dump: TextSelectionDialog]"on receive selection change event"
[marionette log] app://system.gaiamobile.org/js/text_selection_dialog.js:66 [Dump: TextSelectionDialog]"{\"rect\":{\"width\":81.01666259765625,\"height\":14,\"top\":235,\"bottom\":249,\"left\":87,\"right\":168.01666259765625},\"commands\":{\"canSelectAll\":true,\"canCut\":true,\"canCopy\":true,\"canPaste\":true},\"zoomFactor\":1,\"reasons\":[],\"isCollapsed\":false,\"msg_name\":\"selectionchange\",\"offsetX\":0,\"offsetY\":0}"
Assignee | ||
Comment 9•10 years ago
|
||
Hi Alive,
could you review this patch? I made some changes as below
1. change position of top-left and top-right input element, because click event doesn't work if top=0 with js-marionette
2. change size of input, to make sure the bubble will show on the rightest side
3. tap on the dom before long-pressing, in order to launch the keyboard in case bubble is hidden after window resizing
4. add 'docshell.device_size_is_page_size': true
Attachment #8473529 -
Attachment is obsolete: true
Attachment #8537608 -
Flags: review?(alive)
Updated•10 years ago
|
Attachment #8537608 -
Flags: review?(alive) → review+
Assignee | ||
Comment 10•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•