Age | Commit message (Collapse) | Author |
|
PWL_FontMap does not need its own charset definitions. fx_edit.h does
not need to define DEFAULT_CHARSET. XFA have their own definitions.
They look different in that most are MAC or MSWin charset definitions.
So they are left untouched. public/fpdf_sysfontinfo.h duplicate ones
were left untouched due to being in public folder.
Review-Url: https://codereview.chromium.org/2347313002
|
|
CPDF_ImageRenderer::StartDIBSource.
Correct the compare logic in CPDF_ImageRenderer::StartDIBSource() by using size_t instead of int.
BUG=chromium:645036
R=ochang@chromium.org
Review-Url: https://codereview.chromium.org/2323663002
|
|
BUG=648127
Review-Url: https://codereview.chromium.org/2351623002
|
|
ProcessbCJK and CalculateFontDesc methods are used to reduce the code
duplication between AddFont and AddWindowsFont methods.
Review-Url: https://codereview.chromium.org/2341373003
|
|
CFX_FontCache refactoring:
after this CL: Only one global CFX_FontCache used. Any cached items from it, are released, when its are not used.
BUG=79367,48791
The fonts was not cleared after unloading pages.
Test pdf:
http://www.nasa.gov/pdf/750614main_NASA_FY_2014_Budget_Estimates-508.pdf
For this file, we have ~5 fonts per page, which equal ~1 Mb per page.
In this PDF we have 670 pages, as result after slow scrolling(reading) full document we have ~600 Mb fonts data in memory.
memory usage of PDF Plugin:
before this CL: ~660 Mb
after this CL: ~100 Mb
Review-Url: https://codereview.chromium.org/2158023002
|
|
Adds string hashes so CFX strings will interoperate with
STL unordered containers.
These will be employed per-document in a subsequent cl.
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2341683005
|
|
On Acrobat, if "/AP" is present on a text markup definition,
the coordinates used to draw the annotation come from "/Rect
values, whereas if "/AP" is not defined, the array defined
in /QuadPoints is used to grab the annotation coordinates from.
PDFium, on the other hand, uses "/Rect" regardless of
presence or absence of "/AP".
CL fixes PDFium to work similarly to Acrobat, in this case.
TEST=testing/resources/pixel/bug_585_*.in
BUG=pdfium:585
Review-Url: https://codereview.chromium.org/2289293005
|
|
CPDF_Font::UnicodeFromCharcode returns 0 only if ToUnicode map maps the
charcode to 0. CPDF_SimpleFont::UnicodeFromCharcode and CPDF_CID_Font::
UnicodeFromCharCode return 0 only if the call to CPDF_Font returns 0.
In other cases, these methods return an empty string. So when
processing text, a 0 return from the method should not be replaced
with the charcode.
BUG=pdfium:583
Review-Url: https://codereview.chromium.org/2342073002
|
|
Strings are never less than themselves, and this will occur given
the shared CoW nature of these strings.
Review-Url: https://codereview.chromium.org/2347433004
|
|
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For.
BUG=pdfium:596
Review-Url: https://codereview.chromium.org/2334323005
|
|
Deleted parameter from callers, who also do not use it.
Review-Url: https://codereview.chromium.org/2337973004
|
|
CFX_FaceCache::LookUpGlyphBitMap should remember its unsuccessful glyph
bitmap calculations. This is especially important if there are a lot of
repeated requests for the same glyph with large bitmaps (which means
long calculations in freetype). With this CL, the pdf in the bug below
will be rendered quickly.
BUG=chromium:638856
Review-Url: https://codereview.chromium.org/2338883004
|
|
Remove unused params and methods. Cleanup formatting.
Review-Url: https://codereview.chromium.org/2322003002
|
|
This CL updates all of the includes to be correctly sorted. A PRESUBMIT warning
is added (from chromium) that will warn if the includes are in the wrong order on upload.
Review-Url: https://codereview.chromium.org/2337293002
|
|
BUG=
Review-Url: https://codereview.chromium.org/2338623005
|
|
Review-Url: https://codereview.chromium.org/2341453002
|
|
Review-Url: https://codereview.chromium.org/2340513002
|
|
Avoids a needless alloc and copy.
Review-Url: https://codereview.chromium.org/2338553002
|
|
Wide strings compare just fine on their own.
Review-Url: https://codereview.chromium.org/2331233002
|
|
Removes some unused code for the default implementation,
Review-Url: https://codereview.chromium.org/2332983002
|
|
We should not use DR field from annotation/field dictionaries, since
these are not supposed to have one. In PDF spec 1.7, DR is defined only
for the form dictionary, in 8.6.1. In addition, note 118 in Appendix H
says "In PDF 1.2, an additional entry in the field dictionary, DR, was
defined but was never implemented. Beginning with PDF 1.5, this entry
is obsolete and should be ignored."
The changes in CBA_FontMap fix the bug below. The changes in
cpvt_generateap do not affect the bug but follow the reasoning from
the above paragraph.
BUG=pdfium:538
Review-Url: https://codereview.chromium.org/2337673002
|
|
The fx_codec_jpx_opj code will attempt to do a 1 << (prec - 1). If the prec
value is >=32 then that shift will overflow the int value. This CL adds a check
that prec is < 32 before attempting the shift.
BUG=chromium:633208
Review-Url: https://codereview.chromium.org/2334823002
|
|
- Methods GetPagesDict, ProcessNonbCJK, CalculateFlags, and
CalculateEncodingDict created to reduce duplicated code.
- Code nits
Review-Url: https://codereview.chromium.org/2323793003
|
|
BUG=645186
Review-Url: https://codereview.chromium.org/2326103002
|
|
BUG=627399
Review-Url: https://codereview.chromium.org/2328003002
|
|
This may be a better design because it avoids having a level
of indirection that the Observer required.
Review-Url: https://codereview.chromium.org/2326763002
|
|
Previously, PDFium only supported widget annotations to draw forms. As
we've implemented other annotations, the behavior of
FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw changed. So, this CL
clearly defines what needs to be done in FPDF_RenderPageBitmap_Retail
and FPDF_FFLDraw.
This CL first assumes that PDFium users will always call
FPDF_RenderPageBitmap_Retail and FPDF_FFLDraw to render PDF pages,
because otherwise they are not able to support PDF forms.
FPDF_RenderPageBitmap_Retail should only deal with non-widget
annotations, such as highlight, underline, text, etc. If
FPDF_ANNOT flag is passed, non-widget annotations are drawn. Otherwise,
they are hidden.
FPDF_FFLDraw should only deal with annotations that requires
user-interaction, such as widget annotations and popup annotation. Since
popup annotation is associated with non-widget annotation, they should
not be drawn if the associated annotation is hidden. Thus, if FPDF_ANNOT
flag is passed, popup annotations are drawn. Otherwise, they are hidden.
Widget annotations should be always drawn regardless of FPDF_ANNOT flag
since they need to be always displayed for PDF forms.
Also, roll DEPS for testing/corpus to 8485b30.
BUG=pdfium:594
Review-Url: https://codereview.chromium.org/2323203002
|
|
Review-Url: https://codereview.chromium.org/2324733003
|
|
Review-Url: https://codereview.chromium.org/2323933002
|
|
CFX_ByteString cannot properly check whether the contents string is empty
because the first two bytes of text strings encoded in Unicode are always ASCII
254 followed by 255. So if we get contents in CFX_ByteString, the length will
always be 2.
Also, roll DEPS for testing/corpus to 608bf04.
Review-Url: https://codereview.chromium.org/2293403003
|
|
A few issues are fixed:
--Change variable |m_bLogic| in CFX_Font to |m_bShallowCopy| to
reflect its meaning better;
--For a shallow copy of font, we must guarantee that the copied font
will not be deleted until the shallow copy is deleted. So need to
increase the src font's refcount when copying it;
--The stream |m_pOwnedStream| needs to have matched new/delete
These errors need to be fixed before we can properly delete all the
fonts to address the leaks.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2322043002
|
|
Previously, the observer set a flag which conditionalized a null
pointer return. Now, we just clear the pointer.
Destruction order matters, so add a method to trigger notifications.
Review-Url: https://codereview.chromium.org/2322743002
|
|
We know the values are always valid at this point, so use ValueOrDie instead
of ValueOrDefault.
BUG=chromium:637984
Review-Url: https://codereview.chromium.org/2319343003
|
|
Review-Url: https://codereview.chromium.org/2311343003
|
|
Verify the provided image size is within bounds before loading.
BUG=chromium:639160
Review-Url: https://codereview.chromium.org/2323473002
|
|
When calculating the starting x and y for a pattern it is possible to overflow
the int value. Use checked math to make sure we don't overflow.
BUG=chromium:637984
Review-Url: https://codereview.chromium.org/2317283002
|
|
Use the shared copy-on-write version instead of the underlying
CFX_GraphStateData since it may not always get modified.
Review-Url: https://codereview.chromium.org/2316823002
|
|
Review-Url: https://codereview.chromium.org/2313083002
|
|
The FX layer is spying on its private data, so make the job
of ref-counting it live in FX as well, instead of up a layer
at pdfapi.
Pre-cursor to making this private and passing the graph
state itself everywhere.
Review-Url: https://codereview.chromium.org/2314223002
|
|
Review-Url: https://codereview.chromium.org/2312743005
|
|
Review-Url: https://codereview.chromium.org/2311313002
|
|
- Rename fx_ge_font.cpp to cfx_font.cpp
- Deleted unused CONTRAST_RAMP_STEP in fx_ge_text.cpp
- Move CFX_Font definitions and auxiliary methods in fx_ge_text to cfx_font
- Remove extern "C", static, and underscore prefixes in new namespace
methods in cfx_font.cpp
Review-Url: https://codereview.chromium.org/2304493005
|
|
By doing this, we simplify the code in cpvt_generateap.cpp,
and avoid calling CPVT_GenerateAP methods altogether,
when it is known that they are bailing out.
This is a preparation to fix pdfium bug 585.
BUG=pdfium:585
Review-Url: https://codereview.chromium.org/2310873002
|
|
Review-Url: https://codereview.chromium.org/2310693002
|
|
Make Data private to the ClipPath class which manages it
transparently for its callers. This prevents the callers
from having to remember to make a copy before dirtying the
shared data, since the operations that modify state will do
this under the covers for us.
Review-Url: https://codereview.chromium.org/2301263003
|
|
The default assignment operator will suffice and allows
us to write matrix1 = matrix2;
Review-Url: https://codereview.chromium.org/2307953003
|
|
All interaction goes through the CPDF_GeneralState, which
manages the underlying storage transparently to the callers.
Make StateData use a real string and a real matrix rather
than C-style arrays.
Review-Url: https://codereview.chromium.org/2302683002
|
|
Review-Url: https://codereview.chromium.org/2305103002
|
|
Remove a const cast along the way and propagate to callers.
Review-Url: https://codereview.chromium.org/2303553002
|
|
When we create popup annotations, we also create the dictionary
associated with it. For regular annotations, the dictionary
associated with an annotation is not owned by annotation,
and will be released separately. But our created dictionary is not
associated with any other data structure, it would be leaked if not
released by the associated annotation.
Add a boolean to indicate the ownership to the dictionary, and release
the owned dictionary during the destruction of an annotation.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2301613002
|