| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/fpdfapi/page/pageint.h" | 7 #include "core/fpdfapi/page/cpdf_contentparser.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/font/cpdf_type3char.h" | 9 #include "core/fpdfapi/font/cpdf_type3char.h" |
| 10 #include "core/fpdfapi/page/cpdf_allstates.h" | 10 #include "core/fpdfapi/page/cpdf_allstates.h" |
| 11 #include "core/fpdfapi/page/cpdf_form.h" | 11 #include "core/fpdfapi/page/cpdf_form.h" |
| 12 #include "core/fpdfapi/page/cpdf_page.h" | 12 #include "core/fpdfapi/page/cpdf_page.h" |
| 13 #include "core/fpdfapi/page/cpdf_pageobject.h" | 13 #include "core/fpdfapi/page/cpdf_pageobject.h" |
| 14 #include "core/fpdfapi/page/cpdf_path.h" | 14 #include "core/fpdfapi/page/cpdf_path.h" |
| 15 #include "core/fpdfapi/parser/cpdf_array.h" | 15 #include "core/fpdfapi/parser/cpdf_array.h" |
| 16 #include "core/fpdfapi/parser/cpdf_dictionary.h" | 16 #include "core/fpdfapi/parser/cpdf_dictionary.h" |
| 17 #include "core/fpdfapi/parser/cpdf_stream.h" | 17 #include "core/fpdfapi/parser/cpdf_stream.h" |
| 18 #include "core/fpdfapi/parser/cpdf_stream_acc.h" | 18 #include "core/fpdfapi/parser/cpdf_stream_acc.h" |
| 19 #include "core/fxcrt/fx_safe_types.h" | 19 #include "core/fxcrt/fx_safe_types.h" |
| 20 | 20 |
| 21 #define PARSE_STEP_LIMIT 100 |
| 22 |
| 21 CPDF_ContentParser::CPDF_ContentParser() | 23 CPDF_ContentParser::CPDF_ContentParser() |
| 22 : m_Status(Ready), | 24 : m_Status(Ready), |
| 23 m_InternalStage(STAGE_GETCONTENT), | 25 m_InternalStage(STAGE_GETCONTENT), |
| 24 m_pObjectHolder(nullptr), | 26 m_pObjectHolder(nullptr), |
| 25 m_bForm(false), | 27 m_bForm(false), |
| 26 m_pType3Char(nullptr), | 28 m_pType3Char(nullptr), |
| 27 m_pData(nullptr), | 29 m_pData(nullptr), |
| 28 m_Size(0), | 30 m_Size(0), |
| 29 m_CurrentOffset(0) {} | 31 m_CurrentOffset(0) {} |
| 30 | 32 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 pObj->m_ClipPath.SetNull(); | 208 pObj->m_ClipPath.SetNull(); |
| 207 } | 209 } |
| 208 m_Status = Done; | 210 m_Status = Done; |
| 209 return; | 211 return; |
| 210 } | 212 } |
| 211 steps++; | 213 steps++; |
| 212 if (pPause && pPause->NeedToPauseNow()) | 214 if (pPause && pPause->NeedToPauseNow()) |
| 213 break; | 215 break; |
| 214 } | 216 } |
| 215 } | 217 } |
| OLD | NEW |