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 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
8 #import <AppKit/AppKit.h> | |
9 #include <CoreText/CoreText.h> | 9 #include <CoreText/CoreText.h> |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <cmath> | 12 #include <cmath> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "base/mac/foundation_util.h" | 15 #include "base/mac/foundation_util.h" |
16 #include "base/mac/mac_util.h" | 16 #include "base/mac/mac_util.h" |
17 #include "base/mac/scoped_cftyperef.h" | 17 #include "base/mac/scoped_cftyperef.h" |
| 18 #include "base/macros.h" |
18 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
19 #include "skia/ext/skia_utils_mac.h" | 20 #include "skia/ext/skia_utils_mac.h" |
20 #include "third_party/skia/include/ports/SkTypeface_mac.h" | 21 #include "third_party/skia/include/ports/SkTypeface_mac.h" |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 // This function makes a copy of |font| with the given symbolic traits. On OSX | 25 // This function makes a copy of |font| with the given symbolic traits. On OSX |
25 // 10.11, CTFontCreateCopyWithSymbolicTraits has the right behavior but | 26 // 10.11, CTFontCreateCopyWithSymbolicTraits has the right behavior but |
26 // CTFontCreateWithFontDescriptor does not. The opposite holds true for OSX | 27 // CTFontCreateWithFontDescriptor does not. The opposite holds true for OSX |
27 // 10.10. | 28 // 10.10. |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 } | 433 } |
433 | 434 |
434 void RenderTextMac::InvalidateStyle() { | 435 void RenderTextMac::InvalidateStyle() { |
435 line_.reset(); | 436 line_.reset(); |
436 attributes_.reset(); | 437 attributes_.reset(); |
437 runs_.clear(); | 438 runs_.clear(); |
438 runs_valid_ = false; | 439 runs_valid_ = false; |
439 } | 440 } |
440 | 441 |
441 } // namespace gfx | 442 } // namespace gfx |
OLD | NEW |