Move layout/LayoutView::setSelection() to editing/LayoutSelection
This moves layout marking functionality from LayoutView to LayoutSelection
to prepare for LayoutNG.
This is refatoring but difference of each lifetime makes different
LayoutObject member clearing timing(see FrameSelection::ContextDestroyed).
Detail:
LayoutView::
-SetSelection()
-SelectionBounds()
-InvalidatePaintForSelection()
-selection_start_, selection_end_
-selection_start_pos_, selection_end_pos_
-> move to LayoutSelection. Leave function definition in LayoutView and will move it
to LayoutSelection later.
ClearSelection(), SelectionStartEnd()
They are used from few LayoutObject classes so move function body to
LayoutSelection and make LayoutView and FrameSelection proxies.
LayoutSelection::
+SetSelection()
+SelectionBounds()
+InvalidatePaintForSelection()
+selection_start_, selection_end_
+selection_start_pos_, selection_end_pos_
+OnDocumentShutdown();
This just clear above 4 members because LayoutSelection lives longer than
LayoutView.
LayoutViewItem::
-SelectionBounds()
-InvalidatePaintForSelection()
They are only used from FrameSelection. Since FrameSelection has LayoutSelection,
just use it directly.
BUG=708453
Review-Url: https://codereview.chromium.org/2800813006
Cr-Commit-Position: refs/heads/master@{#463978}
7 files changed