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

Side by Side Diff: ui/gfx/render_text_mac.h

Issue 2734333005: RenderTextMac: Fix crash when passed an invalid font. (Closed)
Patch Set: Nits. Created 3 years, 9 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
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef UI_GFX_RENDER_TEXT_MAC_H_ 5 #ifndef UI_GFX_RENDER_TEXT_MAC_H_
6 #define UI_GFX_RENDER_TEXT_MAC_H_ 6 #define UI_GFX_RENDER_TEXT_MAC_H_
7 7
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 13 matching lines...) Expand all
24 // 24 //
25 // Note: The current implementation only supports drawing and sizing the text, 25 // Note: The current implementation only supports drawing and sizing the text,
26 // but not text selection or cursor movement. 26 // but not text selection or cursor movement.
27 class GFX_EXPORT RenderTextMac : public RenderText { 27 class GFX_EXPORT RenderTextMac : public RenderText {
28 public: 28 public:
29 RenderTextMac(); 29 RenderTextMac();
30 ~RenderTextMac() override; 30 ~RenderTextMac() override;
31 31
32 // RenderText: 32 // RenderText:
33 std::unique_ptr<RenderText> CreateInstanceOfSameType() const override; 33 std::unique_ptr<RenderText> CreateInstanceOfSameType() const override;
34 void SetFontList(const FontList& font_list) override;
34 bool MultilineSupported() const override; 35 bool MultilineSupported() const override;
35 const base::string16& GetDisplayText() override; 36 const base::string16& GetDisplayText() override;
36 Size GetStringSize() override; 37 Size GetStringSize() override;
37 SizeF GetStringSizeF() override; 38 SizeF GetStringSizeF() override;
38 SelectionModel FindCursorPosition(const Point& point) override; 39 SelectionModel FindCursorPosition(const Point& point) override;
39 bool IsSelectionSupported() const override; 40 bool IsSelectionSupported() const override;
40 std::vector<FontSpan> GetFontSpansForTesting() override; 41 std::vector<FontSpan> GetFontSpansForTesting() override;
41 42
42 protected: 43 protected:
43 // RenderText: 44 // RenderText:
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 133
133 // Indicates that |runs_| are valid, set by |ComputeRuns()|. 134 // Indicates that |runs_| are valid, set by |ComputeRuns()|.
134 bool runs_valid_; 135 bool runs_valid_;
135 136
136 DISALLOW_COPY_AND_ASSIGN(RenderTextMac); 137 DISALLOW_COPY_AND_ASSIGN(RenderTextMac);
137 }; 138 };
138 139
139 } // namespace gfx 140 } // namespace gfx
140 141
141 #endif // UI_GFX_RENDER_TEXT_MAC_H_ 142 #endif // UI_GFX_RENDER_TEXT_MAC_H_
OLDNEW
« no previous file with comments | « ui/gfx/render_text.h ('k') | ui/gfx/render_text_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698