Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
Review-Url: https://codereview.chromium.org/2304613004
|
|
https://codereview.chromium.org/2297303004/ )
Reason for revert:
asan bot doesn't like it, will investigate
Original issue's description:
> Fix leaked internal font
>
> 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 boolean parameter and pass it along
> during the creation of the font.
>
> BUG=pdfium:242
>
> Committed: https://pdfium.googlesource.com/pdfium/+/6708106e6a3d54f3370c871ebf6643d1ecf58999
TBR=thestig@chromium.org,dsinclair@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2302213002
|
|
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 boolean parameter and pass it along
during the creation of the font.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2297303004
|
|
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
|
|
calls.
Review-Url: https://codereview.chromium.org/2305443005
|
|
Fix up callers from CPDF_DataAvail.
Review-Url: https://codereview.chromium.org/2294383003
|
|
Review-Url: https://codereview.chromium.org/2298163004
|