Age | Commit message (Collapse) | Author |
|
Getting rid of more (FX_LPCWSTR) casts and fixing two bugs revealed by this.
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)
TBR=bo_xu@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/811593007
|
|
Fixing operator so that bCheckRight isn't always true. Unknown effect!
VC++'s /analyze points out that this expression:
FX_BOOL bCheckRight = type != 'D' || type != 'W';"
is always true. This means that the tests for the right edge of a word
Original patch from Bruce Dawson(brucedawson@chromium.org)
BUG=427616
TBR=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/822763003
|
|
Zero initialize ch to avoid possible bug - conditions are very subtle.
Whether ch and iRet are read without being initialized depends on complex
preconditions and cannot be determined by looking at these function.
Therefore it seems prudent to zero initialize them to avoid any risk.
BUG=427616
TBR=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/727083002
Review URL: https://codereview.chromium.org/793763005
|
|
Add the license back to ftmodule.h after the freetype 2.5.4 upgrade.
Review URL: https://codereview.chromium.org/815333002
Set the freetype options missing in the recent update.
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
|
|
Transform font size to user space for valid text size comparison.
BUG=438441
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/816153002
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/821493002
|
|
Update freetype to 2.5.4.
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
|
|
Fix a few windows compile warnings
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/817753002
|
|
Cleanup: Refactor some code into its own function in fpdf_text_int.cpp.
Also use stdlib algorithms in a few places.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/810223003
Conflicts:
core/src/fpdftext/fpdf_text_int.cpp
|
|
Cleanup: Remove a shadow variable in CPDF_TextPage::CloseTempLine().
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/816593002
|
|
Add a small LRU cache for the JBIG2 symbol dictionary.
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
|
|
Cleanup: Pass by const reference in fpdftext.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/790213005
|
|
Avoid duplicate definitions of JSCONST_n*Hash and QeTable variables.
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
|
|
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/818543002
|
|
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/814903002
|
|
This is a quick patch to fix the segv which occurs in pdfium_test when
the v8 external data is not provided. Fixing the full-up initialization
is left as a follow-on exercise.
Path manipulations remain a nuisance since we don't want to depend on a
particular /base library.
BUG=439793
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/810793004
|
|
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
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/811493002
|
|
Simplify PDFium by removing code that's not used in the open source repo.
-remove parameter from FPDF_InitLibrary
-remove a bunch of ifdefs that are unused
Fix build after previous commit.
TBR=tsepez@chromium.org
BUG=
Review URL: https://codereview.chromium.org/809513002
|
|
m_pColorSpace can not be NULL for image object with DCTDecode filter
BUG=411842
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/792113003
|
|
Do not do strict check of BitsPerComponent for RunLengthDecode filter
BUG=438421
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/790363002
|
|
Lab colorspace needs to be 3 component
BUG=429134
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/791223002
|
|
Trailer should be a dictionary object
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
|
|
This is needed as an aid to testing.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/788433002
|
|
BUG= https://code.google.com/p/pdfium/issues/detail?id=89
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/786523004
|
|
A minor change to make it obvious when generated/test XFA files are not
being fully processed.
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/732173003
|
|
Follow-up to work on (wide) string literals.
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/751113003
|
|
Using an incomplete type here avoids casting later on, and allows the
debugger to more easily dig through these data structures.
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/766183009
|
|
This patch merges the 3 commits in master branch into one
|
|
One table is also reformatted to put one entry per line for readability.
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/749273003
|
|
Update to openjpeg r2944
BUG=429139,430566,431288
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/758593002
|
|
Fix blank page issues caused by too strict check
Before this fix, PDF parser aborts the parsering process when detecting an error.
For this case, PDF parser just gives up parsering when it detects that the length of
image stream is incorrect. The solution to this case is to find the tag "endstream"
and "endobj" to calculate the length rather than aborting the parsering process.
BUG=433339
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/743263002
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/715133004
|
|
BUG=https://code.google.com/p/pdfium/issues/detail?id=82
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/743493004
|
|
Review URL: https://codereview.chromium.org/738433003
R=tsepez@chromium.org
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/741473003
|
|
|
|
|
|
BUG=https://code.google.com/p/pdfium/issues/detail?id=78
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/726143002
|
|
BUG=431770
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/728993002
|
|
Change from 'this' to L'this' and remove the cast that was hiding this mismatch.
Found by VC++'s /analyze. Warning was:
fpdfsdk\src\javascript\js_runtime.cpp(352) : warning C6276:
Cast between semantically different string types: char * to wchar_t *.
Use of invalid string can lead to undefined behavior.
This mismatch has been there as far back as the history goes (to May of this year).
It looks like a real bug to me. However I don't know the implications of this bug and why it would not have been noticed at run-time.
The code has been this way as far back as the git history goes, but that is only to May 2014.
Original patch from Bruce Dawson(brucedawson@chromium.org)
BUG=427616
R=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/705503004
|
|
This mirrors the changes made to .gyp files on the XFA branch. Chrome is
still building against the master branch, so the only meaningful way
to test this is locally.
R=dpranke@chromium.org
Review URL: https://codereview.chromium.org/727673003
|
|
Fixes android build error under stricter compilation modes.
TBR=bo_xu@foxitsoftware.com
Review URL: https://codereview.chromium.org/728943002
|
|
Adds GN build capability for pdfium_test.
TBR=dpranke@chromium.org
Review URL: https://codereview.chromium.org/720373002
|
|
BUG=401988
R=vitalybuka@chromium.org
Review URL: https://codereview.chromium.org/618073003
|
|
|
|
|
|
Fix bug with reading from uninitialized variable found by VC++'s /analyze.
The flag variable is conditionally initialized but unconditionally read.
Warning was:
src\fpdfapi\fpdf_page\fpdf_page_pattern.cpp(274) : warning C6001:
Using uninitialized memory 'flag'.
BUG=427616
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/703213004
Review URL: https://codereview.chromium.org/680173005
|
|
Review URL: https://codereview.chromium.org/706993004
|
|
|
|
61750 for dateField input "aaa" not dislpay;
update font map;
|