AccessibleCaret: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Move the document in tree)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
=AccessiblCaret (aka Copy & Paste)=
The document now lives in https://firefox-source-docs.mozilla.org/layout/AccessibleCaret.html
The AccessibleCaret 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===
* <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===
* {{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 <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:
{| class="wikitable"
|-
! Real events or callbacks !! Actions
|-
| <code>eMouseDown</code> or <code>eTouchStart</code> || Press
|-
| <code>eMouseMove</code> or <code>eTouchMove</code> || Move
|-
| <code>eMouseUp</code> or <code>eTouchEnd</code> or <code>eTouchCancel</code> || Release
|-
| <code>eMouseLongTap</code> || Long tap
|-
| <code>AsyncPanZoomStarted()</code> || Scroll start
|-
| <code>AsyncPanZoomStopped()</code> || Scroll end
|-
| <code>NotifyBlur()</code> || Blur
|}
 
http://hg.mozilla.org/mozilla-central/raw-file/default/layout/base/doc/AccessibleCaretEventHubStates.png
 
===Debug Tips===
* Gecko
** To dump AccessibleCaret log, export <code>NSPR_LOG_MODULES=AccessibleCaret:5</code>. Or open about:config and add a pref "logging.AccessibleCaret" with value "debug" or "verbose" (case matters).
** To print log, use <code>AC_LOG()</code> macro.
* Gaia
** To dump text selection dialog log, change the variable <code>DEBUG=true</code> in apps/system/js/app_text_selection_dialog.js.
** To print log, use <code>this.debug()</code>
 
 
==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>

Latest revision as of 17:55, 16 April 2020