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> |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle, | 381 class CFDE_CSSComputedStyle : public IFDE_CSSComputedStyle, |
382 public IFDE_CSSBoundaryStyle, | 382 public IFDE_CSSBoundaryStyle, |
383 public IFDE_CSSFontStyle, | 383 public IFDE_CSSFontStyle, |
384 public IFDE_CSSPositionStyle, | 384 public IFDE_CSSPositionStyle, |
385 public IFDE_CSSParagraphStyle, | 385 public IFDE_CSSParagraphStyle, |
386 public CFX_Target { | 386 public CFX_Target { |
387 public: | 387 public: |
388 CFDE_CSSComputedStyle(IFX_MemoryAllocator* pAlloc) | 388 CFDE_CSSComputedStyle(IFX_MemoryAllocator* pAlloc) |
389 : m_dwRefCount(1), m_pAllocator(pAlloc) {} | 389 : m_dwRefCount(1), m_pAllocator(pAlloc) {} |
390 | 390 |
391 ~CFDE_CSSComputedStyle() {} | 391 ~CFDE_CSSComputedStyle() override {} |
392 | 392 |
393 // IFX_Unknown: | 393 // IFX_Retainable: |
394 uint32_t AddRef() override { return ++m_dwRefCount; } | 394 uint32_t Retain() override { return ++m_dwRefCount; } |
395 | |
396 uint32_t Release() override { | 395 uint32_t Release() override { |
397 uint32_t dwRefCount = --m_dwRefCount; | 396 uint32_t dwRefCount = --m_dwRefCount; |
398 if (dwRefCount == 0) { | 397 if (dwRefCount == 0) { |
399 delete m_NonInheritedData.m_pCounterStyle; | 398 delete m_NonInheritedData.m_pCounterStyle; |
400 FXTARGET_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this); | 399 FXTARGET_DeleteWith(CFDE_CSSComputedStyle, m_pAllocator, this); |
401 } | 400 } |
402 return dwRefCount; | 401 return dwRefCount; |
403 } | 402 } |
404 | 403 |
405 // IFDE_CSSComputedStyle: | 404 // IFDE_CSSComputedStyle: |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 } | 577 } |
579 | 578 |
580 uint32_t m_dwRefCount; | 579 uint32_t m_dwRefCount; |
581 IFX_MemoryAllocator* m_pAllocator; | 580 IFX_MemoryAllocator* m_pAllocator; |
582 CFDE_CSSInheritedData m_InheritedData; | 581 CFDE_CSSInheritedData m_InheritedData; |
583 CFDE_CSSNonInheritedData m_NonInheritedData; | 582 CFDE_CSSNonInheritedData m_NonInheritedData; |
584 CFX_WideStringArray m_CustomProperties; | 583 CFX_WideStringArray m_CustomProperties; |
585 }; | 584 }; |
586 | 585 |
587 #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ | 586 #endif // XFA_FDE_CSS_FDE_CSSSTYLESELECTOR_H_ |
OLD | NEW |