Commit dc570cbb authored by Thomas Lukaszewicz's avatar Thomas Lukaszewicz Committed by Commit Bot

Remove redundant call to RefreshLayer() in FocusRing

Bug: 1044687
Change-Id: I5b146bcb29f65516049bfe6d5010151e0f22b3c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212541Reviewed-by: default avatarWei Li <weili@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771938}
parent 6757f24d
...@@ -107,13 +107,13 @@ void FocusRing::ViewHierarchyChanged( ...@@ -107,13 +107,13 @@ void FocusRing::ViewHierarchyChanged(
if (details.is_add) { if (details.is_add) {
// Need to start observing the parent. // Need to start observing the parent.
view_observer_.Add(details.parent); view_observer_.Add(details.parent);
RefreshLayer();
} else if (view_observer_.IsObserving(details.parent)) { } else if (view_observer_.IsObserving(details.parent)) {
// This view is being removed from its parent. It needs to remove itself // This view is being removed from its parent. It needs to remove itself
// from its parent's observer list. Otherwise, since its |parent_| will // from its parent's observer list in the case where the FocusView is
// become a nullptr, it won't be able to do so in its destructor. // removed from its parent but not deleted.
view_observer_.Remove(details.parent); view_observer_.Remove(details.parent);
} }
RefreshLayer();
} }
void FocusRing::OnPaint(gfx::Canvas* canvas) { void FocusRing::OnPaint(gfx::Canvas* canvas) {
......
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