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 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
| 9 #include "xfa/src/fdp/src/css/fde_csscache.h" |
9 #include "xfa/src/foxitlib.h" | 10 #include "xfa/src/foxitlib.h" |
10 #include "xfa/src/fdp/src/css/fde_csscache.h" | |
11 _FDE_CSSCACHEITEM::_FDE_CSSCACHEITEM(IFDE_CSSStyleSheet* p) | 11 _FDE_CSSCACHEITEM::_FDE_CSSCACHEITEM(IFDE_CSSStyleSheet* p) |
12 : pStylesheet(p), dwActivity(0) { | 12 : pStylesheet(p), dwActivity(0) { |
13 FXSYS_assert(pStylesheet); | 13 FXSYS_assert(pStylesheet); |
14 pStylesheet->AddRef(); | 14 pStylesheet->AddRef(); |
15 } | 15 } |
16 _FDE_CSSCACHEITEM::~_FDE_CSSCACHEITEM() { | 16 _FDE_CSSCACHEITEM::~_FDE_CSSCACHEITEM() { |
17 pStylesheet->Release(); | 17 pStylesheet->Release(); |
18 } | 18 } |
19 IFDE_CSSStyleSheetCache* IFDE_CSSStyleSheetCache::Create() { | 19 IFDE_CSSStyleSheetCache* IFDE_CSSStyleSheetCache::Create() { |
20 return new CFDE_CSSStyleSheetCache; | 20 return new CFDE_CSSStyleSheetCache; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void CFDE_CSSAccelerator::OnEnterTag(IFDE_CSSTagProvider* pTag) { | 138 void CFDE_CSSAccelerator::OnEnterTag(IFDE_CSSTagProvider* pTag) { |
139 FDE_CSSTAGCACHE* pTop = GetTopElement(); | 139 FDE_CSSTAGCACHE* pTop = GetTopElement(); |
140 FDE_CSSTAGCACHE item(pTop, pTag); | 140 FDE_CSSTAGCACHE item(pTop, pTag); |
141 m_Stack.Push(item); | 141 m_Stack.Push(item); |
142 } | 142 } |
143 void CFDE_CSSAccelerator::OnLeaveTag(IFDE_CSSTagProvider* pTag) { | 143 void CFDE_CSSAccelerator::OnLeaveTag(IFDE_CSSTagProvider* pTag) { |
144 FXSYS_assert(m_Stack.GetTopElement()); | 144 FXSYS_assert(m_Stack.GetTopElement()); |
145 FXSYS_assert(m_Stack.GetTopElement()->GetTag() == pTag); | 145 FXSYS_assert(m_Stack.GetTopElement()->GetTag() == pTag); |
146 m_Stack.Pop(); | 146 m_Stack.Pop(); |
147 } | 147 } |
OLD | NEW |