Age | Commit message (Collapse) | Author |
|
Currently, when we destroy a CFFL_ComboBox we'll cleanup the fontmap and then
call the destructor for the parent type. This will case the PWL_Wnd to be
destroyed. In this case, the window is a PWL_Edit. On destruction it will reset
the focus which causes the text selection to change, which asks the font map
for data but we've already destroyed the font map.
This CL forces the destruction of the window earlier in order to have the
fontmap available. A followup bug is filed to correct the location of the
fontmap so we don't have this dependency.
BUG=chromium:637546
Review-Url: https://codereview.chromium.org/2266943002
|
|
Review-Url: https://codereview.chromium.org/2262703003
|
|
https://codereview.chromium.org/2253723002/ )
Reason for revert:
Causing asan issues. See crbug.com/639451.
Original issue's description:
> Move parser pointer to CPDF_Document
>
> The CPDF_IndirectObjectHolder has two subclasses, CPDF_Document and
> CFDF_Document. The CPDF document requires the parser and the CFDF document
> does not. This cl moves the parser pointer up to CPDF_Document.
>
> Committed: https://pdfium.googlesource.com/pdfium/+/260f5fbf3553a96fa49b029cc050220039c30e2a
TBR=tsepez@chromium.org,thestig@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
Review-Url: https://codereview.chromium.org/2266033002
|
|
BUG=pdfium:559
NOTRY=true
Review-Url: https://codereview.chromium.org/2265973002
|
|
The public API FPDFPage_New() incorrectly said to use FPDFPage_Delete()
instead of FPDF_ClosePage() to free the new page. This led to a page object
leak in an embedder test. Correct the public API description
as well as its usage in the embedder test.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2260683003
|
|
Moved ScopedFontTransform from fx_ge_text namespace to fx_font
Moved some arrays used by both CFX_Font and CFX_FaceCache from fx_ge_text to
inside CFX_Font class
Review-Url: https://codereview.chromium.org/2263623002
|
|
It was intended to be unsigned in the first place, and we're
perfectly happy with the overflow as long as it is no longer
undefined behaviour.
BUG=638489
Review-Url: https://codereview.chromium.org/2258053003
|
|
Review-Url: https://codereview.chromium.org/2262473002
|
|
The array buffer allocators are allocated and owned by pdfium code,
they should be deleted properly after the corresponding isolates are
disposed.
BUG=pdfium:242
Review-Url: https://codereview.chromium.org/2254123004
|
|
BUG=636559
Review-Url: https://codereview.chromium.org/2255083004
|
|
The PDF specification [1] says:
"
syncAnnotScan guarantees that all annotations will be scanned
by the time this method returns.
(..)
Normally a background task runs that examine every page and
looks for annotations during idle times.
"
The statement details specifically how Acrobat implements
this method.
Although, neither the method itself nor the background scanner
task are implemented in PDFium (as of today, Ago/2016),
not having ::syncAnnotScan at least stubbed out can be considered
harmfull since its absence makes JS acrobat scripts silently
fail when it has a call to it.
Given that, and following a stub-out pattern present in other
methods including ::addAnnot and ::addField, CL provides
a stubbed out implementation of Document::syncAnnotScan.
[1] http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
BUG=pdfium:492
Review-Url: https://codereview.chromium.org/2265553002
|
|
BUG=pdfium:562
Review-Url: https://codereview.chromium.org/2257313002
|
|
CL implements the first step in order to support
Annotations manipulation in PDFium: Document::getAnnot.
The method takes two arguments, an integer (page number)
and a string (annotation name).
When called, it iterates over the annotations on
the given page number, searching for the one whose name
matches the string in the second parameter.
If found, then an Annot instance (see Annot.cpp/g added by this
CL), is bound to a Javascript object and returned.
With the use cases described in bug [1] as an initial test case,
CL adds support to the following Annotation object properties:
- hidden
- name
- type
Idea is to keep evolving the implementation with more methods
and properties in follow up CLs.
[1] https://bugs.chromium.org/p/pdfium/issues/detail?id=492
BUG=pdfium:492
Review-Url: https://codereview.chromium.org/2260663002
|
|
Put class definition into its own header file so fuzzer can find it.
Fix a pair of div by 0s immediately hit by the fuzzer.
Review-Url: https://codereview.chromium.org/2253193003
|
|
Review-Url: https://codereview.chromium.org/2260533002
|
|
Currently the timers is a vector. When we cancel a timer we have an O(n) operation
to remove the timer. If there are a lot of timers (which this test has > 16k) this can
take a long time. The impact is a lot lower in Release, but the test is very slow in Debug.
From Linux on waterfall:
[ RUN ] FPDFFormFillEmbeddertest.BUG_634716
[ OK ] FPDFFormFillEmbeddertest.BUG_634716 (7855 ms)
From Linux try bot:
[ RUN ] FPDFFormFillEmbeddertest.BUG_634716
[ OK ] FPDFFormFillEmbeddertest.BUG_634716 (431 ms)
From Linux XFA Rel GYP on waterfall:
[ RUN ] FPDFFormFillEmbeddertest.BUG_634716
[ OK ] FPDFFormFillEmbeddertest.BUG_634716 (185 ms)
From Linux XFA Rel GYP try bot:
[ RUN ] FPDFFormFillEmbeddertest.BUG_634716
[ OK ] FPDFFormFillEmbeddertest.BUG_634716 (72 ms)
Review-Url: https://codereview.chromium.org/2251333002
|
|
If the control is not found in the CPDF_InterForm control map then
::GetControlByDict can return nullptr. This nullptr was not handled in
CPDFSDK_Widget::GetFormField(). This Cl propagates the nullptr back up to the
caller methods and fixes the returns as needed.
This is a speculative crash to fix the referenced bug.
BUG=chromium:637953
Review-Url: https://codereview.chromium.org/2256783003
|
|
Moved classes CFX_FontCache and CFX_AutoFontCache into a separate file.
Review-Url: https://codereview.chromium.org/2246223002
|
|
The CPDF_IndirectObjectHolder has two subclasses, CPDF_Document and
CFDF_Document. The CPDF document requires the parser and the CFDF document
does not. This cl moves the parser pointer up to CPDF_Document.
Review-Url: https://codereview.chromium.org/2253723002
|
|
Also, remove the #ifdef PDF_ENABLE_XFA that wraps the whole file.
Review-Url: https://codereview.chromium.org/2253193002
|
|
This CL moves classes in fsdk_baseform.h to their own files.
Classes include CPDFSDK_Widget, CBA_AnnotIterator, CPDFSDK_XFAWidget,
PDFSDK_FieldAction, and CPDFSDK_Interform.
Review-Url: https://codereview.chromium.org/2252723002
|
|
CL introduces a helper function to share the common
logic.
No new tests, since there is no behavior change.
Review-Url: https://codereview.chromium.org/2255843002
|
|
Recent Skia driver addition of 8 bit src / 8 bit dst workaround
needs to check for a nullptr bitmap.
R==dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2255763002
|
|
BUG=635848
Review-Url: https://codereview.chromium.org/2242213004
|
|
CFX_SubstFont::m_ExtHandle is never assigned a value different from nullptr.
Similarly, IFX_SystemFontInfo::RetainFont has two implementations.
Both of these return nullptr, so this method is not needed.
Review-Url: https://codereview.chromium.org/2252833002
|
|
Review-Url: https://codereview.chromium.org/2247073005
|
|
Now that PDFium supports drawing of more annotation
types, it should also respect the "hidden" flag that
annotations might feature.
For instance, in IE/Acroread if an annotation is flagged as
"hidden" it does not get drawn.
CL adds a check for the specific "hidden" flag, not drawing
annotation that are flagged with it, in order to match IE + acrobat
reader behavior.
The "flags" definition can be seen by looking at "/F {value}"
syntax in a PDF file source, where {value} is an predefined
integer value.
Test: PDF files being added in [1].
[1] https://codereview.chromium.org/2239713003/
BUG=62625
Review-Url: https://codereview.chromium.org/2239853002
|
|
The parser and document refer to async loading and parsing. The code isn't
actually async but loading a linearized PDF. This Cl renames the methods to
clarify what the code is doing.
The LoadDoc() and LoadLinearizedDoc() methods have been refactored to share
a common LoadDocInternal() method.
Review-Url: https://codereview.chromium.org/2250163002
|
|
Precursor to someday using possibly subclassed documents.
Review-Url: https://codereview.chromium.org/2248123002
|
|
Update the Skia DEPS revision
to a version that can handle
PDFium's use of SkComposeShader.
R=dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2249103002
|
|
Nearly all the "loose" functions in FXJS become methods on
the CFJXS_Engine.
This is the "missing link" wrt some layering violatons that
have been around forever. We can stop passing &m_ variables
from CJS_ down into FXJS Initialization as a result.
Review-Url: https://codereview.chromium.org/2245863002
|
|
And also CFX_RenderDevice::DrawNormalText().
BUG=637192
Review-Url: https://codereview.chromium.org/2244613002
|
|
Currently the GetWidget call will create a backing widget for a control behind
the scenes if it doesn't exist. This can cause more work to be done then needed
as we may need to create the page and any supporting structures. This created
structure will then be torn down as we don't need it anymore once we're done
with the widget.
For the instances where setting the value on the widget will have no effect (as
we'll destroy it anyway) we can tell GetWidget() to not create the widget and
return without doing any work.
BUG=pdfium:632709
Review-Url: https://codereview.chromium.org/2251453002
|
|
Return unique_ptr for GetLocale(), directly use destructors
instead of Release() functions, use vectors to manage arrays.
Review-Url: https://codereview.chromium.org/2241863002
|
|
BUG=635438
Review-Url: https://codereview.chromium.org/2248473002
|
|
Create a new class to hold these, CFXJS_Engine (could have been
called Runtime, but there are too many "Runtimes" already). In a
subsequent patch, all the FXJS_*() functions that take an isolate
as the first argument can become methods on the engine.
CJS_ must still manage the isolates; this happens outside
the engine.
The IJS_Runtime abstraction moves up to fpdfsdk/javascript; it
remains to allow for either a real JS library or a stubb one to
be linked (for non-js builds).
Review-Url: https://codereview.chromium.org/2241483004
|
|
Previously, Skia generated PDFs would only output one character at a
time, but now they output whole strings. Handle this case.
BUG=409472
Review-Url: https://codereview.chromium.org/2197553002
|
|
This CL moves classes in fsdk_annothandler.h, which are
CPDFSDK_AnnotIterator, CPDFSDK_AnnotHandlerMgr, IPDFSDK_AnnotHandler,
CPDFSDK_XFAAnnotHandler and CPDFSDK_BFAnnotHandler, to their own files.
Review-Url: https://codereview.chromium.org/2243623002
|
|
Review-Url: https://codereview.chromium.org/2248463002
|
|
Review-Url: https://codereview.chromium.org/2248453002
|
|
PDFs draw bitmaps with alpha by supplying an
image alpha mask along side the image color data.
The alpha mask may not be the same scale as the
image data. Skia doesn't have a direct mapping
for this draw call, but can come close by using
the internal SkCompositeShader class.
This scales the alpha mask to match the size of
the image data, then puts both in the composite
shader to draw.
There are more things to do:
- Allow Alpha8 or Gray8 to draw scaled to
a matching device (blit doesn't work today)
Temporary code marked with
a TODO implements this functionality.
- Refactor PDFium to allow SkComposeShader's
components to take a matrix.
The latter goal will defer drawing so that PDFium
doesn't resize the mask, discarding resolution,
before Skia has a chance to record it.
Additionally fix drawing text with a negative
font size.
R=reed@google.com,dsinclair@chromium.org,herb@chromium.org
Review-Url: https://codereview.chromium.org/2182763002
|
|
Review-Url: https://codereview.chromium.org/2241153002
|
|
Even 39 bits is very generous for the number of bits needed to represent
the greatest number of shared object references.
BUG=637119
Review-Url: https://codereview.chromium.org/2242723002
|
|
to fix bug 617135
617135 described an exploit against pdfium using a malformed gif.
This fix introduced a couple edge case handling lines to address
the OOB issue.
BUG= 617135
Review-Url: https://codereview.chromium.org/2230683002
|
|
Review-Url: https://codereview.chromium.org/2240863002
|
|
Analogous to getting the length of JS array, this result
should be a C++-side object only.
Also rename to FXJS_GetObjectProperty to match JS nomenclature.
Review-Url: https://codereview.chromium.org/2242593002
|
|
When the source bitmap's width and height are large,
the multiplication could easily overflow a signed integer.
Change to use 'long long' type for calculation to avoid that.
BUG=chromium:635663
Review-Url: https://codereview.chromium.org/2240723002
|
|
Review-Url: https://codereview.chromium.org/2236743002
|
|
Added methods to reduce duplicated code
Nit fixes
Review-Url: https://codereview.chromium.org/2239703003
|
|
The two methods in fgas_system also exist in core/fxcrt/include/fx_ext with the
FXSYS_ prefix instead of FX_. Remove the fgas_system files and use the
fx_ext versions instead.
Review-Url: https://codereview.chromium.org/2233133002
|