summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-31Simplify code in fpdf_transformpage.cpp.Artem Strygin
Change-Id: I4a33ad52bf5d0710a44f784da9f50123771b8416 Reviewed-on: https://pdfium-review.googlesource.com/17150 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-30Convert JS resource into enum classchromium/3254Dan Sinclair
This CL converts the #defines into an enum class. Change-Id: I895e29e1d46a7a82d7be896f5776eb00d28559f5 Reviewed-on: https://pdfium-review.googlesource.com/17091 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Remove useless code.Artem Strygin
Change-Id: I5fa9472eecc176d25213fd446a4abc06e815a48b Reviewed-on: https://pdfium-review.googlesource.com/15592 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-30Deduplicate md5s in fpdfannot_embeddertest.cpp for Windows and others.Henrique Nakashima
Change-Id: I521be6b6548518487ba4eef93d72f29b26809cb5 Reviewed-on: https://pdfium-review.googlesource.com/17110 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-10-30Use CPDF_PageDataAvail to check page availability.Artem Strygin
Change-Id: Iad67de5881481684fee605f48f9349a3be21f70b Reviewed-on: https://pdfium-review.googlesource.com/15591 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-30Rename global data files to match contentsDan Sinclair
This CL renames the files related to Javascript global data to match their file contents. Change-Id: I65a6191968656b5e89c9eb6edb2ea9f9db92875a Reviewed-on: https://pdfium-review.googlesource.com/17090 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Move fpdfsdk/javascript to fxjs/Dan Sinclair
This CL moves all of the CJS files into fxjs. The :javascript build rule is removed and :fxjs is used instead. Change-Id: I1701b308f51317d0346c7401b43812c3f43a27bf Reviewed-on: https://pdfium-review.googlesource.com/17047 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Combine common code in fpdf_transformpage.cpp.Lei Zhang
Change-Id: I50311794b6fb4ef3c38420838ec6c3bb157b06a7 Reviewed-on: https://pdfium-review.googlesource.com/17071 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-10-30Use CPDF_PageDataAvail to check page resources availability.Artem Strygin
Change-Id: Idbb30122c113ffce421c8d471551f619f4ab7576 Reviewed-on: https://pdfium-review.googlesource.com/15590 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-30Rename util to cjs_utilDan Sinclair
This CL renames util.{cpp|h} to cjs_util.{cpp|h} to match the file contents. Change-Id: Ia1bcbced0d817e2334310a25b09f9ec56822d600 Reviewed-on: https://pdfium-review.googlesource.com/17046 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Use CPDF_PageDataAvail to check form availability.Artem Strygin
Change-Id: I31c0a74322a2299f2d0cd1f42669b1bf447a9958 Reviewed-on: https://pdfium-review.googlesource.com/13530 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-30More safe ints in CJBig2_TRDProcNicolas Pena
Bug: chromium:778961 Change-Id: I1d08b3282304931276c24e50392c10b21780dcde Reviewed-on: https://pdfium-review.googlesource.com/16971 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-30Move resource to js_resourceDan Sinclair
This CL moves the resource.{cpp|h} files to js_resources.{cpp|h}. Change-Id: I6a9ccb7e0819f40edf4a91e7839a92657d5d39d7 Reviewed-on: https://pdfium-review.googlesource.com/17045 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename report to cjs_reportDan Sinclair
This Cl renames report.{cpp|h} to cjs_report.{cpp|h} to match the contents. Change-Id: Ifb8846bff5423417f7543e47a45a7e50e18c72c6 Reviewed-on: https://pdfium-review.googlesource.com/17044 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename event to cjs_eventDan Sinclair
This CL renames the event.{cpp|h} files to cjs_event.{cpp|h} to match the internal class. Change-Id: I0e41a7ee068829f2bc8d94ff926edcf49b3a3c9f Reviewed-on: https://pdfium-review.googlesource.com/17043 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename console to cjs_consoleDan Sinclair
This CL renames the console.{cpp|h} files to cjs_console.{cpp|h}. Change-Id: Icc4f70e9653cd7e11bab305e47c03af07f4e56b0 Reviewed-on: https://pdfium-review.googlesource.com/17042 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename color to cjs_colorDan Sinclair
This CL renames color.{cpp|h} to cjs_color.{cpp|h}. Change-Id: I141435da9e4f6ac38bda85126975fca02e12b17c Reviewed-on: https://pdfium-review.googlesource.com/17041 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename app to cjs_appDan Sinclair
This CL renames the app.{cpp|h} files to cjs_app.{cpp|h}. The CJS_TimerObj and GlobalTimer objects have been moved to their own files. Change-Id: I7a4063b212f1051b1517ec8902a0ee215854feaf Reviewed-on: https://pdfium-review.googlesource.com/17040 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Rename PublicMethods to cjs_publicmethodsDan Sinclair
This CL renames the PublicMethods.{cpp|h} files to match the internal class name. Change-Id: I530f4ce5b53dd74cbef447faf0875782bfe27b70 Reviewed-on: https://pdfium-review.googlesource.com/17039 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Move JS_Value into JS_DefineDan Sinclair
This CL moves CJS_Return to its own files and moves the remaining function definitions from JS_Value to JS_Define. Change-Id: Ic7058a02330153f22d1fff9fc6cdebd9167c498b Reviewed-on: https://pdfium-review.googlesource.com/17038 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Rename JS_Runtime_Stub to cjs_runtimestubDan Sinclair
This CL renames JS_Runtime_Stub.cpp to cjs_runtimestub.cpp to match the contents. The event context stub is moved to to cjs_event_context_stub.cpp. Change-Id: I1b231b10aaedd1fe484e55736b0fb562d0a0df88 Reviewed-on: https://pdfium-review.googlesource.com/17037 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Move JS_Object to cjs_objectDan Sinclair
This CL moves JS_Object.{cpp|h} to cjs_object.{cpp|h} and splits the cjs_embedobj out to its own files. Change-Id: I8eced9c613455638f4adeefd60e67f38c0c3c1a6 Reviewed-on: https://pdfium-review.googlesource.com/17036 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-30Rename Icon to cjs_iconDan Sinclair
This CL renames Icon.{cpp|h} to cjs_icon.{cpp|h}. Change-Id: Ie0554771441cfa7011205e0c4f461bb7526bb068 Reviewed-on: https://pdfium-review.googlesource.com/17034 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename Field to cjs_fieldDan Sinclair
This CL renames Field.{cpp|h} to cjs_field.{cpp|h}. The CJS_DelayData is split out into cjs_delaydata.{cpp|h} Change-Id: If1e3cbbc0d65cbb5cc69ee9862db3fc78ee652e2 Reviewed-on: https://pdfium-review.googlesource.com/17033 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Rename Document to match classDan Sinclair
This CL renames fpdfsdk/javascript/Document.{cpp|h} to fpdfsdk/javascript/cjs_document.{cpp|h}. The CJS_PrintParamsObj is split out into cjs_printparamsobj.{cpp|h}. Change-Id: I29377e7e60b576790fab01e4293c0c1f86339a56 Reviewed-on: https://pdfium-review.googlesource.com/17032 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-30Fix overflow in image size checkRyan Harrison
BUG=chromium:779342 Change-Id: I2a087a08fe87594eb73d9d955955be0e66e5cdc2 Reviewed-on: https://pdfium-review.googlesource.com/17030 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-30Add test for CPDF_HintsTable.Artem Strygin
Change-Id: Ibda8e140791215faec52e6dbc33adea732373f6c Reviewed-on: https://pdfium-review.googlesource.com/15810 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-10-27Revert "Revert "Reland "Remove ContrastAdjust()."""chromium/3253chromium/3252Henrique Nakashima
This reverts commit 978ba20ffd0d2b37bf02b9d86828fa701c0c02fa. Reason for revert: I now have the new expected files for the chrome test ready in https://chromium-review.googlesource.com/c/chromium/src/+/742061 Landing this again and will immediately add a manual pdfium roll to cl 742061 to unblock the deps roller. Original change's description: > Revert "Reland "Remove ContrastAdjust()."" > > This reverts commit d5ec7ab0cd0663184d6056bc6fc87c86ec345342. > > Reason for revert: Did not mean to reland, just create the reland CL. > > Original change's description: > > Reland "Remove ContrastAdjust()." > > > > Original change's description: > > > Revert "Remove ContrastAdjust()." > > > > > > This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. > > > > > > Reason for revert: Breaks PDFToPWGRasterBrowserTest > > > > > > Original change's description: > > > > Remove ContrastAdjust(). > > > > > > > > This post-processing increased the contrast of scaled-down features - > > > > mainly lines and fonts, relative to the background. The effect does not > > > > improved readability and in some cases makes the scaled-down version > > > > look like a different document at a glance. Text that is normal > > > > weight appears bold when scaled down in these cases. > > > > > > > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > > > > Reviewed-on: https://pdfium-review.googlesource.com/15471 > > > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > > > > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > > > Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 > > > Reviewed-on: https://pdfium-review.googlesource.com/16970 > > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > > > Change-Id: I77d4377d30908d1e2d4dc842300a761072a5fbd4 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Reviewed-on: https://pdfium-review.googlesource.com/16990 > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > Change-Id: Ie2e91662a1e82c0a793952aab47c2acbde1596d4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://pdfium-review.googlesource.com/16991 > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: Iaae451131043ee69052809680922fdac06a69458 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/16992 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-10-27Limit the size of images being fuzzed in XFACodecFuzzersRyan Harrison
This limits the size detected in the header to 1,000,000 pixels, which will support 1000 x 1000 images. This is being done to remove non-useful OOM reports for very large images and improve fuzzing efficiency, since larger images are unlikely to cover new logic. BUG=pdfium:925 Change-Id: I4a7fa7cf02cbb469048b752d45bc9f64a1b60a98 Reviewed-on: https://pdfium-review.googlesource.com/17010 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-10-27Revert "Reland "Remove ContrastAdjust().""Henrique Nakashima
This reverts commit d5ec7ab0cd0663184d6056bc6fc87c86ec345342. Reason for revert: Did not mean to reland, just create the reland CL. Original change's description: > Reland "Remove ContrastAdjust()." > > Original change's description: > > Revert "Remove ContrastAdjust()." > > > > This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. > > > > Reason for revert: Breaks PDFToPWGRasterBrowserTest > > > > Original change's description: > > > Remove ContrastAdjust(). > > > > > > This post-processing increased the contrast of scaled-down features - > > > mainly lines and fonts, relative to the background. The effect does not > > > improved readability and in some cases makes the scaled-down version > > > look like a different document at a glance. Text that is normal > > > weight appears bold when scaled down in these cases. > > > > > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > > > Reviewed-on: https://pdfium-review.googlesource.com/15471 > > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > > > # Not skipping CQ checks because original CL landed > 1 day ago. > > > > Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 > > Reviewed-on: https://pdfium-review.googlesource.com/16970 > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > Change-Id: I77d4377d30908d1e2d4dc842300a761072a5fbd4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://pdfium-review.googlesource.com/16990 > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: Ie2e91662a1e82c0a793952aab47c2acbde1596d4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/16991 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-10-27Reland "Remove ContrastAdjust()."Henrique Nakashima
Original change's description: > Revert "Remove ContrastAdjust()." > > This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. > > Reason for revert: Breaks PDFToPWGRasterBrowserTest > > Original change's description: > > Remove ContrastAdjust(). > > > > This post-processing increased the contrast of scaled-down features - > > mainly lines and fonts, relative to the background. The effect does not > > improved readability and in some cases makes the scaled-down version > > look like a different document at a glance. Text that is normal > > weight appears bold when scaled down in these cases. > > > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > > Reviewed-on: https://pdfium-review.googlesource.com/15471 > > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > > Reviewed-by: dsinclair <dsinclair@chromium.org> > > TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 > Reviewed-on: https://pdfium-review.googlesource.com/16970 > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: I77d4377d30908d1e2d4dc842300a761072a5fbd4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/16990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-10-27Revert "Remove ContrastAdjust()."Henrique Nakashima
This reverts commit 53d443f042b590ae2d920def16bc9daf66f8427d. Reason for revert: Breaks PDFToPWGRasterBrowserTest Original change's description: > Remove ContrastAdjust(). > > This post-processing increased the contrast of scaled-down features - > mainly lines and fonts, relative to the background. The effect does not > improved readability and in some cases makes the scaled-down version > look like a different document at a glance. Text that is normal > weight appears bold when scaled down in these cases. > > Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 > Reviewed-on: https://pdfium-review.googlesource.com/15471 > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > Reviewed-by: dsinclair <dsinclair@chromium.org> TBR=bungeman@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I7f61650bc6d917b3c6640da60f3f740ef4498de0 Reviewed-on: https://pdfium-review.googlesource.com/16970 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-10-26Remove unneeded DefineJSObject paramDan Sinclair
The second parameter to DefineJSObject is always set the same for each object type. Remove and put the value directly into the DefineObj calls. Change-Id: If939c57fe6ea3b985ab2337eb30f472c668cdc42 Reviewed-on: https://pdfium-review.googlesource.com/16911 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-26Make spec arrays constDan Sinclair
This CL marks all of the Spec arrays as const. Change-Id: Ie36f670a4230fcac2cba5544b9c6e5179b0c7073 Reviewed-on: https://pdfium-review.googlesource.com/16951 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-26Cleanup statics in JS classesDan Sinclair
This CL removes the static object IDs from each of the CJS_Object subclasses and moves them to anonymous namespaces. The Spec arrays are moved to private members of the object classes. Change-Id: I5dcdb87ef57e4b374b5431580fb55cb75023f8fb Reviewed-on: https://pdfium-review.googlesource.com/16950 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Remove g_pClassNameDan Sinclair
This CL removes the g_pClassName static member and uses the string directly where needed. Change-Id: I47f61442ced2ee1d6a607fb1a7d9bcaf000b8ee2 Reviewed-on: https://pdfium-review.googlesource.com/16931 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-26Cleanup JS define methodsDan Sinclair
This CL moves DefineProps, DefineMethods and DefineConsts to the CJS_Object and removes from the subclasses. The JSConstructor and JSDestructor are moved to be templated static methods in JS_Defines. Change-Id: Ibe5ee063a32ae2332b8affc843d97ee6da21f4ee Reviewed-on: https://pdfium-review.googlesource.com/16930 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Remove methods for empty const/method/property arraysDan Sinclair
This CL cleans up the methods and arrays for constants, methods and property definitions which are empty. Change-Id: I4a4d85cc139075de77d84a40182bd00341c31818 Reviewed-on: https://pdfium-review.googlesource.com/16910 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Remove JS macrosDan Sinclair
This CL removes the JS macros and inlines the code directly into the requisite classes. Change-Id: I514ca025be42cd46b041b4af271f7b1d1067ab42 Reviewed-on: https://pdfium-review.googlesource.com/16890 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Remove CJS_ArrayDan Sinclair
This CL removes the CJS_Array wrapper and uses the v8 objects directly. Change-Id: I904f76e59e27d65db4b4d0bbd503fddb3e8cfc6f Reviewed-on: https://pdfium-review.googlesource.com/16830 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Rename JS_EventHandlerdan sinclair
This Renames JS_EventHandler to cjs_eventhandler to match the class name. Change-Id: I30c7c4b92051b6d960ac7d8d8620d981f84e2142 Reviewed-on: https://pdfium-review.googlesource.com/16871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Move global.{h|cpp} to match classdan sinclair
This CL moves global.{h|cpp} to cjs_global.{h|cpp} to match the internal class name. Change-Id: I58a0dfcb36ee35320a0ad0d134a544e615dc93bf Reviewed-on: https://pdfium-review.googlesource.com/16870 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Rename Annot to cjs_annotdan sinclair
Thist CL renames Annot.{h|cpp} to cjs_annot.{h|cpp} to better match the primary class. Change-Id: I9c3e2fcbb149d97e90098018f42205568ef179b1 Reviewed-on: https://pdfium-review.googlesource.com/16851 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Split Consts into individual filesdan sinclair
This CL splits the individual CJS classes out of the Consts.{cpp|h} files into their own files. Change-Id: I4497ee2dcb46205c1dc3f521d44a9046a8d7f067 Reviewed-on: https://pdfium-review.googlesource.com/16850 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-10-26Add option to regenerate only platform-specific expected pngs.Henrique Nakashima
Change-Id: Id4798fe9a4d297678a76d0511cde7fecbf130e3e Reviewed-on: https://pdfium-review.googlesource.com/16613 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2017-10-26Remove ContrastAdjust().Henrique Nakashima
This post-processing increased the contrast of scaled-down features - mainly lines and fonts, relative to the background. The effect does not improved readability and in some cases makes the scaled-down version look like a different document at a glance. Text that is normal weight appears bold when scaled down in these cases. Change-Id: I2544d45e2bcec25d6742d2a60c1316d8df08cce1 Reviewed-on: https://pdfium-review.googlesource.com/15471 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-10-26Consistently apply JS size checkRyan Harrison
This CL makes the use of CXFA_IsTooBig consistent and universal across all of the ToJavascript and related methods. Previously this method was only applied in some calls. It is now being tested as a precondition and postcondition on every call and as a post condition for the entire translation process. There are some size checks within methods that potentially generate large amounts of JS that have been left in. BUG=chromium:752920 Change-Id: I1a8bfe21e0a17c2e47592fc6017060243674f1bc Reviewed-on: https://pdfium-review.googlesource.com/16812 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-10-25Temporarily disable mask rendering againchromium/3251rbpotter
Bug: chromium:777837 Change-Id: I1830dc37b9c039a95509627026461134d8f2c16d Reviewed-on: https://pdfium-review.googlesource.com/16710 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
2017-10-25Add --regenerate_expected option to test_runner.py.chromium/3250Henrique Nakashima
After a change in rendering, corpus and pixel test expected pngs need to be regenerated manually. This option reduces the toil by automating renaming and moving the new expected files over the old ones. Change-Id: I9d490369ccf946d4d4567e440b7b5252469eec46 Reviewed-on: https://pdfium-review.googlesource.com/16451 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2017-10-25Enforce end of data in CJBig2_ArithDecoderNicolas Pena
Quoting the JBIG2 spec: "If B is a 0xFF byte, then B1 (the byte pointed to by BP+1) is tested. If B1 exceeds 0x8F, then B1 must be one of the marker codes. The marker code is interpreted as required, and the buffer pointer remains pointed to the 0xFF prefix of the marker code which terminates the arithmetically compressed data. 1-bits are then fed to the decoder until the decoding is complete. This is shown by adding 0xFF00 to the C-register and setting the bit counter CT to 8." Our implementation is the alternative (faster for software according to the spec), where only CT is changed to 8. Reaching this part of the code means we will never read from stream again so we should be wrapping up the decoding. To ensure this, the |m_Complete| attribute is set to true if we reach this code again, which will result in bailing out next time DECODE is called. Bug: 767156 Change-Id: I434d46bc7914713a065f0e4da079bbc9b5dd216c Reviewed-on: https://pdfium-review.googlesource.com/16791 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>