Age | Commit message (Collapse) | Author |
|
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
|
|
CPDF_HintTables::ReadSharedObjHintTable() unnecessarily constraints
a FX_FILESIZE value to an int32_t. Relax this check, since the result
will be stored in |m_szSharedObjOffsetArray| which is of FX_FILESIZE.
Bad values in |m_szSharedObjOffsetArray| will still cause hint table
loading to eventually fail.
BUG=635565
Review-Url: https://codereview.chromium.org/2230883003
|
|
This Cl fixes the CFDE_XMLSyntaxParser::ParseTextChar() to handle entities
where the value goes negative. Currently this could cause an undefined-shift
as due to the (ch << 4) calls. Instead, detect if the value has gone negative
and return a space character.
BUG=chromium:603489
Review-Url: https://codereview.chromium.org/2223823003
|
|
Use smart pointers instead of raw pointer to make memory management
easier for classes mainly under xfa/fxfa.
Also change the return type of IFGAS_FontMgr::Create() to smart
pointer type.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2227883002
|
|
Cleanup some dead code and c-style casts.
Review-Url: https://codereview.chromium.org/2235743003
|
|
As per the PDF specification in [1], page 103, the
'info' property of the Document object is readonly.
[1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf
Review-Url: https://codereview.chromium.org/2235883003
|
|
... rather then doing c-style type cast.
CL also tweaks the method body a bit to have more early-returns
rather than too-nested-if blocks.
No behavior change is expected, so no new tests are being added.
Review-Url: https://codereview.chromium.org/2230983003
|
|
Use smart pointers instead of raw pointer to make memory management
easier for classes under xfa/fwl/theme.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2230813002
|
|
- Return earlier when possible.
- Fail rather than crash on invalid values.
Review-Url: https://codereview.chromium.org/2235843002
|
|
files.
This is the third CL to separate fx_ge into classes, one per file.
All fx_ge.h includes had to be replaced with new includes
The method definitions for CFX_FxgeDevice were not moved to a single file.
These methods are defined in two folders different from fxge/ge, so they were left untouched for now.
Review-Url: https://codereview.chromium.org/2223213002
|
|
Review-Url: https://codereview.chromium.org/2227673005
|
|
BUG=pdfium:545
Review-Url: https://codereview.chromium.org/2229103003
|
|
CPDFSDK_ActionHandler are unclear. It does not add encapsulation, nor
simplicity to the logic.
CL is a driven-by clean up that merges CPDFSDK_FormActionHandler into
CPDFSDK_ActionHandler.
It takes the opportunity to delete CPDFSDK_ActionHandler (now) empty
constructor and destructor, in favor of compiler-generated ones.
No behavior change is expected, so no new tests are being added.
Review-Url: https://codereview.chromium.org/2227173002
|
|
BUG=pdfium:545
Review-Url: https://codereview.chromium.org/2194393002
|
|
This patch generates a default AP stream for ink annotation so that ink
annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to 4119f8e to test ink annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2232553002
|