Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong handling of certain input events #96

Open
javifernandez opened this issue Apr 12, 2024 · 4 comments
Open

Wrong handling of certain input events #96

javifernandez opened this issue Apr 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@javifernandez
Copy link
Member

javifernandez commented Apr 12, 2024

This issue is reproducible in Wolvic (Chromium) 0.9 from the current (07d9122) wolvic_experimental branch.

These are the steps to reproduce the issue:

1- Load the https://www.disneyplus.com/identity/login/enter-email URL
2- Introduce an email and press continue
3- Type the numeric code

This specific web page prevents the user to move the focus to a specific text input, so that it's handled by the input event handling. The expected behavior is that typing a numerical value will be renderer in the corresponding input box and the caret and focus is moved to the next element automatically.

Attached a picture of the web page used as test case for the issue:
Screenshot from 2024-04-11 15-50-12

@javifernandez javifernandez added the bug Something isn't working label Apr 12, 2024
@javifernandez
Copy link
Member Author

I've been able to do some debugging and I'll dump here some logs that think would be useful to investigate the root cause of the issue.

These are the Chromium calls when clicking on the first text box to show the virtual keyboard, followed by typing the "5" key:

8655-28695 chromium                 I  [28655:28695:0411/143607.728632:INFO:document.cc(5155)] Document::SetFocusedElement -- : No focused element !!!
28655-28695 chromium                 I  [28655:28695:0411/143607.738949:INFO:document.cc(5152)] Document::SetFocusedElement -- : New focused element: "INPUT"
28655-28695 chromium                 I  [28655:28695:0411/143616.793118:INFO:document.cc(5155)] Document::SetFocusedElement -- : No focused element !!!
28655-28695 chromium                 I  [28655:28695:0411/143626.672843:INFO:document.cc(5152)] Document::SetFocusedElement -- : New focused element: "INPUT"
28320-28320 chromium                 I  [28320:28320:0411/143634.654619:INFO:ime_adapter_android.cc(354)] ImeAdapterAndroid::CommitText -- text: 5
28320-28320 chromium                 I  [28320:28320:0411/143634.654739:INFO:render_widget_host_impl.cc(2369)] RenderWidgetHostImpl::ImeCommitText -- text: 5
28655-28710 chromium                 I  [28655:28710:0411/143634.655270:INFO:widget_input_handler_impl.cc(146)] WidgetInputHandlerImpl::ImeCommitText -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.655647:INFO:document.cc(8178)] EventTargetNodeForDocument -- Returning the focused element: "INPUT"
28655-28695 chromium                 I  [28655:28695:0411/143634.681925:INFO:widget_input_handler_impl.cc(134)] ImeCommitTextOnMainThread -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.682013:INFO:widget_base.cc(1414)] WidgetBase::ImeCommitText -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.682068:INFO:web_frame_widget_impl.cc(3672)] WebFrameWidgetImpl::CommitText -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.682116:INFO:web_input_method_controller_impl.cc(141)] WebInputMethodControllerImpl::CommitText -- text: 5
28655-28695 chromium                 I  [28655:28695:0411/143634.682229:INFO:input_method_controller.cc(689)] InputMethodController::CommitText -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.682281:INFO:input_method_controller.cc(899)] InputMethodController::InsertTextAndMoveCaret -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.682402:INFO:event_handler.cc(2388)] EventHandler::HandleTextInputEvent -- text: "5"
28655-28695 chromium                 I  [28655:28695:0411/143634.682457:INFO:event_handler.cc(2402)] EventHandler::HandleTextInputEvent -- Getting event target from document !!!
28655-28695 chromium                 I  [28655:28695:0411/143634.682502:INFO:document.cc(8178)] EventTargetNodeForDocument -- Returning the focused element: "INPUT"
28655-28695 chromium                 I  [28655:28695:0411/143634.686228:INFO:document.cc(8178)] EventTargetNodeForDocument -- Returning the focused element: "INPUT"

These are the logs combining the Android (Wolvic) and Chromium sides:

