Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: third_party/WebKit/Source/core/editing/LayoutSelection.cpp

Issue 2936963003: Use SelectionPaintRange::Iterator in LayoutSelection::ClearSelection(). (Closed)
Patch Set: split Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/LayoutSelection.cpp
diff --git a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
index e6c1a3a727b033743767bf4665fcca75e6cd65b0..986e97df0c2613582a2d3b8e73da0690fe6a1cc3 100644
--- a/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
+++ b/third_party/WebKit/Source/core/editing/LayoutSelection.cpp
@@ -315,11 +315,7 @@ void LayoutSelection::ClearSelection() {
if (paint_range_.IsNull())
return;
- const SelectedMap& old_selected_map = CollectSelectedMap(
- paint_range_, CollectSelectedMapOption::kNotCollectBlock);
- // Clear SelectionState and invalidation.
- // TODO(yoichio): Iterate with *this directrly.
- for (auto layout_object : old_selected_map.object_map.Keys()) {
+ for (auto layout_object : paint_range_) {
const SelectionState old_state = layout_object->GetSelectionState();
layout_object->SetSelectionStateIfNeeded(SelectionState::kNone);
if (layout_object->GetSelectionState() == old_state)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698