|
|
Created:
4 years, 2 months ago by yosin_UTC9 Modified:
4 years, 2 months ago CC:
blink-reviews, chromium-reviews Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMove setNonDirectionalSelectionIfNeeded() to SelectionController from FrameSelection
This patch moves |setNonDirectionalSelectionIfNeeded()| to |SelectionController|
from |FrameSelection| since it is used only in |SelectionController| to simplify
|FrameSelection| for improving code health.
This patch also gets rid of |originalBase()| which had been used in
|setNonDirectionalSelectionIfNeeded()|, but it has never been used.
BUG=n/a
TEST=n/a; no behavior changes
Committed: https://crrev.com/82db1ff7a020d127b961d81e4baa60bbfd5baf03
Cr-Commit-Position: refs/heads/master@{#427032}
Patch Set 1 : 2016-10-20T18:42:15 #Patch Set 2 : 2016-10-21T11:31:27 #Patch Set 3 : 2016-10-21T13:13:56 #Patch Set 4 : 2016-10-21T13:33:51 #Patch Set 5 : 2016-10-21T14:42:31 #Patch Set 6 : 2016-10-21T15:43:37 #
Total comments: 8
Patch Set 7 : 2016-10-24T15:46:27 #
Total comments: 2
Patch Set 8 : 2016-10-24T17:02:54 #
Messages
Total messages: 64 (54 generated)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== 2016-10-20T16:39:47 BUG= ========== to ========== Move setNonDirectionalSelectionIfNeeded() to SelectionController from FrameSelection This patch moves |setNonDirectionalSelectionIfNeeded()| to |SelectionController| from |FrameSelection| since it is used only in |SelectionController| to simplify |FrameSelection| for improving code health. BUG=n/a TEST=n/a; no behavior changes ==========
The CQ bit was unchecked by yosin@chromium.org
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
Patchset #2 (id:20001) has been deleted
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...) mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
Patchset #2 (id:40001) has been deleted
Patchset #2 (id:60001) has been deleted
Patchset #2 (id:80001) has been deleted
Patchset #1 (id:1) has been deleted
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
yosin@chromium.org changed reviewers: + xiaochengh@chromium.org, yoichio@chromium.org
PTAL
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
I'm mostly OK with the path. Just a few minor revisions needed. https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/FrameSelection.cpp:828: m_frame->eventHandler().selectionController().documentDetached(); SelectionController::DocumentDetached doesn't seem to be quite relevant to FrameSelection. I think we should move the call site somewhere else, say, to Document::shutdown. https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/FrameSelection.h (left): https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/FrameSelection.h:308: VisiblePositionTemplate<Strategy> originalBase() const; Is it a drive-by removal of unused functions? If so, please mention in patch description. https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/SelectionController.h (right): https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/SelectionController.h:43: : public GarbageCollectedFinalized<SelectionController> { What's the difference between GarbageCollected and GarbageCollectedFinalized? https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/SelectionController.h:120: VisiblePositionInFlatTree m_originalBaseInFlatTree; It's a bad pattern to store a VP on heap, as it's likely that the DOM changes during the storage of the VP. Can we add a TODO to eliminate it?
Description was changed from ========== Move setNonDirectionalSelectionIfNeeded() to SelectionController from FrameSelection This patch moves |setNonDirectionalSelectionIfNeeded()| to |SelectionController| from |FrameSelection| since it is used only in |SelectionController| to simplify |FrameSelection| for improving code health. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Move setNonDirectionalSelectionIfNeeded() to SelectionController from FrameSelection This patch moves |setNonDirectionalSelectionIfNeeded()| to |SelectionController| from |FrameSelection| since it is used only in |SelectionController| to simplify |FrameSelection| for improving code health. This patch also gets rid of |originalBase()| which had been used in |setNonDirectionalSelectionIfNeeded()|, but it has never been used. BUG=n/a TEST=n/a; no behavior changes ==========
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
yosin@chromium.org changed reviewers: + tkent@chromium.org
PTAL - Move SelectionController::documentDettached() call to Document - Update comments https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/FrameSelection.cpp (right): https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/FrameSelection.cpp:828: m_frame->eventHandler().selectionController().documentDetached(); On 2016/10/24 at 03:53:11, Xiaocheng wrote: > SelectionController::DocumentDetached doesn't seem to be quite relevant to FrameSelection. I think we should move the call site somewhere else, say, to Document::shutdown. Done. https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/FrameSelection.h (left): https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/FrameSelection.h:308: VisiblePositionTemplate<Strategy> originalBase() const; On 2016/10/24 at 03:53:11, Xiaocheng wrote: > Is it a drive-by removal of unused functions? If so, please mention in patch description. Done https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/SelectionController.h (right): https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/SelectionController.h:43: : public GarbageCollectedFinalized<SelectionController> { On 2016/10/24 at 03:53:11, Xiaocheng wrote: > What's the difference between GarbageCollected and GarbageCollectedFinalized? Member variable |m_originalBaseInFlatTree| requires |GarbageCollectedFinalized<T>|. Detailed explanation found in "Finalization Error" section of http://dev.chromium.org/developers/blink-gc-plugin-errors https://codereview.chromium.org/2441573002/diff/200001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/SelectionController.h:120: VisiblePositionInFlatTree m_originalBaseInFlatTree; On 2016/10/24 at 03:53:11, Xiaocheng wrote: > It's a bad pattern to store a VP on heap, as it's likely that the DOM changes during the storage of the VP. > > Can we add a TODO to eliminate it? Done.
lgtm
https://codereview.chromium.org/2441573002/diff/220001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/SelectionController.h (right): https://codereview.chromium.org/2441573002/diff/220001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/SelectionController.h:48: DECLARE_VIRTUAL_TRACE(); Why do you make it virtual?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by yosin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL Use DEFINE_TRACE() in FrameSelection instead of DEFINE_VIRTUAL_TRACE() https://codereview.chromium.org/2441573002/diff/220001/third_party/WebKit/Sou... File third_party/WebKit/Source/core/editing/SelectionController.h (right): https://codereview.chromium.org/2441573002/diff/220001/third_party/WebKit/Sou... third_party/WebKit/Source/core/editing/SelectionController.h:48: DECLARE_VIRTUAL_TRACE(); On 2016/10/24 at 07:40:59, tkent wrote: > Why do you make it virtual? Just follow FrameSelection... Use |DEFINE_TRACE()| for |SelectionController|. I make FrameSelection not use DEFINE_VIRTUAL_TRACE(), http://crrev.com/2443883002
lgtm
The CQ bit was unchecked by yosin@chromium.org
The CQ bit was checked by yosin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from xiaochengh@chromium.org Link to the patchset: https://codereview.chromium.org/2441573002/#ps240001 (title: "2016-10-24T17:02:54")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #8 (id:240001)
Message was sent while issue was closed.
Description was changed from ========== Move setNonDirectionalSelectionIfNeeded() to SelectionController from FrameSelection This patch moves |setNonDirectionalSelectionIfNeeded()| to |SelectionController| from |FrameSelection| since it is used only in |SelectionController| to simplify |FrameSelection| for improving code health. This patch also gets rid of |originalBase()| which had been used in |setNonDirectionalSelectionIfNeeded()|, but it has never been used. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Move setNonDirectionalSelectionIfNeeded() to SelectionController from FrameSelection This patch moves |setNonDirectionalSelectionIfNeeded()| to |SelectionController| from |FrameSelection| since it is used only in |SelectionController| to simplify |FrameSelection| for improving code health. This patch also gets rid of |originalBase()| which had been used in |setNonDirectionalSelectionIfNeeded()|, but it has never been used. BUG=n/a TEST=n/a; no behavior changes Committed: https://crrev.com/82db1ff7a020d127b961d81e4baa60bbfd5baf03 Cr-Commit-Position: refs/heads/master@{#427032} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/82db1ff7a020d127b961d81e4baa60bbfd5baf03 Cr-Commit-Position: refs/heads/master@{#427032} |