28320-28320 VRB[VRBrowserActivity]   D  ======> OnGlobalFocusChangeListener: old(null) new(org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... .F...... 0,0-800,450})
28320-28320 VRB[KeyboardWidget]      E  onGlobalFocusChanged --  old(null) new(org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... .F...... 0,0-800,450})
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ........ 0,0-1450,816}
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- the new mFocusedView is not a TextEditor, so the input connection is null
28320-28320 VRB[VRBrowserActivity]   D  ======> OnGlobalFocusChangeListener: old(org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... ......ID 0,0-800,450}) new(com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... .F...... 0,0-1450,816})
28320-28320 VRB[KeyboardWidget]      E  onGlobalFocusChanged --  old(org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... ......ID 0,0-800,450}) new(com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... .F...... 0,0-1450,816})
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... .F...... 0,0-1450,816}
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- the new mFocusedView is not a TextEditor, so the input connection is null
28320-28320 VRB[WindowWidget]        D  BrowserWidget onFocusChanged: true
28320-28320 VRB[WindowWidget]        D  BrowserWidget onFocusChanged: false
28320-28320 VRB[VRBrowserActivity]   D  ======> OnGlobalFocusChangeListener: old(com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ......ID 0,0-1450,816}) new(org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... .F...... 0,0-800,450})
28320-28320 VRB[KeyboardWidget]      E  onGlobalFocusChanged --  old(com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ......ID 0,0-1450,816}) new(org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... .F...... 0,0-800,450})
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ......ID 0,0-1450,816}
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- the new mFocusedView is not a TextEditor, so the input connection is null
28655-28695 chromium                 I  [28655:28695:0411/144440.484810:INFO:document.cc(5155)] Document::SetFocusedElement -- : No focused element !!!
28655-28695 chromium                 I  [28655:28695:0411/144440.492511:INFO:document.cc(5152)] Document::SetFocusedElement -- : New focused element: "INPUT"
28320-28320 VRB[KeyboardWidget]      E  showSoftInput --  mExternalFocusedView: org.chromium.components.embedder_support.view.ContentView{c1ded18 VFE...... .F...... 0,0-800,450}
28320-28320 VRB[KeyboardWidget]      E  showSoftInput --  mAttachedWindow: com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ........ 0,0-1450,816} / mFocusedView: com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ........ 0,0-1450,816}
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- com.igalia.wolvic.ui.widgets.WindowWidget{16c63bd VFE...... ........ 0,0-1450,816}
28320-28320 VRB[KeyboardWidget]      E  updateFocusedView -- the new mFocusedView is a TextEditor, so we are going to create a new InputConnection !!!
28320-28320 VRB[WindowWidget]        D  BrowserWidget onCreateInputConnection

@javifernandez
Copy link
Member Author

I've added some debug calls to see the DOM tree of the focused element:

3684-3706  chromium                 I  [3684:3706:0411/163503.290716:INFO:document.cc(5156)] Document::SetFocusedElement -- : No focused element !!!
 3684-3706  chromium                 I  [3684:3706:0411/163503.326967:INFO:document.cc(5152)] Document::SetFocusedElement -- : New focused element: "INPUT"
 3684-3706  chromium                 I  [3684:3706:0411/163503.327121:INFO:node.cc(3434)] 
 3684-3706  chromium                 I  BODY class="t-fQukMr c-cfdzVR"
 3684-3706  chromium                 I  	DIV id="__next"
 3684-3706  chromium                 I  		DIV class="c-bTDrLr c-bTDrLr-cmpvrW-headerType-none"
 3684-3706  chromium                 I  			MAIN id="content" class="c-dhzjXW c-dhzjXW-dtuscr-headerType-none"
 3684-3706  chromium                 I  				DIV id="global-identity-ui" class="GlobalIdentityUi identity-c-fWxOud identity-t-lkzNGS"
 3684-3706  chromium                 I  					DIV class="Screen identity-c-jQlZXf gradient-background"
 3684-3706  chromium                 I  						DIV class="screen-body"
 3684-3706  chromium                 I  							DIV class="Container identity-c-fKNMBS"
 3684-3706  chromium                 I  								DIV class="BrandLogo identity-c-bCKVlJ"
 3684-3706  chromium                 I  									svg
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  										path
 3684-3706  chromium                 I  								DIV class="primary-container"
 3684-3706  chromium                 I  									DIV class="secondary-container"
 3684-3706  chromium                 I  										DIV class="Heading identity-c-kShjvO"
 3684-3706  chromium                 I  											H1 class="heading-title"
 3684-3706  chromium                 I  												#text "Check your email inbox"
 3684-3706  chromium                 I  											DIV class="heading-description"
 3684-3706  chromium                 I  												#text "We\u2019ll need you to verify your email address. We\u2019ve sent a 6-digit code to "
 3684-3706  chromium                 I  												B
 3684-3706  chromium                 I  													#text " "
 3684-3706  chromium                 I  													#text "[email protected]"
 3684-3706  chromium                 I  													#text " "
 3684-3706  chromium                 I  												#text ". The code expires in 15 minutes. Please enter it below."
 3684-3706  chromium                 I  										FORM
 3684-3706  chromium                 I  											DIV class="Passcode identity-c-cylZQb"
 3684-3706  chromium                 I  *												INPUT
 3684-3706  chromium                 I  *													#shadow-root(UserAgent)
 3684-3706  chromium                 I  *														DIV (editable)
 3684-3706  chromium                 I  												DIV class="passcode-keys"
 3684-3706  chromium                 I  													DIV class="passcode-key"
 3684-3706  chromium                 I  														::after
 3684-3706  chromium                 I  														SPAN
 3684-3706  chromium                 I  													DIV class="passcode-key"
 3684-3706  chromium                 I  														::after
 3684-3706  chromium                 I  														SPAN
 3684-3706  chromium                 I  													DIV class="passcode-key"
 3684-3706  chromium                 I  														::after
 3684-3706  chromium                 I  														SPAN
 3684-3706  chromium                 I  													DIV class="passcode-key"
 3684-3706  chromium                 I  														::after
 3684-3706  chromium                 I  														SPAN
 3684-3706  chromium                 I  													DIV class="passcode-key"
 3684-3706  chromium                 I  														::after
 3684-3706  chromium                 I  														SPAN
 3684-3706  chromium                 I  													DIV class="passcode-key"
 3684-3706  chromium                 I  														::after
 3684-3706  chromium                 I  														SPAN
 3684-3706  chromium                 I  											DIV class="Group identity-c-dhzjXW" style="flex-direction: column; gap: 12px;"
 3684-3706  chromium                 I  												BUTTON class="Button identity-c-dLfNfa identity-c-dLfNfa-gtaHLC-color-primary"
 3684-3706  chromium                 I  													SPAN class="identity-c-hwtasM"
 3684-3706  chromium                 I  														#text "Continue"
 3684-3706  chromium                 I  												BUTTON class="Button identity-c-dLfNfa identity-c-dLfNfa-kCeCIi-color-secondary"
 3684-3706  chromium                 I  													SPAN class="identity-c-hwtasM"
 3684-3706  chromium                 I  														#text "Cancel"
 3684-3706  chromium                 I  										DIV class="Group identity-c-dhzjXW" style="flex-direction: column; gap: 12px;"

@javifernandez
Copy link
Member Author

I've tried the same test case with a Chromium (Linux) build using the same branch we are using for Wolvic. One difference is that the HandleTextInputEvent call receives an underlaying event, while in our Wolvic browser there is no underlaying event and the target is got from the Document.

This is the backtrace of the call using the Chromium built, where the test case works as expected:

 Thread 1 "chrome" hit Breakpoint 1, blink::EventHandler::HandleTextInputEvent (this=0x17b10014ed58, text=..., underlying_event=0x17b100793b48, 
    input_type=blink::kTextEventInputKeyboard) at ../../third_party/blink/renderer/core/input/event_handler.cc:2462
2462	  LOG(INFO) << " EventHandler::HandleTextInputEvent -- text: " << text << " input_type : " << input_type;
(gdb) bt
#0  blink::EventHandler::HandleTextInputEvent (this=0x17b10014ed58, text=..., underlying_event=0x17b100793b48, input_type=blink::kTextEventInputKeyboard)
    at ../../third_party/blink/renderer/core/input/event_handler.cc:2462
#1  0x000079bd4fd444a7 in blink::Editor::InsertText (this=0x17b100128580, text=..., triggering_event=0x17b100793b48)
    at ../../third_party/blink/renderer/core/editing/editor.cc:495
#2  0x000079bd4fd4ca77 in blink::Editor::HandleEditingKeyboardEvent (this=0x17b100128580, evt=0x17b100793b48)
    at ../../third_party/blink/renderer/core/editing/editor_key_bindings.cc:119
#3  0x000079bd4fd4cb60 in blink::Editor::HandleKeyboardEvent (this=0x17b100128580, evt=0x17b100793b48)
    at ../../third_party/blink/renderer/core/editing/editor_key_bindings.cc:125
#4  0x000079bd507fbc74 in blink::KeyboardEventManager::DefaultKeyboardEventHandler (this=0x17b100104da0, event=0x17b100793b48, possible_focused_node=0x17b10067d2c8)
    at ../../third_party/blink/renderer/core/input/keyboard_event_manager.cc:450
#5  0x000079bd507eb288 in blink::EventHandler::DefaultKeyboardEventHandler (this=0x17b10014ed58, event=0x17b100793b48)
    at ../../third_party/blink/renderer/core/input/event_handler.cc:2422
#6  0x000079bd4fbb4730 in blink::Node::DefaultEventHandler (this=0x17b10067d438, event=...) at ../../third_party/blink/renderer/core/dom/node.cc:2905
#7  0x000079bd5063db10 in blink::HTMLElement::DefaultEventHandler (this=0x17b10067d438, event=...) at ../../third_party/blink/renderer/core/html/html_element.cc:2866
#8  0x000079bd5055e8fb in blink::HTMLFormControlElement::DefaultEventHandler (this=0x17b10067d438, event=...)
    at ../../third_party/blink/renderer/core/html/forms/html_form_control_element.cc:536
#9  0x000079bd51ed64c0 in blink::TextControlElement::DefaultEventHandler (this=0x17b10067d438, event=...)
    at ../../third_party/blink/renderer/core/html/forms/text_control_element.cc:156
#10 0x000079bd51ec99a9 in blink::HTMLInputElement::DefaultEventHandler (this=0x17b10067d438, evt=...)
    at ../../third_party/blink/renderer/core/html/forms/html_input_element.cc:1501
#11 0x000079bd51e98f29 in blink::EventDispatcher::DispatchEventPostProcess (this=0x7fff0f2691a0, activation_target=0x0, pre_dispatch_event_handler_result=0x0)
    at ../../third_party/blink/renderer/core/dom/events/event_dispatcher.cc:431
#12 0x000079bd51e974da in blink::EventDispatcher::Dispatch (this=0x7fff0f2691a0) at ../../third_party/blink/renderer/core/dom/events/event_dispatcher.cc:292
#13 0x000079bd4fb1dea9 in blink::Event::DispatchEvent (this=0x17b100793b48, dispatcher=...) at ../../third_party/blink/renderer/core/dom/events/event.cc:359
#14 0x000079bd51e96527 in blink::EventDispatcher::DispatchEvent (node=..., event=...) at ../../third_party/blink/renderer/core/dom/events/event_dispatcher.cc:79
#15 0x000079bd4fbb42ad in blink::Node::DispatchEventInternal (this=0x17b10067d438, event=...) at ../../third_party/blink/renderer/core/dom/node.cc:2849
#16 0x000079bd4fb373c3 in blink::EventTarget::DispatchEvent (this=0x17b10067d438, event=...) at ../../third_party/blink/renderer/core/dom/events/event_target.cc:917
#17 0x000079bd507fb74c in blink::KeyboardEventManager::KeyEvent (this=0x17b100104da0, initial_key_event=...)
    at ../../third_party/blink/renderer/core/input/keyboard_event_manager.cc:395
#18 0x000079bd507eb165 in blink::EventHandler::KeyEvent (this=0x17b10014ed58, initial_key_event=...) at ../../third_party/blink/renderer/core/input/event_handler.cc:2418
#19 0x000079bd50344f14 in blink::WebFrameWidgetImpl::HandleCharEvent (this=0x17b100155738, event=...)
    at ../../third_party/blink/renderer/core/frame/web_frame_widget_impl.cc:1211
#20 0x000079bd508457c4 in blink::WidgetEventHandler::HandleInputEvent (this=0x17b100155770, coalesced_event=..., root=0x17b10014e6c0)
    at ../../third_party/blink/renderer/core/input/widget_event_handler.cc:117
#21 0x000079bd5034dc47 in blink::WebFrameWidgetImpl::HandleInputEvent (this=0x17b100155738, coalesced_event=...)
    at ../../third_party/blink/renderer/core/frame/web_frame_widget_impl.cc:2915
