Closed Bug 855232 Opened 11 years ago Closed 11 years ago

UIABridge should access focus state in real-time vs. relying on delayed observer events (was: sporadic soft keyboard display)

Categories

(Firefox for Metro Graveyard :: Input, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 23

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(2 files, 3 obsolete files)

I did some debugging on this earlier in the week. I think the problem here is that we rely on accessible observer events to update focus state in our uia bridge down in widget. Unfortunately the observers fire off the refresh timer, so they can come delayed, after the last input event has been sent. For example:

mozilla::widget::winrt::MetroInput::OnPointerEntered
mozilla::widget::winrt::MetroInput::OnPointerPressed
MetroWidget::GetDPI
mozilla::widget::winrt::MetroInput::OnPointerReleased
mozilla::widget::winrt::MetroInput::OnTapped
UIABridge::GetFocus focus=0
UIATextElement::get_BoundingRectangle 0.000000 0.000000 0.000000 0.000000
mozilla::widget::winrt::UIATextElement::get_IsReadOnly
mozilla::widget::winrt::MetroInput::OnPointerExited
Bridge: EVENT_FOCUS
Bridge: Focus element flags: 1 1 0
Bridge: focus item can be focused
mozilla::widget::winrt::UIABridge::SetFocusInternal
mozilla::widget::winrt::UIABridge::SetFocus
mozilla::widget::winrt::UIATextElement::SetFocusInternal
mozilla::widget::winrt::UIATextElement::SetFocus

What we probably have to do here is query the accessible tree in realtime when windows asks us about it. Starting with the call to UIABridge::GetFocus, which queries for the focused IRawElementProviderFragment. Internally accessible should be up to date at this point.
Blocks: 833305
No longer blocks: 833035
Whiteboard: [forms]
Attached patch wip v.1 (obsolete) — Splinter Review
Attached patch wip v.1 (obsolete) — Splinter Review
Attachment #730217 - Attachment is obsolete: true
Attached patch msaa patchSplinter Review
This turns off some native event msaa code that's confusing the uia implementation in metro.
Attachment #730219 - Attachment is obsolete: true
Attachment #732391 - Flags: review?(dbolter)
Attached patch uia bridge wip v.2 (obsolete) — Splinter Review
Comment on attachment 732391 [details] [diff] [review]
msaa patch

Review of attachment 732391 [details] [diff] [review]:
-----------------------------------------------------------------

r=me. Yeah makes sense for metro mode.
Attachment #732391 - Flags: review?(dbolter) → review+
UIABridge now queries for state directly from accessible when it needs it. I've also removed some comment cruft.
Attachment #732967 - Flags: review?(netzen)
Attachment #732392 - Attachment is obsolete: true
Attachment #732967 - Flags: review?(netzen) → review+
Whiteboard: [forms]
https://hg.mozilla.org/mozilla-central/rev/10bcc9c3ca1d
https://hg.mozilla.org/mozilla-central/rev/1225c6016d10
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: