summaryrefslogtreecommitdiff
path: root/BUILD.gn
AgeCommit message (Collapse)Author
2015-03-19Fix subtle issues in opj_skip_from_memory and add unit tests.Tom Sepez
Follow on to https://codereview.chromium.org/990683002/. This more closely mimics what fseek() actually does, so as to avoid subtle bugs down the road. Move the DecodeData struct into a header so the test can use it, and provide a constructor for it. Along the way, I added include guards, removed the p_ prefix from some non-pointer vars, fixed some IWYU, and resolved some signed/unsigned comparison warnings with careful casting. BUG=452671 R=jun_fang@foxitsoftware.com, thestig@chromium.org Review URL: https://codereview.chromium.org/1016203002
2015-03-06Fix the pdfium component build.Brett Wilson
It has a component with no object files in it. When compiled as a shared library, this fails. This changes the target to a source set which can handle empty sources. It also changes the other static libraries in pdfium to source_sets (it should be very rare to need real static libraries). Runs "gn format" over the BUILD files. Renames the arg bundle_freetype to pdfium_bundle_freetype which makes more sense in the context of a larger build like Chrome. R=jam@chromium.org Review URL: https://codereview.chromium.org/985543002
2015-02-27Remove unused IDS_ constants from pdfium.Tom Sepez
Along the way, I noticed that one of these is used in a header file that isn't included anywhere and describes no actual code (JS_Console.h). Also add missing header guards, and IWYU to resources.h Also move a static function from a header to the new resources.cpp file. Also fix the grammar on some of the error messages. Most of these appear to be JS error messages destined for a JS error handler or (someday) a console (which can remain in english), and oddly, some appear to be about failed form validation, which smells user-facing. Also check that the message makes sense for the point the C++ code wants to use it, and reword accordingly. As it turns out, these currently don't make it back to JS due to the unimplemented JS_Error() function; this is an enabling step towards implementing it. R=thestig@chromium.org Review URL: https://codereview.chromium.org/955273003
2015-02-27Pull in gmock for standalone pdfium builds.Tom Sepez
For chromium checkouts, the top-level gmock is used instead. Verify build with a simple test that ensures neither mock method is fired. R=thestig@chromium.org Review URL: https://codereview.chromium.org/955513009
2015-02-24Add small flate decode unit test.Tom Sepez
As we remove flate encoded sections from test cases (to promote clarity), we should first have a simple unit test for the underlying functionality. R=thestig@chromium.org Review URL: https://codereview.chromium.org/845313006
2015-02-20Update GN build files w/ cpu_arch -> current_cpu changes.Dirk Pranke
R=jam@chromium.org BUG=344767 Review URL: https://codereview.chromium.org/945723004
2015-02-05Fix GN build, fpdf_font_utility.cpp no longer present.Tom Sepez
Clean in standalone pdfium, but this would block a pdfium roll into chromium. TBR=jam@chromium.org Review URL: https://codereview.chromium.org/903903003
2015-02-05Add namespace and-re-arrange PDFium's local copy of chromium /base.Tom Sepez
Any projects DEPS'd into chromium and requiring a /base subset should have a local copy of that subset in a separate namespace. This will avoid future naming conflicts. Re-arrange the directory structure to better identify what came from chromium's base, and to make drop-in replacement easier for files that contain hard-coded "base/" in their #include directives. R=jam@chromium.org Review URL: https://codereview.chromium.org/900753002
2015-02-04Update GN files from previous commit as well.chromium/2301chromium/2300chromium/2299chromium/2298chromium/2297chromium/2296John Abd-El-Malek
TBR=tsepez@chromium.org BUG=455399 Review URL: https://codereview.chromium.org/902753002
2015-02-04Prevent base::CheckedNumeric from leaking outside of pdfium.Tom Sepez
Headers in /include directories should be free of implementation details from third_party. Put the types into a new header outside of /include. Requires https://codereview.chromium.org/902443003/ before a version containing this patch is rolled into chromium. R=jam@chromium.org Review URL: https://codereview.chromium.org/896023003
2015-02-03Remove OpenJPEG header generator binary from PDFium build.chromium/2295John Abd-El-Malek
This is giving duplicate symbols for main when linking PDFium into Chromium. BUG=453844 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/897463003
2015-02-01Fix GN PDFium build when building all.chromium/2294chromium/2293John Abd-El-Malek
The problem was FT_INTERNAL_DEBUG_H wasn't being defined because FT2_BUILD_LIBRARY wasn't set. So even if PDFium isn't using bundled FreeType, the FreeType target needs FT2_BUILD_LIBRARY defined. The GYP build was already correct. BUG=453844 TBR=brettw Review URL: https://codereview.chromium.org/891993003
2015-02-01Always use the FreeType headers included in PDFium.John Abd-El-Malek
The problem with trying to use the system headers sometimes is that we'll need to use pkg-config which is pretty slow. BUG=453844 TBR=brettw Review URL: https://codereview.chromium.org/865333003
2015-01-30Use system FreeType on Linux.John Abd-El-Malek
This saves 406KB in the binary size of the plugin. More importantly, it gets rid of the linker flag preventing bundling PDFium into the Chromium binary. BUG=453844 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/826613004
2015-01-27Add embedder test for stream length beyond end of file.Tom Sepez
This was fixed by https://codereview.chromium.org/743263002, but the bug remained open due to confusion. BUG=https://code.google.com/p/pdfium/issues/detail?id=57 R=thestig@chromium.org Review URL: https://codereview.chromium.org/878523003
2015-01-23Fix test naming in previous commit.Tom Sepez
The embeddertests binary should have source files ending in _embeddertest, not _unittest. TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/871093004
2015-01-23Fix null crash in CheckTrailer.Tom Sepez
We are making checks in the incorrect order. Also adds two test cases, one for the this crash, and another for the original issue that motivated the patch. Original Patch by Bo at https://codereview.chromium.org/866003003/ BUG=450871 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/872563002
2015-01-22Add pdfium_embeddertests to BUILD.gnTom Sepez
This brings BUILD.gn into equivalence with pdfium.gyp. Blocked on https://codereview.chromium.org/851283006/ R=thestig@chromium.org Review URL: https://codereview.chromium.org/871453004
2015-01-21Simplify UTF16LE_Encode and add unittest.Bo Xu
Previously, UTF16LE_Encode take an optional flag to indicate if the returned byte string has trailing zeros. In fact, no where needs the flag to be false. So just get rid of it so callers won't misuse. The bug is found by https://codereview.chromium.org/837723009 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/860973002
2015-01-15Land patch from issue 854603005 at patchset 1 (http://crrev.com/854603005#ps1)chromium/2281chromium/2280chromium/2279chromium/2278Tom Sepez
on behalf of qsr@ TBR=qsr@chromium.org Review URL: https://codereview.chromium.org/852983003
2015-01-09Add pdfium_unittests to BUILD.gnTom Sepez
Brings GN build up to sync with GYP build for this test binary. R=thestig@chromium.org Review URL: https://codereview.chromium.org/840343005
2014-12-29Revert build of pdfium_unittests.Tom Sepez
Buildbot fails with the recent changes. Review URL: https://codereview.chromium.org/796243003
2014-12-29Create pdfium_unittests binary.Tom Sepez
PDFium has not yet had a unit-tests binary, so introduce one based on the typical gtest framework. Also provide a small initial test fragment for fxcrt strings for instructional purposes. Naturally, doing so kicked out one corner case that isn't handled, we'll fix that in a separate patch. This is a small part of the testing strategy tracking bug. BUG=https://code.google.com/p/pdfium/issues/detail?id=62 R=brucedawson@chromium.org, palmer@chromium.org Review URL: https://codereview.chromium.org/831653002
2014-12-19Update freetype to 2.5.4.Bo Xu
Put freetype into third_party directory, cleaning up header files. Previously freetype header files are in core/src/fxge/freetype and core/include/thirdparties. There were also multiple fx_freetype.h. This patch removes the additional Foxit wrapper to make further update easier. Notice, for original freetype source code, the following files are modified and need to be updated accordingly in future update: third_party/freetype/include/config/ftmodule.h third_party/freetype/include/config/ftoption.h BUG=407341 R=thestig@chromium.org Review URL: https://codereview.chromium.org/815103002
2014-12-12Fix build after previous commit.chromium/2255chromium/2254chromium/2253chromium/2252chromium/2251John Abd-El-Malek
TBR=tsepez Review URL: https://codereview.chromium.org/804463003
2014-12-12Simplify PDFium by removing code that's not used in the open source repo.John Abd-El-Malek
-remove parameter from FPDF_InitLibrary -remove a bunch of ifdefs that are unused R=tsepez@chromium.org Review URL: https://codereview.chromium.org/801913002
2014-12-02Modify big integer libraryBo Xu
This patch follows https://pdfium.googlesource.com/pdfium/+/44047c3300d07192a67b1714084cc2d43b1e9bd9 Modify the library to resolve compile error, add copyright notice and change pdfium.gyp and BUILD.gn R=tsepez@chromium.org Review URL: https://codereview.chromium.org/754743003
2014-11-06Fix PDFium build with Windows GN.John Abd-El-Malek
R=scottmg@chromium.org Review URL: https://codereview.chromium.org/695183005
2014-09-24Rename GN public variables.chromium/2188chromium/2187chromium/2186chromium/2185chromium/2184chromium/2183chromium/2182chromium/2181chromium/2180chromium/2179chromium/2178chromium/2177chromium/2176chromium/2175chromium/2174chromium/2173chromium/2172chromium/2170chromium/2169Brett Wilson
forward_dependent_configs_from => public_deps direct_dependent_configs => public_configs R=jam@chromium.org Review URL: https://codereview.chromium.org/598093002
2014-09-18gn: don't remove -fno-exceptions to match gypScott Graham
Not required since: https://code.google.com/p/pdfium/issues/detail?id=28 R=jam@chromium.org BUG=chromium:335824 Review URL: https://codereview.chromium.org/567393004
2014-09-08Convert GN visibility to be a list.chromium/2155chromium/2154chromium/2152Brett Wilson
GN visibility currently allows either string or list types, but this is causing some problems for some templates. I'm going to require it to be lists, so am changing all callers before pushing the new binary. R=jam@chromium.org Review URL: https://codereview.chromium.org/555523002
2014-09-04Add v8_platform to the JS dependencies in the GN build.chromium/2151chromium/2150chromium/2149chromium/2148chromium/2147Brett Wilson
This is required for the call to v8::platform::CreateDefaultPlatform. R=jam@chromium.org Review URL: https://codereview.chromium.org/540133002
2014-07-31Revert 'gn: cross-platform exception disable'Scott Graham
This reverts commit 4923e3cfbc2b617614858c427fa87a8c67aca784. Since exceptions are in the process of being removed, and the code currently isn't rollable into pdfium (for other reasons) I'm going to revert this for now, so that this CL doesn't become blocking-for-rolls if the other min/max problem is addressed. And, hopefully by the time I get back to this it won't be necessary anyway. BUG=pdfium:28,pdfium:31,chromium:354261 R=thakis@chromium.org Review URL: https://codereview.chromium.org/432243002
2014-07-31gn: cross-platform exception disableScott Graham
Goes with https://codereview.chromium.org/431803003/ R=jam@chromium.org BUG=chromium:354261 Review URL: https://codereview.chromium.org/426153007
2014-07-17Hook up the default v8::Platform implementation to pdfiumJochen Eisinger
It remains to call the PumpMessageLoop() method at a regular interval, however, since nothing posts to the loop yet, that shouldn't be a problem. BUG=25 R=jam@chromium.org Review URL: https://codereview.chromium.org/374123002
2014-07-08Fix BUILD.gn for commit 3522876d.chromium/2085Lei Zhang
TBR=palmer@chromium.org Review URL: https://codereview.chromium.org/378073002
2014-06-30Fix syntax error in BUILD.gnchromium/2084chromium/2083chromium/2082chromium/2081chromium/2080chromium/2079chromium/2078chromium/2077John Abd-El-Malek
2014-06-26Import Chromium base/numerics to resolve integer overflow.Chris Palmer
We'll use this for integer overflows going forward. BUG=382606 R=jam@chromium.org Review URL: https://codereview.chromium.org/349363005
2014-06-23Revert "Import Chromium base/numerics to resolve integer overflow."John Abd-El-Malek
This reverts commit d9713f05fdcecab8428d39034c6b84cd0bbd2920. This is breaking compile.
2014-06-20Import Chromium base/numerics to resolve integer overflow.Chris Palmer
We'll use this for integer overflows going forward. BUG=382606 R=bo_xu@foxitsoftware.com, jschuh@chromium.org Review URL: https://codereview.chromium.org/341533007
2014-06-09Disable pointer-to-int conversion warning.John Abd-El-Malek
In this case the warning is benign. Original patch by Brett Wilson <brettw@chromium.org> R=jam@chromium.org Review URL: https://codereview.chromium.org/319033002
2014-06-05Add GN build file for pdfium, rename GYP target.chromium/2040chromium/2039chromium/2038chromium/2037chromium/2036chromium/2035chromium/2034John Abd-El-Malek
The GYP target is now called "pdfium" rather than "fpdfsdk". Original pach by Brett Wilson <brettw@chromium.org>