#22 0x000079bd4a372ff1 in blink::WidgetBaseInputHandler::HandleInputEvent(blink::WebCoalescedInputEvent const&, std::__Cr::unique_ptr<cc::EventMetrics, std::__Cr::default_delete<cc::EventMetrics> >, base::OnceCallback<void (blink::mojom::InputEventResultState, ui::LatencyInfo const&, std::__Cr::unique_ptr<blink::InputHandlerProxy::DidOverscrollParams, std::__Cr::default_delete<blink::InputHandlerProxy::DidOverscrollParams> >, std::__Cr::optional<cc::TouchAction>)>)
    (this=0x251c000e10b8, coalesced_event=..., metrics=..., callback=...) at ../../third_party/blink/renderer/platform/widget/input/widget_base_input_handler.cc:421
#23 0x000079bd4a38664c in blink::WidgetInputHandlerManager::HandleInputEvent(blink::WebCoalescedInputEvent const&, std::__Cr::unique_ptr<cc::EventMetrics, std::__Cr::default_delete<cc::EventMetrics> >, base::OnceCallback<void (blink::mojom::InputEventResultState, ui::LatencyInfo const&, mojo::StructPtr<blink::mojom::blink::DidOverscrollPara--Type <RET> for more, q to quit, c to continue without paging--
ms>, std::__Cr::optional<cc::TouchAction>)>) (this=0x251c00379900, event=..., metrics=..., handled_callback=...)
    at ../../third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.cc:298
#24 0x000079bd4a35e51f in blink::MainThreadEventQueue::HandleEventOnMainThread(blink::WebCoalescedInputEvent const&, blink::WebInputEventAttribution const&, std::__Cr::unique_ptr<cc::EventMetrics, std::__Cr::default_delete<cc::EventMetrics> >, base::OnceCallback<void (blink::mojom::InputEventResultState, ui::LatencyInfo const&, mojo::StructPtr<blink::mojom::blink::DidOverscrollParams>, std::__Cr::optional<cc::TouchAction>)>)
    (this=0x251c00424700, event=..., attribution=..., metrics=..., handled_callback=...)
    at ../../third_party/blink/renderer/platform/widget/input/main_thread_event_queue.cc:736
#25 0x000079bd4a360f76 in blink::QueuedWebInputEvent::Dispatch (this=0x251c02ec8980, queue=0x251c00424700)
    at ../../third_party/blink/renderer/platform/widget/input/main_thread_event_queue.cc:171
#26 0x000079bd4a35db86 in blink::MainThreadEventQueue::DispatchEvents (this=0x251c00424700)
    at ../../third_party/blink/renderer/platform/widget/input/main_thread_event_queue.cc:510
#27 0x000079bd4a36449f in base::internal::DecayedFunctorTraits<void (blink::MainThreadEventQueue::*)(), blink::MainThreadEventQueue*&&>::Invoke<void (blink::MainThreadEventQueue::*)(), scoped_refptr<blink::MainThreadEventQueue>>(void (blink::MainThreadEventQueue::*)(), scoped_refptr<blink::MainThreadEventQueue>&&)
    (method=(void (blink::MainThreadEventQueue::*)(blink::MainThreadEventQueue * const)) 0x79bd4a35d9e0 <blink::MainThreadEventQueue::DispatchEvents()>, receiver_ptr=...)
    at ../../base/functional/bind_internal.h:738
#28 0x000079bd4a364419 in base::internal::InvokeHelper<false, base::internal::FunctorTraits<void (blink::MainThreadEventQueue::*&&)(), blink::MainThreadEventQueue*&&>, void, 0ul>::MakeItSo<void (blink::MainThreadEventQueue::*)(), std::__Cr::tuple<scoped_refptr<blink::MainThreadEventQueue> >>(void (blink::MainThreadEventQueue::*&&)(), std::__Cr::tuple<scoped_refptr<blink::MainThreadEventQueue> >&&)
    (functor=@0x251c031efef0: (void (blink::MainThreadEventQueue::*)(blink::MainThreadEventQueue * const)) 0x79bd4a35d9e0 <blink::MainThreadEventQueue::DispatchEvents()>, bound=...) at ../../base/functional/bind_internal.h:930
