AccessibleCaret: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 1: Line 1:
=Copy & Paste=
=AccessiblCaret (aka Copy & Paste)=
The copy & paste feature includes selection manipulation by the carets implemented in gecko, and UI buttons (select-all, cut, copy, paste) implemented in Gaia.  
The copy & paste feature includes selection manipulation by the carets implemented in gecko, and UI buttons (select-all, cut, copy, paste) implemented in Gaia.  


==Developers==
==Developers==
* Ting-Yu Lin <tlin@mozilla.com>
* Morris Tseng <mtseng@mozilla.com>
* Morris Tseng <mtseng@mozilla.com>
* Ting-Yu Lin <tlin@mozilla.com>
* Jeremy Chen <jeremychen@mozilla.com>
* Jeremy Chen <jeremychen@mozilla.com>
* Boris Chiou <boris@mozilla.com>
* Boris Chiou <boris@mozilla.com>
Line 11: Line 11:
* {{Bug|921965}} - [Keyboard][User Story] Text Selection (editable text)
* {{Bug|921965}} - [Keyboard][User Story] Text Selection (editable text)


==Legacy gecko implementation on B2G branch v2.2==
==Current gecko implementation==
TouchCaret and SelectionCarets are currently being deployed on B2G v2.2.
 
===Tracking Bugs===
* {{Bug|1023688}} - (CopyPasteLegacy) [META] TouchCaret & SelectionCarets, and text selection/copy/paste support on B2G v2.2
 
===Feature preferences===
* For displaying one caret when selection is collapsed: <code>touchcaret.enabled</code>
* For displaying two carets when selection is non-collapsed: <code>selectioncaret.enabled</code>
 
==Current gecko implementation on master branch==
AccessibleCaret had being deployed on B2G master branch.
 
===Open question/Known issues===
===Open question/Known issues===
* Support vertical text
* Support vertical text
Line 30: Line 18:


===Feature Preference===
===Feature Preference===
* <code>layout.accessiblecaret.enabled</code> (Enabled on B2G and Fennec Nightly)
* <code>layout.accessiblecaret.enabled</code> (Enabled on Fennec since 48 and B2G)
* <code>layout.accessiblecaret.enabled_on_touch</code> (Enabled on Firefox Nighly on platforms with touch support)


===Tracking Bugs===
===Tracking Bugs===
* {{Bug|1124074}} - (CopyPaste) [META] AccessibleCaret and text selection/copy/paste on B2G v2.5 and above
* {{Bug|1124074}} - Bug 1124074 - (AccessibleCaret) [META] AccessibleCaret and text selection/copy/paste on Fennec and B2G
* {{Bug|1114450}} - [META] Copy/Paste testing suite


===Working branch===
===AccessibleCaretEventHub State Transition Diagram===
* The refactoring is landed in {{Bug|1110039}}, {{Bug|1155493}}, and {{Bug|1147329}}. The preference is enabled in {{Bug|1172382}}.
** The development branch for AccessibleCaret is archived in https://github.com/aethanyc/gecko-dev/commits/copypaste-refactor-done
** The development branch for CaretStateChangedEvent is archived in https://github.com/mephisto41/gecko-dev/commits/copypaste-refactor-event
 
===CopyPasteEventHub State Transition Diagram===
* This graph depicts only the events and callbacks which involves state transitions. Callbacks such as <code>NotifySelectionChanged</code> or <code>Reflow</code> which does not cause a state transition are omitted.
* This graph depicts only the events and callbacks which involves state transitions. Callbacks such as <code>NotifySelectionChanged</code> or <code>Reflow</code> which does not cause a state transition are omitted.
* Mapping from real events or callback to actions which depict on the edge of the diagram:
* Mapping from real events or callback to actions which depict on the edge of the diagram:
Line 73: Line 56:
** To print log, use <code>this.debug()</code>
** To print log, use <code>this.debug()</code>


===Regular meeting===
 
* [https://etherpad.mozilla.org/tpe-layout-refactor meeting minutes]
==Legacy gecko implementation on B2G branch v2.2==
TouchCaret and SelectionCarets are currently being deployed on B2G v2.2.
 
===Tracking Bugs===
* {{Bug|1023688}} - (CopyPasteLegacy) [META] TouchCaret & SelectionCarets, and text selection/copy/paste support on B2G v2.2
 
===Feature preferences===
* For displaying one caret when selection is collapsed: <code>touchcaret.enabled</code>
* For displaying two carets when selection is non-collapsed: <code>selectioncaret.enabled</code>

Revision as of 07:30, 10 August 2016

AccessiblCaret (aka Copy & Paste)

The copy & paste feature includes selection manipulation by the carets implemented in gecko, and UI buttons (select-all, cut, copy, paste) implemented in Gaia.

Developers

  • Ting-Yu Lin <tlin@mozilla.com>
  • Morris Tseng <mtseng@mozilla.com>
  • Jeremy Chen <jeremychen@mozilla.com>
  • Boris Chiou <boris@mozilla.com>

UX Specification

  • bug 921965 - [Keyboard][User Story] Text Selection (editable text)

Current gecko implementation

Open question/Known issues

  • Support vertical text
    • bug 1217757 - Update text selection spec for vertical writing mode
    • bug 1217841 - Text-selection indicators (carets) should be oriented sideways when the text has vertical writing-mode

Feature Preference

  • layout.accessiblecaret.enabled (Enabled on Fennec since 48 and B2G)
  • layout.accessiblecaret.enabled_on_touch (Enabled on Firefox Nighly on platforms with touch support)

Tracking Bugs

  • bug 1124074 - Bug 1124074 - (AccessibleCaret) [META] AccessibleCaret and text selection/copy/paste on Fennec and B2G

AccessibleCaretEventHub State Transition Diagram

  • This graph depicts only the events and callbacks which involves state transitions. Callbacks such as NotifySelectionChanged or Reflow which does not cause a state transition are omitted.
  • Mapping from real events or callback to actions which depict on the edge of the diagram:
Real events or callbacks Actions
eMouseDown or eTouchStart Press
eMouseMove or eTouchMove Move
eMouseUp or eTouchEnd or eTouchCancel Release
eMouseLongTap Long tap
AsyncPanZoomStarted() Scroll start
AsyncPanZoomStopped() Scroll end
NotifyBlur() Blur

AccessibleCaretEventHubStates.png

Debug Tips

  • Gecko
    • To dump AccessibleCaret log, export NSPR_LOG_MODULES=AccessibleCaret:5. Or open about:config and add a pref "logging.AccessibleCaret" with value "debug" or "verbose" (case matters).
    • To print log, use AC_LOG() macro.
  • Gaia
    • To dump text selection dialog log, change the variable DEBUG=true in apps/system/js/app_text_selection_dialog.js.
    • To print log, use this.debug()


Legacy gecko implementation on B2G branch v2.2

TouchCaret and SelectionCarets are currently being deployed on B2G v2.2.

Tracking Bugs

  • bug 1023688 - (CopyPasteLegacy) [META] TouchCaret & SelectionCarets, and text selection/copy/paste support on B2G v2.2

Feature preferences

  • For displaying one caret when selection is collapsed: touchcaret.enabled
  • For displaying two carets when selection is non-collapsed: selectioncaret.enabled