OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ui/gfx/render_text_mac.h" | 5 #include "ui/gfx/render_text_mac.h" |
6 | 6 |
7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
9 #include <CoreText/CoreText.h> | 9 #include <CoreText/CoreText.h> |
10 | 10 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
441 runs_valid_ = true; | 441 runs_valid_ = true; |
442 } | 442 } |
443 | 443 |
444 void RenderTextMac::InvalidateStyle() { | 444 void RenderTextMac::InvalidateStyle() { |
445 line_.reset(); | 445 line_.reset(); |
446 attributes_.reset(); | 446 attributes_.reset(); |
447 runs_.clear(); | 447 runs_.clear(); |
448 runs_valid_ = false; | 448 runs_valid_ = false; |
449 } | 449 } |
450 | 450 |
451 bool RenderTextMac::GetDecoratedTextForRange( | |
452 const Range& range, | |
453 DecoratedText* decorated_text) const { | |
454 // TODO(karandeepb): This is not invoked on any codepath currently. Style the | |
455 // returned text if need be. | |
456 if (obscured()) | |
457 return false; | |
458 | |
459 decorated_text->attributes.clear(); | |
msw
2016/10/04 01:52:37
q: is this necessary?
karandeepb
2016/10/04 12:04:24
Not really, removed.
| |
460 decorated_text->text = GetTextFromRange(range); | |
461 return true; | |
462 } | |
463 | |
451 } // namespace gfx | 464 } // namespace gfx |
OLD | NEW |