summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fxcrt/cfx_checksumcontext.cpp2
-rw-r--r--core/fxcrt/xml/cfx_saxreader.cpp12
-rw-r--r--core/fxcrt/xml/cfx_saxreader.h2
-rw-r--r--core/fxcrt/xml/cfx_saxreader_unittest.cpp2
-rw-r--r--core/fxcrt/xml/cfx_xmldoc.cpp4
-rw-r--r--core/fxcrt/xml/cfx_xmldoc.h2
-rw-r--r--core/fxcrt/xml/cfx_xmlparser.cpp5
-rw-r--r--core/fxcrt/xml/cfx_xmlparser.h3
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp4
-rw-r--r--testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc2
-rw-r--r--testing/libfuzzer/pdf_xml_fuzzer.cc2
-rw-r--r--xfa/fde/cfde_txtedtbuf.h2
-rw-r--r--xfa/fde/cfde_txtedtengine.cpp6
-rw-r--r--xfa/fde/cfde_txtedtengine.h2
-rw-r--r--xfa/fde/cfde_txtedtpage.cpp8
-rw-r--r--xfa/fde/cfde_txtedtpage.h2
-rw-r--r--xfa/fwl/cfwl_edit.cpp6
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp4
-rw-r--r--xfa/fxfa/cxfa_ffdoc.h2
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp10
-rw-r--r--xfa/fxfa/cxfa_ffdocview.h2
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp12
-rw-r--r--xfa/fxfa/parser/cxfa_dataimporter.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.h3
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.cpp7
-rw-r--r--xfa/fxfa/parser/cxfa_layoutprocessor.h3
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp9
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.h5
30 files changed, 57 insertions, 74 deletions
diff --git a/core/fxcrt/cfx_checksumcontext.cpp b/core/fxcrt/cfx_checksumcontext.cpp
index 97d0af2d75..eb20db69ec 100644
--- a/core/fxcrt/cfx_checksumcontext.cpp
+++ b/core/fxcrt/cfx_checksumcontext.cpp
@@ -122,7 +122,7 @@ bool CFX_ChecksumContext::UpdateChecksum(
CFX_SaxParseMode_NotConvert_sharp) < 0) {
return false;
}
- return m_pSAXReader->ContinueParse(nullptr) > 99;
+ return m_pSAXReader->ContinueParse() > 99;
}
void CFX_ChecksumContext::FinishChecksum() {
diff --git a/core/fxcrt/xml/cfx_saxreader.cpp b/core/fxcrt/xml/cfx_saxreader.cpp
index c345c0c038..42bf510c19 100644
--- a/core/fxcrt/xml/cfx_saxreader.cpp
+++ b/core/fxcrt/xml/cfx_saxreader.cpp
@@ -203,10 +203,10 @@ int32_t CFX_SAXReader::StartParse(
return 0;
}
-int32_t CFX_SAXReader::ContinueParse(IFX_Pause* pPause) {
- if (m_iState < 0 || m_iState > 99) {
+int32_t CFX_SAXReader::ContinueParse() {
+ if (m_iState < 0 || m_iState > 99)
return m_iState;
- }
+
while (m_File.m_dwCur < m_File.m_dwEnd) {
uint32_t& index = m_File.m_dwBufIndex;
uint32_t size = m_File.m_dwBufSize;
@@ -219,17 +219,13 @@ int32_t CFX_SAXReader::ContinueParse(IFX_Pause* pPause) {
m_File.m_dwCur += index;
m_iState = (m_File.m_dwCur - m_File.m_dwStart) * 100 /
(m_File.m_dwEnd - m_File.m_dwStart);
- if (m_File.m_dwCur >= m_File.m_dwEnd) {
+ if (m_File.m_dwCur >= m_File.m_dwEnd)
break;
- }
if (!m_File.ReadNextBlock()) {
m_iState = -2;
break;
}
m_dwDataOffset = 0;
- if (pPause && pPause->NeedToPauseNow()) {
- break;
- }
}
return m_iState;
}
diff --git a/core/fxcrt/xml/cfx_saxreader.h b/core/fxcrt/xml/cfx_saxreader.h
index 47ef79c50f..9f1f324062 100644
--- a/core/fxcrt/xml/cfx_saxreader.h
+++ b/core/fxcrt/xml/cfx_saxreader.h
@@ -101,7 +101,7 @@ class CFX_SAXReader {
uint32_t dwStart = 0,
uint32_t dwLen = -1,
uint32_t dwParseMode = 0);
- int32_t ContinueParse(IFX_Pause* pPause = nullptr);
+ int32_t ContinueParse();
void SetHandler(HandlerIface* pHandler) { m_pHandler = pHandler; }
private:
diff --git a/core/fxcrt/xml/cfx_saxreader_unittest.cpp b/core/fxcrt/xml/cfx_saxreader_unittest.cpp
index dca93b3a16..62828500c9 100644
--- a/core/fxcrt/xml/cfx_saxreader_unittest.cpp
+++ b/core/fxcrt/xml/cfx_saxreader_unittest.cpp
@@ -61,7 +61,7 @@ class CFX_SAXReaderTest : public testing::Test {
int32_t ContinueParse() {
int32_t ret;
do {
- ret = reader_.ContinueParse(nullptr);
+ ret = reader_.ContinueParse();
} while (ret >= 0 && ret < 100);
return ret;
}
diff --git a/core/fxcrt/xml/cfx_xmldoc.cpp b/core/fxcrt/xml/cfx_xmldoc.cpp
index 4f58da91f2..6fce38cea6 100644
--- a/core/fxcrt/xml/cfx_xmldoc.cpp
+++ b/core/fxcrt/xml/cfx_xmldoc.cpp
@@ -36,9 +36,9 @@ bool CFX_XMLDoc::LoadXML(std::unique_ptr<CFX_XMLParser> pXMLParser) {
return true;
}
-int32_t CFX_XMLDoc::DoLoad(IFX_Pause* pPause) {
+int32_t CFX_XMLDoc::DoLoad() {
if (m_iStatus < 100)
- m_iStatus = m_pXMLParser->DoParser(pPause);
+ m_iStatus = m_pXMLParser->DoParser();
return m_iStatus;
}
diff --git a/core/fxcrt/xml/cfx_xmldoc.h b/core/fxcrt/xml/cfx_xmldoc.h
index 5966c096ba..c182504f6f 100644
--- a/core/fxcrt/xml/cfx_xmldoc.h
+++ b/core/fxcrt/xml/cfx_xmldoc.h
@@ -20,7 +20,7 @@ class CFX_XMLDoc {
~CFX_XMLDoc();
bool LoadXML(std::unique_ptr<CFX_XMLParser> pXMLParser);
- int32_t DoLoad(IFX_Pause* pPause);
+ int32_t DoLoad();
void CloseXML();
CFX_XMLNode* GetRoot() const { return m_pRoot.get(); }
diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp
index 0e328f33ea..884f6fc477 100644
--- a/core/fxcrt/xml/cfx_xmlparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser.cpp
@@ -31,7 +31,7 @@ CFX_XMLParser::CFX_XMLParser(
CFX_XMLParser::~CFX_XMLParser() {}
-int32_t CFX_XMLParser::DoParser(IFX_Pause* pPause) {
+int32_t CFX_XMLParser::DoParser() {
if (m_syntaxParserResult == FX_XmlSyntaxResult::Error)
return -1;
if (m_syntaxParserResult == FX_XmlSyntaxResult::EndOfString)
@@ -160,9 +160,6 @@ int32_t CFX_XMLParser::DoParser(IFX_Pause* pPause) {
m_syntaxParserResult == FX_XmlSyntaxResult::EndOfString) {
break;
}
- if (pPause && iCount > 500 && pPause->NeedToPauseNow()) {
- break;
- }
}
return (m_syntaxParserResult == FX_XmlSyntaxResult::Error ||
m_NodeStack.size() != 1)
diff --git a/core/fxcrt/xml/cfx_xmlparser.h b/core/fxcrt/xml/cfx_xmlparser.h
index dc3cc4c297..9746d78ae8 100644
--- a/core/fxcrt/xml/cfx_xmlparser.h
+++ b/core/fxcrt/xml/cfx_xmlparser.h
@@ -17,7 +17,6 @@
class CFX_XMLElement;
class CFX_XMLNode;
class CFX_SeekableStreamProxy;
-class IFX_Pause;
class CFX_XMLParser {
public:
@@ -25,7 +24,7 @@ class CFX_XMLParser {
const CFX_RetainPtr<CFX_SeekableStreamProxy>& pStream);
~CFX_XMLParser();
- int32_t DoParser(IFX_Pause* pPause);
+ int32_t DoParser();
FX_FILESIZE m_nStart[2];
size_t m_nSize[2];
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index bda0128f18..454e2187a3 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -107,7 +107,7 @@ bool CPDFXFA_Context::LoadXFADoc() {
}
m_pXFADoc->StartLoad();
- int iStatus = m_pXFADoc->DoLoad(nullptr);
+ int iStatus = m_pXFADoc->DoLoad();
if (iStatus != XFA_PARSESTATUS_Done) {
CloseXFADoc();
SetLastError(FPDF_ERR_XFALOAD);
@@ -128,7 +128,7 @@ bool CPDFXFA_Context::LoadXFADoc() {
return false;
}
- m_pXFADocView->DoLayout(nullptr);
+ m_pXFADocView->DoLayout();
m_pXFADocView->StopLayout();
m_nLoadStatus = FXFA_LOADSTATUS_LOADED;
diff --git a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
index 6769d8e844..fcf8b09e90 100644
--- a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
@@ -18,7 +18,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
}
while (1) {
- int32_t ret = reader.ContinueParse(nullptr);
+ int32_t ret = reader.ContinueParse();
if (ret < 0 || ret > 99)
break;
}
diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc
index be77016b60..80a112d32b 100644
--- a/testing/libfuzzer/pdf_xml_fuzzer.cc
+++ b/testing/libfuzzer/pdf_xml_fuzzer.cc
@@ -58,7 +58,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (!doc->LoadXML(pdfium::MakeUnique<CFX_XMLParser>(doc->GetRoot(), stream)))
return 0;
- if (doc->DoLoad(nullptr) < 100)
+ if (doc->DoLoad() < 100)
return 0;
(void)XFA_FDEExtension_GetDocumentNode(doc.get());
diff --git a/xfa/fde/cfde_txtedtbuf.h b/xfa/fde/cfde_txtedtbuf.h
index 096ce6bf77..39187f48a3 100644
--- a/xfa/fde/cfde_txtedtbuf.h
+++ b/xfa/fde/cfde_txtedtbuf.h
@@ -15,8 +15,6 @@
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/ifx_chariter.h"
-class IFX_Pause;
-
class CFDE_TxtEdtBuf {
public:
class Iterator : public IFX_CharIter {
diff --git a/xfa/fde/cfde_txtedtengine.cpp b/xfa/fde/cfde_txtedtengine.cpp
index 7bd9259b5f..a8445b028e 100644
--- a/xfa/fde/cfde_txtedtengine.cpp
+++ b/xfa/fde/cfde_txtedtengine.cpp
@@ -622,7 +622,7 @@ int32_t CFDE_TxtEdtEngine::StartLayout() {
return 0;
}
-int32_t CFDE_TxtEdtEngine::DoLayout(IFX_Pause* pPause) {
+int32_t CFDE_TxtEdtEngine::DoLayout() {
int32_t nCount = pdfium::CollectionSize<int32_t>(m_ParagPtrArray);
CFDE_TxtEdtParag* pParag = nullptr;
int32_t nLineCount = 0;
@@ -630,10 +630,6 @@ int32_t CFDE_TxtEdtEngine::DoLayout(IFX_Pause* pPause) {
pParag = m_ParagPtrArray[m_nLayoutPos].get();
pParag->CalcLines();
nLineCount += pParag->GetLineCount();
- if (nLineCount > m_nPageLineCount && pPause && pPause->NeedToPauseNow()) {
- m_nLineCount += nLineCount;
- return (++m_nLayoutPos * 100) / nCount;
- }
}
m_nLineCount += nLineCount;
return 100;
diff --git a/xfa/fde/cfde_txtedtengine.h b/xfa/fde/cfde_txtedtengine.h
index 3166f1854c..31883fc3c8 100644
--- a/xfa/fde/cfde_txtedtengine.h
+++ b/xfa/fde/cfde_txtedtengine.h
@@ -68,7 +68,7 @@ class CFDE_TxtEdtEngine {
bool Undo(const IFDE_TxtEdtDoRecord* pRecord);
int32_t StartLayout();
- int32_t DoLayout(IFX_Pause* pPause);
+ int32_t DoLayout();
void EndLayout();
int32_t CountParags() const;
diff --git a/xfa/fde/cfde_txtedtpage.cpp b/xfa/fde/cfde_txtedtpage.cpp
index f0b03af7ca..f3127e7708 100644
--- a/xfa/fde/cfde_txtedtpage.cpp
+++ b/xfa/fde/cfde_txtedtpage.cpp
@@ -226,18 +226,18 @@ bool CFDE_TxtEdtPage::IsLoaded(const CFX_RectF* pClipBox) {
return m_bLoaded;
}
-int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
- IFX_Pause* pPause) {
+int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox) {
if (m_nRefCount > 0) {
m_nRefCount++;
return m_nRefCount;
}
+
CFDE_TxtEdtBuf* pBuf = m_pEditEngine->GetTextBuf();
const FDE_TXTEDTPARAMS* pParams = m_pEditEngine->GetEditParams();
wchar_t wcAlias = 0;
- if (pParams->dwMode & FDE_TEXTEDITMODE_Password) {
+ if (pParams->dwMode & FDE_TEXTEDITMODE_Password)
wcAlias = m_pEditEngine->GetAliasChar();
- }
+
m_pIter = pdfium::MakeUnique<CFDE_TxtEdtBuf::Iterator>(
static_cast<CFDE_TxtEdtBuf*>(pBuf), wcAlias);
CFX_TxtBreak* pBreak = m_pEditEngine->GetTextBreak();
diff --git a/xfa/fde/cfde_txtedtpage.h b/xfa/fde/cfde_txtedtpage.h
index beebdad2af..c715c45062 100644
--- a/xfa/fde/cfde_txtedtpage.h
+++ b/xfa/fde/cfde_txtedtpage.h
@@ -42,7 +42,7 @@ class CFDE_TxtEdtPage : public IFDE_VisualSet {
FXTEXT_CHARPOS*& pCharPos,
CFX_RectF* pBBox) const;
bool IsLoaded(const CFX_RectF* pClipBox);
- int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause);
+ int32_t LoadPage(const CFX_RectF* pClipBox);
void UnloadPage(const CFX_RectF* pClipBox);
const CFX_RectF& GetContentsBox();
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 1b76ec6240..2dc4bcff7b 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -439,7 +439,7 @@ bool CFWL_Edit::OnPageLoad(int32_t nPageIndex) {
if (!pPage)
return false;
- pPage->LoadPage(nullptr, nullptr);
+ pPage->LoadPage(nullptr);
return true;
}
@@ -698,11 +698,11 @@ void CFWL_Edit::UpdateEditLayout() {
pPage->UnloadPage(nullptr);
m_EdtEngine.StartLayout();
- m_EdtEngine.DoLayout(nullptr);
+ m_EdtEngine.DoLayout();
m_EdtEngine.EndLayout();
pPage = m_EdtEngine.GetPage(0);
if (pPage)
- pPage->LoadPage(nullptr, nullptr);
+ pPage->LoadPage(nullptr);
}
bool CFWL_Edit::UpdateOffset() {
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index 228c4948b6..bddc02a9ce 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -233,8 +233,8 @@ void XFA_XPDPacket_MergeRootNode(CXFA_Node* pOriginRoot, CXFA_Node* pNewRoot) {
}
}
-int32_t CXFA_FFDoc::DoLoad(IFX_Pause* pPause) {
- int32_t iStatus = m_pDocumentParser->DoParse(pPause);
+int32_t CXFA_FFDoc::DoLoad() {
+ int32_t iStatus = m_pDocumentParser->DoParse();
if (iStatus == XFA_PARSESTATUS_Done && !m_pPDFDoc)
return XFA_PARSESTATUS_SyntaxErr;
return iStatus;
diff --git a/xfa/fxfa/cxfa_ffdoc.h b/xfa/fxfa/cxfa_ffdoc.h
index c5822e3577..1cfbb50a2c 100644
--- a/xfa/fxfa/cxfa_ffdoc.h
+++ b/xfa/fxfa/cxfa_ffdoc.h
@@ -53,7 +53,7 @@ class CXFA_FFDoc {
XFA_DocType GetDocType() const { return m_dwDocType; }
int32_t StartLoad();
- int32_t DoLoad(IFX_Pause* pPause = nullptr);
+ int32_t DoLoad();
void StopLoad();
CXFA_FFDocView* CreateDocView();
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index bcf5ef2772..058116be72 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -99,15 +99,17 @@ int32_t CXFA_FFDocView::StartLayout(int32_t iStartPage) {
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Start;
return iStatus;
}
-int32_t CXFA_FFDocView::DoLayout(IFX_Pause* pPause) {
+
+int32_t CXFA_FFDocView::DoLayout() {
int32_t iStatus = 100;
- iStatus = m_pXFADocLayout->DoLayout(pPause);
- if (iStatus != 100) {
+ iStatus = m_pXFADocLayout->DoLayout();
+ if (iStatus != 100)
return iStatus;
- }
+
m_iStatus = XFA_DOCVIEW_LAYOUTSTATUS_Doing;
return iStatus;
}
+
void CXFA_FFDocView::StopLayout() {
CXFA_Node* pRootItem =
ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form));
diff --git a/xfa/fxfa/cxfa_ffdocview.h b/xfa/fxfa/cxfa_ffdocview.h
index 7b443d4019..761397c4b0 100644
--- a/xfa/fxfa/cxfa_ffdocview.h
+++ b/xfa/fxfa/cxfa_ffdocview.h
@@ -44,7 +44,7 @@ class CXFA_FFDocView {
CXFA_FFDoc* GetDoc() { return m_pDoc; }
int32_t StartLayout(int32_t iStartPage = 0);
- int32_t DoLayout(IFX_Pause* pPause);
+ int32_t DoLayout();
void StopLayout();
int32_t GetLayoutStatus();
void UpdateDocView();
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index b74e1dcaf7..69aabe38be 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -568,7 +568,7 @@ class CXFA_ImageRenderer {
const CFX_Matrix* pImage2Device,
uint32_t flags,
int blendType = FXDIB_BLEND_NORMAL);
- bool Continue(IFX_Pause* pPause);
+ bool Continue();
protected:
bool StartDIBSource();
@@ -709,9 +709,9 @@ bool CXFA_ImageRenderer::StartDIBSource() {
return false;
}
-bool CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
+bool CXFA_ImageRenderer::Continue() {
if (m_Status == 2) {
- if (m_pTransformer->Continue(pPause))
+ if (m_pTransformer->Continue(nullptr))
return true;
CFX_RetainPtr<CFX_DIBitmap> pBitmap = m_pTransformer->DetachBitmap();
@@ -734,7 +734,7 @@ bool CXFA_ImageRenderer::Continue(IFX_Pause* pPause) {
return false;
}
if (m_Status == 3)
- return m_pDevice->ContinueDIBits(m_DeviceHandle.get(), pPause);
+ return m_pDevice->ContinueDIBits(m_DeviceHandle.get(), nullptr);
return false;
}
@@ -828,7 +828,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap(
&m_ImageMatrix, m_Flags)) {
return;
}
- while (imageRender.Continue(nullptr))
+ while (imageRender.Continue())
continue;
}
@@ -901,7 +901,7 @@ void XFA_DrawImage(CFX_Graphics* pGS,
FXDIB_INTERPOL)) {
return;
}
- while (imageRender.Continue(nullptr))
+ while (imageRender.Continue())
continue;
}
diff --git a/xfa/fxfa/parser/cxfa_dataimporter.cpp b/xfa/fxfa/parser/cxfa_dataimporter.cpp
index cb5a42c428..d83b92b08d 100644
--- a/xfa/fxfa/parser/cxfa_dataimporter.cpp
+++ b/xfa/fxfa/parser/cxfa_dataimporter.cpp
@@ -30,7 +30,7 @@ bool CXFA_DataImporter::ImportData(
XFA_PARSESTATUS_Ready) {
return false;
}
- if (pDataDocumentParser->DoParse(nullptr) < XFA_PARSESTATUS_Done)
+ if (pDataDocumentParser->DoParse() < XFA_PARSESTATUS_Done)
return false;
CXFA_Node* pImportDataRoot = pDataDocumentParser->GetRootNode();
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index eb7cadc01c..99b36749d1 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -31,8 +31,8 @@ int32_t CXFA_DocumentParser::StartParse(
return nRetStatus;
}
-int32_t CXFA_DocumentParser::DoParse(IFX_Pause* pPause) {
- int32_t nRetStatus = m_nodeParser.DoParse(pPause);
+int32_t CXFA_DocumentParser::DoParse() {
+ int32_t nRetStatus = m_nodeParser.DoParse();
if (nRetStatus >= XFA_PARSESTATUS_Done) {
ASSERT(m_pDocument);
m_pDocument->SetRoot(m_nodeParser.GetRootNode());
diff --git a/xfa/fxfa/parser/cxfa_document_parser.h b/xfa/fxfa/parser/cxfa_document_parser.h
index d876244e35..ad3f17f8e8 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.h
+++ b/xfa/fxfa/parser/cxfa_document_parser.h
@@ -16,7 +16,6 @@ class CXFA_Document;
class CXFA_FFNotify;
class CXFA_Notify;
class IFX_SeekableStream;
-class IFX_Pause;
class CXFA_DocumentParser {
public:
@@ -25,7 +24,7 @@ class CXFA_DocumentParser {
int32_t StartParse(const CFX_RetainPtr<IFX_SeekableStream>& pStream,
XFA_XDPPACKET ePacketID);
- int32_t DoParse(IFX_Pause* pPause);
+ int32_t DoParse();
CFX_XMLDoc* GetXMLDoc() const;
CXFA_FFNotify* GetNotify() const;
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
index 2e919dbc84..0fbae9e368 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp
@@ -57,7 +57,7 @@ int32_t CXFA_LayoutProcessor::StartLayout(bool bForceRestart) {
return 0;
}
-int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
+int32_t CXFA_LayoutProcessor::DoLayout() {
if (m_nProgressCounter < 1)
return -1;
@@ -78,8 +78,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
pLayoutItem->m_sPos = CFX_PointF(fPosX, fPosY);
m_pLayoutPageMgr->SubmitContentItem(pLayoutItem, eStatus);
- } while (eStatus != XFA_ItemLayoutProcessorResult::Done &&
- (!pPause || !pPause->NeedToPauseNow()));
+ } while (eStatus != XFA_ItemLayoutProcessorResult::Done);
if (eStatus == XFA_ItemLayoutProcessorResult::Done) {
m_pLayoutPageMgr->FinishPaginatedPageSets();
@@ -96,7 +95,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) {
bool CXFA_LayoutProcessor::IncrementLayout() {
if (m_bNeedLayout) {
StartLayout(true);
- return DoLayout(nullptr) == 100;
+ return DoLayout() == 100;
}
for (CXFA_Node* pNode : m_rgChangedContainers) {
CXFA_Node* pParentNode =
diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h
index 75bf2597c5..5a48560f26 100644
--- a/xfa/fxfa/parser/cxfa_layoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h
@@ -18,7 +18,6 @@ class CXFA_ItemLayoutProcessor;
class CXFA_LayoutItem;
class CXFA_LayoutPageMgr;
class CXFA_Node;
-class IFX_Pause;
class CXFA_LayoutProcessor {
public:
@@ -27,7 +26,7 @@ class CXFA_LayoutProcessor {
CXFA_Document* GetDocument() const;
int32_t StartLayout(bool bForceRestart = false);
- int32_t DoLayout(IFX_Pause* pPause = nullptr);
+ int32_t DoLayout();
bool IncrementLayout();
int32_t CountPages() const;
CXFA_ContainerLayoutItem* GetPage(int32_t index) const;
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 9fae4a43aa..e136814e9f 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -1284,7 +1284,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
auto pParser = pdfium::MakeUnique<CXFA_SimpleParser>(m_pDocument, false);
if (!pParser)
return;
- CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression, nullptr);
+ CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression);
if (!pXMLNode)
return;
if (bIgnoreRoot &&
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 4773fda22a..3cbcd26100 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -293,11 +293,11 @@ int32_t CXFA_SimpleParser::StartParse(
return XFA_PARSESTATUS_Ready;
}
-int32_t CXFA_SimpleParser::DoParse(IFX_Pause* pPause) {
+int32_t CXFA_SimpleParser::DoParse() {
if (!m_pXMLDoc || m_ePacketID == XFA_XDPPACKET_UNKNOWN)
return XFA_PARSESTATUS_StatusErr;
- int32_t iRet = m_pXMLDoc->DoLoad(pPause);
+ int32_t iRet = m_pXMLDoc->DoLoad();
if (iRet < 0)
return XFA_PARSESTATUS_SyntaxErr;
if (iRet < 100)
@@ -313,8 +313,7 @@ int32_t CXFA_SimpleParser::DoParse(IFX_Pause* pPause) {
return XFA_PARSESTATUS_Done;
}
-CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML,
- IFX_Pause* pPause) {
+CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML) {
CloseParser();
m_pXMLDoc = pdfium::MakeUnique<CFX_XMLDoc>();
@@ -326,7 +325,7 @@ CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML,
if (!m_pXMLDoc->LoadXML(std::move(pParser)))
return nullptr;
- int32_t iRet = m_pXMLDoc->DoLoad(pPause);
+ int32_t iRet = m_pXMLDoc->DoLoad();
if (iRet < 0 || iRet >= 100)
m_pXMLDoc->CloseXML();
return iRet < 100 ? nullptr : GetDocumentNode(m_pXMLDoc.get());
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h
index cb1efcc1d5..705b6bde5c 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.h
+++ b/xfa/fxfa/parser/cxfa_simple_parser.h
@@ -18,7 +18,6 @@ class CFX_XMLInstruction;
class CFX_XMLNode;
class CFX_XMLParser;
class IFX_SeekableStream;
-class IFX_Pause;
class CFX_SeekableStreamProxy;
class CXFA_SimpleParser {
@@ -28,8 +27,8 @@ class CXFA_SimpleParser {
int32_t StartParse(const CFX_RetainPtr<IFX_SeekableStream>& pStream,
XFA_XDPPACKET ePacketID);
- int32_t DoParse(IFX_Pause* pPause);
- CFX_XMLNode* ParseXMLData(const CFX_ByteString& wsXML, IFX_Pause* pPause);
+ int32_t DoParse();
+ CFX_XMLNode* ParseXMLData(const CFX_ByteString& wsXML);
void ConstructXFANode(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode);
CXFA_Node* GetRootNode() const;
CFX_XMLDoc* GetXMLDoc() const;