summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-04Lowercase JS_Define.{h,cpp} and CJS_Define.hTom Sepez
Consistency with file naming conventions. No functional change. Change-Id: I596c4be5bbf0510950c44a7d9d80f59537739c3b Reviewed-on: https://pdfium-review.googlesource.com/33593 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-06-04Fix a number of unused writes in barcode codeRyan Harrison
This fixes a number of instances where a value is written out to a variable, but never used in the barcode. There are three different types of fixes employed in this CL. If the non-use is a bug, then rewrite the code to actually use the value. If it is an assignment with no side effects, then just remove the entire line. Finally if it is an assignment of a function return value, cast it to void instead to clearly mark that the return is being ignored. Issues found with Clang Static Analyzer. Change-Id: If13a3684cb2db81592cce9a798788a26fcdb4c6d Reviewed-on: https://pdfium-review.googlesource.com/33771 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-04Remove unused assignment from CFX_RTFBreakRyan Harrison
This assignment is never used, so removing it. Issue found with Clang Static Analyzer. Change-Id: I5cf4bd9626f0a0391681c3923ae1bee70ffb99c7 Reviewed-on: https://pdfium-review.googlesource.com/33791 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-04Convert (void) to static_cast<void> in C++ codechromium/3450Ryan Harrison
Converting instances of old C-style void casts to suppress return values to use C++ style static cases. There are a few examples of (void) that remain, since they are in C code, and the third_party/ instances are not touched at all. Change-Id: I72b3fc0e1d713db669b76135e03d1cf87873a2fe Reviewed-on: https://pdfium-review.googlesource.com/33790 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-04Make CJS_Objects track CJS_Runtime (and hence the document itself)Tom Sepez
Precursor to removing some more v8::Context slot dependency. There's a cost to maintaining the set of observers, but since these objects are tied to V8 lifetimes, not C++ lifetimes, we want to be very wary of the document going away unexpectedly. Change-Id: I579f58a460aa50b88cb861227c9aca9a8a83ce12 Reviewed-on: https://pdfium-review.googlesource.com/33471 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-04Do not merge content streams to parse them.Henrique Nakashima
Removed the PrepareContent() step in CPDF_ContentParser, as its goal was to merge these streams. In Parse(), now loop through the m_StreamArray and parse each stream separately. Bug: pdfium:1051 Change-Id: Id07f3efe766828081c8cf8601bf69c4f37e20e13 Reviewed-on: https://pdfium-review.googlesource.com/33595 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-06-04cjs_globalconsts.cpp need not use v8::Context slotsTom Sepez
Small step towards deprecating FXJS's use of v8::Context slots. Reduces some string constant storage size while were at it by avoiding wide literals for ascii strings. Change-Id: Ibc651cff264302681645fde7c53bf77517b97651 Reviewed-on: https://pdfium-review.googlesource.com/33470 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-04Clean up of comment from post-submitRyan Harrison
Landed https://pdfium-review.googlesource.com/c/pdfium/+/33592 without addressing some comments that appeared after I sent it to CQ, this addresses them. Change-Id: Ic9c4d81328aafee6ff8431460c5b8b674e25ad38 Reviewed-on: https://pdfium-review.googlesource.com/33712 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-04Revert "Make CPDF_Document cache CPDF_Pages"Tom Sepez
This reverts commit f0d9d28a034fe3650c3c2d662090c1e8687ddb16. Reason for revert: avoid parsing page. Change-Id: Id3478f7e38f1cbe95d098e00158b1d7d9dc6f76e Reviewed-on: https://pdfium-review.googlesource.com/33750 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04Revert "Make common page base class for XFA and non-XFA."Tom Sepez
This reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8. Reason for revert: blocking previous revert Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063 Reviewed-on: https://pdfium-review.googlesource.com/33713 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04Revert "Make pagview decisions at runtime for non-xfa pages."Tom Sepez
This reverts commit d8126c2e72a60403c73f4187d4041364d45a8d61. Reason for revert: Blocking previous revert. Change-Id: I144841ad257401ab626b981ef7691d3b8003a49a Reviewed-on: https://pdfium-review.googlesource.com/33711 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04Revert "Remove more ifndef XFA cases"Tom Sepez
This reverts commit 38cb7263a0923dd5613da24b18d3d7ef052ff5e3. Reason for revert: Blocking prior revert. Original change's description: > Remove more ifndef XFA cases > > Remove FXFT_Clear_Face_External_Stream() calls, period. This would cause > FT to try to free memory allocated by the caller, with potentially a > different allocator. If we're leaking, msan will find it, and we can > deal with it properly rather than trying to force FT to tidy after us. > > Always call SetView(), if we have a PDF page. At worst, the link won't > be used in the XFA case. > > Always return 0 for the null document permissions. If we don't have a > document, then we can't dynamically tell if its an XFA doc, so there's > no reason to believe it should have all permissions. If there is an > XFA doc under the covers, then the extension will give us the value. > > > Change-Id: I6e3fb589eda722786567d96288cb35f43643437b > Reviewed-on: https://pdfium-review.googlesource.com/33370 > Commit-Queue: Tom Sepez <tsepez@chromium.org> > Reviewed-by: Lei Zhang <thestig@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I68b6a50ef28fb3d6ab9d8494c4486ca9fb66589e Reviewed-on: https://pdfium-review.googlesource.com/33734 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04Revert "Make FPDF_LoadPage return either page type at runtime."Tom Sepez
This reverts commit 0b4984ca4ed82023cd945512df5744eac394b53d. Reason for revert: Blocking revert of https://pdfium-review.googlesource.com/32830 Original change's description: > Make FPDF_LoadPage return either page type at runtime. > > Rely on strict use of IPDF_Page::As*() methods to prevent bad downcasts. > > Change-Id: I92a146ffbe5d145ca4f4a5b8318f3599fd1d8431 > Reviewed-on: https://pdfium-review.googlesource.com/33431 > Reviewed-by: dsinclair <dsinclair@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,dsinclair@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I6c8a6b87941d203245f7119bac13dd25b50db0ce Reviewed-on: https://pdfium-review.googlesource.com/33731 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04Add tools/code_coverage to .gitignoreRyan Harrison
This directory is pulled in via DEPS. Change-Id: Ib0ec9fa153d07d718a78d5bc0e6fe9ca112610ae Reviewed-on: https://pdfium-review.googlesource.com/33710 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-06-04Add FPDFPath_GetMatrix() and FPDFPath_SetMatrix() APIsMiklos Vajna
This is similar to the existing FPDFImageObj_SetMatrix(), but this exposes the matrix of CPDF_PathObject and provides both a getter and a setter. Change-Id: Ib90a64929dae1b2be3889eca57e4af822d7823be Reviewed-on: https://pdfium-review.googlesource.com/33670 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-06-04[xfa] Get properties from the non-xfa global if possibleDan Sinclair
When script variables are used the methods are set on the non-xfa global object. This CL updates the NormalPropertyGetter to check the non-xfa global object for methods which allows the variables methods to be found. Bug: pdfium:1097 Change-Id: I13d9d49ad654cad776883aef74de6250de5e756b Reviewed-on: https://pdfium-review.googlesource.com/33433 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-06-02Remove more ifndef XFA caseschromium/3449chromium/3448Tom Sepez
Remove FXFT_Clear_Face_External_Stream() calls, period. This would cause FT to try to free memory allocated by the caller, with potentially a different allocator. If we're leaking, msan will find it, and we can deal with it properly rather than trying to force FT to tidy after us. Always call SetView(), if we have a PDF page. At worst, the link won't be used in the XFA case. Always return 0 for the null document permissions. If we don't have a document, then we can't dynamically tell if its an XFA doc, so there's no reason to believe it should have all permissions. If there is an XFA doc under the covers, then the extension will give us the value. Change-Id: I6e3fb589eda722786567d96288cb35f43643437b Reviewed-on: https://pdfium-review.googlesource.com/33370 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-06-02IWYU: std::begin() and std::end() need <iterator>Raphael Kubo da Costa
This fixes the libstdc++ build after 656eb84f8 ("Move codepage/charset methods into related places"): ../../third_party/pdfium/core/fxcrt/fx_codepage.cpp: In function ‘uint16_t FX_GetCodePageFromCharset(uint8_t)’: ../../third_party/pdfium/core/fxcrt/fx_codepage.cpp:212:60: error: no matching function for call to ‘begin(const {anonymous}::FX_CHARSET_MAP [31])’ std::lower_bound(std::begin(g_FXCharset2CodePageTable), ^ In file included from /usr/include/c++/7/utility:76:0, from /usr/include/c++/7/algorithm:60, from ../../third_party/pdfium/core/fxcrt/fx_codepage.cpp:9: /usr/include/c++/7/initializer_list:89:5: note: candidate: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>) begin(initializer_list<_Tp> __ils) noexcept ^~~~~ /usr/include/c++/7/initializer_list:89:5: note: template argument deduction/substitution failed: ../../third_party/pdfium/core/fxcrt/fx_codepage.cpp:212:60: note: mismatched types ‘std::initializer_list<_Tp>’ and ‘const {anonymous}::FX_CHARSET_MAP*’ std::lower_bound(std::begin(g_FXCharset2CodePageTable), ^ Bug: chromium:819294 Change-Id: I3c0368af81ae274d62bf51eb6dc17d9bd71951eb Reviewed-on: https://pdfium-review.googlesource.com/33490 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-06-01Add .gdb_history to .gitignore.Henrique Nakashima
Change-Id: I6d5807fe3ec4e11f09c2bb86a45f0883e71d3ed1 Reviewed-on: https://pdfium-review.googlesource.com/33594 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-06-01Make FPDF_LoadPage return either page type at runtime.Tom Sepez
Rely on strict use of IPDF_Page::As*() methods to prevent bad downcasts. Change-Id: I92a146ffbe5d145ca4f4a5b8318f3599fd1d8431 Reviewed-on: https://pdfium-review.googlesource.com/33431 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-01Remove unused assignments in test codeRyan Harrison
prev_offset is written multiple times through out CPDF_CrossRefAvailTest, but not read until it is written again. Removing this unused intermediate writes. Issues found with Clang Static Analyzer. Change-Id: I980263b8be7f691c030e937a05f248fd9b133fb4 Reviewed-on: https://pdfium-review.googlesource.com/33592 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-06-01GCC6: workaround bug with external class template linking.José Dapena Paz
In the case of ByteStringView and WideStringView, non official build fails to link in GCC 6.3 or older. But it works in GCC 7.2. A workaround for this problem is avoiding declaring in same file extern and explicit class template for them. It seems to be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57728 though that bug is supposed to be already fixed in 6.3.0. Change-Id: Ia6323f23138c0c11e59ce7aa31da1f6c11bc4a5a Reviewed-on: https://pdfium-review.googlesource.com/33270 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-06-01Rename CPDFXFA_Context::GetTimerMgr() to NewTimerMgr()Tom Sepez
Because it returns an unique_ptr to a newly-created object. Also rename m_pTimeMgrAdapter to m_pAdapterTimerMgr, because in English, adjectives come first, and this is a TimerMgr obtained from an Adatper, not an Adapter for a TimerMgr. Also change TimeMgr to TimerMgr since the manager manages timers, not time itself. Follow-on from https://pdfium-review.googlesource.com/c/pdfium/+/33230 No functional change. Change-Id: I08d2b6cd8cc816f38326e87ee46060f091c74fdf Reviewed-on: https://pdfium-review.googlesource.com/33570 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Move variable into loop scopeRyan Harrison
The variable is not used outside of the loop. This was noted by tsepez@ after landing the initial CL to clean up this code. Change-Id: Id7d6713db4fa6bdfe867c151290cb28329ae7042 Reviewed-on: https://pdfium-review.googlesource.com/33590 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Clean up some issues found in CXFA_TextLayoutRyan Harrison
Initialize pCharPos to non-NULL, so that later code can depend on it != nullptr, avoiding a potential call to memset on nullptr. Additionally get rid of a free then alloc pattern and just use realloc. Later on remove updates to fBaseLineTemp that have not effect, since it isn't read after them. Issues found with Clang Static Analyzer. Change-Id: Iff175e20cd8860d263a56a24c8781e214c61d02c Reviewed-on: https://pdfium-review.googlesource.com/33533 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Creating XFA context shouldn't be a side-effect of FPDF_* conversion.Tom Sepez
Create it explicitly as needed. Change-Id: I42d5a6f33bc32e7fb768bed96aa6d239d133467e Reviewed-on: https://pdfium-review.googlesource.com/33350 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-06-01Return unique_ptr from CPDFXFA_Context::GetTimerMgr()Tom Sepez
Proves ownership by avoiding a std::unique_ptr::reset() call. Change-Id: Ia6e11920d84dda49699736ef3189e58d240d409e Reviewed-on: https://pdfium-review.googlesource.com/33230 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-01Roll third_party/freetype/src/ d45d4b97e..125b84800 (4 commits)Nicolas Pena
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/d45d4b97e6a0..125b84800a32 $ git log d45d4b97e..125b84800 --date=short --no-merges --format='%ad %ae %s' 2018-05-31 wl * src/raster/ftraster.c (black_TWorker_): Remove `gTarget' field. 2018-05-30 apodtele Shorten LCD filtering docs. 2018-05-31 wl [sfnt] Get colors from `CPAL' table in right order (#54015). 2018-05-30 wl ftcolor.h: Improve API design, fix typos (#54011, #54014). Created with: roll-dep third_party/freetype/src R=dsinclair@chromium.org,npm@chromium.org,thestig@chromium.org Bug: pdfium:1100 Change-Id: I5fbf9e4ea21e6443293d79e416b55cf23c23ce9d Reviewed-on: https://pdfium-review.googlesource.com/33534 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-06-01Remove ununused startAngle and sweepAngle variablesRyan Harrison
Neither of these local values ever get read after calculating them. Issue found with Clang Static Analyzer. Change-Id: Iffa578f1d5e303c65a881bcd372a9144a11edd3b Reviewed-on: https://pdfium-review.googlesource.com/33532 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Remove initialization of wchar_t chRyan Harrison
This value is overwritten at the beginning of the following while loop, so the initialized value is never used and the method called is const, so should be side effect free. Issue found with Clang Static Analyzer. Change-Id: I77f27daccd3aa1edd434cfa3e0dd7bc095db06d0 Reviewed-on: https://pdfium-review.googlesource.com/33550 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Remove unused variable pDst from CFWL_Edit::OnValidateRyan Harrison
GetOuter is const, so the assignment has no side effects, and the value is never user in the method body. Issue found with Clang Static Analyzer. Change-Id: I0116726a3df38dbf611db75ed03a0a17b4449d09 Reviewed-on: https://pdfium-review.googlesource.com/33531 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Remove unneeded call to GetNextSiblingWidgetRyan Harrison
The value is stored in a local scope variable at the end of a loop, so is never used. The method is const, so is sideffect free, thus this line has no overall effect. Issue found with Clang Static Analyzer. Change-Id: Ib20c5c121c8464433c6ad6d8e1439b929033d6d6 Reviewed-on: https://pdfium-review.googlesource.com/33530 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Fix XFA guardsRyan Harrison
These guards are using #if, when they should be using #ifdef. Caught using Clang's static analyzer. Change-Id: I86e99c5e4142cf84fff5f2365ad534f09ae40511 Reviewed-on: https://pdfium-review.googlesource.com/33510 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Fix V8 guardsRyan Harrison
These guards are using #if, when they should be using #ifdef. Caught using Clang's static analyzer. Change-Id: I9bb7a4c2b817e752c04b21a8321595f9676d6381 Reviewed-on: https://pdfium-review.googlesource.com/33511 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-05-31Make CPDF_Document own its Extension.Tom Sepez
Inverting the ownership from the current situation makes cleanup much more intuitive. Change-Id: Iad9a7ca70c0746170ba753297732e3e34f96c5ba Reviewed-on: https://pdfium-review.googlesource.com/33190 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2018-05-31Update fxjs READMETom Sepez
TBR=dsinclair@chromium.org Change-Id: I6f2a4a4b39c38a1bcfcf817a5c2aa51414291ad9 Reviewed-on: https://pdfium-review.googlesource.com/33451 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-31Make FXJSE variable context compatible with FXJS.Tom Sepez
Allows FXJS to be entered directly from V8 when the variable context gets a reference to an FXJS object. Bug: pdfium:1066 Change-Id: I48e39ed9104cc6df31c19d94fa7e0f8c7760932f Reviewed-on: https://pdfium-review.googlesource.com/33450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-31Make XFA pixel tests more stablechromium/3447Ryan Harrison
When generating PDFs using the fixup script and a .in, specify them to to use Ahem.ttf as the text font. Ahem is a font designed to reduce flakiness in pixel tests due to font rendering differences between platforms. Specifically the glyphs in the font are standard size black boxes, so though the specific text content cannot be easily compared, things like layout and high level changes to the content can still be tested. Testing things like specific text changes should be done via an embedder test, where the strings in the elements can be extracted and inspected. The font itself is is CID type 2 font, which is relatively complex to correctly embed in a PDF due to subsetting and other features. Instead of embedding it in the generated PDFs, which was originally attempted, it is being supplied to pdfium_test via the --font-dir flag. This flag overrides where the binary looks for system fonts. This works correctly on Mac and Linux, but not on Windows, which is why that platform remains suppressed. BUG=pdfium:1008,pdfium:1020 Change-Id: I00811536de98f736fc599d96b397194ccf8db0cd Reviewed-on: https://pdfium-review.googlesource.com/27790 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-31Add missing newlines in pdfium_test help text.Tom Sepez
Change-Id: I05e663b85dcfc6e03a4d77fa7f5071143d7c86b2 Reviewed-on: https://pdfium-review.googlesource.com/33432 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-31Clean up some nits in CPDF_Type3GlyphNicolas Pena
Change-Id: Ia466bb0119d914794b0d7ed9385547a7be245858 Reviewed-on: https://pdfium-review.googlesource.com/33312 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-05-31Handle image mask continuous loading correctlyWei Li
When image mask doesn't need multi-steps to load, ContinueLoadMaskDIB() will return LoadState::kFail as result. For this case, the loading should continue as usual instead of aborting. BUG=pdfium:1087 Change-Id: I5c43a67e43469ac7febca4c0cf1faa96ee105206 Reviewed-on: https://pdfium-review.googlesource.com/33310 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Wei Li <weili@chromium.org>
2018-05-31Remove uselesss code.Artem Strygin
Change-Id: Id58d10dfb2bc51d3bd8b77fd71e7728823a542cf Reviewed-on: https://pdfium-review.googlesource.com/33410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2018-05-31Make pagview decisions at runtime for non-xfa pages.Tom Sepez
Change-Id: I4c51bed2d285060f28311a0c5e1be9a7e19d408d Reviewed-on: https://pdfium-review.googlesource.com/33153 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-31[xfa] Remove unused methods from CFXJSE_ScopeUtil_IsolateHandleContextDan Sinclair
Methods are not called, removed. Bug: pdfium:1097 Change-Id: I0c7bc8ded070002dd5eb980a4705eabb829fb6ec Reviewed-on: https://pdfium-review.googlesource.com/33390 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-31Move codepage/charset methods into related places.Artem Strygin
Change-Id: I71417cc5b1bd00f77d42740198cc17487ebd686e Reviewed-on: https://pdfium-review.googlesource.com/33330 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2018-05-31Fix font regression in AdjustMMParamsNicolas Pena
Commit 2334660 changed the |dest_width| in CFX_Font::AdjustMMParams to unsigned, but this means that dest_width - min_width becomes unsigned, which is wrong because the subtraction could be negative. This CL fixes this bug. Bug: chromium:845697 Change-Id: I88fb2f3ee3837d80ff5fa70a08309d9e0fec50e0 Reviewed-on: https://pdfium-review.googlesource.com/33150 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-31Add alphabetical order per file check in api_check.pyNicolas Pena
Change-Id: Iee691870bd890da8e5c8ce9f9f74d15bc213d4a8 Reviewed-on: https://pdfium-review.googlesource.com/32871 Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-05-30Fix roll-dep path in roll-freetype.shNicolas Pena
This CL removes the 'pdfium' part of the path, because it's not working for me anymore with that. Change-Id: I84008905e368a4bdccc5e53aff2b90f4ae1938d7 Reviewed-on: https://pdfium-review.googlesource.com/33311 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-05-30Remove unused CFX_MemoryStream::{Attach,Detach}Buffer() methodsTom Sepez
Also, EstimateSize() is similarly unused. Change-Id: Idbbb5a4a1105448731d3541365c30ba37ff7eb29 Reviewed-on: https://pdfium-review.googlesource.com/33314 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-30Migrate coverage_report.py to use upstream Chromium scriptsRyan Harrison
This adds tools/code_coverage from Chromium to DEPS and converts our existing coverage_report.py to use it instead of gcov & lcov. This generates a different format of HTML report, but the content appears to be the same. Some of the coverage numbers changed a bit, due to differences in how llvm-cov and gcov calculate executable lines, but drilling down into the reports I think llvm-cov is more accurate overall and there are no major discrepancies. Large portions of the existing script are left as is and just the report generation has been changed. I plan in follow up CLs to remove the duplication of functionality in the PDFium scripts and modularlize the upstream code better. BUG=pdfium:1069 Change-Id: I009bfb8aac8f1a878e01ff70923e19bbb4774a9c Reviewed-on: https://pdfium-review.googlesource.com/32894 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>