summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_shadingpattern.cpp
AgeCommit message (Collapse)Author
2017-12-19Add parameter validation to CPDF_ShadingPattern.Henrique Nakashima
Check if the ColorSpace and the Function params are valid for the shading type. Bug: chromium:794990 Change-Id: I022e976e5489a6b325d95ad16eab056235a8944d Reviewed-on: https://pdfium-review.googlesource.com/21450 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-19Require valid color space for shading pattern.Henrique Nakashima
Bug: chromium:795889 Change-Id: If29a0f6f7d95bedf014464239da1f8b56e55c9b6 Reviewed-on: https://pdfium-review.googlesource.com/21750 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-12-16Fix null-dereference in CPDF_ShadingPattern::Load().chromium/3298chromium/3297Lei Zhang
BUG=chromium:795490 TBR=hnakashima@chromium.org Change-Id: Ic9f12c1c709c148f7294ab2aaf65fcc695960835 Reviewed-on: https://pdfium-review.googlesource.com/21530 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-15Validate shading pattern's ColorSpace. It cannot be a Pattern CS.Henrique Nakashima
Bug: chromium:795251 Change-Id: I6c4fd75a5afd16ced499d031f9b535f8c6828854 Reviewed-on: https://pdfium-review.googlesource.com/21410 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-05-26Release unowned CS reference before maybe destroying owned oneTom Sepez
Colorspaces need to be properly refcounted but in the mean time, get rid of an obvious dangling pointer. Bug: 726728 Change-Id: I6bd879b18f61f7f5defd2679ce896013eb218b9b Reviewed-on: https://pdfium-review.googlesource.com/6072 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-05-25Break apart the pageint.h file.Dan Sinclair
This CL separates pageint.h and the supporting cpp files into indivudal class files. Change-Id: Idcadce41976a8cd5f0d916e6a5ebbc283fd36527 Reviewed-on: https://pdfium-review.googlesource.com/5930 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-05-22Convert more c-style pointers to CFX_UnownedPtrTom Sepez
Change-Id: I551b4210c95db0b916e9fe6cddf11e6c3d015c50 Reviewed-on: https://pdfium-review.googlesource.com/5790 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-04-27Assert CPDF_Pattern always has a valid CPDF_Document pointer.Lei Zhang
Same for CPDF_DocPageData. Change-Id: I8f2f559123dbb2f3623d957e4074d5f9d191797f Reviewed-on: https://pdfium-review.googlesource.com/4501 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-04-26Get rid of a few |new|s in CPDF_Document.Tom Sepez
The chain of destructors may attempt to use m_pDocPage after it has been set to null by the unique_ptr destructor. Verify it is still present before using it from any code that may be called from some other CPDF_ destructor. Change-Id: I007160231d73feed85d90efc687d6da993653f96 Reviewed-on: https://pdfium-review.googlesource.com/4499 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2016-11-21Fixup lint flags.Dan Sinclair
The -build/include setting was masking out build/include_what_you_use. This CL restores them, fixes any build errors, and adds NOLINT as needed. As well, the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd. lint cleanups Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f Reviewed-on: https://pdfium-review.googlesource.com/2030 Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-11-02Remove FX_BOOL from coretsepez
Review-Url: https://codereview.chromium.org/2477443002
2016-10-11Rename fpdf_page_doc.cpp -> cpdf_docpagedata.htsepez
Review-Url: https://codereview.chromium.org/2409283002
2016-10-10Move ToString() and friends from CPDF_Object.h to CPDF_String.htsepez
Ditto with the other ToXXX functions to CPDF_xxx.h. Shortly, we will want to introduce another variant: inline std::unique_ptr<CPDF_String> ToString( std::unique_ptr<CPDF_Object>); This will require that CPDF_String be complete which is not the case in the CPDF_Object.h header. Rather than dragging all the other .h's into it, move these to the subclass headers. That way, these will be together when the new form is added. Review-Url: https://codereview.chromium.org/2406033002
2016-10-05Removed unused stuff, some FX_BOOL, and cleanup pageint.h a bitnpm
- Remove some unused stuff from pageint.h. - Replace some FX_BOOL with bool in pageint.h, and related. - Replace some "protected" with "private" in pageint.h. - Move 2 methods into namespace in fpdf_page_parser_old.cpp. Review-Url: https://codereview.chromium.org/2399573002
2016-10-04Move core/fpdfapi/fpdf_parser to core/fpdfapi/parserdsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2392603004
2016-10-04Move core/fpdfapi/fpdf_page to core/fpdfapi/pagedsinclair
BUG=pdfium:603 Review-Url: https://codereview.chromium.org/2386423004