Revert "[Mac Text Subs] Move up check for text substitutions"
Minor
提交哈希:
e8074166433b0bb1718dd1682e6b601a7b02a03c
提交时间: 2025-05-05 18:54:40+00:00
影响等级: Minor
生成工具: webview2-upstream-sentry
上游审核链接:
查看上游审核 🔗
📋 摘要
This submission is a rollback operation, reverting the previous changes made in commit 20f7c0ec898720267e9d3aaae252edf1551469d5 regarding the Mac text replacement checking logic. The original modification attempted to fix a regression caused by http://crrev/c/6299632 by performing an early check for text replacement. However, while this solution addressed the initial issue, it introduced other new problems. Specifically, the change in the setTextSelectionText:offset:range: method removes the early text replacement checking logic and moves the calls to _substitutionWasApplied and dismissCorrectionIndicatorForView from the beginning of the method back to their original positions. This rollback affects the text input handling flow in the render_widget_host_view_cocoa.mm file of Remote Cocoa.
🎯 影响分析
The impact of this rollback on WebView2Mac is relatively minor but still warrants attention. The changes mainly affect the handling logic of the automatic text replacement feature on macOS, which directly relates to the user’s text input experience within the WebView2Mac control. Specific impacts include: 1) The timing of text replacement checks may change, potentially affecting system behaviors such as auto-correction and quote replacement during text input; 2) Since this is a rollback operation, certain previously fixed issues may be reintroduced, so close monitoring is required to ensure the text replacement feature functions correctly; 3) In certain specific text input scenarios, abnormal text replacement behavior may occur, especially when users input text rapidly or use particular input methods. However, as this mainly restores the previous stable state, it will not directly affect the core rendering and interaction functionalities of WebView2Mac.
受影响的类:
RenderWidgetHostViewCocoa