Reorganize EditingUtilities |
|
Issue description
Many functions in EditingUtilities are used by editing commands only.
We should move them to editing/commands/EditingCommandsUtilities.{cpp,h} for better code structure, and also help our currently on-going refactorings.
,
Feb 28 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/985cac461654afe7694213499c33d231c1160a66 commit 985cac461654afe7694213499c33d231c1160a66 Author: Zhuoyu Qian <zhuoyu.qian@samsung.com> Date: Wed Feb 28 02:46:58 2018 Move Some Functions of EditingUtilities to EditingCommandsUtilities. Functions IsInline() and DeletionInputTypeFromTextGranularity() are used by editing commands only. Move them to EditingCommandsUtilities.{cpp,h} for better code structure. Bug: 802922 Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com> Change-Id: Ic9901e53d21d45ad74f2652b365efa68f5de9d92 Reviewed-on: https://chromium-review.googlesource.com/939209 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#539673} [modify] https://crrev.com/985cac461654afe7694213499c33d231c1160a66/third_party/WebKit/Source/core/editing/EditingUtilities.cpp [modify] https://crrev.com/985cac461654afe7694213499c33d231c1160a66/third_party/WebKit/Source/core/editing/EditingUtilities.h [modify] https://crrev.com/985cac461654afe7694213499c33d231c1160a66/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilities.cpp [modify] https://crrev.com/985cac461654afe7694213499c33d231c1160a66/third_party/WebKit/Source/core/editing/commands/EditingCommandsUtilities.h [modify] https://crrev.com/985cac461654afe7694213499c33d231c1160a66/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
,
Feb 28 2018
@xiaochengh There is some functions in EditingUtilities only used in one place: For example: bool IsEmptyTableCell(const Node*); Only used in SelectionAdjuster.cpp. Is it OK to move IsEmptyTableCell to SelectionAdjuster.cpp as a local function?
,
Mar 2 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dcbbb37d0753c7c23f35cebb28625e8f0d58bc1d commit dcbbb37d0753c7c23f35cebb28625e8f0d58bc1d Author: Zhuoyu Qian <zhuoyu.qian@samsung.com> Date: Fri Mar 02 08:30:16 2018 Make IsEmptyTableCell() be a local function in SelectionAdjuster.cpp. Move IsEmptyTableCell() out of EditingUtilities for better code structure. Bug: 802922 Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com> Change-Id: Ibbaeef1e6ebdfbf31c73c50a0ba81c1a16efe747 Reviewed-on: https://chromium-review.googlesource.com/942598 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#540474} [modify] https://crrev.com/dcbbb37d0753c7c23f35cebb28625e8f0d58bc1d/third_party/WebKit/Source/core/editing/EditingUtilities.cpp [modify] https://crrev.com/dcbbb37d0753c7c23f35cebb28625e8f0d58bc1d/third_party/WebKit/Source/core/editing/EditingUtilities.h [modify] https://crrev.com/dcbbb37d0753c7c23f35cebb28625e8f0d58bc1d/third_party/WebKit/Source/core/editing/SelectionAdjuster.cpp
,
Mar 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a763f0c2f7f78aead41a8a7da78260bf7dbfc405 commit a763f0c2f7f78aead41a8a7da78260bf7dbfc405 Author: Zhuoyu Qian <zhuoyu.qian@samsung.com> Date: Mon Mar 05 06:07:58 2018 Move IsAmbiguousBoundaryCharacter() out of EditingUtilities. IsAmbiguousBoundaryCharacter() only used in SpellChecker.cpp, move it from EditingUtilities to SpellChecker.cpp for better code structure. Bug: 802922 Signed-off-by: Zhuoyu Qian <zhuoyu.qian@samsung.com> Change-Id: Ie86aed1551481312544c2471dac2068199e5cd65 Reviewed-on: https://chromium-review.googlesource.com/945350 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#540786} [modify] https://crrev.com/a763f0c2f7f78aead41a8a7da78260bf7dbfc405/third_party/WebKit/Source/core/editing/EditingUtilities.h [modify] https://crrev.com/a763f0c2f7f78aead41a8a7da78260bf7dbfc405/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
|
►
Sign in to add a comment |
|
Comment 1 by bugdroid1@chromium.org
, Jan 22 2018