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

Side by Side Diff: ui/base/cocoa/controls/hyperlink_text_view.mm

Issue 1842663003: Mac: Replace uses of deprecated NSNoUnderlineStyle and NSSingleUnderlineStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160329-Mac-DeploymentTarget
Patch Set: cl format Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ui/base/cocoa/controls/hyperlink_text_view.h" 5 #import "ui/base/cocoa/controls/hyperlink_text_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "ui/base/cocoa/nsview_additions.h" 9 #include "ui/base/cocoa/nsview_additions.h"
10 10
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 isValidLink_ = YES; 155 isValidLink_ = YES;
156 } else { 156 } else {
157 url = @""; 157 url = @"";
158 isValidLink_ = NO; 158 isValidLink_ = NO;
159 } 159 }
160 NSDictionary* attributes = @{ 160 NSDictionary* attributes = @{
161 NSForegroundColorAttributeName : linkColor, 161 NSForegroundColorAttributeName : linkColor,
162 NSUnderlineStyleAttributeName : @(YES), 162 NSUnderlineStyleAttributeName : @(YES),
163 NSCursorAttributeName : [NSCursor pointingHandCursor], 163 NSCursorAttributeName : [NSCursor pointingHandCursor],
164 NSLinkAttributeName : url, 164 NSLinkAttributeName : url,
165 NSUnderlineStyleAttributeName : @(NSSingleUnderlineStyle) 165 NSUnderlineStyleAttributeName : @(NSUnderlineStyleSingle)
166 }; 166 };
167 167
168 [[self textStorage] addAttributes:attributes range:range]; 168 [[self textStorage] addAttributes:attributes range:range];
169 } 169 }
170 170
171 - (void)setRefusesFirstResponder:(BOOL)refusesFirstResponder { 171 - (void)setRefusesFirstResponder:(BOOL)refusesFirstResponder {
172 refusesFirstResponder_ = refusesFirstResponder; 172 refusesFirstResponder_ = refusesFirstResponder;
173 } 173 }
174 174
175 @end 175 @end
OLDNEW
« no previous file with comments | « ui/base/cocoa/controls/hyperlink_button_cell.mm ('k') | ui/base/cocoa/controls/hyperlink_text_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698