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

Unified Diff: ui/base/cocoa/nsview_additions.mm

Issue 900613003: Mac: Make it easier for views to correctly draw with a theme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gyp
Patch Set: Created 5 years, 11 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: ui/base/cocoa/nsview_additions.mm
diff --git a/ui/base/cocoa/nsview_additions.mm b/ui/base/cocoa/nsview_additions.mm
index fc240392111242bafd5aaf60102f7fdb11452bc5..f111b140248450af2e0d2d239ad6655264199f61 100644
--- a/ui/base/cocoa/nsview_additions.mm
+++ b/ui/base/cocoa/nsview_additions.mm
@@ -60,6 +60,12 @@
colorWithAlphaComponent:0.5 / [self cr_lineWidth]];
}
+- (void)cr_recursivelyInvokeBlock:(void (^)(id view))block {
+ block(self);
+ for (NSView* subview in [self subviews])
+ [subview cr_recursivelyInvokeBlock:block];
+}
+
- (void)cr_recursivelySetNeedsDisplay:(BOOL)flag {
[self setNeedsDisplay:YES];
for (NSView* child in [self subviews])
« chrome/browser/ui/cocoa/toolbar/toolbar_view_cocoa.mm ('K') | « ui/base/cocoa/nsview_additions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698