|
|
Chromium Code Reviews|
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. |
DescriptionGet rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree
This patch gets rid of flat tree version of |createVisibleSelection()| taking
to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to
reduce number of overloads for improving code health.
BUG=657237
TEST=n/a; no behavior changes
Committed: https://crrev.com/dfb8322ccb6687fa5fd64029e9746049c12e06e1
Cr-Commit-Position: refs/heads/master@{#426419}
Patch Set 1 : 2016-10-17T17:15:40 #Patch Set 2 : 2016-10-18T17:19:25 #Patch Set 3 : 2016-10-18T17:29:55 #
Total comments: 6
Patch Set 4 : 2016-10-20T13:16:24 #Patch Set 5 : 2016-10-20T13:19:29 #
Dependent Patchsets: Messages
Total messages: 31 (20 generated)
Description was changed from ========== 2016-10-17T17:15:40 BUG= ========== to ========== Get rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree This patch gets rid of flat tree version of |createVisibleSelection()| taking to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to reduce number of overloads for improving code health. 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...
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 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: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...)
yosin@chromium.org changed reviewers: + xiaochengh@chromium.org, yoichio@chromium.org
PTAL
https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/PendingSelection.cpp (right): https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/PendingSelection.cpp:85: if (visibleStart.isNull()) Does it change the behavior? |createVisiblePosition(pos, pos)| currently uses SelectionTemplate::Builder::setBaseAndExtentDeprecated, which does not necessarily returns null when |visibleStart| is null. https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/PendingSelection.cpp:90: if (visibleExtent.isNull()) Same question. https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/PendingSelection.cpp:101: if (visibleEnd.isNull()) Same question.
https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/PendingSelection.cpp (right): https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/PendingSelection.cpp:85: if (visibleStart.isNull()) On 2016/10/19 at 02:33:47, Xiaocheng wrote: > Does it change the behavior? |createVisiblePosition(pos, pos)| currently uses SelectionTemplate::Builder::setBaseAndExtentDeprecated, which does not necessarily returns null when |visibleStart| is null. In the call site (only one), we do: const VisibleSelectionInFlatTree& selection = calcVisibleSelection(originalSelection); if (!selection.isRange()) { layoutView.clearSelection(); return; } So, caret and none are handled as same. I think this is yet another example, it is better to handle null explicitly. ;-) If original code does, so we don't need to discuss now. https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/PendingSelection.cpp:90: if (visibleExtent.isNull()) On 2016/10/19 at 02:33:47, Xiaocheng wrote: > Same question. ditto. https://codereview.chromium.org/2425623002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/PendingSelection.cpp:101: if (visibleEnd.isNull()) On 2016/10/19 at 02:33:47, Xiaocheng wrote: > Same question. ditto.
I see. lgtm then.
The CQ bit was checked by yosin@chromium.org
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
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
The CQ bit was checked by yosin@chromium.org
Description was changed from ========== Get rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree This patch gets rid of flat tree version of |createVisibleSelection()| taking to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to reduce number of overloads for improving code health. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Get rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree This patch gets rid of flat tree version of |createVisibleSelection()| taking to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to reduce number of overloads for improving code health. BUG=657237 TEST=n/a; no behavior changes ==========
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
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...) 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
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/2425623002/#ps80001 (title: "2016-10-20T13:19:29")
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 #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Get rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree This patch gets rid of flat tree version of |createVisibleSelection()| taking to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to reduce number of overloads for improving code health. BUG=657237 TEST=n/a; no behavior changes ========== to ========== Get rid of flat tree version of createVisibleSelection() taking two VisiblePositionInFlatTree This patch gets rid of flat tree version of |createVisibleSelection()| taking to |VisiblePositionInFlatTree|by replacing with |SelectionInFlatTree| version to reduce number of overloads for improving code health. BUG=657237 TEST=n/a; no behavior changes Committed: https://crrev.com/dfb8322ccb6687fa5fd64029e9746049c12e06e1 Cr-Commit-Position: refs/heads/master@{#426419} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/dfb8322ccb6687fa5fd64029e9746049c12e06e1 Cr-Commit-Position: refs/heads/master@{#426419} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
