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

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm

Issue 2893323002: [Mac] Force invalidate bookmark bar layout on node change (Closed)
Patch Set: Created 3 years, 7 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
Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index 034750d5a6d87a5e1439ead99365a4422066988c..a0f22b0cc2c2ad943ec1742f13ae288e817db33e 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -2134,9 +2134,13 @@ static BOOL ValueInRangeInclusive(CGFloat low, CGFloat value, CGFloat high) {
[self rebuildLayoutWithAnimated:NO];
}
-// TODO(jrg): for now this is brute force.
- (void)nodeChanged:(BookmarkModel*)model
node:(const BookmarkNode*)node {
+ // Invalidate the layout if the changed node is visible. This ensures
+ // the button is updated if the button offsets don't change but the
+ // title does.
+ if (nodeIdToButtonMap_.find(node->id()) != nodeIdToButtonMap_.end())
+ layout_ = {};
[self loaded:model];
}

Powered by Google App Engine
This is Rietveld 408576698