| Index: ui/gfx/render_text_mac.mm
|
| diff --git a/ui/gfx/render_text_mac.mm b/ui/gfx/render_text_mac.mm
|
| index e380333c8c88f471ac158b6c5f30bfc043d3d371..0fbc09a0e7cf86972e2906f3e10d1c4d9891d179 100644
|
| --- a/ui/gfx/render_text_mac.mm
|
| +++ b/ui/gfx/render_text_mac.mm
|
| @@ -64,23 +64,6 @@
|
|
|
| namespace gfx {
|
|
|
| -namespace internal {
|
| -
|
| -// Note: this is only used by RenderTextHarfbuzz.
|
| -sk_sp<SkTypeface> CreateSkiaTypeface(const Font& font,
|
| - bool italic,
|
| - Font::Weight weight) {
|
| - const Font::FontStyle style = italic ? Font::ITALIC : Font::NORMAL;
|
| - Font font_with_style = font.Derive(0, style, weight);
|
| - if (!font_with_style.GetNativeFont())
|
| - return nullptr;
|
| -
|
| - return sk_sp<SkTypeface>(SkCreateTypefaceFromCTFont(
|
| - base::mac::NSToCFCast(font_with_style.GetNativeFont())));
|
| -}
|
| -
|
| -} // namespace internal
|
| -
|
| RenderTextMac::RenderTextMac() : common_baseline_(0), runs_valid_(false) {}
|
|
|
| RenderTextMac::~RenderTextMac() {}
|
| @@ -448,4 +431,17 @@
|
| runs_valid_ = false;
|
| }
|
|
|
| +bool RenderTextMac::GetStyledStringForRange(
|
| + const Range& range,
|
| + NSMutableAttributedString* str) const {
|
| + // TODO(karandeepb): This is not invoked on any codepath currently. Style the
|
| + // returned string if need be.
|
| + if (obscured())
|
| + return false;
|
| +
|
| + [[str mutableString]
|
| + setString:base::SysUTF16ToNSString(GetTextFromRange(range))];
|
| + return true;
|
| +}
|
| +
|
| } // namespace gfx
|
|
|