summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-03Rename xfa_layout_pagemgr_new.hdsinclair
This renames the file to match the class name. Review-Url: https://codereview.chromium.org/2209823002
2016-08-03Roll skia to 96206a96f357cd30b60d1b1aa98e4e3a8f9b97f1msarett
Review-Url: https://codereview.chromium.org/2210563002
2016-08-03Use smart pointers for class owned pointersweili
For all classes under /fpdfsdk, use smart pointer to replace raw pointer type for class owned member variables so that memory management will be easier. BUG=pdfium:518 Review-Url: https://codereview.chromium.org/2173253002
2016-08-03Fixup class name spellingdsinclair
Fix CXFA_FMIdentifierExpressionn to remove the duplicate n. Review-Url: https://codereview.chromium.org/2210543002
2016-08-03Split xfa_layout_appadapterdsinclair
This moves the needed traverse strategies into their own files, removes the unused one and cleans up the includes. Review-Url: https://codereview.chromium.org/2207033002
2016-08-03Fix FMCallExpression undefined shift behaviour.dsinclair
When determining which params should be an object and which are a value it is possible to overflow the int on the shift comparision (if there are more then 32 arguments). This never happens in practise as it's a controlled list of method calls which we pass objects for. Cap the check at 32 for the shifting so it doesn't overflow. We can revisit and extend the value later if we ever have an internal formcalc method that needs an object in a position greater then 32. BUG=chromium:603490 Review-Url: https://codereview.chromium.org/2206253002
2016-08-02Generate default AP stream for strike out annotation.jaepark
This patch generates a default AP stream for strike out annotation so that strike out annotations without AP stream can be displayed. Also, roll DEPS for testing/corpus to ddc1938 to test strike out annotations. BUG=62625 Review-Url: https://codereview.chromium.org/2206083002
2016-08-02Generate default AP stream for underline annotation.jaepark
This patch generates a default AP stream for underline annotation so that underline annotations without AP stream can be displayed. Also, roll DEPS for testing/corpus to cae29d1 to test underline annotations. BUG=62625 Review-Url: https://codereview.chromium.org/2205543002
2016-08-02Splitting fpdfdoc/doc_* part III.dsinclair
This CL cleans up the remaining doc_* files, splitting into .h and .pp files as needed. Review-Url: https://codereview.chromium.org/2190983002
2016-08-02Bound total pixels in JBig2 images to avoid overflows later.tsepez
Also make these private to ensure they aren't modified so as to violate the bounds checks applied at creation time. BUG=633002 Review-Url: https://codereview.chromium.org/2202013002
2016-08-02Verify row bytes before alloc in BMP codec.dsinclair
If the out_row_bytes is negative the alloc will fail. Verify the size before alloc and bail if it's negative. BUG=633381 Review-Url: https://codereview.chromium.org/2202283003
2016-08-02Use PaintOperation instead of bFillOrStroke in CPVT_GenerateAP.jaepark
Also, use PaintOperation instead of bStrokingOperation in CPDF_DefaultAppearance. Review-Url: https://codereview.chromium.org/2197353002
2016-08-02Splitting fpdfdoc/doc_* part II.dsinclair
This splits the doc_ocg, doc_vt and doc_basic files into individual class files. Review-Url: https://codereview.chromium.org/2187073005
2016-08-02Introduce ::getPropertyInternal method to avoid duplicationchromium/2819chromium/2818chromium/2817tonikitoo
Document.cpp implements "getter" methods for some of the Document object properties. Some of the body of such methods are identical. Patch introduces a ::getPropertyInternal private method that gets rid of this duplication. Namely the following properties' getters are cleaned up: - "author", "creationDate", "creator", "keywords", - "modDate", "producer", "subject" and "title" No behavior change. Review-Url: https://codereview.chromium.org/2202283002
2016-08-02Fix Jbig2 document context creation by checking proper pointerweili
The pointer a unique_ptr contains should be checked instead of the pointer of the unique_ptr itself. BUG=chromium:631912 Review-Url: https://codereview.chromium.org/2205573004
2016-08-02Splitting fpdfdoc/doc_* part Idsinclair
The first of several CLs to split the core/fpdfdoc/doc_* files up to individual class files. Review-Url: https://codereview.chromium.org/2192823002
2016-08-02Fixup crypto key generation.dsinclair
This CL fixes up the crypto key copying code to better handle big endian machines. BUG=pdfium:147 Review-Url: https://codereview.chromium.org/2190123002
2016-08-01Fix a memory leak in libtiff.thestig
BUG=633387 Review-Url: https://codereview.chromium.org/2204793002
2016-08-01Support PDF highlight annotation with opacity.jaepark
BUG=62625 Review-Url: https://codereview.chromium.org/2202063002
2016-08-01Watch for destruction of CPDFSDK_widget during callbacktsepez
Speculative fix since I had trouble with the repro. BUG=632709 Review-Url: https://codereview.chromium.org/2197793002
2016-07-29Generate default AP stream for highlight annotation.jaepark
This patch generates a default AP stream for highlight annotation so that highlight annotations without AP stream can be displayed. BUG=62625 Review-Url: https://codereview.chromium.org/2193983002
2016-07-29Simplify some FPDF edit functions.thestig
Fix an unlikely memory leak in FPDFPage_InsertObject(). BUG=pdfium:545 Review-Url: https://codereview.chromium.org/2195643002
2016-07-29Use bool instead of FX_BOOL as return values in CPVT_GenerateAP.jaepark
Review-Url: https://codereview.chromium.org/2196903002
2016-07-29Add build configuration for experimental Windows GDI code.chromium/2816chromium/2815chromium/2814thestig
BUG=409472 Review-Url: https://codereview.chromium.org/2193783002
2016-07-29Refactor fxge/fx_apple and fx_win header filesnpm
- Renamed header for CFX_QuartzDevice class - Removed unused class CFX_WinBitmapDevice - Split remaining fx_ge_win32 header Review-Url: https://codereview.chromium.org/2197513004
2016-07-29Fix a FPE in CStretchEngine::StartStretchHorz().thestig
Do some cleanup in the process. BUG=629839 Review-Url: https://codereview.chromium.org/2190283003
2016-07-29Cleanup CPDF_DocPageData release methods and callers.thestig
Review-Url: https://codereview.chromium.org/2194853002
2016-07-28Remove the document tagged code as it is unused.dsinclair
The fpdf_tagged.h, tagged_int.h and doc_tagged.cpp code is currently unused and can be removed. Review-Url: https://codereview.chromium.org/2188213002
2016-07-28Split fpdfdoc/include/fpdf_doc.h into individual classes.dsinclair
This CL splits the header file apart. The cpp files are not touched as part of this CL, they will be done as a followup. This de-duplicates the fpdf_doc.h BUG=pdfium:249 Review-Url: https://codereview.chromium.org/2183313004
2016-07-28fix text matrix againcaryclark
The text matrix for Skia is still wrong. The last fix allowed text to draw correctly when rotated, but did not draw correctly when skewed. With this edit, text draws correctly rotated, skewed horizontally, skewed vertically, and rotated and skewed. R=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2189093002
2016-07-27Fixup integer conversion logic.chromium/2813chromium/2812chromium/2811dsinclair
In bc8a64029f898286c3dcad3a6cecdc98ef30b139 we updated the FX_atonum logic to correctly handle integer overflow. This causes issues when parsing the Permissions flag of encrypted documents as that flag isn't encoded like other numbers. The Permissions flag is a unsigned value, and has to be treated as such since the sign bit is always set. The current logic will detect an overflow of the int value and return 0. The old logic would have detected the overflow and returned the negative result regardless. This CL updates the logic to do the string to int conversion as a uint32_t and then verifies the uint32_t value, if a sign was provided, fits within the int range, otherwise it converts it to an int and lets it be positive or negative as needed. BUG=pdfium:539 Review-Url: https://codereview.chromium.org/2168173002
2016-07-27Splitting fx_ge_fontmap.cppnpm
Move CFX_FolderFontInfo, CFX_FontMgr, and CFX_FontMapper into their own classes. There are namespaces in each of the new files, having methods from the original namespace in fx_ge_fontmap, according to what each class needs. Review-Url: https://codereview.chromium.org/2185533006
2016-07-27Reland of Remove pageview from map immediatelydsinclair
This reverts commit f2cee9894b9f7cf2e50060965ad1eedd90ab55b6. This CL removes the default parameter from the CPDFSDK_Document::GetPageView |ReNew| flag and updates the code as needed. In CFFL_FormFillter::KillFocusForAnnot we flip the flag to |FALSE| as we don't want to re-create the page view if it is already removed. If we don't do this then the page view will be re-created in the map, the page associated to the page view, but then the page can be deleted out from under the pageview as it isn't owned by the page view. BUG=chromium:630654 Review-Url: https://codereview.chromium.org/2179163004
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