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 "xfa/src/fde/css/fde_csscache.h" | 7 #include "xfa/fde/css/fde_csscache.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "core/include/fxcrt/fx_ext.h" | 11 #include "core/include/fxcrt/fx_ext.h" |
12 | 12 |
13 FDE_CSSCacheItem::FDE_CSSCacheItem(IFDE_CSSStyleSheet* p) | 13 FDE_CSSCacheItem::FDE_CSSCacheItem(IFDE_CSSStyleSheet* p) |
14 : pStylesheet(p), dwActivity(0) { | 14 : pStylesheet(p), dwActivity(0) { |
15 FXSYS_assert(pStylesheet); | 15 FXSYS_assert(pStylesheet); |
16 pStylesheet->AddRef(); | 16 pStylesheet->AddRef(); |
17 } | 17 } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void CFDE_CSSAccelerator::OnEnterTag(IFDE_CSSTagProvider* pTag) { | 140 void CFDE_CSSAccelerator::OnEnterTag(IFDE_CSSTagProvider* pTag) { |
141 FDE_CSSTagCache* pTop = GetTopElement(); | 141 FDE_CSSTagCache* pTop = GetTopElement(); |
142 FDE_CSSTagCache item(pTop, pTag); | 142 FDE_CSSTagCache item(pTop, pTag); |
143 m_Stack.Push(item); | 143 m_Stack.Push(item); |
144 } | 144 } |
145 void CFDE_CSSAccelerator::OnLeaveTag(IFDE_CSSTagProvider* pTag) { | 145 void CFDE_CSSAccelerator::OnLeaveTag(IFDE_CSSTagProvider* pTag) { |
146 FXSYS_assert(m_Stack.GetTopElement()); | 146 FXSYS_assert(m_Stack.GetTopElement()); |
147 FXSYS_assert(m_Stack.GetTopElement()->GetTag() == pTag); | 147 FXSYS_assert(m_Stack.GetTopElement()->GetTag() == pTag); |
148 m_Stack.Pop(); | 148 m_Stack.Pop(); |
149 } | 149 } |
OLD | NEW |