summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_csssyntax.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-18 08:58:00 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-18 14:28:36 +0000
commit9dbc3c4fe51f890ef4e18b3dbe6b231e39d024c8 (patch)
tree0428ddf4a5cf7169c352940515422a4dd08d0384 /xfa/fde/css/fde_csssyntax.h
parent091344f0d97022a0bf1f9edc41455b50f95b5d05 (diff)
downloadpdfium-9dbc3c4fe51f890ef4e18b3dbe6b231e39d024c8.tar.xz
Remove unused syntax parser initialize method.
This Cl removes the stream initializer from the FDE CSS parser. The only consumer was the css fuzzer. The fuzzer has been moved to use the string initializer to match the rest of the code. Change-Id: I65445af1159058b7c71d5e1d7c12e60383da6dbd Reviewed-on: https://pdfium-review.googlesource.com/2217 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fde/css/fde_csssyntax.h')
-rw-r--r--xfa/fde/css/fde_csssyntax.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fde/css/fde_csssyntax.h b/xfa/fde/css/fde_csssyntax.h
index c7578e170b..b29cf23886 100644
--- a/xfa/fde/css/fde_csssyntax.h
+++ b/xfa/fde/css/fde_csssyntax.h
@@ -28,8 +28,10 @@ class CFDE_CSSTextBuf {
m_pBuffer[m_iDatLen++] = wch;
return true;
}
+
void Clear() { m_iDatPos = m_iDatLen = 0; }
void Reset();
+
int32_t TrimEnd() {
while (m_iDatLen > 0 && m_pBuffer[m_iDatLen - 1] <= ' ') {
--m_iDatLen;
@@ -37,14 +39,18 @@ class CFDE_CSSTextBuf {
AppendChar(0);
return --m_iDatLen;
}
+
void Subtract(int32_t iStart, int32_t iLength);
bool IsEOF() const { return m_iDatPos >= m_iDatLen; }
+
FX_WCHAR GetAt(int32_t index) const { return m_pBuffer[index]; }
FX_WCHAR GetChar() const { return m_pBuffer[m_iDatPos]; }
FX_WCHAR GetNextChar() const {
return (m_iDatPos + 1 >= m_iDatLen) ? 0 : m_pBuffer[m_iDatPos + 1];
}
+
void MoveNext() { m_iDatPos++; }
+
int32_t GetLength() const { return m_iDatLen; }
const FX_WCHAR* GetBuffer() const { return m_pBuffer; }
@@ -80,10 +86,6 @@ class CFDE_CSSSyntaxParser {
CFDE_CSSSyntaxParser();
~CFDE_CSSSyntaxParser();
- bool Init(const CFX_RetainPtr<IFGAS_Stream>& pStream,
- int32_t iCSSPlaneSize,
- int32_t iTextDataSize = 32,
- bool bOnlyDeclaration = false);
bool Init(const FX_WCHAR* pBuffer,
int32_t iBufferSize,
int32_t iTextDatSize = 32,
@@ -106,9 +108,6 @@ class CFDE_CSSSyntaxParser {
bool IsImportEnabled() const;
void DisableImport() { m_dwCheck = 0; }
- CFX_RetainPtr<IFGAS_Stream> m_pStream;
- int32_t m_iStreamPos;
- int32_t m_iPlaneSize;
CFDE_CSSTextBuf m_TextData;
CFDE_CSSTextBuf m_TextPlane;
int32_t m_iTextDatLen;