Age | Commit message (Collapse) | Author |
|
Orignal CL at https://codereview.chromium.org/852493002/
TBR=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/849603003
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/834703002
|
|
BUG=445475
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/837093002
|
|
Brings GN build up to sync with GYP build for this test binary.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/840343005
|
|
Linux pdfium builds have 215 warnings of this form:
command line option -std=gnu++11 is valid for C++/ObjC++ but not for C
The obvious fix is to not request C++11 for C compilations. The only
complication was the the switch we are using is actually gnu++0x, not
gnu++11.
BUG=https://code.google.com/p/pdfium/issues/detail?id=102
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/839163002
|
|
This is done by explicitly adding a virtual dtor to interface classes,
since the cost is small given that there are already virtual functions.
The exceptions are for classes that have a Release() or Delete() method,
in which case it is non-virtual and protected to indicate that the virtual
class is never the deletion point.
BUG=
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/810883005
|
|
patch from issue 680873002 at patchset 40001 (http://crrev.com/680873002#ps40001)
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/841943003
|
|
This fixes a few cut-n-paste errors in the previous version, plus
adds more corner cases. The implementation is fixed to handle a
few of these that failed.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/808553013
|
|
This allows integration with the gtest EXPECT_* macros.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/837843002
|
|
pdfium builds on Win32 have about 85 warnings (250 in the XFA
branch, totaling over 480 lines!), mostly from four lines in
a header file and a warning that should be disabled. This
change resolves all but two of them and turns on
warning-as-errors. Bugs have been filed for the two
remaining warnings:
https://code.google.com/p/pdfium/issues/detail?id=100
the 64-bit warnings:
https://code.google.com/p/pdfium/issues/detail?id=101
and the Linux warnings:
https://code.google.com/p/pdfium/issues/detail?id=102
The fix to the double->float truncation bugs will also
improve code-generation.
R=bo_xu@foxitsoftware.com, scottmg@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/792953005
|
|
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/837533003
|
|
In order for the standalone pdfium build to succeed,
DEPS is updated to pull in gtest, and a stub gtest.gyp
file is provided (which is unused under a chromium
checkout).
R=brucedawson@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/835233002
|
|
This is a follow-up to f9640495.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/825983004
|
|
g_timeMap is a global variable with a constructor and destructor so it
must be removed.
BUG=441899
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/832703003
|
|
The g_UnicodeData_Normalization_Map2 array is initialized with a size of
1724 in core\src\fpdftext\unicodenormalizationdata.cpp but its size is
1734 (+10) in core\src\fpdftext\unicodenormalization.cpp, 1724 seems to be
the real size (i.e. there's 1724 values in the initialization list).
BUG=446057
Original Author: sebmarchand@chromium.org
Original CL: https://codereview.chromium.org/837523002/
Review URL: https://codereview.chromium.org/812843004
|
|
PDFium static initializers must go. Static initializers are prohibited
by the style guide. They have negative consequences including increased
startup time (from pulling in additional code pages) and reduced sharing
of data pages (since the variables can't go in the read-only data
segment).
This change uses a template struct and typed enums to reproduce
JS_CalcHash at run-time. An unsigned long long constant and masking with
0xFFFFFFFF are used to avoid compile errors due to integer overflow of
compile-time constants.
The HashVerify class is used to check the results, necessary since none
of the functions in global.cpp are called when pdfium_test.exe runs.
const_expr would be a much cleaner way to implement this change but it
is not yet widely supported.
On the Windows release build this reduces the code size (.text
virtual size) by 0x240 (576) bytes, the .data section by 0x20 bytes
(for eight unsigned globals), and the .rdata section by 0x20 bytes
(the unneeded string savings, minus the eight unsigned globals now
being there).
BUG=441899
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/792043005
|
|
m_sTimeMap is a global variable with a constructor and destructor, which
is not allowed. This change moves it to a function with a static pointer
so that it is constructed on demand and then leaked, thus avoiding
having startup and shutdown code.
This also fixes a worrisome bug caused by having m_sTimeMap defined in
a header file. Because m_sTimeMap was defined (and marked as static) in
a header file there were fifteen separate copies of it, one for each
source file which included the header file. This could easily lead to
bugs because a timer that was added from one source file would be
invisible to other source files.
Each instance of m_sTimeMap added four entries to the
dump-static-initializers.py report, for a total of sixty, so this fix
significantly cleans up that report.
BUG=441899
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/831903002
|
|
Remove CPDF_Dictionary*() operator in CPDF_Bookmark class.
Unify naming conventions and coding styles.
Change some functions to const.
Change the name of function argument to |pDict| for FPDF_xxx type variable.
This makes the code more clear and gives better variable naming
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/828203002
|
|
This is a follow up CL on https://codereview.chromium.org/761313004/
BUG=https://code.google.com/p/pdfium/issues/detail?id=93
R=brucedawson@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/828183002
|
|
When dealing with transparency, the printing procedure will generate a bitmap first,
then draw this bitmap in windows DC.
The format of source bitmap is argb, but the destination bitmap is rgb.
Simply doing memcpy will lose the alpha channel information, so CompositeBitmap function is needed.
BUG=412908
R=vitalybuka@chromium.org
Review URL: https://codereview.chromium.org/826633002
|
|
Doing the type conversion on demand is just as efficient as doing it at
startup time, and makes for more efficient startup.
Also mark g_nan as const, to reduce .data section size and enforce
desired semantics.
BUG=441899
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/788143009
|
|
Follow up on https://codereview.chromium.org/733693003
R=brucedawson@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/809993004
|
|
Buildbot fails with the recent changes.
Review URL: https://codereview.chromium.org/796243003
|
|
Looks like some dependencies were missing during the run at
http://build.chromium.org/p/client.pdfium/builders/linux/builds/31/steps/gyp_pdfium/logs/stdio
TBR=brucedawson@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/833503003
|
|
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
|
|
Fix a memory leak while we are at it.
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/813153002
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/817813004
|
|
Turn on the FT_CONFIG_OPTION_SUBPIXEL_RENDERING to enable sub-pixel rendering.
Also undef some other options to match what they look like before.
BUG=444243
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/789163008
|
|
Review URL: https://codereview.chromium.org/815333002
|
|
BUG=438441
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/816153002
|
|
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
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/817753002
|
|
Also use stdlib algorithms in a few places.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/810223003
|
|
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/814903002
Review URL: https://codereview.chromium.org/816743002
|
|
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/816593002
|
|
This reduces rendering time on my test document by over
10 seconds. It is super common for a JBIG2 dictionary to
span multiple pages, so we don't want to decode the same
dictionary over and over again.
Original patch from Jeff Breidenbach (breidenbach@gmail.com)
BUG=https://code.google.com/p/pdfium/issues/detail?id=85
R=bo_xu@foxitsoftware.com, thestig@chromium.org
Review URL: https://codereview.chromium.org/761313004
|
|
BUG=439793
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/810793004
Review URL: https://codereview.chromium.org/808293002
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/790213005
|
|
root object
Before this fix, the root will be released when an indirect object has the
same object number with the root. However, the root object is loaded when
the trailer is parsed. It shall not be updated or replaced anymore.
BUG=425040
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/803103002
|
|
QeTable is a 752 byte array that was defined in a header file. This
caused it to be instantiated by the VC++ compiler 12 times, wasting
8,272 bytes of space in the data segment. Because 'const' implies
'static' this did not cause any duplicate symbol errors.
JSCONST_n*HASH are a set of eight variables that are defined in a header
file. This causes them to be replicated 15 times. The variables
themselves are tiny but they are dynamically initialized and this
dynamic initialization code is replicated 15 times.
When tested on pdfium_test.exe the effect of this change is to:
Reduce the .text (code) segment by 3,616 bytes.
Reduce the .rdata section by 8,656 bytes.
Reduce the total binary file size by 13312 bytes.
These are the worst offenders for pdf.dll as shown in:
https://drive.google.com/open?id=1BvubxoA2SU_2e4T5cq7jHTjc1TlT0qOndpIfX3DMeA8&authuser=0
This will also drastically simplify the list of work to be done
for bug 441899 (getting rid of initializers).
BUG=441988
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/802013002
|
|
TBR=tsepez
Review URL: https://codereview.chromium.org/804463003
|
|
-remove parameter from FPDF_InitLibrary
-remove a bunch of ifdefs that are unused
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/801913002
|
|
BUG=411842
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/792113003
|
|
BUG=438421
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/790363002
|
|
BUG=429134
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/791223002
|
|
BUG=https://code.google.com/p/pdfium/issues/detail?id=86
a "<<" token should follow "trailer" but "<" will trick the parser to make trailer a hex string object.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/787753002
|
|
FX_ArraySize macro.
pdfium has numerous places where the number of elements in an array is
calculated with expressions like:
sizeof(cFormats)/sizeof(FX_LPCWSTR)
This is suboptimal because it is verbose, it is easy to get wrong, and
it cannot be determined through casual inspection whether the code is
correct. It will give incorrect results if cFormats is a pointer instead
of an array and it will give incorrect results if FX_LPCWSTR is not the
type of the array elements.
The FX_WSTRC macro in fx_string.h which I fixed was particularly scary
because it would silently misbehave if passed a pointer.
The FX_ArraySize macro which I have added and started using (taken from
arraysize in v8's macros.h) is easier to use and will always give correct
results. If passed a pointer it will fail to compile.
For this change I only fixed instances of sizeof(FX_LPCWSTR). There
appear to be about 150 other places in the pdfium code that could
benefit from using FX_ArraySize.
R=bo_xu@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/729293003
|
|
Since casts to FX_LPCWSTR have been shown to hide bugs I tried removing
more of them, targeting those places where a cast was used to force a
conversion from CFX_WideString to FX_LPCWSTR, replacing these casts with
calls to the newly added .c_str() function. This revealed two places
where the cast was hiding a bug -- where ->c_str() was required instead!
This removes ~33 FX_LPCWSTR casts and there are ~31 left, many of which
will go away in some future change.
Also includes this change:
Removing unnecessary casts from wchar_t* to wchar_t*, by various names.
Original patch from Bruce Dawson(brucedawson@chromium.org)
R=bo_xu@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/733693003
|
|
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/775903002
|
|
Review URL: https://codereview.chromium.org/770673004
|