Age | Commit message (Collapse) | Author |
|
This CL separates the CPDFDoc_Environment, CPDFSDK_Document and CPDFSDK_PageView
classes into their own h and cpp files.
Review-Url: https://codereview.chromium.org/2335243002
|
|
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
|
|
Use CFX_DefStore to only replace CFX_FixedStore, but not
CFX_StaticStore, since CFX_StaticStore has different behaviors.
CFX_StaticStore doesn't require its users to explicitly call free(),
it frees all the allocated memory during destruction. Use
CFX_DefStore to replace CFX_StaticStore would cause leaks.
Also remove two undeclared, but defined, functions.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2328403002
|
|
When setting a new value for a V8 object property, the passed along
pointer of CFXJSE_Value is only used, but needs to be released by the
original owner. Use unique_ptr to have the pointer released
automatically.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2328273004
|
|
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
|
|
Review-Url: https://codereview.chromium.org/2337583002
|
|
First of several patches to ensure JS objects don't track
stale C++ objects.
Review-Url: https://codereview.chromium.org/2323903002
|
|
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/2331453002
|
|
given convert color type.
Previously, it compred the given convert color type with itself. So
CPWL_Color::ConvertColorType never converted the color into the given
type.
Review-Url: https://codereview.chromium.org/2326883002
|
|
Review-Url: https://codereview.chromium.org/2324733003
|
|
Reland of Fix leaked internal font (patchset #2 id:60001 of
https://codereview.chromium.org/2297303004/ )
In CFGAS_FontMgrImp::LoadFont(), a new internal font is created which
is never released. It needs to be correctly marked as internal font to
be released. Fix this by adding a new method to take the ownership
of the font and mark it as internal font properly.
The previous revert was caused by memory management errors
which were fixed at https://codereview.chromium.org/2322043002/
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2320213002
|
|
Review-Url: https://codereview.chromium.org/2323933002
|
|
In https://pdfium.googlesource.com/pdfium/+/461eeafe191068ac8c32f2717907fc6a22a667d2
we moved the map cleanup for the page view to happen before the page view was
destroyed and before we killed the annotation focus.
The map removal must happen before the pageview is destroyed, but must happen
after we've killed the annotation focus in order to not create duplicate page
views which point to the same page.
BUG=chromium:645122
Review-Url: https://codereview.chromium.org/2320253002
|
|
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
|
|
Avoid a couple of places where we copy the raw string back into a
brand-new widestring.
There are a few places where the difference between a null
ptr and an empty string control the logic, and I left these
as-is. Other places can just take the string by const ref.
Review-Url: https://codereview.chromium.org/2323493002
|
|
Clean up before using IDS_STRING_JSBADOBJECT in nearly
all JS callbacks, which will happen in the next CL when we
watch C-side object destruction.
Add a "no permission" message as well.
Review-Url: https://codereview.chromium.org/2319543003
|
|
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
|
|
Two leak cases are addressed here:
--In CFGAS_FontMgrImp::LoadFont(), calling LoadFace() is unnecessary
since the following LoadFile() does the exact same thing. Calling
LoadFace() without releasing the loaded face results in a leak;
--|m_Hash2Fonts| in class CFGAS_FontMgrImp owns all the fonts stored
in it. The fonts need to be deleted along with the container.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2322483003
|
|
Review-Url: https://codereview.chromium.org/2318423002
|
|
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
|
|
There are several issues when CPDFSDK_PageView and CPDF_Page interact,
especially around deletion. This Cl fixes up several places where things
go wrong working with these objects.
BUG=chromium:632709
Review-Url: https://codereview.chromium.org/2319663002
|
|
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
|
|
When unloading a page in the embedder tests we need to cleanup the internal
page map so if we load the page a second time we don't get a previously unloaded
page.
Review-Url: https://codereview.chromium.org/2322523002
|
|
This Cl moves the observer code from the CPDFSDK_Widget up into the
CPDFSDK_Annot base class and then adds a second observer for CPDFSDK_BAAnnot
objects.
This allows us to attach an observer to the Annot javascript class which will
update its internal pointer to the BAAnnot if the BAAnnot is destroyed by
the CPDFSDK_PageView being destroyed.
BUG=chromium:642307
Review-Url: https://codereview.chromium.org/2306663002
|
|
Review-Url: https://codereview.chromium.org/2313083002
|
|
When removing a field from the document we can force the recreation of a
CPDFSDK_PageView by passing |true| as the last parameter to |GetPageView|. This
will force a new page view to be created so we can delete a field from it and,
we then end up with a dangling PageView.
This CL passes |false| to |GetPageView| and skips removing the widget if we
do not receive a pageView back from the document.
BUG=chromium:644219
Review-Url: https://codereview.chromium.org/2312023004
|
|
Previous attempt: https://codereview.chromium.org/2289263005
It failed for the PDFium inside Chromium use case.
This time the paths are relative.
Review-Url: https://codereview.chromium.org/2308873002
|
|
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
|
|
This incorporates the changes from the following Chrome Skia build modifications:
https://codereview.chromium.org/2301233002/
This file is provided by the Skia repo so the GN Chrome build doesn't have
to make assumptions about the location and layout of Skia's GYP files.
https://codereview.chromium.org/2299033006
Remove Skia GYP files from Chromium tree.
Inlines the contents into the GN build.
Review-Url: https://codereview.chromium.org/2316653003
|
|
The call to png_set_pCAL can call into png_error for several reasons. This CL
verifies that the params are valid before calling into png_set_pCAL.
BUG=chromium:636214
Review-Url: https://codereview.chromium.org/2292313003
|
|
- 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
|
|
Review-Url: https://codereview.chromium.org/2307243002
|
|
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
|