Age | Commit message (Collapse) | Author |
|
fpdfsdk/ edition.
Review-Url: https://codereview.chromium.org/2381723002
|
|
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2345063002
|
|
Remove default arguments.
Review-Url: https://codereview.chromium.org/2380753003
|
|
Review-Url: https://codereview.chromium.org/2369323004
|
|
We implemented the CFX_Observable mechanism for detecting
stale objects some time ago; now just use it in more places.
Change method signatures to required an ObservedPtr to
indicate that the callers are aware that the value may be
destroyed out from underneath them.
BUG=649659
Review-Url: https://codereview.chromium.org/2368403002
|
|
Apart from the IPWL_Filler_Notify overrides, none of
these are overriden because there are no subclasses.
Review-Url: https://codereview.chromium.org/2372263002
|
|
It has no sub-classes or super-classes, so no need for virtual.
Review-Url: https://codereview.chromium.org/2365383003
|
|
In all cases, bool can be used instead without problems.
Review-Url: https://codereview.chromium.org/2368693002
|
|
Move the creation of the CPDFSDK_Document into FPDFDOC_InitFormFillEnvironment
instead of hidden inside a Get method in CDPFXFA_Document.
Review-Url: https://codereview.chromium.org/2353303004
|
|
More instances of CPDFSDK_Environment being called m_pApp in the code. Renamed
to m_pEnv to be clear that it's the environment not an app object.
Review-Url: https://codereview.chromium.org/2354413002
|
|
This CL moves the code from the .h file into the .cpp file.
Review-Url: https://codereview.chromium.org/2354363003
|
|
Also, it's idempotent, so simplify some logic in callers to
not care if objnum is zero.
The alternate forms are rarely used, using the objnum form
makes it clear that SetReferenceFor() can't possibly register
the object as a side-effect.
Review-Url: https://codereview.chromium.org/2361713002
|
|
Typically the I prefix means Interface, except for CFFL_IFormFiller where it
means Interactive. Rename CFFL_IFormFiller to CFFL_InteractiveFormFiller to
make the meaning explicit.
Review-Url: https://codereview.chromium.org/2357203003
|
|
The m_pApp variable holds a CPDFSDK_Environment. This Cl renames the variable
to be m_pEnv so as not to confuse with the various App classes that exist.
Review-Url: https://codereview.chromium.org/2357293002
|
|
We remove the indirect object holder argument and check that
call sites pass ownable objects, adding a reference in one
place that always was passing an indirect object.
Also check that the invariant isn't violated, we need to fail
here in the wild and investigate -- these are existing UAFs.
Review-Url: https://codereview.chromium.org/2355083002
|
|
This CL renames and cleans up some methods that are similar between
CPDF_Document and CPDFXFA_Document.
Review-Url: https://codereview.chromium.org/2351673004
|
|
Replace the CPDF_Stream(nullptr, 0, nullptr) pattern with
a default ctor.
Remove unused parameters from CPDF_Stream::SetData(). Both
are always passed as FALSE.
CPDF_Stream declared its own m_GenNum, which shadowed the one
in CPDF_Object. It was used only to distinguish file/memory
streams, so add a bool explicitly for this purpose.
Remove the union, it would be sad if we confused user data
with a C++ object with virtual function calls.
Use unique_ptrs with appropriate deleters to manage memory.
Review-Url: https://codereview.chromium.org/2347993002
|
|
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_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
|
|
Some '#define' and methods are not being used.
Review-Url: https://codereview.chromium.org/2340373002
|
|
This CL cleans up signatures and code in CFX_SystemHandler.
Review-Url: https://codereview.chromium.org/2341693003
|
|
Remove the FX_UINT typedef and update to use the actual unsigned int type.
Review-Url: https://codereview.chromium.org/2343693002
|
|
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
|
|
The prefix doesn't add anything when used in CPDFSDK_Environment, remove.
Review-Url: https://codereview.chromium.org/2338303002
|
|
CPDFDoc_Environment does not fit with the general naming scheme of the rest of
the files in fpdfsdk. This CL updates the naming to CPDFSDK_Environment to
better fit with the surrounding files.
Review-Url: https://codereview.chromium.org/2333413003
|
|
[DO NOT COMMIT]
This CL renames IXFA_DocProvider to IXFA_DocEnvironment to better describe the
purpose. Then, CPDFXFA_Document has all of the IXFA_DocEnvironment methods
removed and placed in CPDFXFA_DocEnvironment. The CPDFXFA_Document then
has a CPDFXFA_DocEnvironment.
This splits the code related to the document apart from the XFA callback methods
to work with that document.
Review-Url: https://codereview.chromium.org/2328573002
|
|
Remove unused params and methods. Cleanup formatting.
Review-Url: https://codereview.chromium.org/2322003002
|
|
Remove methods that always just return without doing any work. Clean up the
IXFA_DocProvider interface calls for those methods and cleanup the callers
that were calling the methods.
Review-Url: https://codereview.chromium.org/2323523002
|
|
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
|
|
There's a separate, different FX_DATETIME in XFA. Once we remove
memcpy(), there's no reason to have the inner struct for sizing.
Review-Url: https://codereview.chromium.org/2333213005
|
|
Review-Url: https://codereview.chromium.org/2341453002
|
|
Review-Url: https://codereview.chromium.org/2340513002
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Review-Url: https://codereview.chromium.org/2318423002
|
|
Review-Url: https://codereview.chromium.org/2311343003
|
|
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
|
|
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
|