#29 0x000079bd4a3643ad in base::internal::Invoker<base::internal::FunctorTraits<void (blink::MainThreadEventQueue::*&&)(), blink::MainThreadEventQueue*&&>, base::internal::BindState<true, true, false, void (blink::MainThreadEventQueue::*)(), scoped_refptr<blink::MainThreadEventQueue> >, void ()>::RunImpl<void (blink::MainThreadEventQueue::*)(), std::__Cr::tuple<scoped_refptr<blink::MainThreadEventQueue> >, 0ul>(void (blink::MainThreadEventQueue::*&&)(), std::__Cr::tuple<scoped_refptr<blink::MainThreadEventQueue> >&&, std::__Cr::integer_sequence<unsigned long, 0ul>)
    (functor=@0x251c031efef0: (void (blink::MainThreadEventQueue::*)(blink::MainThreadEventQueue * const)) 0x79bd4a35d9e0 <blink::MainThreadEventQueue::DispatchEvents()>, bound=...) at ../../base/functional/bind_internal.h:1067
#30 0x000079bd4a364337 in base::internal::Invoker<base::internal::FunctorTraits<void (blink::MainThreadEventQueue::*&&)(), blink::MainThreadEventQueue*&&>, base::internal::BindState<true, true, false, void (blink::MainThreadEventQueue::*)(), scoped_refptr<blink::MainThreadEventQueue> >, void ()>::RunOnce(base::internal::BindStateBase*)
    (base=0x251c031efed0) at ../../base/functional/bind_internal.h:980
#31 0x000079bd8f1e1cf0 in base::OnceCallback<void ()>::Run() && (this=0x251c002b1478) at ../../base/functional/callback.h:156
#32 0x000079bd8f3bfcdf in base::TaskAnnotator::RunTaskImpl (this=0x251c0004c610, pending_task=...) at ../../base/task/common/task_annotator.cc:203
#33 0x000079bd8f42e680 in base::TaskAnnotator::RunTask<base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_3>(perfetto::StaticString, base::PendingTask&, base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*)::$_3&&)
    (this=0x251c0004c610, event_name=..., pending_task=..., args=...) at ../../base/task/common/task_annotator.h:90
#34 0x000079bd8f42e104 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl (this=0x251c0004c380, continuation_lazy_now=0x7fff0f26a990)
    at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:473
#35 0x000079bd8f42d5a7 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork (this=0x251c0004c380)
    at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:338
#36 0x000079bd8f42e3a3 in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ()
    at /home/javi/devel/Chromium/chromium-wolvic/src/out/Debug/libbase.so
#37 0x000079bd8f271a7d in base::MessagePumpDefault::Run (this=0x251c0000c140, delegate=0x251c0004c468) at ../../base/message_loop/message_pump_default.cc:40
#38 0x000079bd8f42edbc in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run (this=0x251c0004c380, application_tasks_allowed=true, timeout=...)
--Type <RET> for more, q to quit, c to continue without paging--
    at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:641
#39 0x000079bd8f33d0e6 in base::RunLoop::Run (this=0x7fff0f26ad58, location=...) at ../../base/run_loop.cc:134
#40 0x000079bd8c01f669 in content::RendererMain (parameters=...) at ../../content/renderer/renderer_main.cc:367
#41 0x000079bd8c59fe56 in content::RunZygote (delegate=0x7fff0f26bb00) at ../../content/app/content_main_runner_impl.cc:676
#42 0x000079bd8c5a0698 in content::RunOtherNamedProcessTypeMain (process_type=..., main_function_params=..., delegate=0x7fff0f26bb00)
    at ../../content/app/content_main_runner_impl.cc:780
#43 0x000079bd8c5a1a7c in content::ContentMainRunnerImpl::Run (this=0x363400228080) at ../../content/app/content_main_runner_impl.cc:1146
#44 0x000079bd8c59dd3c in content::RunContentProcess (params=..., content_main_runner=0x363400228080) at ../../content/app/content_main.cc:332
#45 0x000079bd8c59e3b6 in content::ContentMain (params=...) at ../../content/app/content_main.cc:345
#46 0x0000626b22fdfb8c in ChromeMain (argc=5, argv=0x7fff0f26bce8) at ../../chrome/app/chrome_main.cc:192
#47 0x0000626b22fdf892 in main (argc=5, argv=0x7fff0f26bce8) at ../../chrome/app/chrome_exe_main_aura.cc:17
(gdb) 

