summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_csssyntax.cpp
AgeCommit message (Collapse)Author
2017-01-19Split fde/css files into individual class files.Dan Sinclair
This CL splits the files in xfa/fde/css into class per file and renames any needed files to match the class names. Update some of the classes to use std::stack. Change-Id: I4eca0fb3556d949a15a873bb0f0fd732f47e4fb1 Reviewed-on: https://pdfium-review.googlesource.com/2253 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-01-18Convert CSS mode stack to std::stackDan Sinclair
This CL converts the css syntax parser to use a std::stack instead of a custom CFX stack. Change-Id: I650c8340693d3608b9264bbf887f1d14847cb68f Reviewed-on: https://pdfium-review.googlesource.com/2218 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-01-18Remove unused syntax parser initialize method.Dan Sinclair
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>
2017-01-11Convert FDE CSS enums to enum classes.Dan Sinclair
This CL updates the possible FDE CSS enums to enum classes and fixes up any instances of incorrect values being used. A few other cleanups and changes were needed to complete the conversion. Change-Id: Ibcca5229a9ca8de1f4beb6462535f61705fd4f8c Reviewed-on: https://pdfium-review.googlesource.com/2170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2016-12-07Refcount IFGAS_ streams all the time, tootsepez
IFGAS_Streams are not part of the IFX_Stream hierarchy, but can be made from such. Review-Url: https://codereview.chromium.org/2559763002
2016-12-02Rename IFX_Stream to IFGAS_Stream.tsepez
It's a separate hierarchy unrelated to the IFX_*Stream classes. Also rename CFX_Stream to CFGAS_Stream, and so forth. Review-Url: https://codereview.chromium.org/2535723010
2016-11-28Fix crash in CFDE_CSSSyntaxParser when parsing empty urlnpm
When parsing "url('')", Subtract() should be called to correctly set m_iDatLen. But iLength will be 0 because there is no url. So I changed the ASSERT. Also replaced some non-const refs with pointers to make the code more readable. BUG=659509 Review-Url: https://codereview.chromium.org/2535663003
2016-11-02Remove FX_BOOL from xfa.tsepez
Review-Url: https://codereview.chromium.org/2467203003
2016-07-18Cleanup fgas/crt.dsinclair
This CL removes unused methods and default parameters from the fgas/crt code. Review-Url: https://codereview.chromium.org/2162503003
2016-06-10Get rid of NULLs in xfa/fde/thestig
Review-Url: https://codereview.chromium.org/2039923004
2016-05-27Avoid two C-style FX_WCHAR* casts in pdfiumbrucedawson
FX_WCHAR* casts were hiding a number of misuses of narrow strings in pdfium, which /analyze identified. Now that those are fixed I did a search for other instances of (FX_WCHAR*) to see if any other bugs were lurking. No bugs were found but one unnecessary cast and one that should be a const_cast were identified. This change fixes those. No behavioral change. Review-Url: https://codereview.chromium.org/2024463002
2016-05-19fgas/ code cleanup.dsinclair
This CL shuffles code around in the fgas/ headers, removes unused functions and adds anonymous namepaces for static methods and data. Review-Url: https://codereview.chromium.org/1992033002
2016-04-28Cleanup IFDE_CSS interfaces.dsinclair
This CL removes the follwing in favour of their concrete class. * IFDE_CSSDeclaration * IFDE_CSSSelector * IFDE_CSSSyntaxParser * IFDE_CSSStyleSelector Review-Url: https://codereview.chromium.org/1928763002
2016-04-27Standardize on ASSERT.dsinclair
There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003
2016-03-25Remove FX_DWORD from XFA.tsepez
Review URL: https://codereview.chromium.org/1830323006
2016-03-21Remove FX_WORD in favor of uint16_t.Tom Sepez
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
2016-03-14Move xfa/src up to xfa/.Dan Sinclair
This CL moves the xfa/src files up to the xfa/ directory and fixes the includes, include guards, and build files. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1803723002 .