Closed Bug 976274 Opened 11 years ago Closed 11 years ago

[AccessFu] Move cursor if position is hidden

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file)

If the cursor is hidden, and we fnd out about that via a HIDE event, we should move the cursor somewhere sensible.
Attachment #8380885 - Flags: review?(yzenevich)
Comment on attachment 8380885 [details] [diff] [review] Introduce hide support Review of attachment 8380885 [details] [diff] [review]: ----------------------------------------------------------------- r=me! some nits + test_content_integration.html has lots of indentation issues. ::: accessible/src/jsat/EventManager.jsm @@ +243,1 @@ > // Only handle hide if it is a relevant live region. This comment needs updating. @@ +250,5 @@ > + } else { > + let vc = Utils.getVirtualCursor(this.contentScope.content.document); > + if (vc.position && (Utils.getState(vc.position).contains(States.DEFUNCT) || > + Utils.isInSubtree(vc.position, aEvent.accessible))) { > + this.contentScope.contentControl.autoMove( nit: indentation here and a couple of lines below. ::: accessible/src/jsat/Utils.jsm @@ +240,5 @@ > return new Rect(objX.value, objY.value, objW.value, objH.value); > }, > > + isInSubtree: function isInSubtree(aAccessible, aSubTreeRoot) { > + for (let acc = aAccessible; acc;) { Let's use while to be consistent with the rest of the examples walking up the tree. @@ +241,5 @@ > }, > > + isInSubtree: function isInSubtree(aAccessible, aSubTreeRoot) { > + for (let acc = aAccessible; acc;) { > + if (acc == aSubTreeRoot) Nit: {} @@ +247,5 @@ > + > + try { > + acc = acc.parent; > + } catch (x) { > + acc = null; Do we want to log if in DEBUG mode? @@ +576,5 @@ > + while (parent && (parent = parent.parent)) { > + ancestry.push(parent); > + } > + } catch (e) { > + // A defunct accessible will raise an exception geting parent. Same here: do we want to log if in DEBUG mode?
Attachment #8380885 - Flags: review?(yzenevich) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: