Age | Commit message (Collapse) | Author |
|
There appear to be a bunch of corpus tests which fail with this change such
as FAILURE: shading1.pdf
This reverts commit 85361b227ad6786d2aeef8409b79a8d077a26ee9.
Make m_pShadingObj a CPDF_Stream instead of CPDF_Object.
This object is required to be a stream and was being converted as such. With
the new type checking this caused us to pass a nullptr where previously we'd
have, incorrectly, cast a CPDF_Dictionary to a CPDF_Stream.
This CL changes the m_pShadingObj to always be a CPDF_Stream. Then, we never
go down the bad code path because we check if m_pShadingObj is nullptr earlier
and bail out.
BUG=chromium:547706
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1414283003 .
|
|
This object is required to be a stream and was being converted as such. With
the new type checking this caused us to pass a nullptr where previously we'd
have, incorrectly, cast a CPDF_Dictionary to a CPDF_Stream.
This CL changes the m_pShadingObj to always be a CPDF_Stream. Then, we never
go down the bad code path because we check if m_pShadingObj is nullptr earlier
and bail out.
BUG=chromium:547706
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1426713002 .
|
|
None of the methods in this file are used and it is not included anywhere. Removing.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1417783004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1411963002 .
|
|
Removes duplication between pdfium_test and pdfium_embeddertest
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1416713002 .
|
|
Original patch from issue 1391843004 at patchset 1
(http://crrev.com/1391843004#ps1)
Introduce a pdf_enable_v8 GYP variable, which controls a
corresponding PDF_ENABLE_V8 #define, and bring in the real
JS library when set. Otherwise, link against a stub JS
runtime.
BUG=pdfium:211
R=dml@google.com, jochen@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1395733006 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1393823002 .
|
|
The fpdfsdk/include/javascript/IJavascript.h is the sole API.
This required moving a creaton method to it from JS_Runtime.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1389783002 .
|
|
It merely includes a bunch of other .h files which are handled
better since we fixed IWYU.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1385983002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1359233002 .
|
|
std::unique_ptr supports move assignment as in:
ptr2 = std::move(ptr1);
R=jyasskin@chromium.org
Review URL: https://codereview.chromium.org/1358163002 .
|
|
Target v8 has:
'direct_dependent_settings': {
'defines': [
'V8_SHARED',
'USING_V8_SHARED',
],
},
For this to work, targets using v8 headers have to depend on v8
directly, else the V8_EXPORT macro won't work. Add a direct
dependency on v8.
BUG=none
TEST=do a debug component build of pdfium_embeddertests on Win,
should work without linker errors
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1349843002 .
|
|
This forces the layer defined by fxjs_v8.h to be (more)
self-contained, so that it can be tested apart from the
CJS_* objects (in fpdfsdk/{src,include}/javascript. This
implies the array buffer allocator must be part of fxjs_v8.
One wrinkle is that we'd like to be able to test an isolate
upon which no native objects have been added, so some
initialization that would have occurred as part of object
definition must be made explicit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1338073002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1326953006 .
|
|
Part 1. Move to headers so compiler can type check against
the definitions.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1299963002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1297593005 .
|
|
- Replace IFX_BidiChar with just CFX_BidiChar
- Document implementation
- Change out parameters to pointers
- Remove dead code
- Add an enum for bidi directions
- Move several externs to a header
- Add unit tests
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1197643002 .
|
|
BUG=pdfium:188
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1301473003 .
|
|
Cloning a CPDF_Stream actually happens via CPDF_Object::Clone().
Transitively, remove:
- GetStreamFilter()
-- all the filters.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1288543002 .
|
|
I thought about removing it, but decided to fix it instead until c++11
hits and there may be better alternatives.
Remove unused variants.
BUG=517854
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1274423003 .
|
|
But use platform freetype for library itself according to the rules
for the platform.
This should greatly reduce per-platform diffs in the corpus tests, but
requires that the corpus be rolled at the same time.
When this rolls into chromium, its src/BUILD.gn will need to be updated
to say third_party:fx_freetype instead of third_party:freetype.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1267493005 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1240713004 .
|
|
Removed several header files that simply proxy other headers.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1199553002.
|
|
Remove some fx_* files that simply included other files along the way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1197693003.
|
|
We get to delete a whole bunch of fx_foo.c files that did nothing
but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this
from the .gyp/.gn files instead.
Also sort some "config"s in .gn file.
R=thestig@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a
Review URL: https://codereview.chromium.org/1185373010.
|
|
This reverts commit c7a17bf9cdb0d646aa8b653e6ab2678a1837ed6a.
|
|
We get to delete a whole bunch of fx_foo.c files that did nothing
but #include "foo.c" after defining _CRT_SECURE_NO_WARNINGS. Do this
from the .gyp/.gn files instead.
Also sort some "config"s in .gn file.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1185373010.
|
|
Removal of fpdfapi_ suffix can be part of a future CL.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1186113005.
|
|
Second CL to apply less restrictive flags to third party.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1181943008.
|
|
Creates a separate library so we can apply less-strict warnings to
the code we can't change from upstream vs. the code we can change,
reducing noise in the standalone build.
Remove needless foo.{cpp,h} files that merely perform indirection
via #include "some_other_path/foo.{cpp,h}".
BUG=pdfium:166
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1152743007.
|
|
Small bit of OCD here, since this file is included cross-library
(i.e. from fpdfsk), it can't be in src/. In other words, the
following should be empty:
grep -R 'include.*core/src/' fpdfsdk
Fix some IWYU in it at the same time.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1147353006
|
|
Reproducing this bug requires the embedder to fire timers, something the
single-pass pdfium-test binary doesn't do properly at the present. So
we modify the embedder test delegate to allow the immediate triggering
of the same.
Perform some cleanup along the way by removing EmbedderTestDefaultDelegate
-- it buys us nothing over the the no-op one.
And, of course, v8 initialization is busted again, and we need v8 here.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1153213004
|
|
Add a FX_TryAlloc() for those few cases where we might need to continue
in face of OOM.
Remove FX_AllocNL() (the context of its use would suggest that NL
means "No Limit"). This is used for some big allocations, so replace
it with TryAlloc(). Large allocations may be worth trying to continue
from, since there are few and they have a large chance of failing.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1128043009
|
|
This involves adding some missing extern "C" { } declarations,
using FPDF_ types instead of C++ types, and converting pass
by reference arguments into pointers.
Test this using fpdfview_embedertest for simplicity.
BUG=pdfium:158
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1130843003
|
|
These are the only files that embedders of PDFium should be including.
They are entirely self-contained, and compile cleanly against -Wall so
as to not offend the code that may include them.
Having done this, we can see that chromium is pulling in two additional
files from the fpdfsdk/include/pdfwindow directory, which is not guaranteed
to work.
A few files are renamed, adding an "_" to make the names consistent.
The exception is fpdfview, which is doc'd as such in the doc.
Naturally, paths will need updating in a handful of files in chrome
when this rolls in.
BUG=pdfium:154
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1135913002
|
|
... rather than redundantly declaring them in several .cpp files, and
hoping that the linker lines things up for you.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1128193004
|
|
The initialization sequence becomes more complicated as v8 evolves
and when we move to XFA (where pdfium_unittests are currently broken).
Centralize this initialization in a few places, like the embedder_test
framework and the pdfium_test binary, and convert tests that require
it into embedder_tests rather than unit_tests.
Change on master first before moving to XFA.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1071343002
|
|
Move some typedefs for v8 types into fxjs_v8.h wrapper to
avoid circular inclusions. Also delete JS_Module.h, as no
other file includes it.
BUG=https://code.google.com/p/pdfium/issues/detail?id=66
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1060133002
|
|
When there is a wrong keyword like '??ze' in the dictionary
of the trailer, PDFium can't recognize it and aborts further
parsing. After this change, PDFium continues even it can't
get the right size at this moment. It will rebuild the cross
reference table later since the size of the table is missing.
BUG=459580
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1055323003
|
|
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
|
|
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
|
|
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
|
|
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
|
|
The bstring's read from file is unused.
The load from file paths aren't taken.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/902943003
|
|
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
|
|
This is similar to how we initialize ICU for V8 inside PDFium.
BUG=455399
R=wfh@chromium.org
Review URL: https://codereview.chromium.org/897973002
|
|
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
|
|
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
|
|
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
|
|
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
|