Chromium Code Reviews| Index: ui/gfx/render_text_mac.h |
| diff --git a/ui/gfx/render_text_mac.h b/ui/gfx/render_text_mac.h |
| index 737207fe19af6060b893b4b38a0cfb582e1f847a..03146b9d7d109988ab8370ce698053573d19665e 100644 |
| --- a/ui/gfx/render_text_mac.h |
| +++ b/ui/gfx/render_text_mac.h |
| @@ -53,6 +53,8 @@ class RenderTextMac : public RenderText { |
| void DrawVisualText(Canvas* canvas) override; |
| private: |
| + FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Mac_ElidedText); |
| + |
| struct TextRun { |
| CTRunRef ct_run; |
| SkPoint origin; |
| @@ -71,8 +73,26 @@ class RenderTextMac : public RenderText { |
| ~TextRun(); |
| }; |
| + // Returns the size used to draw |layout_text_|. |
| + gfx::SizeF GetLayoutTextSize(); |
|
msw
2015/03/05 21:55:29
I believe this function would be useful on the bas
Jun Mukai
2015/03/06 01:32:38
Not sure how beneficial is it, RTHB updates displa
|
| + |
| + // Computes the size used to draw |line|. Stores the baseline position into |
| + // |baseline|. |
| + gfx::SizeF GetCTLineSize(CTLineRef line, SkScalar* baseline); |
| + |
| + // Creates Core Text line object and its attributes for the given text and |
| + // returns the line. |attributes| keeps the ownership of the text attributes. |
| + // See the comments of ArrayStyles() implementation for the ownership details. |
| + base::ScopedCFTypeRef<CTLineRef> EnsureLayoutInternal( |
| + const base::string16& text, |
| + base::ScopedCFTypeRef<CFMutableArrayRef>* attributes); |
| + |
| // Applies RenderText styles to |attr_string| with the given |ct_font|. |
| - void ApplyStyles(CFMutableAttributedStringRef attr_string, CTFontRef ct_font); |
| + // Returns the array of attributes to keep the ownership of the attributes. |
| + // See the comments in .cc file for the details. |
| + base::ScopedCFTypeRef<CFMutableArrayRef> ApplyStyles( |
| + CFMutableAttributedStringRef attr_string, |
| + CTFontRef ct_font); |
| // Updates |runs_| based on |line_| and sets |runs_valid_| to true. |
| void ComputeRuns(); |