summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-26Use smart pointer for CPDF_Form in CPDF_Annot.jaepark
CPDF_Annot owns CPDF_Form, so use std::unique_ptr for memory management. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2189463003
2016-07-26Remove stray "extern" keyword for gs_EventActivity definition.tsepez
BUG=pdfium:112 TBR=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2183703004
2016-07-26Remove unused m_bFirstLayer in CPDF_RenderContext.jaepark
Review-Url: https://codereview.chromium.org/2183933002
2016-07-26Revert of Remove pageview from map immediately (patchset #1 id:1 of ↵dsinclair
https://codereview.chromium.org/2179283005/ ) Reason for revert: Looks like this broke linux_asan embedder tests. https://build.chromium.org/p/client.pdfium/builders/linux_asan/builds/1152/steps/embeddertests/logs/stdio Original issue's description: > Remove pageview from map immediately > > There seems to be an ownership issue in the page annotation code where removing > the annotations can result in removing the parent page view. This is fine except > that removing the parent page view removes the annotations and you can end up > with a use-after-free. > > This CL removes the page view from the documents page map immediately and then > proceeds with the cleanup. Then, if we try to remove that page again it won't > be found and we won't double free. > > BUG=chromium:630654 > > Committed: https://pdfium.googlesource.com/pdfium/+/49dce65dc78bcd5a0c78a8bbdf2809cf20212220 TBR=thestig@chromium.org,weili@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:630654 Review-Url: https://codereview.chromium.org/2188523002
2016-07-26Remove pageview from map immediatelydsinclair
There seems to be an ownership issue in the page annotation code where removing the annotations can result in removing the parent page view. This is fine except that removing the parent page view removes the annotations and you can end up with a use-after-free. This CL removes the page view from the documents page map immediately and then proceeds with the cleanup. Then, if we try to remove that page again it won't be found and we won't double free. BUG=chromium:630654 Review-Url: https://codereview.chromium.org/2179283005
2016-07-25Fix an integer overflow in opj_tcd_get_decoded_tile_size().chromium/2810chromium/2809ochang
Based on suggested patch by reporter. BUG=629919 Review-Url: https://codereview.chromium.org/2182683002
2016-07-25Remove FX_FONTCACHE_DEFINEtsepez
This macro isn't buying us anything and reduces transparency. Review-Url: https://codereview.chromium.org/2179953002
2016-07-25fix text rotation for skiacaryclark
My initial guess for text rotation worked for scaled but not skewed or rotated. R=dsinclair@chromium.org,reed@google.com Review-Url: https://codereview.chromium.org/2178623002
2016-07-25Tidy up JS_Value.htsepez
Use ToV8Object() instead of CJS_Value cast operator. Add some missing consts / explicits. Move code into empty namespace. Review-Url: https://codereview.chromium.org/2172813002
2016-07-25Use smart pointers for CFX_Font and CFX_Type3Font classesweili
For the class owned member variables, use std::unique_ptr or std::vector for memory management. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2169793002
2016-07-25Remove unused CJS_Value::Attach() varianttsepez
Review-Url: https://codereview.chromium.org/2174513002
2016-07-24Remove CFX_Deletableweili
Change the last use of CFX_Deletable to its actual type and remove the use of CFX_Deletable. Review-Url: https://codereview.chromium.org/2178613002
2016-07-24Use actual type instead CFX_Deletableweili
Change two places that used CFX_Deletable to use actual types. This makes the type more obvious, and avoids unnecessary casts. Review-Url: https://codereview.chromium.org/2180443002
2016-07-21Fix skia build broken by commit c38cd6weili
Add back one function which is only used by Skia code. And make a couple small fixes. Review-Url: https://codereview.chromium.org/2167383002
2016-07-21Use smart pointers for graphics device classesweili
Use unique_ptr for class owned member variables. Also clean up some style issues such as removing unused functions and casting to raw pointer. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2163103002
2016-07-21Remove EnableMessageBox() / IsMessageBoxEnabled()tsepez
It's always enabled. Also inline FXJS_MsgBox since it only has one caller. Review-Url: https://codereview.chromium.org/2167343002
2016-07-21Remove the use of handler array in CPDFSDK_AnnotHandlerMgrweili
Use map to store and manage the handlers directly instead of needing an extra array. Review-Url: https://codereview.chromium.org/2166953005
2016-07-21Remove default parameters from CXFA_SimpleParser.dsinclair
This CL removes default params from CXFA_SimpleParser and updates the call sites as necessary. Review-Url: https://codereview.chromium.org/2164963003
2016-07-21Remove unused methods from JS_Object.cpptsepez
Review-Url: https://codereview.chromium.org/2170913003
2016-07-21Remove CXFA_DocumentParser friendship with CXFA_SimpleParserdsinclair
This CL moves the |SetFactory| method to be public and removes the friendship with CXFA_DocumentParser from CXFA_SimpleParser. Review-Url: https://codereview.chromium.org/2162263003
2016-07-21Remove friendship from CXFA_Document to CXFA_SimpleParser.dsinclair
This no longer seems to be needed (removing causes no issues). Review-Url: https://codereview.chromium.org/2168483004
2016-07-21Rename xfa_utils_imp to xfa_utilsdsinclair
This makes the cpp and unittest files match the naming of the header file. Review-Url: https://codereview.chromium.org/2165833005
2016-07-21Split xfa_document_serialize into class filesdsinclair
This CL moves CXFA_DataImporter and CXFA_DataExporter into their own files and moves code to an anonymous namespace as necessary. Review-Url: https://codereview.chromium.org/2164663004
2016-07-21Move xfa_document to cxfa_documentdsinclair
This moves the code to match the actual class name. Review-Url: https://codereview.chromium.org/2163133004
2016-07-21Rename xfa_doclayout and xfa_document_layout_imp files.dsinclair
This Cl moves the xfa_doclayout and xfa_document_layout_imp files to have names based off of their classes. Review-Url: https://codereview.chromium.org/2170473002
2016-07-21Move xfa_basic_imp to cxfa_widetextread.dsinclair
This Cl splits out the CXFA_WideTextRead class into it's own file. The helper methods have been moved into xfa_utils.cpp and their pre-declarations into xfa_utils.h. Review-Url: https://codereview.chromium.org/2165993002
2016-07-21Convert source sets to static libraries.chromium/2808chromium/2807chromium/2806chromium/2805chromium/2804brettw
This improves build performance somewhat. This does not change the standalone targets since these don't affect the build time of Chrome and are small enough for it not to matter anyway. BUG=http://crbug.com/627637 Review-Url: https://codereview.chromium.org/2164633005
2016-07-21Bring pdfium file in sync with chrome, fix mac buildcaryclark
This permits PDFium to build on the Mac with Skia as the backend. It builds on Linux and Windows as well. R=dsinclair@chromium.org,bungeman@google.com Review-Url: https://codereview.chromium.org/1995003002
2016-07-20Move CPDF_Annot and CPDF_AnnotList to their own header.jaepark
Review-Url: https://codereview.chromium.org/2163133002
2016-07-20Pass CPDF_Document instead of CPDF_AnnotList when constructing CPDF_Annot.jaepark
CPDF_AnnotList in CPDF_Annot is only used for getting CPDF_Document. Review-Url: https://codereview.chromium.org/2166883002
2016-07-20Move CSSRuleCollection class to its own filenpm
Review-Url: https://codereview.chromium.org/2166833002
2016-07-20Clean up singleton implementationweili
Move the singleton instances into their namespaces, and use get()/getInstance() for uniform accesses. Review-Url: https://codereview.chromium.org/2154843002
2016-07-20Rename remaining xfa_script_* files.dsinclair
This Cl renames the remaining xfa_script_* files to match the class names contained within the files. Review-Url: https://codereview.chromium.org/2160343002
2016-07-20Rename the CScript_* files to match class names.dsinclair
This Cl updates the various files to have filenames which match the classes inside those files. Review-Url: https://codereview.chromium.org/2161193002
2016-07-19Use smart pointers for various Jbig2 decoding contextsweili
Use unique_ptr for class owned member variables, and remove unnecessary or unused functions and member variable. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2149903002
2016-07-19Split xfa_object_imp into individual class files.dsinclair
This CL splits the CXFA_Object, CXFA_NodeList, CXFA_ThisProxy, CXFA_ArrayNodeList and CXFA_AttachNodeList out of xfa_object_imp. xfa_object_imp is then renamed to CXFA_Node. Review-Url: https://codereview.chromium.org/2159973003
2016-07-19Cleanup CXFA_Documentchromium/2803chromium/2802dsinclair
Removing unused XFA_LAYOUTRESULT, cleanup unused parameters, convert XFA_DocFlag to an enum from defines and make the constructor explicit. Review-Url: https://codereview.chromium.org/2166433002
2016-07-19Remove m_pList conditionals from CPWL_ListBoxdsinclair
We create |m_pList| in the constructor and it is never reset during the lifetime of the class or subclasses. Remove the conditional checks on the existence of |m_pList|. Review-Url: https://codereview.chromium.org/2162873003
2016-07-19Reset notify parameter in CPWL_ListBox OnDestroy().dsinclair
Currently the OnDestroy() method of CPWL_ListBox will free the |m_pListNotify| but it does not update the |m_pList| that it has done so. This causes issues when CPWL_ListBox is destroyed as the destructor for |m_pList| will attempt to call into the |m_pListNotify|. This CL resets the |m_pList| notify parameter before we clear |m_pListNotify| in OnDestroy so it will not be accessed during the |m_pList| destructor. BUG=628995 Review-Url: https://codereview.chromium.org/2160023002
2016-07-18Implement CGdiPrinterDriver::DrawDeviceText().chromium/2801thestig
This is sufficient to print text with GDI for PDFs generated by Chromium and cannot print any arbitrary PDF. Text that cannot be printed will be drawn as glyphs as before. BUG=409472 Review-Url: https://codereview.chromium.org/2113563003
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-07-18Rename files with spaces in namedsinclair
Two of the test/ files have spaces in the name, rename to remove. Review-Url: https://codereview.chromium.org/2156003003
2016-07-18Remove default params in CPDF_VariableText.dsinclair
This Cl cleans up the default params and any supporting code if necessary. Review-Url: https://codereview.chromium.org/2146993002
2016-07-18Removing default params from CFX_Edit.dsinclair
This CL removes all of the default params from CFX_Edit. They are either moved to the callsite or removed completely if unused. Review-Url: https://codereview.chromium.org/2152473002
2016-07-18Remove CFX_Edit_Refresh::Analysedsinclair
Unused method, removed. Review-Url: https://codereview.chromium.org/2148353002
2016-07-18Pass element hash and name into CXFA_Object constructor.dsinclair
Providing the element hash and name in the constructor allows us to remove the calls to XFA_GetElementByID in the get methods. Review-Url: https://codereview.chromium.org/2101403002
2016-07-18Remove foxit app related setter and getter APIs in XFA codeweili
No need to get or set foxit app type, name, and version, thus remove all these APIs and implementation. Review-Url: https://codereview.chromium.org/2050913002
2016-07-15Use CPDF_Dictionary::SetAtReference instead of CPDF_Dictionary::AddReference.jaepark
The definitions of CPDF_Dictionary::SetAtReference and CPDF_Dictionary::AddReference are identical, and AddReference is only used once. So remove CPDF_Dictionary::AddReference method and use CPDF_Dictionary::SetAtReference instead. Review-Url: https://codereview.chromium.org/2161453002
2016-07-15Remove type info from CJS_Value, interrogate v8 insteadtsepez
Review-Url: https://codereview.chromium.org/2154503002
2016-07-15Clean up some nits in pdfium_test.cc.thestig
TBR=weili@chromium.org Review-Url: https://codereview.chromium.org/2149773003