Make LayoutObject.selectionState marking Editing friendly |
|||||||
Issue descriptionLayoutObject.selectionState marking is owned by LayoutView and ugly. Let's make it clean. This is ready for Selection painting on NG.
,
Apr 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9b622930a92d073c8a558ee00ff9fc14c90478c0 commit 9b622930a92d073c8a558ee00ff9fc14c90478c0 Author: yoichio <yoichio@chromium.org> Date: Thu Apr 06 04:29:50 2017 Rename PendingSelection to LayoutSelection This class controls whether LayoutObject.selectionState should be updated. However its name is ambiguous and we're going to let the class have more power to manage LayoutObject. Thus rename it. BUG= 708453 Review-Url: https://codereview.chromium.org/2803583002 Cr-Commit-Position: refs/heads/master@{#462356} [modify] https://crrev.com/9b622930a92d073c8a558ee00ff9fc14c90478c0/third_party/WebKit/Source/core/editing/BUILD.gn [modify] https://crrev.com/9b622930a92d073c8a558ee00ff9fc14c90478c0/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/9b622930a92d073c8a558ee00ff9fc14c90478c0/third_party/WebKit/Source/core/editing/FrameSelection.h [rename] https://crrev.com/9b622930a92d073c8a558ee00ff9fc14c90478c0/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [rename] https://crrev.com/9b622930a92d073c8a558ee00ff9fc14c90478c0/third_party/WebKit/Source/core/editing/LayoutSelection.h
,
Apr 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a85cc3a3dd57a9811b794878a0056a27cbb058d commit 4a85cc3a3dd57a9811b794878a0056a27cbb058d Author: yoichio <yoichio@chromium.org> Date: Thu Apr 06 10:15:09 2017 Rename FrameSelection::m_pendingSelection to m_layoutSelection TEST=No change in behavior BUG= 708453 Review-Url: https://codereview.chromium.org/2802983002 Cr-Commit-Position: refs/heads/master@{#462411} [modify] https://crrev.com/4a85cc3a3dd57a9811b794878a0056a27cbb058d/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/4a85cc3a3dd57a9811b794878a0056a27cbb058d/third_party/WebKit/Source/core/editing/FrameSelection.h
,
Apr 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b33836726c84241997ec990495acd9f9616008d0 commit b33836726c84241997ec990495acd9f9616008d0 Author: yoichio <yoichio@chromium.org> Date: Wed Apr 12 10:00:20 2017 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} [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/editing/FrameSelection.h [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/editing/LayoutSelection.h [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/layout/LayoutView.cpp [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/layout/LayoutView.h [modify] https://crrev.com/b33836726c84241997ec990495acd9f9616008d0/third_party/WebKit/Source/core/layout/api/LayoutViewItem.h
,
Apr 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0ce68a3d93044122537ef22d6490319bac338c88 commit 0ce68a3d93044122537ef22d6490319bac338c88 Author: yoichio <yoichio@chromium.org> Date: Thu Apr 13 08:58:55 2017 Move LayouetSelection function definition from layout/LayoutView.cpp to editing/LayoutSelection.cpp This is just moving: https://codereview.chromium.org/2800813006/ TEST=No change in behavior. BUG= 708453 Review-Url: https://codereview.chromium.org/2813403002 Cr-Commit-Position: refs/heads/master@{#464346} [modify] https://crrev.com/0ce68a3d93044122537ef22d6490319bac338c88/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/0ce68a3d93044122537ef22d6490319bac338c88/third_party/WebKit/Source/core/layout/LayoutView.cpp
,
Apr 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/230b4e0eb7f14d23c70bc4134b8a23a9ddccd5a8 commit 230b4e0eb7f14d23c70bc4134b8a23a9ddccd5a8 Author: yoichio <yoichio@chromium.org> Date: Thu Apr 13 09:09:39 2017 Remove ClearSelection() from Layout{BlockFlow,Inline}::WillbeDestroyed() LayoutView::ClearSelection was originally introduced at 2004 to assure no crash: https://chromium.googlesource.com/chromium/src/+/10f7ac6ea6784e33161c7979e9a59c5e2cae14b5 Even now that code doesn't make sense because we update LayoutSelection after layout in following sequence: 1. FrameView::PerformPostLayoutTasks() checks LayoutSelection::SetHasPendingSelection() 2. PaintLayerCompositor::UpdateIfNeededRecursiveInternal() calls LayoutSelection::Commit() and it updates layout selection. BUG= 708453 Review-Url: https://codereview.chromium.org/2811333003 Cr-Commit-Position: refs/heads/master@{#464352} [modify] https://crrev.com/230b4e0eb7f14d23c70bc4134b8a23a9ddccd5a8/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp [modify] https://crrev.com/230b4e0eb7f14d23c70bc4134b8a23a9ddccd5a8/third_party/WebKit/Source/core/layout/LayoutInline.cpp
,
Apr 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e5d560486bf5b9e6880ad8501bf1e6b8af3a0e2e commit e5d560486bf5b9e6880ad8501bf1e6b8af3a0e2e Author: yoichio <yoichio@chromium.org> Date: Thu Apr 13 09:22:49 2017 Remove ClearSelection() from DragCaret::NodeWillBeRemoved() This line was introduced before 2011 splitting DragCaretController from FrameSelection: https://chromium.googlesource.com/chromium/src/+/fa14cd2b25316fb358f7f5ebc16f752ebcb4093a Now DragCaret doesn't touch Selection Layout and this is unnecessary call. BUG= 708453 Review-Url: https://codereview.chromium.org/2813883005 Cr-Commit-Position: refs/heads/master@{#464356} [modify] https://crrev.com/e5d560486bf5b9e6880ad8501bf1e6b8af3a0e2e/third_party/WebKit/Source/core/editing/DragCaret.cpp
,
Apr 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a1bd9cb4fe2557db40620f62766eb2e111b12de1 commit a1bd9cb4fe2557db40620f62766eb2e111b12de1 Author: yoichio <yoichio@chromium.org> Date: Fri Apr 14 01:51:50 2017 Shorten FrameSelection::IsAppearanceDirty() call stack IsAppearanceDirty() is called only from FrameView.cpp so call it directly w/o Layout API. Also rename it to NeedsLayoutSelectionUpdate(). BUG= 708453 Review-Url: https://codereview.chromium.org/2816953002 Cr-Commit-Position: refs/heads/master@{#464653} [modify] https://crrev.com/a1bd9cb4fe2557db40620f62766eb2e111b12de1/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/a1bd9cb4fe2557db40620f62766eb2e111b12de1/third_party/WebKit/Source/core/editing/FrameSelection.h [modify] https://crrev.com/a1bd9cb4fe2557db40620f62766eb2e111b12de1/third_party/WebKit/Source/core/frame/FrameView.cpp [modify] https://crrev.com/a1bd9cb4fe2557db40620f62766eb2e111b12de1/third_party/WebKit/Source/core/layout/LayoutView.cpp [modify] https://crrev.com/a1bd9cb4fe2557db40620f62766eb2e111b12de1/third_party/WebKit/Source/core/layout/LayoutView.h [modify] https://crrev.com/a1bd9cb4fe2557db40620f62766eb2e111b12de1/third_party/WebKit/Source/core/layout/api/LayoutViewItem.h
,
Apr 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1210f0f9a5941ce09b2ece0c4d2c593ef64986e5 commit 1210f0f9a5941ce09b2ece0c4d2c593ef64986e5 Author: yoichio <yoichio@chromium.org> Date: Fri Apr 14 04:06:41 2017 Shorten LayoutSelectionStartEnd() call stack LayoutObject calls FrameSelection::LayoutSelectionStartEnd() via LayoutView. Let's call it directly. BUG= 708453 Review-Url: https://codereview.chromium.org/2818703002 Cr-Commit-Position: refs/heads/master@{#464674} [modify] https://crrev.com/1210f0f9a5941ce09b2ece0c4d2c593ef64986e5/third_party/WebKit/Source/core/layout/LayoutObject.cpp [modify] https://crrev.com/1210f0f9a5941ce09b2ece0c4d2c593ef64986e5/third_party/WebKit/Source/core/layout/LayoutView.cpp [modify] https://crrev.com/1210f0f9a5941ce09b2ece0c4d2c593ef64986e5/third_party/WebKit/Source/core/layout/LayoutView.h
,
Apr 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a commit 39a09b97b317ad6c2417a3f19f6d3e32e356fe0a Author: yoichio <yoichio@chromium.org> Date: Fri Apr 21 08:38:21 2017 Remove LayoutView from LayoutSelection::commit() Since LayoutSelection::commit() doesn't use LayoutView any more, remove it. BUG= 708453 Review-Url: https://codereview.chromium.org/2831583003 Cr-Commit-Position: refs/heads/master@{#466288} [modify] https://crrev.com/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a/third_party/WebKit/Source/core/editing/FrameSelection.h [modify] https://crrev.com/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a/third_party/WebKit/Source/core/editing/LayoutSelection.h [modify] https://crrev.com/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a/third_party/WebKit/Source/core/layout/LayoutObject.cpp [modify] https://crrev.com/39a09b97b317ad6c2417a3f19f6d3e32e356fe0a/third_party/WebKit/Source/core/layout/LayoutView.cpp
,
Apr 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fb75c0c4e9721fcbca5f6229cf2e5dab5e8d9fcd commit fb75c0c4e9721fcbca5f6229cf2e5dab5e8d9fcd Author: yoichio <yoichio@chromium.org> Date: Tue Apr 25 07:01:27 2017 Remove CommitPendingSelection() from LayoutView::HitTestNoLifecycleUpdate() That's because marking LayoutObject::SelectionState doesn't affect hit test. BUG= 708453 Review-Url: https://codereview.chromium.org/2836843002 Cr-Commit-Position: refs/heads/master@{#466908} [modify] https://crrev.com/fb75c0c4e9721fcbca5f6229cf2e5dab5e8d9fcd/third_party/WebKit/Source/core/layout/LayoutView.cpp
,
Apr 25 2017
,
Apr 27 2017
,
May 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/662c7984fa505100839315658fa70320ddf58a11 commit 662c7984fa505100839315658fa70320ddf58a11 Author: yoichio <yoichio@chromium.org> Date: Thu May 11 06:03:38 2017 DCHECK FrameView in LayoutSelection::SetSelection() We early return when FrameView is not available, but it should not happen. BUG= 708453 Review-Url: https://codereview.chromium.org/2875603002 Cr-Commit-Position: refs/heads/master@{#470835} [modify] https://crrev.com/662c7984fa505100839315658fa70320ddf58a11/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2a81fbab97384f01c8cb80d680d10e6bc6a95ebb commit 2a81fbab97384f01c8cb80d680d10e6bc6a95ebb Author: yoichio <yoichio@chromium.org> Date: Thu May 11 06:09:30 2017 Introduce SelectedMap class to LayoutSelection::SetSelection() LayoutSelection::SetSelection defines 2 inner classes and 2 variables for that. This CL defines the new class to combine them. TEST=No change in behavior. BUG= 708453 Review-Url: https://codereview.chromium.org/2873953002 Cr-Commit-Position: refs/heads/master@{#470839} [modify] https://crrev.com/2a81fbab97384f01c8cb80d680d10e6bc6a95ebb/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/18e6b4998b080ffe6c303c85a3498dab8f55f622 commit 18e6b4998b080ffe6c303c85a3498dab8f55f622 Author: yoichio <yoichio@chromium.org> Date: Fri May 12 08:04:11 2017 Introduce CollectSelectedMap() in LayoutSelection::SetSelection() This CL introduces local static CollectSelectedMap() from big LayoutSelection::SetSelection() and shares it to create |{new,old}_selected_map|. TEST=No change in behavior. BUG= 708453 Review-Url: https://codereview.chromium.org/2874153002 Cr-Commit-Position: refs/heads/master@{#471247} [modify] https://crrev.com/18e6b4998b080ffe6c303c85a3498dab8f55f622/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/56fd91872a4109611d4c1142243b349e430b61a2 commit 56fd91872a4109611d4c1142243b349e430b61a2 Author: yoichio <yoichio@chromium.org> Date: Tue May 16 01:47:18 2017 Make for loop using C++11 foreach in LayoutSelection::SetSelection() BUG= 708453 Review-Url: https://codereview.chromium.org/2876363002 Cr-Commit-Position: refs/heads/master@{#471977} [modify] https://crrev.com/56fd91872a4109611d4c1142243b349e430b61a2/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b27dd8b56144f6373f05716a028b907a4fb21af2 commit b27dd8b56144f6373f05716a028b907a4fb21af2 Author: yoichio <yoichio@chromium.org> Date: Wed May 17 07:17:23 2017 Remove redundant variables in LayoutSelection::SetSelection() Use |selection_{start/end}_pos_| instead of old_{start/end}_pos| and update |selection_{start/end}_pos_| at the end of SetSelection(). TEST=No change in behavior BUG= 708453 Review-Url: https://codereview.chromium.org/2884903002 Cr-Commit-Position: refs/heads/master@{#472365} [modify] https://crrev.com/b27dd8b56144f6373f05716a028b907a4fb21af2/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/62b34f48da334b945960af53f8cbaf656907bf0c commit 62b34f48da334b945960af53f8cbaf656907bf0c Author: yoichio <yoichio@chromium.org> Date: Wed May 17 09:52:24 2017 Introduce MarkSetSelectionState() in LayoutSelection::SetSelection() This CL improves code readbility BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2882963002 Cr-Commit-Position: refs/heads/master@{#472403} [modify] https://crrev.com/62b34f48da334b945960af53f8cbaf656907bf0c/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 23 2017
,
May 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3d8a59becdfba11d9e9249f04c4ed6695e2a878b commit 3d8a59becdfba11d9e9249f04c4ed6695e2a878b Author: yoichio <yoichio@chromium.org> Date: Tue May 23 07:26:33 2017 Split LayoutSelecton::ClearSelection() out from SetSelection() |ClearSelection()| calls |SetSelection(0, -1, 0, -1, kPaintInvalidationNewMinusOld)| but what it does is only marking old layout object selection state none and invalidating them. Just extract its step and make |SetSelection()| layout clean. BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2894383003 Cr-Commit-Position: refs/heads/master@{#473827} [modify] https://crrev.com/3d8a59becdfba11d9e9249f04c4ed6695e2a878b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/353a96e9ef4fe92c8808aac4acec49b2a7527109 commit 353a96e9ef4fe92c8808aac4acec49b2a7527109 Author: yoichio <yoichio@chromium.org> Date: Tue May 23 13:04:02 2017 Cleanup traversing in LayoutSelection.cpp::CollectSelectedMap() Since |selection_start| is always before |selection_end|(L322), we don't need to switch back traversing. Patch[1] introduced the backward traversal to support CSS Region. Since, Blink doesn't support CSS Region, we can remove it safely. [1] https://chromiumcodereview.appspot.com/23674007 [CSSRegions] Not possible to clear the selection when mixing content from different FlowThreads BUG= 708453 Review-Url: https://codereview.chromium.org/2895193002 Cr-Commit-Position: refs/heads/master@{#473872} [modify] https://crrev.com/353a96e9ef4fe92c8808aac4acec49b2a7527109/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
May 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e7eadd47df235c4a2b583e12e56279022c9bc944 commit e7eadd47df235c4a2b583e12e56279022c9bc944 Author: yoichio <yoichio@chromium.org> Date: Fri May 26 04:48:58 2017 Introduce SelectionPaintRange in LayoutSelection SelectionPaintRange has members of |selection_start_|,|selection_end_, |selection_start_pos_| and |selection_end_pos_| which LayoutSelection had directly. BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2901263002 Cr-Commit-Position: refs/heads/master@{#474909} [modify] https://crrev.com/e7eadd47df235c4a2b583e12e56279022c9bc944/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/e7eadd47df235c4a2b583e12e56279022c9bc944/third_party/WebKit/Source/core/editing/LayoutSelection.h
,
May 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6ba7bee79232bdf31a7128df13ae4236d4e70659 commit 6ba7bee79232bdf31a7128df13ae4236d4e70659 Author: yoichio <yoichio@chromium.org> Date: Tue May 30 09:23:42 2017 Make LayoutSelection::SetSelection() local Update member |paint_range| at Commit(). This CL also moves enum SelectionPaintInvalidationMode to local and renames it appropriately. BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2906273002 Cr-Commit-Position: refs/heads/master@{#475478} [modify] https://crrev.com/6ba7bee79232bdf31a7128df13ae4236d4e70659/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/6ba7bee79232bdf31a7128df13ae4236d4e70659/third_party/WebKit/Source/core/editing/LayoutSelection.h
,
Jun 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3b6c0e0cda44ef86b480a3c9604417d78f6ac650 commit 3b6c0e0cda44ef86b480a3c9604417d78f6ac650 Author: yoichio <yoichio@chromium.org> Date: Thu Jun 01 09:25:22 2017 Extract SelectionPaintRange calculation from LayoutSelection::Commit() This CL introduces CalcSelectionPaintRange() and minimize Commit(). BUG= 708453 Review-Url: https://codereview.chromium.org/2916803003 Cr-Commit-Position: refs/heads/master@{#476234} [modify] https://crrev.com/3b6c0e0cda44ef86b480a3c9604417d78f6ac650/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/3b6c0e0cda44ef86b480a3c9604417d78f6ac650/third_party/WebKit/Source/core/editing/LayoutSelection.h
,
Jun 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0a7a89f4a4f300968dd600ad428a45b01541e3e0 commit 0a7a89f4a4f300968dd600ad428a45b01541e3e0 Author: yoichio <yoichio@chromium.org> Date: Mon Jun 12 07:46:44 2017 Introduce range-based for loop in LayoutSelection. LayoutSelection traverses Layout tree in the way here and there. This CL introduces LayoutSelection::Iterator which lists only 'valid' LayoutObjects( see SelectionPaintRange::Iterator::operator++); BUG= 708453 Review-Url: https://codereview.chromium.org/2921863002 Cr-Commit-Position: refs/heads/master@{#478562} [modify] https://crrev.com/0a7a89f4a4f300968dd600ad428a45b01541e3e0/third_party/WebKit/Source/core/editing/LayoutSelection.cpp [modify] https://crrev.com/0a7a89f4a4f300968dd600ad428a45b01541e3e0/third_party/WebKit/Source/core/editing/LayoutSelection.h
,
Jun 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e09d97394910e35d76264416d4df48c0e477d2c commit 6e09d97394910e35d76264416d4df48c0e477d2c Author: yoichio <yoichio@chromium.org> Date: Mon Jun 12 08:52:40 2017 Early return if SelectionInDOMTree is None at LayoutSelection::CalcSelectionPaintRange. It must be Null SelectionPaintRange w/o calculating VSinFlatTree. BUG= 708453 Review-Url: https://codereview.chromium.org/2932293002 Cr-Commit-Position: refs/heads/master@{#478567} [modify] https://crrev.com/6e09d97394910e35d76264416d4df48c0e477d2c/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
Jun 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2d27e28015730c2d6f814ff24cc0ae811303eee3 commit 2d27e28015730c2d6f814ff24cc0ae811303eee3 Author: yoichio <yoichio@chromium.org> Date: Wed Jun 14 06:24:24 2017 Use SelectionPaintRange::Iterator in LayoutSelection::ClearSelection(). ClearSelection() only uses LayoutObjects that just SelectionPaintRange iterates. BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2936963003 Cr-Commit-Position: refs/heads/master@{#479304} [modify] https://crrev.com/2d27e28015730c2d6f814ff24cc0ae811303eee3/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
Jun 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/63782c356988416645c4db73cec6d961a769d3d5 commit 63782c356988416645c4db73cec6d961a769d3d5 Author: yoichio <yoichio@chromium.org> Date: Wed Jun 14 10:26:15 2017 Remove redundant arg of LayoutSelection::CollectSelectedMap(). We always call it with kCollectBlock. BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2935253002 Cr-Commit-Position: refs/heads/master@{#479344} [modify] https://crrev.com/63782c356988416645c4db73cec6d961a769d3d5/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
Jun 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6b583e8e663c6afb2a9ceffaaad6b54637bdd8fc commit 6b583e8e663c6afb2a9ceffaaad6b54637bdd8fc Author: yoichio <yoichio@chromium.org> Date: Thu Jun 15 08:39:14 2017 Refactor LayoutSelection::SelectionBounds() with CollectSelectedMap(). CollectSelectedMap() collects LayoutObjects and LayoutBlocks that removed for-while-loop iterates. Then we can unify their Rect. BUG= 708453 TEST=No change in behavior Review-Url: https://codereview.chromium.org/2938133002 Cr-Commit-Position: refs/heads/master@{#479643} [modify] https://crrev.com/6b583e8e663c6afb2a9ceffaaad6b54637bdd8fc/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
Jun 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2e9c25f8d596ec955e3ff7667e6d10376466596a commit 2e9c25f8d596ec955e3ff7667e6d10376466596a Author: yoichio <yoichio@chromium.org> Date: Thu Jun 22 05:54:04 2017 Remove redundant canonicalization in LayoutSelection::CalacSelectionRange Since we call CreateVisibleSelection just above, we don't need canonicalize again. BUG= 708453 Review-Url: https://codereview.chromium.org/2951893003 Cr-Commit-Position: refs/heads/master@{#481457} [modify] https://crrev.com/2e9c25f8d596ec955e3ff7667e6d10376466596a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
Jun 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/80471d8d1cbf8b08eaa893832f4d735765881a02 commit 80471d8d1cbf8b08eaa893832f4d735765881a02 Author: yoichio <yoichio@chromium.org> Date: Mon Jun 26 04:07:44 2017 Simplify LayoutSelection::CalcSelection() This CL changes - Unify code whether selection is inside TextControl or not - Split block cursor logic. Then CalcSelection does - return FrameSelection.VSinFlat if no block cursor - if block cursor, extending selection with NextPositionOf(kGrapheme); BUG= 708453 Review-Url: https://codereview.chromium.org/2953743002 Cr-Commit-Position: refs/heads/master@{#482194} [modify] https://crrev.com/80471d8d1cbf8b08eaa893832f4d735765881a02/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
,
Jul 4 2017
,
Jul 4 2017
,
Jul 4 2017
,
Jul 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/24bd4066e46f42bdafe467100538f4c6e940ff55 commit 24bd4066e46f42bdafe467100538f4c6e940ff55 Author: yoichio <yoichio@chromium.org> Date: Thu Jul 27 16:39:08 2017 Revert of Remove ClearSelection() from Layout{BlockFlow,Inline}::WillbeDestroyed() (patchset #1 id:1 of https://codereview.chromium.org/2811333003/ ) Reason for revert: This causes use-after-free: crbug.com/748718 Original issue's description: > Remove ClearSelection() from Layout{BlockFlow,Inline}::WillbeDestroyed() > > LayoutView::ClearSelection was originally introduced at 2004 to assure no > crash: > https://chromium.googlesource.com/chromium/src/+/10f7ac6ea6784e33161c7979e9a59c5e2cae14b5 > > Even now that code doesn't make sense because we update LayoutSelection after > layout in following sequence: > 1. FrameView::PerformPostLayoutTasks() checks > LayoutSelection::SetHasPendingSelection() > 2. PaintLayerCompositor::UpdateIfNeededRecursiveInternal() calls > LayoutSelection::Commit() and it updates layout selection. > > > > BUG= 708453 > > Review-Url: https://codereview.chromium.org/2811333003 > Cr-Commit-Position: refs/heads/master@{#464352} > Committed: https://chromium.googlesource.com/chromium/src/+/230b4e0eb7f14d23c70bc4134b8a23a9ddccd5a8 TBR=yosin@chromium.org,eae@chromium.org,kojih@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= 708453 , 748718 Review-Url: https://codereview.chromium.org/2988003002 Cr-Commit-Position: refs/heads/master@{#489968} [modify] https://crrev.com/24bd4066e46f42bdafe467100538f4c6e940ff55/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp [modify] https://crrev.com/24bd4066e46f42bdafe467100538f4c6e940ff55/third_party/WebKit/Source/core/layout/LayoutInline.cpp |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by yoichio@chromium.org
, Apr 5 2017