Commit aff544de authored by Yoichi Osato's avatar Yoichi Osato Committed by Commit Bot

Rename SetShouldInvalidateIfNeeds().

Rename to SetShouldInvalidateIfNeeded() using more
popular term "IfNeeded" than "IfNeeds":
https://cs.chromium.org/search/?q=ifneeded+file:%5Esrc/third_party/WebKit/+package:%5Echromium$&type=cs

Bug: 739062
Change-Id: I124a13d27659ff29a5e3c75c45348f64f8815063
Reviewed-on: https://chromium-review.googlesource.com/784744Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519551}
parent c24daf67
...@@ -217,7 +217,7 @@ class NewPaintRangeAndSelectedLayoutObjects { ...@@ -217,7 +217,7 @@ class NewPaintRangeAndSelectedLayoutObjects {
DISALLOW_COPY_AND_ASSIGN(NewPaintRangeAndSelectedLayoutObjects); DISALLOW_COPY_AND_ASSIGN(NewPaintRangeAndSelectedLayoutObjects);
}; };
static void SetShouldInvalidateIfNeeds(LayoutObject* layout_object) { static void SetShouldInvalidateIfNeeded(LayoutObject* layout_object) {
if (layout_object->ShouldInvalidateSelection()) if (layout_object->ShouldInvalidateSelection())
return; return;
layout_object->SetShouldInvalidateSelection(); layout_object->SetShouldInvalidateSelection();
...@@ -283,7 +283,7 @@ static void SetShouldInvalidateSelection( ...@@ -283,7 +283,7 @@ static void SetShouldInvalidateSelection(
// Invalidate new selected LayoutObjects. // Invalidate new selected LayoutObjects.
for (LayoutObject* layout_object : new_selected_objects) { for (LayoutObject* layout_object : new_selected_objects) {
if (layout_object->GetSelectionState() != SelectionState::kNone) { if (layout_object->GetSelectionState() != SelectionState::kNone) {
SetShouldInvalidateIfNeeds(layout_object); SetShouldInvalidateIfNeeded(layout_object);
old_selected_objects.erase(layout_object); old_selected_objects.erase(layout_object);
continue; continue;
} }
...@@ -296,7 +296,7 @@ static void SetShouldInvalidateSelection( ...@@ -296,7 +296,7 @@ static void SetShouldInvalidateSelection(
SetSelectionStateIfNeeded(layout_object, SelectionState::kNone); SetSelectionStateIfNeeded(layout_object, SelectionState::kNone);
if (layout_object->GetSelectionState() == old_state) if (layout_object->GetSelectionState() == old_state)
continue; continue;
SetShouldInvalidateIfNeeds(layout_object); SetShouldInvalidateIfNeeded(layout_object);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment