Age | Commit message (Collapse) | Author |
|
Using IsEmpty() is more readable than using GetCount() == 0.
Review-Url: https://codereview.chromium.org/2226113002
|
|
They're only related to the |app| object, not all embed's.
Alert() itself unused.
Review-Url: https://codereview.chromium.org/2224073002
|
|
The CJS_Timer is fairly far removed from JS itself, the
wrapper objects are CJS_TimerObj and TimerObj. Make it
sound less like them.
Having moved the code to app.cpp, the GlobalTimer can now
refer directly to the app, rather than its superclass of
CJS_EmbedObj. Hence we can pull some app-only timer
related methods out of the superclass.
Review-Url: https://codereview.chromium.org/2222043002
|
|
If the width of the CJBig2_Image is set to 0 then the stride_pixels will be
zero and when we divide we'll get a floating point exception.
If the width or height are zero then we can exit early without proceeding with
the rest of the constructor.
BUG=chromium:635008
Review-Url: https://codereview.chromium.org/2222843004
|
|
As per the PDF specification at [1]
"
This property specifies the document's URL.
".
IE/Acrobat supports it, and getting it implemented
would be one step forward in order to support Acrobat JS
script as the one in [2].
[1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf
[2] https://bugs.chromium.org/p/pdfium/issues/detail?id=492
BUG=492
Review-Url: https://codereview.chromium.org/2219183002
|
|
This is always available elsewhere, so save the bytes and ease
removal of CJS_Array since it now only contains a single v8 local.
Review-Url: https://codereview.chromium.org/2217253002
|
|
This is the second CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files. CFX_ClipRgn is moved to core/fxge/ge because it is only used in core/fxge. The header for CFX_PathData is left in core/fxge/include since it is used elsewhere.
Review-Url: https://codereview.chromium.org/2216853004
|
|
And use it where appropriate.
Review-Url: https://codereview.chromium.org/2224623002
|
|
Fix memory ownership model for PDFium timers.
The |app| class owns the CJS_Timer as part of its vector<unique_ptr>
to them.
The CJS_Timer "owns" its slot in the global ID to timer map, and
removes itself when it is destroyed. Nothing else deletes
from the global map. Deleting from the global map is
accompanied by a callback to the embedder to clear its
resources.
Next, the proper way to remove a CJS_Timer is by going
through the app, and having the app erase its unique ptr,
which then deletes the CJS_Timer, which in turn cleans up the
global map. Provide a CJS_Timer::Cancel static method to
do this conveniently.
There is a alternate path to the CJS_timer via JS and its
CJS_TimerObj. CJS_TimerObj owns a TimerObj that currently
points to the CJS_Timer. If the timer fires, and cleans
itself up, this can go stale.
Make the TimerObj maintain a weak reference via global
timer ID rather than a direct pointer to the CJS_Timer, so
that if the timer fires and is destroyed, future attempts
to cancel find nothing.
There is another path, where if the JS timer object is GC'd, then we
just clean up its CJS_TimerObj without touching
the actual CJS_Timers. We could make this match the spec
by calling into the new cancel routine as described above,
but it seems weird to have a timer depend on whether a gc
happened or not.
A subsequent CL will rename these objects to more closely
match the conventions used by the other JS wrappers.
BUG=634716
Review-Url: https://codereview.chromium.org/2221513002
|
|
Also get rid of FXJS_ValueCopy() while we're at it.
BUG=pdfium:556
Review-Url: https://codereview.chromium.org/2215093002
|
|
BUG=628304
R=thestig@chromium.org, ochang@chromium.org
Review-Url: https://codereview.chromium.org/2218783002
|
|
This is the first CL in an attempt to split up the classes in fxge/include/fx_ge.h into their own files.
Review-Url: https://codereview.chromium.org/2217663002
|
|
|l_nb_code_blocks_size|
BUG=628890
R=ochang@chromium.org
Review-Url: https://codereview.chromium.org/2212973002
|
|
For classes under xfa/fgas, xfa/fwl/basewidget, and xfa/fwl/core,
use smart pointers instead of raw pointer to make memory management
easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2207093005
|
|
Since CFX_BinaryBuf::GetBuffer() returns uint8_t*, casting to uint8_t*
is unnecessary.
Review-Url: https://codereview.chromium.org/2218633002
|
|
Use smart pointer to replace raw pointer type for class
owned member variables so that memory management will
be easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2208423002
|
|
We must look the timer up a second time since the callback
may have released it.
BUG=634394
Review-Url: https://codereview.chromium.org/2214003003
|
|
Adds more questionable invocations of ClearTimeOut().
Also, checking that nothing happened is fragile. Log at least
one thing to show that the code ran.
Review-Url: https://codereview.chromium.org/2218473002
|
|
Fix a file name to be consistent with its class name and header file
name.
Review-Url: https://codereview.chromium.org/2215813003
|
|
Review-Url: https://codereview.chromium.org/2218433002
|
|
BUG=624514
Review-Url: https://codereview.chromium.org/2204773003
|
|
TBR=msarett@google.com
Review-Url: https://codereview.chromium.org/2214543003
|
|
Review-Url: https://codereview.chromium.org/2206283004
|
|
Sync up with Chromium's copy of libpng.
Review-Url: https://codereview.chromium.org/2132263002
|
|
This patch generates a default AP stream for squiggly annotation so that
squiggly annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to a89e4fb to test squiggly annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2206773004
|
|
While we're at it, beef up existing test for non-cancellation.
In turn, fix test harness to implement intervals properly.
In turn, fix public documentation to be clearer about timers.
Also rename a few identifiers that sounded "off".
Review-Url: https://codereview.chromium.org/2211513002
|
|
This renames the file to match the class name.
Review-Url: https://codereview.chromium.org/2209823002
|
|
Review-Url: https://codereview.chromium.org/2210563002
|
|
For all classes under /fpdfsdk, use smart pointer to replace
raw pointer type for class owned member variables so that memory
management will be easier.
BUG=pdfium:518
Review-Url: https://codereview.chromium.org/2173253002
|
|
Fix CXFA_FMIdentifierExpressionn to remove the duplicate n.
Review-Url: https://codereview.chromium.org/2210543002
|
|
This moves the needed traverse strategies into their own files, removes the
unused one and cleans up the includes.
Review-Url: https://codereview.chromium.org/2207033002
|
|
When determining which params should be an object and which are a value it is
possible to overflow the int on the shift comparision (if there are more then
32 arguments).
This never happens in practise as it's a controlled list of method calls which
we pass objects for. Cap the check at 32 for the shifting so it doesn't
overflow. We can revisit and extend the value later if we ever have an internal
formcalc method that needs an object in a position greater then 32.
BUG=chromium:603490
Review-Url: https://codereview.chromium.org/2206253002
|
|
This patch generates a default AP stream for strike out annotation so that
strike out annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to ddc1938 to test strike out annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2206083002
|
|
This patch generates a default AP stream for underline annotation so that
underline annotations without AP stream can be displayed.
Also, roll DEPS for testing/corpus to cae29d1 to test underline annotations.
BUG=62625
Review-Url: https://codereview.chromium.org/2205543002
|
|
This CL cleans up the remaining doc_* files, splitting into .h and .pp files
as needed.
Review-Url: https://codereview.chromium.org/2190983002
|
|
Also make these private to ensure they aren't modified so as to
violate the bounds checks applied at creation time.
BUG=633002
Review-Url: https://codereview.chromium.org/2202013002
|
|
If the out_row_bytes is negative the alloc will fail. Verify the size before
alloc and bail if it's negative.
BUG=633381
Review-Url: https://codereview.chromium.org/2202283003
|
|
Also, use PaintOperation instead of bStrokingOperation in
CPDF_DefaultAppearance.
Review-Url: https://codereview.chromium.org/2197353002
|
|
This splits the doc_ocg, doc_vt and doc_basic files into individual class files.
Review-Url: https://codereview.chromium.org/2187073005
|
|
Document.cpp implements "getter" methods for some of the
Document object properties.
Some of the body of such methods are identical.
Patch introduces a ::getPropertyInternal private method
that gets rid of this duplication.
Namely the following properties' getters are cleaned up:
- "author", "creationDate", "creator", "keywords",
- "modDate", "producer", "subject" and "title"
No behavior change.
Review-Url: https://codereview.chromium.org/2202283002
|
|
The pointer a unique_ptr contains should be checked instead of the
pointer of the unique_ptr itself.
BUG=chromium:631912
Review-Url: https://codereview.chromium.org/2205573004
|
|
The first of several CLs to split the core/fpdfdoc/doc_* files up to individual
class files.
Review-Url: https://codereview.chromium.org/2192823002
|
|
This CL fixes up the crypto key copying code to better handle big endian
machines.
BUG=pdfium:147
Review-Url: https://codereview.chromium.org/2190123002
|
|
BUG=633387
Review-Url: https://codereview.chromium.org/2204793002
|
|
BUG=62625
Review-Url: https://codereview.chromium.org/2202063002
|
|
Speculative fix since I had trouble with the repro.
BUG=632709
Review-Url: https://codereview.chromium.org/2197793002
|
|
This patch generates a default AP stream for highlight annotation so that
highlight annotations without AP stream can be displayed.
BUG=62625
Review-Url: https://codereview.chromium.org/2193983002
|
|
Fix an unlikely memory leak in FPDFPage_InsertObject().
BUG=pdfium:545
Review-Url: https://codereview.chromium.org/2195643002
|
|
Review-Url: https://codereview.chromium.org/2196903002
|
|
BUG=409472
Review-Url: https://codereview.chromium.org/2193783002
|