| 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 <vector> |   10 #include <vector> | 
|   11  |   11  | 
|   12 #include "core/fxcrt/include/fx_ext.h" |   12 #include "core/fxcrt/include/fx_ext.h" | 
|   13 #include "xfa/fde/css/fde_css.h" |   13 #include "xfa/fde/css/fde_css.h" | 
|   14 #include "xfa/fde/css/fde_csscache.h" |   14 #include "xfa/fde/css/fde_csscache.h" | 
|   15 #include "xfa/fde/css/fde_cssdeclaration.h" |   15 #include "xfa/fde/css/fde_cssdeclaration.h" | 
|   16 #include "xfa/fgas/crt/fgas_memory.h" |   16 #include "xfa/fgas/crt/fgas_memory.h" | 
|   17 #include "xfa/fgas/crt/fgas_system.h" |   17 #include "xfa/fgas/crt/fgas_system.h" | 
|   18  |   18  | 
|   19 class CFDE_CSSAccelerator; |   19 class CFDE_CSSAccelerator; | 
|   20 class CFDE_CSSComputedStyle; |   20 class CFDE_CSSComputedStyle; | 
 |   21 class CXFA_CSSTagProvider; | 
|   21  |   22  | 
|   22 class FDE_CSSRuleData : public CFX_Target { |   23 class FDE_CSSRuleData : public CFX_Target { | 
|   23  public: |   24  public: | 
|   24   FDE_CSSRuleData(IFDE_CSSSelector* pSel, |   25   FDE_CSSRuleData(IFDE_CSSSelector* pSel, | 
|   25                   IFDE_CSSDeclaration* pDecl, |   26                   IFDE_CSSDeclaration* pDecl, | 
|   26                   uint32_t dwPos); |   27                   uint32_t dwPos); | 
|   27  |   28  | 
|   28   IFDE_CSSSelector* pSelector; |   29   IFDE_CSSSelector* pSelector; | 
|   29   IFDE_CSSDeclaration* pDeclaration; |   30   IFDE_CSSDeclaration* pDeclaration; | 
|   30   uint32_t dwPriority; |   31   uint32_t dwPriority; | 
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  102                                 IFDE_CSSStyleSheet* pSheet); |  103                                 IFDE_CSSStyleSheet* pSheet); | 
|  103   virtual FX_BOOL SetStyleSheets(FDE_CSSSTYLESHEETGROUP eType, |  104   virtual FX_BOOL SetStyleSheets(FDE_CSSSTYLESHEETGROUP eType, | 
|  104                                  const CFDE_CSSStyleSheetArray* pArray); |  105                                  const CFDE_CSSStyleSheetArray* pArray); | 
|  105   virtual void SetStylePriority(FDE_CSSSTYLESHEETGROUP eType, |  106   virtual void SetStylePriority(FDE_CSSSTYLESHEETGROUP eType, | 
|  106                                 FDE_CSSSTYLESHEETPRIORITY ePriority); |  107                                 FDE_CSSSTYLESHEETPRIORITY ePriority); | 
|  107   virtual void UpdateStyleIndex(uint32_t dwMediaList); |  108   virtual void UpdateStyleIndex(uint32_t dwMediaList); | 
|  108   virtual CFDE_CSSAccelerator* InitAccelerator(); |  109   virtual CFDE_CSSAccelerator* InitAccelerator(); | 
|  109   virtual IFDE_CSSComputedStyle* CreateComputedStyle( |  110   virtual IFDE_CSSComputedStyle* CreateComputedStyle( | 
|  110       IFDE_CSSComputedStyle* pParentStyle); |  111       IFDE_CSSComputedStyle* pParentStyle); | 
|  111   virtual int32_t MatchDeclarations( |  112   virtual int32_t MatchDeclarations( | 
|  112       IFDE_CSSTagProvider* pTag, |  113       CXFA_CSSTagProvider* pTag, | 
|  113       CFDE_CSSDeclarationArray& matchedDecls, |  114       CFDE_CSSDeclarationArray& matchedDecls, | 
|  114       FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE); |  115       FDE_CSSPERSUDO ePersudoType = FDE_CSSPERSUDO_NONE); | 
|  115   virtual void ComputeStyle(IFDE_CSSTagProvider* pTag, |  116   virtual void ComputeStyle(CXFA_CSSTagProvider* pTag, | 
|  116                             const IFDE_CSSDeclaration** ppDeclArray, |  117                             const IFDE_CSSDeclaration** ppDeclArray, | 
|  117                             int32_t iDeclCount, |  118                             int32_t iDeclCount, | 
|  118                             IFDE_CSSComputedStyle* pDestStyle); |  119                             IFDE_CSSComputedStyle* pDestStyle); | 
|  119  |  120  | 
|  120  protected: |  121  protected: | 
|  121   void Reset(); |  122   void Reset(); | 
|  122   void MatchRules(FDE_CSSTagCache* pCache, |  123   void MatchRules(FDE_CSSTagCache* pCache, | 
|  123                   FDE_CSSRuleData* pList, |  124                   FDE_CSSRuleData* pList, | 
|  124                   FDE_CSSPERSUDO ePersudoType); |  125                   FDE_CSSPERSUDO ePersudoType); | 
|  125   FX_BOOL MatchSelector(FDE_CSSTagCache* pCache, |  126   FX_BOOL MatchSelector(FDE_CSSTagCache* pCache, | 
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  581   } |  582   } | 
|  582  |  583  | 
|  583   uint32_t m_dwRefCount; |  584   uint32_t m_dwRefCount; | 
|  584   IFX_MEMAllocator* m_pAllocator; |  585   IFX_MEMAllocator* m_pAllocator; | 
|  585   CFDE_CSSInheritedData m_InheritedData; |  586   CFDE_CSSInheritedData m_InheritedData; | 
|  586   CFDE_CSSNonInheritedData m_NonInheritedData; |  587   CFDE_CSSNonInheritedData m_NonInheritedData; | 
|  587   CFX_WideStringArray m_CustomProperties; |  588   CFX_WideStringArray m_CustomProperties; | 
|  588 }; |  589 }; | 
|  589  |  590  | 
|  590 #endif  // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ |  591 #endif  // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ | 
| OLD | NEW |