|
|
Created:
3 years, 7 months ago by yoichio Modified:
3 years, 7 months ago Reviewers:
yosin_UTC9 CC:
blink-reviews, chromium-reviews Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionSplit 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}
Committed: https://chromium.googlesource.com/chromium/src/+/3d8a59becdfba11d9e9249f04c4ed6695e2a878b
Patch Set 1 #Patch Set 2 : update #
Total comments: 7
Patch Set 3 : update #Messages
Total messages: 20 (15 generated)
The CQ bit was checked by yoichio@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: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by yoichio@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: This issue passed the CQ dry run.
Description was changed from ========== Split LayoutSelecton::ClearSelection BUG=708453 TEST=No change in behavior ========== to ========== Split LayoutSelecton::ClearSelection() out from SetSelection() |ClearSelection()| calls |SetSelection(0, -1, 0, -1, kPaintInvalidationNewMinusOld)| but what it does is 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 ==========
yoichio@chromium.org changed reviewers: + yosin@chromium.org
Description was changed from ========== Split LayoutSelecton::ClearSelection() out from SetSelection() |ClearSelection()| calls |SetSelection(0, -1, 0, -1, kPaintInvalidationNewMinusOld)| but what it does is 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 ========== to ========== 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 ==========
lgtm w/ small nits https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right): https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:216: DCHECK(start); Nice! (^_^)b https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:305: SelectedMap old_selected_map = nit: s/SelectedMap/const SelectedMap&/ https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:312: if (layout_object->GetSelectionState() != old_state) nit: early-continue style is better. if (layoutObject->GetSelectionState() == old_state) continue; layout_object->SetShouldInvalidateSelection(); https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:317: selection_start_ = nullptr; Q: do you have a plan to introduce object representing LayoutTreeRange or another name to represent range in Layout tree? struct LayoutTreeRange { LayoutObject* start = nullptr; LayoutObject* end = nullptr; int start_offset = -1; int end_offset = -1; LayoutTreeRange() {} }; Is |class| better?
https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/LayoutSelection.cpp (right): https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:305: SelectedMap old_selected_map = On 2017/05/23 05:29:05, yosin_UTC9 wrote: > nit: s/SelectedMap/const SelectedMap&/ Done. https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:312: if (layout_object->GetSelectionState() != old_state) On 2017/05/23 05:29:05, yosin_UTC9 wrote: > nit: early-continue style is better. > > if (layoutObject->GetSelectionState() == old_state) > continue; > layout_object->SetShouldInvalidateSelection(); Done. https://codereview.chromium.org/2894383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/LayoutSelection.cpp:317: selection_start_ = nullptr; On 2017/05/23 05:29:05, yosin_UTC9 wrote: > Q: do you have a plan to introduce object representing LayoutTreeRange or > another name > to represent range in Layout tree? I consider having SelectionInFlatTree instead of having LayoutObjects.
The CQ bit was checked by yoichio@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yosin@chromium.org Link to the patchset: https://codereview.chromium.org/2894383003/#ps40001 (title: "update")
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": 40001, "attempt_start_ts": 1495518499590560, "parent_rev": "719237584073bc2ef77a64e4f8b1514e66ef037e", "commit_rev": "3d8a59becdfba11d9e9249f04c4ed6695e2a878b"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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} Committed: https://chromium.googlesource.com/chromium/src/+/3d8a59becdfba11d9e9249f04c4e... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/3d8a59becdfba11d9e9249f04c4e... |