summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
AgeCommit message (Collapse)Author
2018-04-18Revert "Return pdfium::span<char> from ByteString::GetBuffer()."Tom Sepez
This reverts commit 80a6cbe0a427e155de8555bc867af745d10f9777. Reason for revert: too many abrts in beta branch. TBR: dsinclair@chromium.org Bug: 832557, 832978, 832992, 833062, 833097 Change-Id: I7d511dbb224ddc644be96ea2f3770ad6f73debf5 Reviewed-on: https://pdfium-review.googlesource.com/30792 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> (cherry picked from commit 3d523e3cf89440e2ffc6571b1c687ad5e3f0318f) Reviewed-on: https://pdfium-review.googlesource.com/30950
2018-04-12Slightly simplify CPDF_Color::SetColorSpace().Lei Zhang
All the callers pass in a valid colorspace. SetColorSpace() is the only caller to CPDF_ColorSpace::GetDefaultColor(). Also adjust that method to make it harder to use incorrectly. Change-Id: I5cf7b6d2abef630e1b9443043b13d1c2b5bed18a Reviewed-on: https://pdfium-review.googlesource.com/30351 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-12Return pdfium::span<char> from ByteString::GetBuffer().Tom Sepez
Get bounds checking "for free". Change-Id: I7b14cacbc7130ced7b5cb1869b82c96ccff8e642 Reviewed-on: https://pdfium-review.googlesource.com/30451 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-12Make the input data to CPDF_ColorSpace::GetRGB() const.Lei Zhang
Make a copy of the input data when clamping it in CPDF_Function::Call(). Change-Id: I1d2b3d080977f0f9a4c3ccaf111780867668991a Reviewed-on: https://pdfium-review.googlesource.com/30350 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-12Change CPDF{XFA}_Page::PageToDevice() to take a CFX_PointF.Lei Zhang
Instead of taking two doubles. The doubles get casted to floats anyway. Change-Id: Ie16dc60fa5d6412026a5fda08c8c64d4fa2d56c4 Reviewed-on: https://pdfium-review.googlesource.com/30410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-12Add return value to FPDF_DeviceToPage().Lei Zhang
Do the same for FPDF_PageToDevice(). Clean up the internal implementation as well. Change-Id: Ia207bfa779d144cb9f0310e768750ab10e603b8f Reviewed-on: https://pdfium-review.googlesource.com/17370 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-12Add CPDF_Page::DeviceToPage() / PageToDevice().Lei Zhang
Just like CPDFXFA_Page. Also mark the methods const. Change-Id: I6717b4b61a29663780f45bf872f76fe8e671df75 Reviewed-on: https://pdfium-review.googlesource.com/30132 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-12Change GetDisplayMatrix methods to take FX_RECT.Lei Zhang
Change-Id: I079bc3bf1242fd28fdd51930d9deb6efa34d7509 Reviewed-on: https://pdfium-review.googlesource.com/30055 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-11Fix crash when ColorSpace references itself directly.Henrique Nakashima
Also fixes any problems with cycles between colorspaces. Past fixes have solved problems with CPDF_DocPageData::GetColorSpace() calling itself and CPDF_DocPageData::GetColorSpace() calling CPDF_ColorSpace::Load() and vice versa. They have not solved CPDF_ColorSpace::Load() calling itself. This CL repurposes the |pVisited| set to ensure CPDF_ColorSpace::Load() does not try to load a colorspace as a dependency of itself and creates |pVisitedLocal| to ensure CPDF_DocPageData::GetColorSpace() does not create a similar circular dependency not involving CPDF_ColorSpace::Load(). Bug: chromium:828206 Change-Id: Ib2d0ec494be169135607f3651e0f70627b26ebd7 Reviewed-on: https://pdfium-review.googlesource.com/29810 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-11Fix trailing whitespace handling in CPDF_StreamParser::ReadInlineStream()Tom Sepez
After advancing past whitespace, the buffer may become empty. We were checking too early. Bug: 831498 Test: covered by fuzzers Change-Id: I6796b4723a05c2bcafe495dc7bc648213aa9cc22 Reviewed-on: https://pdfium-review.googlesource.com/30191 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-11Avoid stack overflow when loading CPDF_Function.chromium/3395Henrique Nakashima
CPDF_StitchFuncs that reference each other create a Load() loop. Maintaining a set of the visited CPDF_Objects during a Load() call tree prevents that. Bug: chromium:830221 Change-Id: I6f494da16c6d79f05870ff85cff38ff8fe69ecfe Reviewed-on: https://pdfium-review.googlesource.com/30050 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-09Use ByteStringView / pdfium::span in CPDF font as appropriate.chromium/3393Tom Sepez
Change-Id: I92c7ba605bf95a9023ad046b8dddebe0a0592802 Reviewed-on: https://pdfium-review.googlesource.com/29992 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-09Use pdfium::span<> in CFX_BitStream, CPDF_SimpleParser.Tom Sepez
Get bounds checks in parsers automatically when using spans. Change-Id: I71fbe7b838435d455376db2f89817d807a9cdcfd Reviewed-on: https://pdfium-review.googlesource.com/29830 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-06Add span.h from chromium base.chromium/3392Tom Sepez
Allows indexing with better bounds-checking to occur. Some small modifications are required to deal with PDFium being intentionally held at C++11 compliance, not C++14. Use in one place as check on correctness. Change-Id: Id2875cf0a93980112bc536a93c4f9ec5306c0dac Reviewed-on: https://pdfium-review.googlesource.com/29671 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-03Re-arrange so inline vectors come last in structs.Tom Sepez
This might make the memory tools more effective in finding OOBs. Change-Id: Id093bb0a88c37954c80d612ac00b5a168e75bdbf Reviewed-on: https://pdfium-review.googlesource.com/29550 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-03Off-by-one in CPDF_StreamParser::ParseNextElement()Tom Sepez
Limit the token to 255 bytes + NUL. Also, shuffle fields in cpdf_streamparser to allow memory tools to better check this inline array. Bug: 828049 Change-Id: I444f2b4c6958167577d9cd76c06805baf7d5c26c Reviewed-on: https://pdfium-review.googlesource.com/29530 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-03-28Use ByteStringView in parsersDan Sinclair
This CL converts the CPDF_SimpleParser to accept a ByteStringView. Several of the callers of SimpleParser are also updated to use a ByteStringView instead of <char*,size>. Change-Id: Ic2df3a06f92e77b53745a0419b44368142f9d8e6 Reviewed-on: https://pdfium-review.googlesource.com/29351 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-03-26Do not call CPDF_PageObjectList directly in fpdfeditpage.cpp.Henrique Nakashima
Change-Id: If816c4f532f03513ad06959182b0e0edfd688e39 Reviewed-on: https://pdfium-review.googlesource.com/29170 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-03-21Use more const pointers in CPDF_ContentMarkItem.Lei Zhang
Transitively mark the same pointers as const in callers. Change-Id: I1f9669b35c6d7f4b1a11c25163480bc687fbc7f8 Reviewed-on: https://pdfium-review.googlesource.com/28870 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-03-21Explain how CPDF_Page::GetDisplayMatrix() inverts y.Henrique Nakashima
Change-Id: Ia6e9fe790065d0bfd288d425c10d1dd9e0cf8c31 Reviewed-on: https://pdfium-review.googlesource.com/28850 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-03-21Change FXSYS_RGB() to FXSYS_BGR().Lei Zhang
Also change it from a macro to a constexpr function. Change-Id: I8b2bb42c45a23da6db136abdaee24132db4471c6 Reviewed-on: https://pdfium-review.googlesource.com/28579 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-20Rename "RGB" methods/variables to "ColorRef" in CPDF_ColorState.Lei Zhang
Change-Id: I196e3148d680c9efeaf9609dd3ddbfe3f6635fa6 Reviewed-on: https://pdfium-review.googlesource.com/28576 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-16Fix methods that have definition with different parameter names.Lei Zhang
Found by ClangTidy. BUG=pdfium:1039 Change-Id: I2bb9256a63d5459e959c1a3228418073245d7a86 Reviewed-on: https://pdfium-review.googlesource.com/28731 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-03-15Create FPDFPage_RemoveObject().Henrique Nakashima
This call removes a page object from a page. We currently offer an API to insert these objects, but not to remove. Bug: pdfium:1037 Change-Id: I35ff596f9e7c87a39051f0cb1de40a5bec40fee5 Reviewed-on: https://pdfium-review.googlesource.com/28492 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-03-15Rename FX_COLORREF variables from "rgb" to "bgr".Lei Zhang
FX_COLORREF should work like win32 COLORREF, which is BGR. Change-Id: I9f8bb3e2d30a64dc822ac6b8c46130358a03678a Reviewed-on: https://pdfium-review.googlesource.com/28574 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-03-06Rename core/fxcrt IFX files to IfaceDan Sinclair
This CL renames the 3 IFX files in core/fxcrt to Iface instead. Change-Id: I7cee6836650b71bc5c5729a8147fda62f0910fe3 Reviewed-on: https://pdfium-review.googlesource.com/27970 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-03-05Make FPDFBitmap_GetFormat() work for JBIG images.Lei Zhang
BUG=pdfium:945 Change-Id: I2a880e747b6f5a2fabed4d34ce47b69ff589ce3f Reviewed-on: https://pdfium-review.googlesource.com/27814 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-05Use CPDF_DIBSource::LoadState enum class in more places.Lei Zhang
Change-Id: Iaf124c1b1ceca86d220ae654d9d18af7475209b6 Reviewed-on: https://pdfium-review.googlesource.com/27870 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-05Change return types for some rendering Start/Continue methods.Lei Zhang
Either return a bool or a CPDF_DIBSource::LoadState. Explain what the bool return value means. Change-Id: I6346d0cd61d5faee5290df181cfff3b9e4d5d84e Reviewed-on: https://pdfium-review.googlesource.com/27851 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-02-16Add ASSERT to check OOB m_CharCodesNicolas Pena
It seems m_CharCodes is in rare cases being corrupted, this CL adds ASSERTS to catch whether the corruption is due to out-of-bounds element access. Bug: 782215 Change-Id: I555ad1ccc2de3c35b2e06496f7216fba770f0759 Reviewed-on: https://pdfium-review.googlesource.com/27030 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-02-10Renable -Wimplicit-fallthrough for PDFium.Nico Weber
Didn't find any bugs, but also doesn't require much boilerplate. Bug: TODO Change-Id: I5f30183c55216f1333c79fcb46476d281720873e Reviewed-on: https://pdfium-review.googlesource.com/26210 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
2018-02-09Use CFX_Size in CPDF_Page and fpdf_ppo.cpp.Lei Zhang
Instead of having separate floats for width and height. Also remove some out parameters and just return them instead. Change-Id: I798b1453910c89477d422dcb7c0805b90823bf98 Reviewed-on: https://pdfium-review.googlesource.com/26090 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Shirleen Lou <xlou@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-02-07Clean up RenderPage methods in EmbedderTest.Lei Zhang
Add replacement methods that make themselves clear as to what they are rendering, and return unique_ptrs to help prevent leakage. Mark existing methods deprecated. Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d Reviewed-on: https://pdfium-review.googlesource.com/25470 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-30Guard usages of tellp(). It may return -1 in error cases.Henrique Nakashima
Change-Id: I064ddcad8671b9ade2c02142a6c2c2983846e3a9 Reviewed-on: https://pdfium-review.googlesource.com/24650 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-30Revert "Revert "Use UnownedPtr instead of T* in MaybeOwned.""Tom Sepez
This reverts commit 77d8ed02c7e97471ceccee5abbabeb2fdea413c7. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Use UnownedPtr instead of T* in MaybeOwned." > > This reverts commit e563e8352139e4852a955e319023b09f2844aee9. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Use UnownedPtr instead of T* in MaybeOwned. > > > > Always check the liftime in the unowned case. Doing so unearthed > > the following issues: > > > > Transient lifetime issue in jbig2_image when doing realloc(). > > Stale (but unused) dictionary pointer in CPDF_Image. > > Destruction order in error branch in cpdf_dibsource.cpp > > > > Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f > > Reviewed-on: https://pdfium-review.googlesource.com/24552 > > Commit-Queue: Tom Sepez <tsepez@chromium.org> > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org > > Change-Id: I3c56ee6ab502da90e3adb7507dbc8cc92f090140 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://pdfium-review.googlesource.com/24670 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org Change-Id: I0ccbbeab8be6cadc9b3a5bfefe2aca733654342f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/24671 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-01-30Revert "Use UnownedPtr instead of T* in MaybeOwned."Tom Sepez
This reverts commit e563e8352139e4852a955e319023b09f2844aee9. Reason for revert: <INSERT REASONING HERE> Original change's description: > Use UnownedPtr instead of T* in MaybeOwned. > > Always check the liftime in the unowned case. Doing so unearthed > the following issues: > > Transient lifetime issue in jbig2_image when doing realloc(). > Stale (but unused) dictionary pointer in CPDF_Image. > Destruction order in error branch in cpdf_dibsource.cpp > > Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f > Reviewed-on: https://pdfium-review.googlesource.com/24552 > Commit-Queue: Tom Sepez <tsepez@chromium.org> > Reviewed-by: dsinclair <dsinclair@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org Change-Id: I3c56ee6ab502da90e3adb7507dbc8cc92f090140 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/24670 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-01-30Use UnownedPtr instead of T* in MaybeOwned.Tom Sepez
Always check the liftime in the unowned case. Doing so unearthed the following issues: Transient lifetime issue in jbig2_image when doing realloc(). Stale (but unused) dictionary pointer in CPDF_Image. Destruction order in error branch in cpdf_dibsource.cpp Change-Id: I12b758aafeefedc7abe1e8b21a18db959929e95f Reviewed-on: https://pdfium-review.googlesource.com/24552 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-26Pass nullptr to ParseContentWithParams() instead of 0.Lei Zhang
Change-Id: I4ec48652d41cea9a79b6711c08484965ceea7587 Reviewed-on: https://pdfium-review.googlesource.com/24130 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-18Remove more unneeded includes and code from headers.Lei Zhang
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17 Reviewed-on: https://pdfium-review.googlesource.com/22891 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-17Fix behavior of FPDF_RenderPageBitmapWithMatrixHenrique Nakashima
This functional part of this CL is mostly a revert of "Change behaviour of FPDF_RenderPageBitmapWithMatrix" 24b0733a72bbc4013bff8628f198b0aea807aa06 Besides the revert, the parameters passed to pPage->GetDisplayMatrix() are changed to fix a bug with the previous implementation: the page was scaled to fit inside the clipping_rect, instead of clipped. Bug: pdfium:849 Change-Id: I95d0a303a979c998026a3bd6963c8684a1209f03 Reviewed-on: https://pdfium-review.googlesource.com/22931 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-09Expose marked content IDs for images and alt text.Julian Lunger
- Adds two new public bits of API: - StructElement_GetMCID(STRUCTELEMENT) to return the marked content ID of the struct element. - IMAGEOBJ_METADATA.mcid to contain the marked content ID of the image. - Restores ContentMark::GetMCID, which was removed with other dead code in https://pdfium-review.googlesource.com/c/pdfium/+/19170. - Adds a couple calls to tests, including a simple new PDF to test the struct tree marked content ID. Bug:pdfium:957 Change-Id: I92856e43d741df989e53a575a08258da19a39f22 Reviewed-on: https://pdfium-review.googlesource.com/20632 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-08Encapsulate CPDF_ShadingObject members.Lei Zhang
Change-Id: I9b878c8df4a6208fb1908bad09eb1c699970163f Reviewed-on: https://pdfium-review.googlesource.com/21690 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-08Make SharedCopyOnWrite use RetainablesDan Sinclair
This CL removes the CountedObject from SharedCopyOnWrite and instead converts the items being shared into Retainable subclasses. BUG: chromium:792372 Change-Id: I9570a521f2fc2434013c3ccb103273bdd2440bb8 Reviewed-on: https://pdfium-review.googlesource.com/22010 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-12-22Only set CPDF_ColorSpace component count on successful load.chromium/3310chromium/3309chromium/3308chromium/3307chromium/3306chromium/3305chromium/3304chromium/3303chromium/3302Lei Zhang
Make sure all CPDF_ColorSpace instances consistently call v_Load(). Change-Id: I15c1608c36781a03131884abceff1ecc4a9a1eb1 Reviewed-on: https://pdfium-review.googlesource.com/21911 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-12-21Clean up CPDF_Color.chromium/3301Lei Zhang
- Add IsPatternInternal(). - Mark some method parameters const. - Explain relationship between member variables. Change-Id: I650e18012341199985a4537e08c787e46cf8fef7 Reviewed-on: https://pdfium-review.googlesource.com/21912 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-12-21Fix various nits in color code.Lei Zhang
Change-Id: Idf2af2dd613d0e2bed5ef9bba4f8c50cd5bc1bc5 Reviewed-on: https://pdfium-review.googlesource.com/21851 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
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-19Remove some dead code.Lei Zhang
Change-Id: I8edb14c024860c66b5e6c014136393e71e38387d Reviewed-on: https://pdfium-review.googlesource.com/21570 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: 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-19Change pattern creation checks in CPDF_DocPageData::GetPattern().Lei Zhang
Do them in the right places, instead of having a catch-all at the end. Change-Id: Ie26f06dbd1c50d5b5bf57aa1f9993d5d19f74c02 Reviewed-on: https://pdfium-review.googlesource.com/21670 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>