|
|
Created:
3 years, 6 months ago by yosin_UTC9 Modified:
3 years, 6 months ago CC:
blink-reviews, chromium-reviews Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionRefactor SelectionController::SelectClosestMisspellingFromHitTestResult()
This patch changes |SelectClosestMisspellingFromHitTestResult()| in
|SelectionController| class to utilize early-return style for improving
readability.
# Details
|SelectClosestMisspellingFromHitTestResult() calls
|UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null
|VisibleSelectionInFlatTree| if |pos.IsNotNull()| and
|marker != nullptr| are true, other wise this function calls null
|VisibleSelectionInFlatTree|.
Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a
whitespace only if selection is range, we don't need to call it for null
selection.
BUG=n/a
TEST=n/a; no behavior changes
Review-Url: https://codereview.chromium.org/2952173002
Cr-Commit-Position: refs/heads/master@{#481751}
Committed: https://chromium.googlesource.com/chromium/src/+/5a5d5754d9d90c8869f2450c89e0ed0285242ab1
Patch Set 1 : 2017-06-22T17:44:33 #
Messages
Total messages: 16 (12 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 ========== 2017-06-22T17:44:33 BUG= 2017-06-22T17:44:10 ========== to ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. This function calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ==========
Description was changed from ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. This function calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Background This function calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ==========
Description was changed from ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Background This function calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Details |SelectClosestMisspellingFromHitTestResult() calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ==========
Description was changed from ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Details |SelectClosestMisspellingFromHitTestResult() calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Details |SelectClosestMisspellingFromHitTestResult() calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ==========
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.
lgtm
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...
CQ is committing da patch. Bot data: {"patchset_id": 1, "attempt_start_ts": 1498179018537870, "parent_rev": "3e24f475f9f865b61b3bf4b61f86276cc983d243", "commit_rev": "5a5d5754d9d90c8869f2450c89e0ed0285242ab1"}
Message was sent while issue was closed.
Description was changed from ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Details |SelectClosestMisspellingFromHitTestResult() calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes ========== to ========== Refactor SelectionController::SelectClosestMisspellingFromHitTestResult() This patch changes |SelectClosestMisspellingFromHitTestResult()| in |SelectionController| class to utilize early-return style for improving readability. # Details |SelectClosestMisspellingFromHitTestResult() calls |UpdateSelectionForMouseDownDispatchingSelectStart()| with non-null |VisibleSelectionInFlatTree| if |pos.IsNotNull()| and |marker != nullptr| are true, other wise this function calls null |VisibleSelectionInFlatTree|. Because |VisibleSelectionInFlatTree::AppendTrailingWhitespace()| appends a whitespace only if selection is range, we don't need to call it for null selection. BUG=n/a TEST=n/a; no behavior changes Review-Url: https://codereview.chromium.org/2952173002 Cr-Commit-Position: refs/heads/master@{#481751} Committed: https://chromium.googlesource.com/chromium/src/+/5a5d5754d9d90c8869f2450c89e0... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/5a5d5754d9d90c8869f2450c89e0... |