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

Unified Diff: xfa/fxfa/app/xfa_textlayout.h

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: xfa/fxfa/app/xfa_textlayout.h
diff --git a/xfa/fxfa/app/xfa_textlayout.h b/xfa/fxfa/app/xfa_textlayout.h
index 26bd1634ee7669d0bc2de70977fb8dd152e78989..18bf5eb66b18776939a4950ae0145f4cda49cf7e 100644
--- a/xfa/fxfa/app/xfa_textlayout.h
+++ b/xfa/fxfa/app/xfa_textlayout.h
@@ -92,8 +92,8 @@ class CXFA_TextParser {
bool IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const;
bool GetTabstops(IFDE_CSSComputedStyle* pStyle,
CXFA_TextTabstopsContext* pTabstopContext);
- CFGAS_GEFont* GetFont(CXFA_TextProvider* pTextProvider,
- IFDE_CSSComputedStyle* pStyle) const;
+ CFX_RetainPtr<CFGAS_GEFont> GetFont(CXFA_TextProvider* pTextProvider,
+ IFDE_CSSComputedStyle* pStyle) const;
FX_FLOAT GetFontSize(CXFA_TextProvider* pTextProvider,
IFDE_CSSComputedStyle* pStyle) const;
int32_t GetHorScale(CXFA_TextProvider* pTextProvider,
@@ -211,7 +211,7 @@ class XFA_TextPiece : public CFX_Target {
int32_t iUnderline;
int32_t iPeriod;
int32_t iLineThrough;
- CFGAS_GEFont* pFont;
+ CFX_RetainPtr<CFGAS_GEFont> pFont;
FX_ARGB dwColor;
FX_FLOAT fFontSize;
CFX_RectF rtPiece;

Powered by Google App Engine
This is Rietveld 408576698