As of today we have 132 files in core/editing/. It is too many for one
directory.
I would like to have:
ime/
- ImeTextSpan.{cpp.h}
- ImeTextSpanVectorBuilder.{cpp,h}
- InputMethodController.{cpp,h}
- InputMethodControllerTest.cpp
- PlainTextRange.{cpp,h}
finder/
- FindingInPageCoordinates.{cpp,h}
- FindOptions.h
- TextFinder.{cpp,h}
- TextFinderTest.cpp
position/
- EphemeralRange.{cpp,h}
- Position.{cpp,h}
- PositionTest.cpp
- PositionIterator.{cpp,h}
- PositionIteratorTest.cpp
- PositionWithAffinity.{cpp,h}
- RelocatablePosition.{cpp,h}
- RelocatablePositionTest.cpp
- RenderedPosition.{cpp,h}
- RenderedPositionTest.cpp
- VisiblePosition.{cpp,h}
- VisiblePositionTest.cpp
selection/
- CaretDispalyItemClient.{cpp,h}
- CaretDisplayItemClientTest.cpp
- DOMSeleciton.{cpp,h}
- DragCaret.{cpp,h}
- FrameCaret.{cpp,h}
- FrameCaretTest.cpp
- FrameSelection.{cpp,h}
- FrameSelectionTest.cpp
- GranularityStrategy.{cpp,h}
- GranularityStrategyTest.cpp
- LayoutSeleciton.{cpp,h}
- LayoutSelectionTest.cpp
- LinkSelectionTest.cpp
- Selection.idl
- SelectionAdjuster.{cpp,h}
- SelectionController.{cpp,h}
- SelectionControllerTest.cpp
- SelectionEditor.{cpp,h}
- SelectionModifier.{cpp,h}
- SelectionModifierCharacter.cpp
- SelectionModifierTest.cpp
- SelectionModifierWord.cpp
- SelectionStrategy.h
- SelectionTemplate.{cpp,h}
- SelectionTemplateTet.cpp
- SelectionType.h
- SetSelectionOptions.{cpp,h}
- VisibleSelection.{cpp,h}
- VisibleSelectionTest.cpp
testing/
- EditingTestBase.{cpp,h}
Files used only testing should be consolidated into testing/ directory.
As of today we have 132 files in core/editing/. It is too many for one
directory.
We would like to have:
ime/
- ImeTextSpan.{cpp.h}
- ImeTextSpanVectorBuilder.{cpp,h}
- InputMethodController.{cpp,h}
- InputMethodControllerTest.cpp
finder/
- FindingInPageCoordinates.{cpp,h}
- FindOptions.h
- TextFinder.{cpp,h}
- TextFinderTest.cpp
testing/
- EditingTestBase.{cpp,h}
Files used only testing should be consolidated into testing/ directory.
I have some other ideas about the reorganization. Instead of having divisions of position and selection, how about introducing a model/ directory:
model/
- EphemeralRange.{cpp,h}
- PlainTextRange.{cpp,h}
- Position.{cpp,h}
- PositionTest.cpp
- SelectionTemplate.{cpp,h}
- SelectionTemplateTet.cpp
- SelectionType.h
- TextAffinity.{cpp,h}
- VisiblePosition.{cpp,h}
- VisiblePositionTest.cpp
- VisibleSelection.{cpp,h}
- VisibleSelectionTest.cpp
Then selection/ direction contains support only for frame selection. And there shouldn't be a position/ directory.
Notes:
1. classes in model/ are widely used in all editing and editing-related component, so they should be grouped together
2. Although PlainTextRange is extensively used by IME, it's a general class and I suggested AX using it.
3. RelocatablePosition is only used by commands and should go to commands/
4. PositionIterator is only used by canonicalization, and should be grouped together with EditingUtilities and VisibleUnits
5. RenderedPosition is a myth nobody understands (sigh...) and shouldn't be moved for now
We (tkent@, xiaochengh@, yoichio@, yosin@) had an offline discussion but didn't find a good idea to reorganize the classes other than ime and finder. The conclusion is to leave the files at their original places other than:
ime/
- ImeTextSpan.{cpp.h}
- ImeTextSpanVectorBuilder.{cpp,h}
- InputMethodController.{cpp,h}
- InputMethodControllerTest.cpp
finder/
- FindingInPageCoordinates.{cpp,h}
- FindOptions.h
- TextFinder.{cpp,h}
- TextFinderTest.cpp
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.
Sorry for the inconvenience if the bug really should have been left as Available.
For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Comment 1 by shanmug...@samsung.com
, Sep 13 2017Status: Assigned (was: Available)