Currently, IdleSpellCheckCallback is both a state machine, and also an IdleTask object to be passed to the requestIdleCallback() API. This results in confusion and lifecycle management issues. State machine and IdleTask should be decoupled.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/917c45b8a11b337c74971b3babcae18d648b07a4 commit 917c45b8a11b337c74971b3babcae18d648b07a4 Author: Xiaocheng Hu <xiaochengh@chromium.org> Date: Fri Aug 24 20:21:19 2018 Stop using IdleSpellCheckCallback as both state machine and callback Currently, IdleSpellCheckCallback is both a state machine that controls the checking at idle time, and also the IdleTask callback to be passed to document.requestIdleCallback() API. This results confusion in the lifecycle management of the class. This patch changes the class into a state machine only, and introduces a new IdleCallback class to be passed to requestIdleCallback() to fix the issue. Bug: 877154 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I79ae9711cb8308e902e8a472039b5e0723948447 Reviewed-on: https://chromium-review.googlesource.com/1187555 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#585965} [modify] https://crrev.com/917c45b8a11b337c74971b3babcae18d648b07a4/third_party/blink/renderer/core/editing/spellcheck/idle_spell_check_callback.cc [modify] https://crrev.com/917c45b8a11b337c74971b3babcae18d648b07a4/third_party/blink/renderer/core/editing/spellcheck/idle_spell_check_callback.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0 commit 223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0 Author: Xiaocheng Hu <xiaochengh@chromium.org> Date: Mon Aug 27 17:09:18 2018 Rename IdleSpellCheckCallback to IdleSpellCheckController After crrev.com/c/1187555, IdleSpellCheckCallback class is no longer used as a callback, but only a state machine controlling the checking progress at idle time. Hence, this patch renames it, which is mostly mechanical string replacement. Bug: 877154 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I54127f84620d45a9d533a5091cd628054d80567c Reviewed-on: https://chromium-review.googlesource.com/1188773 Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#586289} [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/BUILD.gn [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/editor.h [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/cold_mode_spell_check_requester.h [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/hot_mode_spell_check_requester.h [rename] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/idle_spell_check_controller.cc [rename] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/idle_spell_check_controller.h [rename] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/idle_spell_check_controller_test.cc [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/spell_checker.cc [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/editing/spellcheck/spell_checker.h [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/exported/web_frame_test.cc [modify] https://crrev.com/223b5eef45dfe9db1fc3b96f8c6c9cf52925caa0/third_party/blink/renderer/core/testing/internals.cc
Comment 1 by bugdroid1@chromium.org
, Aug 24