@javifernandez
Copy link
Member Author

javifernandez commented Aug 7, 2024

Some "debug" information about a test case that works in Wolvic (eg, teh text field is correctly rendered):

26677-26677 chromium                 I  [26677:26677:0807/085404.348809:INFO:ime_adapter_android.cc(344)] ImeAdapterAndroid::CommitText -- text: 0x7ffbd661a4
26677-26677 chromium                 I  [26677:26677:0807/085404.348987:INFO:render_widget_host_impl.cc(2309)] RenderWidgetHostImpl::ImeCommitText -- text: 3
26909-26932 chromium                 I  [26909:26932:0807/085404.349215:INFO:widget_input_handler_impl.cc(145)] WidgetInputHandlerImpl::ImeCommitText -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.381492:INFO:editor_key_bindings.cc(125)]  Editor::HandleKeyboardEvent -- Handling a keyboard event
26909-26925 chromium                 I  [26909:26925:0807/085404.381630:INFO:editor_key_bindings.cc(47)]  Editor::HandleEditingKeyboardEvent -- Handling a keyboard event
26909-26925 chromium                 I  [26909:26925:0807/085404.413268:INFO:widget_input_handler_impl.cc(134)] WidgetInputHandlerImpl::ImeCommitTextOnMainThread -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.413393:INFO:widget_base.cc(1516)] WidgetBase::ImeCommitText -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.413437:INFO:web_frame_widget_impl.cc(3760)] WebFrameWidgetImpl::CommitText -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.413463:INFO:web_input_method_controller_impl.cc(142)] WebInputMethodControllerImpl::CommitText -- 
26909-26925 chromium                 I  [26909:26925:0807/085404.413568:INFO:input_method_controller.cc(693)] InputMethodController::CommitText -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.413597:INFO:input_method_controller.cc(900)] InputMethodController::InsertTextAndMoveCaret -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.413628:INFO:input_method_controller.cc(886)] InputMethodController::InsertText -- text: "3"
26909-26925 chromium                 I  [26909:26925:0807/085404.413667:INFO:input_event.cc(196)] InputEvent::DispatchEvent ...
26909-26925 chromium                 I  [26909:26925:0807/085404.413716:INFO:editor.cc(498)] Editor::InsertText -- text: "3" without a triggering event.

On the contrary, this is the same 'debug' data for the Disney test case that doesn't work:

 26677-26677 chromium                 I  [26677:26677:0807/085709.553164:INFO:ime_adapter_android.cc(344)] ImeAdapterAndroid::CommitText -- text: 0x7ffbd661a4
26677-26677 chromium                 I  [26677:26677:0807/085709.553314:INFO:render_widget_host_impl.cc(2309)] RenderWidgetHostImpl::ImeCommitText -- text: 9
26909-26932 chromium                 I  [26909:26932:0807/085709.553449:INFO:widget_input_handler_impl.cc(145)] WidgetInputHandlerImpl::ImeCommitText -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.624638:INFO:widget_input_handler_impl.cc(134)] WidgetInputHandlerImpl::ImeCommitTextOnMainThread -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.624763:INFO:widget_base.cc(1516)] WidgetBase::ImeCommitText -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.624811:INFO:web_frame_widget_impl.cc(3760)] WebFrameWidgetImpl::CommitText -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.624840:INFO:web_input_method_controller_impl.cc(142)] WebInputMethodControllerImpl::CommitText -- 
26909-26925 chromium                 I  [26909:26925:0807/085709.625196:INFO:input_method_controller.cc(693)] InputMethodController::CommitText -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.625256:INFO:input_method_controller.cc(900)] InputMethodController::InsertTextAndMoveCaret -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.625348:INFO:input_method_controller.cc(886)] InputMethodController::InsertText -- text: "9"
26909-26925 chromium                 I  [26909:26925:0807/085709.625410:INFO:input_event.cc(196)] InputEvent::DispatchEvent ...
26909-26925 chromium                 I  [26909:26925:0807/085709.625453:INFO:editor.cc(498)] Editor::InsertText -- text: "9" without a triggering event.

The difference between these 2 cases seem to be the lack of calls to Editor::HandleKeyboardEvent in the case that doesn´t work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant