summaryrefslogtreecommitdiff
path: root/BUILD.gn
AgeCommit message (Collapse)Author
2017-01-19Add ObservedPtrs to PWL_CREATEPARAMDan Sinclair
It's possible for both the provider and attached widget to be destroyed before the PWL_CREATEPARAM objects which point to them. This causes issues when those widgets access their attached widget or provider. This CL wraps the pAttachedWidget and pProvider into ObservedPtrs so we will know if the underlying pointer has gone away. BUG=chromium:681351 Change-Id: Ib40445be9487dc3e89a66bb7407abdeed7d2c946 Reviewed-on: https://pdfium-review.googlesource.com/2270 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
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-18Split CFDE_CSSPrimitiveValue apartDan Sinclair
This CL splits the CFDE_CSSPrimitiveValue class into individual classes per value type. This moves the numeric itypes out of the FDE_CSSPrimitiveType list and creates a new CFDE_CSSNumberType list. Change-Id: I6f55e9e3509de7ff1e82dcf018a1f1c472565e54 Reviewed-on: https://pdfium-review.googlesource.com/2250 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-17Start CSS parser unit testsDan Sinclair
Start adding unit tests for the css parser. Fixup memory leaks that are exposed by the tests. Change-Id: Id863d9cd5f13ab82626bc7b945de925253c88d43 Reviewed-on: https://pdfium-review.googlesource.com/2180 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-17Add optional coverage flags to buildDan Sinclair
This CL allows generating coverage information for the source files. By adding use_coverage=true to the GN build settings clang will generate .gcno files for each source file and executing the binary will generate a .gcda file for each source file. Those files can then be processed by llvm-cov to generate .gcov reports for each source file. i.e. (assuming use_coverage=true is set for out/coverage) * ninja -C out/coverage pdfium_unittests * cd out/coverage * find obj -name "*.o" -exec llvm-cov -af -stats {} > d.out \; There should now be .gcov files for each source file in the out/coverage directory. Note, llvm-gcov may have a different name or syntax on your machine. Change-Id: I7379579f5f20a5b8b2f3a3b409b868bba4b4d74d Reviewed-on: https://pdfium-review.googlesource.com/2216 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-16Replace remaining CSS interfaces with concrete classesDan Sinclair
This Cl moves IFDE_CSSValue and IFDE_CSSRule to concrete classes and moves the holding of the type into the base class. Change-Id: Iea29cc55256dd2183b60ca8711367d5dc8daaa24 Reviewed-on: https://pdfium-review.googlesource.com/2178 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-16Remove IFDE_CSS interfaces which are only implemented once.Dan Sinclair
This CL cleans up some interface classes from FDE CSS. Change-Id: I975e5d63f8ae6a0bc7bb849b6f11f0ae43092e4d Reviewed-on: https://pdfium-review.googlesource.com/2177 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-12Add postscript pathrbpotter
This patch adds the additional functions required to make postscript printing functional. The most significant additions are are two added compression functions and a new API for setting the postscript level. Not currently called from Chromium, Chromium patch to come. BUG= Review-Url: https://codereview.chromium.org/2612243005
2017-01-11Use observed pointers in CPDFSDK_AnnotIterator.chromium/2979tsepez
Rename to CPDFSDK_AnnotIteration, as it is now an ordered set of annots, and not the iterator itself. Review-Url: https://codereview.chromium.org/2626073005
2017-01-10Strip out custom allocator codeDan Sinclair
This Cl replaces the custom IFX_MemoryAllocator code with new/delete as needed. Change-Id: Ie786f607c9e0b3035ffd87733bc3e29a4b6426d9 Reviewed-on: https://pdfium-review.googlesource.com/2164 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-10Split xfa_textlayout apart.Dan Sinclair
This CL splits the xfa_texlayout.{cpp|h} files into individual class files. Minor reformatting was done in the new clasess. Change-Id: Id79ffcb8dca3fcf287a2e6dec78fd2b1f990a542 Reviewed-on: https://pdfium-review.googlesource.com/2162 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-10Remove custom allocator from CFDE_TxtEdtBuf.Dan Sinclair
This CL removes the custom allocator from CFDE_TxtEdtBuf and uses std::vector<std::unique_ptr>> instead. The Iterator code has been made an inner class of the buffer and rename to CFDE_TxtEdtBuf::Iterator instead of CFDE_TxtEdtBufIter. Change-Id: Ied8e844dea700e0ef37087f0d3fad4882d9eada1 Reviewed-on: https://pdfium-review.googlesource.com/2159 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-09Add CFDE_TxtEdtBuf testschromium/2977dsinclair
This CL adds a set of unit tests for the text edit buffer. It fixes up a few bugs found adding the tests and removes the unused ::Optimize method. Review-Url: https://codereview.chromium.org/2614383003
2017-01-06Remove CFX_MapPtrToPtr and templates.chromium/2976chromium/2975tsepez
All usage is now replaced with stl equivalents. Move one definition from fx_basic.h to where it's actually needed. Review-Url: https://codereview.chromium.org/2612773007
2017-01-06Revert postscript code removal.rbpotter
Revert CL http://crrev.com/2608663003 in preparation for adding postscript generation to Pdfium. Note postscript generation code will not be called until additional patches land. These patches will also include modifications needed to make this code functional (currently missing a few compression functions). BUG= Review-Url: https://codereview.chromium.org/2615703002
2017-01-04Kill render_int.hchromium/2973chromium/2972Nicolas Pena
CPDF_DIBSource was already in its own file, but files needed renaming. Change-Id: Ib3ac787a0bb33d3f78ecdcdfcdbc938867857a14 Reviewed-on: https://pdfium-review.googlesource.com/2152 Commit-Queue: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-01-03Cleanup ThemeProvider codeDan Sinclair
Remove unused methods, fold the arrow data into the CFWL_WidgetTP instead of a custom class and global object. Change-Id: Ie942052555d6c8668d27072c1fcc5e8e00597518 Reviewed-on: https://pdfium-review.googlesource.com/2139 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-03Kill last use of CFX_PtrList.tsepez
I'd been waiting on this hoping the code would be refactored out of existence, but it looks to be used. Use tests against x.end() in place of a "null position". This is greatly complicated by the use of "tail position", which now calcluated by std::prev(x.end()) unless the list is empty. Review-Url: https://codereview.chromium.org/2592163002
2016-12-15Remove unused sysbtn codedsinclair
This CL removes the unused FWL_WGTSTYLE_MinimizeBox, FWL_WGTSTYLE_MaximizeBox, and FWL_WGTSTYLE_CloseBox along with the supporting code. Review-Url: https://codereview.chromium.org/2578603002
2016-12-14Remove CJBig2_List in favor of std::vector<std::unique_ptr<>>tsepez
Review-Url: https://codereview.chromium.org/2578663002
2016-12-08Move xfa/fwl/core to xfa/fwl.dsinclair
The core/ directory in FWL no-longer provides any context. This Cl moves all of the core/ files up to the fwl/ folder. As well, the CFWL_EvtFoo files are renamed CFWL_EventFoo and the CFWL_MsgFoo files are renamed CFWL_MessageFoo. The event and message preceed the type in order to keep the files sorted together and to make it clear that they're all related. Review-Url: https://codereview.chromium.org/2559173002
2016-12-07Cleanup FWL Event and Message code.dsinclair
This CL removes any CFWL_Evt classes for which nothing was listening to the events. For events with no parameters the override class was removed and the event type passed into CFWL_Event which is used instead. Any event or message parameters which are un-read have been removed. Review-Url: https://codereview.chromium.org/2530993002
2016-12-05[android] Make pdfium_unittests work on Android.jbudorick
This updates test.gni to match chromium as of crrev.com/d29ecfa7dc3ed49a2a49002ab941adb57c53e923, changes how PathService::GetSourceDir behaves on Android, and specifies the runtime test data for test_support. BUG=pdfium:415 Review-Url: https://codereview.chromium.org/2541503002
2016-12-02Rename fpdf_render_image and fpdf_render_textchromium/2942chromium/2941chromium/2940npm
Review-Url: https://codereview.chromium.org/2551593002
2016-12-01Kill off fpdf_render_cache.cppchromium/2939npm
Review-Url: https://codereview.chromium.org/2550543002
2016-12-01Remove fpdf_render.cppNicolas Pena
Split the remaining code into files per class. Change-Id: Idb959dbf807223a509e16c76f9626e61856a886b Reviewed-on: https://pdfium-review.googlesource.com/2094 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2016-12-01Protect against unexpected library create/destroytsepez
Probably won't fix bug 669797 on its own, but nice to have. Remove unimplemented static method. Review-Url: https://codereview.chromium.org/2543833002
2016-11-23Merge IFWL and CFWL classes.dsinclair
This CL merges the IFWL hierarchy into the CFWL hierachy. All CFWL proxy methods have been replaced by the IFWL implementations. Review-Url: https://codereview.chromium.org/2524173002
2016-11-23Rename IFWL classes which do not have CFWL equivalentsdsinclair
This CL moves the IFWL classes that do not have CFWL class buddies to have the CFWL name. This CL leaves the tree in a weird state of having CFWL be two hierarchies, one of which is intertwined with the IFWL hierarchy. This should be commited just before the CL to move the rest of IFWL to CFWL. Review-Url: https://codereview.chromium.org/2525083002
2016-11-23Add CFX_MaybeOwned<> template.tsepez
This will allow us to get rid of more .release()s of unique_ptrs, as shown by the changed cpdf_colorspace usage. Review-Url: https://codereview.chromium.org/2526903002
2016-11-23Add APIs for limited use of document tagged code.thestig
BUG=pdfium:568 Review-Url: https://codereview.chromium.org/2519343002
2016-11-23Move CPDF_ImageRenderer from render_intnpm
Review-Url: https://codereview.chromium.org/2525833002
2016-11-22Rename IFWL_App to CFWL_Appdsinclair
This class is not an interface but a concrete implementation. Rename to match. Review-Url: https://codereview.chromium.org/2521303002
2016-11-22Rename IFWL_Timer and IFWL_TimerInfodsinclair
These twho files are not interfaces. Renamed to be CFWL to signify they are concrete implementations. Review-Url: https://codereview.chromium.org/2526513002
2016-11-22Continue splitting pageint.h into per-class filestsepez
Add cpdf_streamparser.h and cpdf_contentparser.h since there are already corresponding .cpp files with the same name. Review-Url: https://codereview.chromium.org/2521123003
2016-11-21Remove the GetCaption dataprovider methodchromium/2928dsinclair
This method mostly returns L"". In the one case where it returns something different the value is substituted into the callsite. The IFWL_Tooltip class was using the caption, but it is not currently being used. Removed as well. Review-Url: https://codereview.chromium.org/2522663002
2016-11-21Split fwl/core class pt II.dsinclair
Split classes in FWL to be single class per file. In the case of data providers which added no new methods, removed and used the IFWL_Widget::DataProvider directly. Review-Url: https://codereview.chromium.org/2520063002
2016-11-21Clean up CFGAS_GEFontnpm
Removed some unused method, named files properly, cleaned up a bit. Review-Url: https://codereview.chromium.org/2524493002
2016-11-21Check dimensions and content of bitmaps in EmbedderTests.chromium/2927thestig
Review-Url: https://codereview.chromium.org/2514173002
2016-11-21Add unit test for fdrm's MD5tsepez
Review-Url: https://codereview.chromium.org/2517153003
2016-11-21Split fwl/core class pt I.dsinclair
Split classes in FWL to be single class per file. In the case of data providers which added no new methods, removed and used the IFWL_DataProvider directly. Review-Url: https://codereview.chromium.org/2506253004
2016-11-21Continue splitting up render_intnpm
Moved CPDF_ImageLoader, CPDF_ImageLoaderHandle, and CPDF_TransferFunc Review-Url: https://codereview.chromium.org/2518553002
2016-11-18Add unit test for CXFA_FileRead.tsepez
The FileRead's return convention is being modified at https://codereview.chromium.org/2430743003/, so first provide a test of the old behaviour. Fix some issues with null dictionaries as provided by the CPDF_Stream default ctor along the way. Review-Url: https://codereview.chromium.org/2517513003
2016-11-17Move CPDF_RenderStatus from render_intnpm
Moved CPDF_RenderStatus to its own class and removed unused methods. I only added some spaces and removed some {}s in cpdf_renderstatus.cpp. Will do cleanup of the file as a followup because it would be too hard to keep track of what's changed in this CL. Review-Url: https://codereview.chromium.org/2513693002
2016-11-17Unify the three CFWL_EventType::SelectChange classes.dsinclair
This CL removes the ListBox SelectChange class as it is never processed. The other two have been unified into a single classs. Review-Url: https://codereview.chromium.org/2509283003
2016-11-17Move CPDF_DocRenderData from render_intnpm
First CL in an attempt to reduce the class cluttering in fpdf_render_text, fpdf_render_image, and fpdf_render. Review-Url: https://codereview.chromium.org/2507023006
2016-11-17Create CFWL_EvtEditChangeddsinclair
This CL creates a generic event for CFWL_EventType::EditChanged and uses it in the ComboBox and DateTimePicker. None of the params from the custom events were used so they have been removed. Review-Url: https://codereview.chromium.org/2511813002
2016-11-17Convert single use EventTypes to class files.dsinclair
This moves the remaining EventType class definitions to there own files where the EventType only has a single implementation. Review-Url: https://codereview.chromium.org/2508203002
2016-11-17Move the IFWL_Edit Events out of ifwl_edit.hdsinclair
This Cl moves the edit events to actual class files and renames to drop the Edt from the names. Review-Url: https://codereview.chromium.org/2515463002
2016-11-16Split the common event classes out to files.dsinclair
This CL splits the common event classes out to individual files instead of being created by the macro. The other classes will be split out in subsequent CLs. Review-Url: https://codereview.chromium.org/2507713003