OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ | 7 #ifndef XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ |
8 #define XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ | 8 #define XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 protected: | 69 protected: |
70 void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, | 70 void AddRulesFrom(IFDE_CSSStyleSheet* pStyleSheet, |
71 IFDE_CSSRule* pRule, | 71 IFDE_CSSRule* pRule, |
72 uint32_t dwMediaList, | 72 uint32_t dwMediaList, |
73 IFGAS_FontMgr* pFontMgr); | 73 IFGAS_FontMgr* pFontMgr); |
74 void AddRuleTo(CFX_MapPtrToPtr& map, | 74 void AddRuleTo(CFX_MapPtrToPtr& map, |
75 uint32_t dwKey, | 75 uint32_t dwKey, |
76 CFDE_CSSSelector* pSel, | 76 CFDE_CSSSelector* pSel, |
77 CFDE_CSSDeclaration* pDecl); | 77 CFDE_CSSDeclaration* pDecl); |
78 FX_BOOL AddRuleTo(FDE_CSSRuleData*& pList, FDE_CSSRuleData* pData); | 78 bool AddRuleTo(FDE_CSSRuleData*& pList, FDE_CSSRuleData* pData); |
79 FDE_CSSRuleData* NewRuleData(CFDE_CSSSelector* pSel, | 79 FDE_CSSRuleData* NewRuleData(CFDE_CSSSelector* pSel, |
80 CFDE_CSSDeclaration* pDecl); | 80 CFDE_CSSDeclaration* pDecl); |
81 CFX_MapPtrToPtr m_IDRules; | 81 CFX_MapPtrToPtr m_IDRules; |
82 CFX_MapPtrToPtr m_TagRules; | 82 CFX_MapPtrToPtr m_TagRules; |
83 CFX_MapPtrToPtr m_ClassRules; | 83 CFX_MapPtrToPtr m_ClassRules; |
84 FDE_CSSRuleData* m_pUniversalRules; | 84 FDE_CSSRuleData* m_pUniversalRules; |
85 FDE_CSSRuleData* m_pPersudoRules; | 85 FDE_CSSRuleData* m_pPersudoRules; |
86 int32_t m_iSelectors; | 86 int32_t m_iSelectors; |
87 }; | 87 }; |
88 | 88 |
89 class CFDE_CSSStyleSelector : public CFX_Target { | 89 class CFDE_CSSStyleSelector : public CFX_Target { |
90 public: | 90 public: |
91 explicit CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr); | 91 explicit CFDE_CSSStyleSelector(IFGAS_FontMgr* pFontMgr); |
92 ~CFDE_CSSStyleSelector() override; | 92 ~CFDE_CSSStyleSelector() override; |
93 | 93 |
94 void SetDefFontSize(FX_FLOAT fFontSize); | 94 void SetDefFontSize(FX_FLOAT fFontSize); |
95 | 95 |
96 FX_BOOL SetStyleSheet(FDE_CSSSTYLESHEETGROUP eType, | 96 bool SetStyleSheet(FDE_CSSSTYLESHEETGROUP eType, IFDE_CSSStyleSheet* pSheet); |
97 IFDE_CSSStyleSheet* pSheet); | 97 bool SetStyleSheets(FDE_CSSSTYLESHEETGROUP eType, |
98 FX_BOOL SetStyleSheets(FDE_CSSSTYLESHEETGROUP eType, | 98 const CFDE_CSSStyleSheetArray* pArray); |
99 const CFDE_CSSStyleSheetArray* pArray); | |
100 void SetStylePriority(FDE_CSSSTYLESHEETGROUP eType, | 99 void SetStylePriority(FDE_CSSSTYLESHEETGROUP eType, |
101 FDE_CSSSTYLESHEETPRIORITY ePriority); | 100 FDE_CSSSTYLESHEETPRIORITY ePriority); |
102 void UpdateStyleIndex(uint32_t dwMediaList); | 101 void UpdateStyleIndex(uint32_t dwMediaList); |
103 CFDE_CSSAccelerator* InitAccelerator(); | 102 CFDE_CSSAccelerator* InitAccelerator(); |
104 IFDE_CSSComputedStyle* CreateComputedStyle( | 103 IFDE_CSSComputedStyle* CreateComputedStyle( |
105 IFDE_CSSComputedStyle* pParentStyle); | 104 IFDE_CSSComputedStyle* pParentStyle); |
106 int32_t MatchDeclarations(CXFA_CSSTagProvider* pTag, | 105 int32_t MatchDeclarations(CXFA_CSSTagProvider* pTag, |
107 CFDE_CSSDeclarationArray& matchedDecls, | 106 CFDE_CSSDeclarationArray& matchedDecls, |
108 FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE); | 107 FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE); |
109 void ComputeStyle(CXFA_CSSTagProvider* pTag, | 108 void ComputeStyle(CXFA_CSSTagProvider* pTag, |
110 const CFDE_CSSDeclaration** ppDeclArray, | 109 const CFDE_CSSDeclaration** ppDeclArray, |
111 int32_t iDeclCount, | 110 int32_t iDeclCount, |
112 IFDE_CSSComputedStyle* pDestStyle); | 111 IFDE_CSSComputedStyle* pDestStyle); |
113 | 112 |
114 protected: | 113 protected: |
115 void Reset(); | 114 void Reset(); |
116 void MatchRules(FDE_CSSTagCache* pCache, | 115 void MatchRules(FDE_CSSTagCache* pCache, |
117 FDE_CSSRuleData* pList, | 116 FDE_CSSRuleData* pList, |
118 FDE_CSSPERSUDO ePersudoType); | 117 FDE_CSSPERSUDO ePersudoType); |
119 FX_BOOL MatchSelector(FDE_CSSTagCache* pCache, | 118 bool MatchSelector(FDE_CSSTagCache* pCache, |
120 CFDE_CSSSelector* pSel, | 119 CFDE_CSSSelector* pSel, |
121 FDE_CSSPERSUDO ePersudoType); | 120 FDE_CSSPERSUDO ePersudoType); |
122 void AppendInlineStyle(CFDE_CSSDeclaration* pDecl, | 121 void AppendInlineStyle(CFDE_CSSDeclaration* pDecl, |
123 const FX_WCHAR* psz, | 122 const FX_WCHAR* psz, |
124 int32_t iLen); | 123 int32_t iLen); |
125 void ApplyDeclarations(FX_BOOL bPriority, | 124 void ApplyDeclarations(bool bPriority, |
126 const CFDE_CSSDeclaration** ppDeclArray, | 125 const CFDE_CSSDeclaration** ppDeclArray, |
127 int32_t iDeclCount, | 126 int32_t iDeclCount, |
128 IFDE_CSSComputedStyle* pDestStyle); | 127 IFDE_CSSComputedStyle* pDestStyle); |
129 void ApplyProperty(FDE_CSSPROPERTY eProperty, | 128 void ApplyProperty(FDE_CSSPROPERTY eProperty, |
130 IFDE_CSSValue* pValue, | 129 IFDE_CSSValue* pValue, |
131 CFDE_CSSComputedStyle* pComputedStyle); | 130 CFDE_CSSComputedStyle* pComputedStyle); |
132 | 131 |
133 FX_FLOAT ApplyNumber(FDE_CSSPRIMITIVETYPE eUnit, | 132 FX_FLOAT ApplyNumber(FDE_CSSPRIMITIVETYPE eUnit, |
134 FX_FLOAT fValue, | 133 FX_FLOAT fValue, |
135 FX_FLOAT fPercentBase); | 134 FX_FLOAT fPercentBase); |
136 FX_BOOL SetLengthWithPercent(FDE_CSSLENGTH& width, | 135 bool SetLengthWithPercent(FDE_CSSLENGTH& width, |
137 FDE_CSSPRIMITIVETYPE eType, | 136 FDE_CSSPRIMITIVETYPE eType, |
138 IFDE_CSSPrimitiveValue* pPrimitive, | 137 IFDE_CSSPrimitiveValue* pPrimitive, |
139 FX_FLOAT fFontSize); | 138 FX_FLOAT fFontSize); |
140 FX_FLOAT ToFontSize(FDE_CSSPROPERTYVALUE eValue, FX_FLOAT fCurFontSize); | 139 FX_FLOAT ToFontSize(FDE_CSSPROPERTYVALUE eValue, FX_FLOAT fCurFontSize); |
141 FDE_CSSDISPLAY ToDisplay(FDE_CSSPROPERTYVALUE eValue); | 140 FDE_CSSDISPLAY ToDisplay(FDE_CSSPROPERTYVALUE eValue); |
142 FDE_CSSTEXTALIGN ToTextAlign(FDE_CSSPROPERTYVALUE eValue); | 141 FDE_CSSTEXTALIGN ToTextAlign(FDE_CSSPROPERTYVALUE eValue); |
143 uint16_t ToFontWeight(FDE_CSSPROPERTYVALUE eValue); | 142 uint16_t ToFontWeight(FDE_CSSPROPERTYVALUE eValue); |
144 FDE_CSSFONTSTYLE ToFontStyle(FDE_CSSPROPERTYVALUE eValue); | 143 FDE_CSSFONTSTYLE ToFontStyle(FDE_CSSPROPERTYVALUE eValue); |
145 FDE_CSSBORDERSTYLE ToBorderStyle(FDE_CSSPROPERTYVALUE eValue); | 144 FDE_CSSBORDERSTYLE ToBorderStyle(FDE_CSSPROPERTYVALUE eValue); |
146 FDE_CSSVERTICALALIGN ToVerticalAlign(FDE_CSSPROPERTYVALUE eValue); | 145 FDE_CSSVERTICALALIGN ToVerticalAlign(FDE_CSSPROPERTYVALUE eValue); |
147 FDE_CSSLISTSTYLETYPE ToListStyleType(FDE_CSSPROPERTYVALUE eValue); | 146 FDE_CSSLISTSTYLETYPE ToListStyleType(FDE_CSSPROPERTYVALUE eValue); |
148 FDE_CSSLISTSTYLEPOSITION ToListStylePosition(FDE_CSSPROPERTYVALUE eValue); | 147 FDE_CSSLISTSTYLEPOSITION ToListStylePosition(FDE_CSSPROPERTYVALUE eValue); |
149 FDE_CSSVISIBILITY ToVisibility(FDE_CSSPROPERTYVALUE eValue); | 148 FDE_CSSVISIBILITY ToVisibility(FDE_CSSPROPERTYVALUE eValue); |
150 FDE_CSSWHITESPACE ToWhiteSpace(FDE_CSSPROPERTYVALUE eValue); | 149 FDE_CSSWHITESPACE ToWhiteSpace(FDE_CSSPROPERTYVALUE eValue); |
151 uint32_t ToTextDecoration(IFDE_CSSValueList* pList); | 150 uint32_t ToTextDecoration(IFDE_CSSValueList* pList); |
152 FDE_CSSTEXTTRANSFORM ToTextTransform(FDE_CSSPROPERTYVALUE eValue); | 151 FDE_CSSTEXTTRANSFORM ToTextTransform(FDE_CSSPROPERTYVALUE eValue); |
153 FDE_CSSFONTVARIANT ToFontVariant(FDE_CSSPROPERTYVALUE eValue); | 152 FDE_CSSFONTVARIANT ToFontVariant(FDE_CSSPROPERTYVALUE eValue); |
154 FDE_CSSFLOAT ToFloat(FDE_CSSPROPERTYVALUE eValue); | 153 FDE_CSSFLOAT ToFloat(FDE_CSSPROPERTYVALUE eValue); |
155 FDE_CSSCLEAR ToClear(FDE_CSSPROPERTYVALUE eValue); | 154 FDE_CSSCLEAR ToClear(FDE_CSSPROPERTYVALUE eValue); |
156 FDE_CSSWRITINGMODE ToWritingMode(FDE_CSSPROPERTYVALUE eValue); | 155 FDE_CSSWRITINGMODE ToWritingMode(FDE_CSSPROPERTYVALUE eValue); |
157 FDE_CSSWORDBREAK ToWordBreak(FDE_CSSPROPERTYVALUE eValue); | 156 FDE_CSSWORDBREAK ToWordBreak(FDE_CSSPROPERTYVALUE eValue); |
158 FDE_CSSPAGEBREAK ToPageBreak(FDE_CSSPROPERTYVALUE eValue); | 157 FDE_CSSPAGEBREAK ToPageBreak(FDE_CSSPROPERTYVALUE eValue); |
159 FDE_CSSOVERFLOW ToOverflow(FDE_CSSPROPERTYVALUE eValue); | 158 FDE_CSSOVERFLOW ToOverflow(FDE_CSSPROPERTYVALUE eValue); |
160 FDE_CSSLINEBREAK ToLineBreak(FDE_CSSPROPERTYVALUE eValue); | 159 FDE_CSSLINEBREAK ToLineBreak(FDE_CSSPROPERTYVALUE eValue); |
161 FDE_CSSTEXTCOMBINE ToTextCombine(FDE_CSSPROPERTYVALUE eValue); | 160 FDE_CSSTEXTCOMBINE ToTextCombine(FDE_CSSPROPERTYVALUE eValue); |
162 FX_BOOL ToTextEmphasisMark(FDE_CSSPROPERTYVALUE eValue, | 161 bool ToTextEmphasisMark(FDE_CSSPROPERTYVALUE eValue, |
163 FDE_CSSTEXTEMPHASISMARK& eMark); | 162 FDE_CSSTEXTEMPHASISMARK& eMark); |
164 FX_BOOL ToTextEmphasisFill(FDE_CSSPROPERTYVALUE eValue, | 163 bool ToTextEmphasisFill(FDE_CSSPROPERTYVALUE eValue, |
165 FDE_CSSTEXTEMPHASISFILL& eFill); | 164 FDE_CSSTEXTEMPHASISFILL& eFill); |
166 FDE_CSSCURSOR ToCursor(FDE_CSSPROPERTYVALUE eValue); | 165 FDE_CSSCURSOR ToCursor(FDE_CSSPROPERTYVALUE eValue); |
167 FDE_CSSPOSITION ToPosition(FDE_CSSPROPERTYVALUE eValue); | 166 FDE_CSSPOSITION ToPosition(FDE_CSSPROPERTYVALUE eValue); |
168 FDE_CSSCAPTIONSIDE ToCaptionSide(FDE_CSSPROPERTYVALUE eValue); | 167 FDE_CSSCAPTIONSIDE ToCaptionSide(FDE_CSSPROPERTYVALUE eValue); |
169 FDE_CSSBKGREPEAT ToBKGRepeat(FDE_CSSPROPERTYVALUE eValue); | 168 FDE_CSSBKGREPEAT ToBKGRepeat(FDE_CSSPROPERTYVALUE eValue); |
170 FDE_CSSBKGATTACHMENT ToBKGAttachment(FDE_CSSPROPERTYVALUE eValue); | 169 FDE_CSSBKGATTACHMENT ToBKGAttachment(FDE_CSSPROPERTYVALUE eValue); |
171 FDE_CSSRUBYALIGN ToRubyAlign(FDE_CSSPROPERTYVALUE eValue); | 170 FDE_CSSRUBYALIGN ToRubyAlign(FDE_CSSPROPERTYVALUE eValue); |
172 FDE_CSSRUBYOVERHANG ToRubyOverhang(FDE_CSSPROPERTYVALUE eValue); | 171 FDE_CSSRUBYOVERHANG ToRubyOverhang(FDE_CSSPROPERTYVALUE eValue); |
173 FDE_CSSRUBYPOSITION ToRubyPosition(FDE_CSSPROPERTYVALUE eValue); | 172 FDE_CSSRUBYPOSITION ToRubyPosition(FDE_CSSPROPERTYVALUE eValue); |
174 FDE_CSSRUBYSPAN ToRubySpan(FDE_CSSPROPERTYVALUE eValue); | 173 FDE_CSSRUBYSPAN ToRubySpan(FDE_CSSPROPERTYVALUE eValue); |
175 | 174 |
176 IFGAS_FontMgr* const m_pFontMgr; | 175 IFGAS_FontMgr* const m_pFontMgr; |
177 FX_FLOAT m_fDefFontSize; | 176 FX_FLOAT m_fDefFontSize; |
178 std::unique_ptr<IFX_MemoryAllocator> m_pRuleDataStore; | 177 std::unique_ptr<IFX_MemoryAllocator> m_pRuleDataStore; |
179 CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX]; | 178 CFDE_CSSStyleSheetArray m_SheetGroups[FDE_CSSSTYLESHEETGROUP_MAX]; |
180 CFDE_CSSRuleCollection m_RuleCollection[FDE_CSSSTYLESHEETGROUP_MAX]; | 179 CFDE_CSSRuleCollection m_RuleCollection[FDE_CSSSTYLESHEETGROUP_MAX]; |
181 FDE_CSSSTYLESHEETGROUP m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_MAX]; | 180 FDE_CSSSTYLESHEETGROUP m_ePriorities[FDE_CSSSTYLESHEETPRIORITY_MAX]; |
182 std::unique_ptr<IFX_MemoryAllocator> m_pInlineStyleStore; | 181 std::unique_ptr<IFX_MemoryAllocator> m_pInlineStyleStore; |
183 std::unique_ptr<IFX_MemoryAllocator> m_pFixedStyleStore; | 182 std::unique_ptr<IFX_MemoryAllocator> m_pFixedStyleStore; |
184 std::unique_ptr<CFDE_CSSAccelerator> m_pAccelerator; | 183 std::unique_ptr<CFDE_CSSAccelerator> m_pAccelerator; |
185 std::vector<FDE_CSSRuleData*> m_MatchedRules; | 184 std::vector<FDE_CSSRuleData*> m_MatchedRules; |
186 }; | 185 }; |
187 | 186 |
188 struct FDE_CSSCOUNTERDATA { | 187 struct FDE_CSSCOUNTERDATA { |
189 public: | 188 public: |
190 FDE_CSSCOUNTERDATA() { FXSYS_memset(this, 0, sizeof(FDE_CSSCOUNTERDATA)); } | 189 FDE_CSSCOUNTERDATA() { FXSYS_memset(this, 0, sizeof(FDE_CSSCOUNTERDATA)); } |
191 FX_BOOL GetCounterIncrement(int32_t& iValue) { | 190 bool GetCounterIncrement(int32_t& iValue) { |
192 iValue = m_iIncVal; | 191 iValue = m_iIncVal; |
193 return m_bIncrement; | 192 return m_bIncrement; |
194 } | 193 } |
195 FX_BOOL GetCounterReset(int32_t& iValue) { | 194 bool GetCounterReset(int32_t& iValue) { |
196 iValue = m_iResetVal; | 195 iValue = m_iResetVal; |
197 return m_bReset; | 196 return m_bReset; |
198 } | 197 } |
199 | 198 |
200 const FX_WCHAR* m_pszIdent; | 199 const FX_WCHAR* m_pszIdent; |
201 FX_BOOL m_bIncrement; | 200 bool m_bIncrement; |
202 FX_BOOL m_bReset; | 201 bool m_bReset; |
203 int32_t m_iIncVal; | 202 int32_t m_iIncVal; |
204 int32_t m_iResetVal; | 203 int32_t m_iResetVal; |
205 }; | 204 }; |
206 | 205 |
207 class CFDE_CSSCounterStyle { | 206 class CFDE_CSSCounterStyle { |
208 public: | 207 public: |
209 CFDE_CSSCounterStyle(); | 208 CFDE_CSSCounterStyle(); |
210 ~CFDE_CSSCounterStyle(); | 209 ~CFDE_CSSCounterStyle(); |
211 | 210 |
212 void SetCounterIncrementList(IFDE_CSSValueList* pList) { | 211 void SetCounterIncrementList(IFDE_CSSValueList* pList) { |
213 m_pCounterInc = pList; | 212 m_pCounterInc = pList; |
214 m_bIndexDirty = TRUE; | 213 m_bIndexDirty = true; |
215 } | 214 } |
216 void SetCounterResetList(IFDE_CSSValueList* pList) { | 215 void SetCounterResetList(IFDE_CSSValueList* pList) { |
217 m_pCounterReset = pList; | 216 m_pCounterReset = pList; |
218 m_bIndexDirty = TRUE; | 217 m_bIndexDirty = true; |
219 } | 218 } |
220 int32_t CountCounters() { | 219 int32_t CountCounters() { |
221 UpdateIndex(); | 220 UpdateIndex(); |
222 return m_arrCounterData.GetSize(); | 221 return m_arrCounterData.GetSize(); |
223 } | 222 } |
224 FX_BOOL GetCounterIncrement(int32_t index, int32_t& iValue) { | 223 bool GetCounterIncrement(int32_t index, int32_t& iValue) { |
225 UpdateIndex(); | 224 UpdateIndex(); |
226 return m_arrCounterData.ElementAt(index).GetCounterIncrement(iValue); | 225 return m_arrCounterData.ElementAt(index).GetCounterIncrement(iValue); |
227 } | 226 } |
228 FX_BOOL GetCounterReset(int32_t index, int32_t& iValue) { | 227 bool GetCounterReset(int32_t index, int32_t& iValue) { |
229 UpdateIndex(); | 228 UpdateIndex(); |
230 return m_arrCounterData.ElementAt(index).GetCounterReset(iValue); | 229 return m_arrCounterData.ElementAt(index).GetCounterReset(iValue); |
231 } | 230 } |
232 const FX_WCHAR* GetCounterIdentifier(int32_t index) { | 231 const FX_WCHAR* GetCounterIdentifier(int32_t index) { |
233 UpdateIndex(); | 232 UpdateIndex(); |
234 return m_arrCounterData.ElementAt(index).m_pszIdent; | 233 return m_arrCounterData.ElementAt(index).m_pszIdent; |
235 } | 234 } |
236 | 235 |
237 protected: | 236 protected: |
238 void UpdateIndex(); | 237 void UpdateIndex(); |
239 void DoUpdateIndex(IFDE_CSSValueList* pList); | 238 void DoUpdateIndex(IFDE_CSSValueList* pList); |
240 int32_t FindIndex(const FX_WCHAR* pszIdentifier); | 239 int32_t FindIndex(const FX_WCHAR* pszIdentifier); |
241 | 240 |
242 IFDE_CSSValueList* m_pCounterInc; | 241 IFDE_CSSValueList* m_pCounterInc; |
243 IFDE_CSSValueList* m_pCounterReset; | 242 IFDE_CSSValueList* m_pCounterReset; |
244 CFX_ArrayTemplate<FDE_CSSCOUNTERDATA> m_arrCounterData; | 243 CFX_ArrayTemplate<FDE_CSSCOUNTERDATA> m_arrCounterData; |
245 FX_BOOL m_bIndexDirty; | 244 bool m_bIndexDirty; |
246 }; | 245 }; |
247 | 246 |
248 class CFDE_CSSInheritedData { | 247 class CFDE_CSSInheritedData { |
249 public: | 248 public: |
250 CFDE_CSSInheritedData(); | 249 CFDE_CSSInheritedData(); |
251 | 250 |
252 void Reset(); | 251 void Reset(); |
253 | 252 |
254 const FX_WCHAR* m_pszListStyleImage; | 253 const FX_WCHAR* m_pszListStyleImage; |
255 FDE_CSSLENGTH m_LetterSpacing; | 254 FDE_CSSLENGTH m_LetterSpacing; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // IFX_Retainable | 359 // IFX_Retainable |
361 uint32_t Retain() override; | 360 uint32_t Retain() override; |
362 uint32_t Release() override; | 361 uint32_t Release() override; |
363 | 362 |
364 // IFDE_CSSComputedStyle | 363 // IFDE_CSSComputedStyle |
365 void Reset() override; | 364 void Reset() override; |
366 IFDE_CSSFontStyle* GetFontStyles() override; | 365 IFDE_CSSFontStyle* GetFontStyles() override; |
367 IFDE_CSSBoundaryStyle* GetBoundaryStyles() override; | 366 IFDE_CSSBoundaryStyle* GetBoundaryStyles() override; |
368 IFDE_CSSPositionStyle* GetPositionStyles() override; | 367 IFDE_CSSPositionStyle* GetPositionStyles() override; |
369 IFDE_CSSParagraphStyle* GetParagraphStyles() override; | 368 IFDE_CSSParagraphStyle* GetParagraphStyles() override; |
370 FX_BOOL GetCustomStyle(const CFX_WideStringC& wsName, | 369 bool GetCustomStyle(const CFX_WideStringC& wsName, |
371 CFX_WideString& wsValue) const override; | 370 CFX_WideString& wsValue) const override; |
372 | 371 |
373 // IFDE_CSSFontStyle: | 372 // IFDE_CSSFontStyle: |
374 int32_t CountFontFamilies() const override; | 373 int32_t CountFontFamilies() const override; |
375 const FX_WCHAR* GetFontFamily(int32_t index) const override; | 374 const FX_WCHAR* GetFontFamily(int32_t index) const override; |
376 uint16_t GetFontWeight() const override; | 375 uint16_t GetFontWeight() const override; |
377 FDE_CSSFONTVARIANT GetFontVariant() const override; | 376 FDE_CSSFONTVARIANT GetFontVariant() const override; |
378 FDE_CSSFONTSTYLE GetFontStyle() const override; | 377 FDE_CSSFONTSTYLE GetFontStyle() const override; |
379 FX_FLOAT GetFontSize() const override; | 378 FX_FLOAT GetFontSize() const override; |
380 FX_ARGB GetColor() const override; | 379 FX_ARGB GetColor() const override; |
381 void SetFontWeight(uint16_t wFontWeight) override; | 380 void SetFontWeight(uint16_t wFontWeight) override; |
(...skipping 30 matching lines...) Expand all Loading... |
412 const CFX_WideString& wsValue); | 411 const CFX_WideString& wsValue); |
413 | 412 |
414 uint32_t m_dwRefCount; | 413 uint32_t m_dwRefCount; |
415 IFX_MemoryAllocator* const m_pAllocator; | 414 IFX_MemoryAllocator* const m_pAllocator; |
416 CFDE_CSSInheritedData m_InheritedData; | 415 CFDE_CSSInheritedData m_InheritedData; |
417 CFDE_CSSNonInheritedData m_NonInheritedData; | 416 CFDE_CSSNonInheritedData m_NonInheritedData; |
418 CFX_WideStringArray m_CustomProperties; | 417 CFX_WideStringArray m_CustomProperties; |
419 }; | 418 }; |
420 | 419 |
421 #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ | 420 #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ |
OLD | NEW |