Age | Commit message (Collapse) | Author |
|
It merely includes a bunch of other .h files which are handled
better since we fixed IWYU.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1385983002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1374723004 .
|
|
BUG=539106
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1386823002 .
|
|
Also remove dead CJS_EmbedObj::{Begin,End}Timer code.
BUG=539107
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1384883002 .
|
|
Move the external isolate and embedder slot from the
IPDF_JSPlatforms struct supplied at the
FPDFDOC_InitFormFillEnvironment() call time to arguments to
the FPDF_InitLibraryWithConfig() call.
This has several benefits:
-- Avoids the crash that could happen if multiple
FPDFDOC_InitFormFillEnvironmen() calls should happen to be
made by an embedder with different slot values.
-- Down the road, for XFA, there may be XFA but no FormFill
environment.
We support both forms for the time being, until the chrome
side catches up, at which point we will deprecate the old
way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1367033002 .
|
|
BUG=537173
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1376093002 .
|
|
Follow-up from https://codereview.chromium.org/1366053003/
- use kPerIsolateDataIndex rather than magic constant 1.
- make a helper function for common code in JS_Define.h
- remove dead prototypes missed in earlier CL.
- fxjs_v8 can't include generic fpdfsdk includes (layering).
R=jochen@chromium.org
Review URL: https://codereview.chromium.org/1367813003 .
|
|
This reverts commit 3b4382a847b5a7439a3107512dbe54c317108579.
The difference between this CL and the one that failed is
fxjs_v8.cpp:271. In master, we pass the runtime information
as:
v8::isolate -> v8::Context -> FXJS Runtime,
but in XFA:
V8::Isolate -> PerIsolate struct -> FXJS Runtime.
The master way is more correct, in that FXJS_Runtime is 1:1
with v8 contexts and many:1 (in theory) with isolates.
It looks like the XFA branch missed a patch along the way.
I'll do that next.
Having made this change, the only data in the per-isolate
struct will be the ptr array (on master); it will also
include the XFA context (on XFA). I've kept the struct on
master for the sake of similarity.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1365733003 .
|
|
Reason for revert: embeddertests failed.
This reverts commit 70bc04b16646c92f221c5aa56831b01d6ec7c1ca.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1358263004 .
|
|
Work on this was first performed on the XFA branch, since
it has additional requirements (FXJSE layer) that needed
to be accomodated by the solution.
(cherry picked from commit ed7b2b50aa1744e0bc5a60bef12c61fa91d863b7)
Original Review URL: https://codereview.chromium.org/1351173002 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1354593004 .
|
|
This avoids some custom linked-list code. Also note that
we use a local copy to be sure we removed the same thing
that was added no matter how our callees may muck with the
handler.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1352393003 .
|
|
The Factory Design Pattern isn't buying us anything here over just new'ing
the object we want.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1360523004 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1349423006 .
|
|
Kill some now unused functions as a result.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1350703003 .
|
|
Re-arrange things in the header so function overloads are
next to each other, and related things are near each other.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1348693003 .
|
|
Currently, its hard to tell which functions come from the JS_
layer at fpdfsdk/include/javascript vs. which functions come
from the FXJS_V8 layer at fpdfsdk/include/jsapi. Until we
take up the task of using namespaces, at least make the
prefix consistent.
Move objects out of FXJS_V8 that are really part of JS_.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1347833002 .
|
|
This was guarded by an assert, but the path is hit.
BUG=528015
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1345923002 .
|
|
This forces the layer defined by fxjs_v8.h to be (more)
self-contained, so that it can be tested apart from the
CJS_* objects (in fpdfsdk/{src,include}/javascript. This
implies the array buffer allocator must be part of fxjs_v8.
One wrinkle is that we'd like to be able to test an isolate
upon which no native objects have been added, so some
initialization that would have occurred as part of object
definition must be made explicit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1338073002 .
|
|
First part of getting rid of CJS_RuntimeFactory. The factory design
pattern isn't appropriate here since we only ever make one kind of
object.
CJS_GlobalData is now perfectly capable of managing itself through
internal ref counts. I'm philosophically opposed to keeping ref-counts
outside the object (do you hear me std::shared_ptr, you're bad!)
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1338993005 .
|
|
Replace multiple #defines of the same strings with externs.
Fix strings mangled by interaction of # and clang-format.
Remove macros as possible.
Make more JS_ functions void and simplify.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1342433002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1335763002 .
|
|
It's too hard to keep mapping between v8 and fx abstractions; the lack
of transparency prevents those skilled in v8 only from working on this
code.
Apparently, the original intention was to confine v8 types to
fpdfsdk/{include,src}/jsapi, but fpdfsdk/{include,src}/javascript
is already well-polluted with v8 types.
Also remove no-op JS_SetThisObj().
Also remove unused ParserParams() [noticed because it was incorrectly
passing handles as pointers].
Also remove cast operator from CJS_Runtime and call GetIsolate()
explicitly.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1332973002 .
|
|
It's pointless to have an abstract interface and its only concrete
implementation defined in the same header. We can de-virtualize along
the way and get a small savings.
Rename CPDFSDK_BFAnnotHandler along the way, since its the only kind
of AnnotHandler, and I can't imagine what BF stands for.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1313733013 .
|
|
It's never instantiated, and any pointers to it are always NULL.
Also kill an unused arg to CPDFSDK_ActionHandler ctor along the way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1329583004 .
|
|
This, in turn, allows us to get rid of the DoJob method and its clumsy
mode parameter conditional.
Add explicit and consts, and remove pointless asserts along the way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1318543012 .
|
|
Fixes the remaining issues, except for JBIG2/Skia ...
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1298393003 .
|
|
Part 1. Move to headers so compiler can type check against
the definitions.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1299963002 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1297723002 .
|
|
They look too much like locals; use JSGlobalData and JSGlobalAlternate
instead. Kill some commented out code.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1289903004 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1288053005 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1284193005 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1287193005 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1292613003 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1293673003 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1286383004 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1287863002 .
|
|
- Delete unneeded CFFL_ComboBox::CanCopy() and friends.
- Delete unneeded CFFL_FormFiller::CanCopy() and friends.
- Delete unneeded CFFL_TextField::CanCopy() and friends.
- Delete unneeded FormFiller::DoCopy() and friends.
- Rename CFFL_FormFiller::On{Set,Kill}Focus to avoid conflicts.
BUG=pdfium:185
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/1283493004 .
|
|
Also add a presubmit that checks for this so I don't have to keep doing it.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
BUG=none
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1272653005 .
|
|
BUG=chromium:515718
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1269783005 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1256283005 .
|
|
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
|
|
- Bool functions should not return -1 for error.
- Bool variables should not be assigned 2
- Bool / int32_t prototypes should match.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254973004 .
|
|
It is never defined, and the declspec()s based on it appear
inconsistently used.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1257163002 .
|
|
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255293002 .
|
|
Try to reland this patch after fixing underlying issues that
caused it to be reverted.
fx_system.h is the only manual edit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1258093002 .
|
|
This is the javascript test failure at 320b2313d198.
The spec says they are booleans, not ints, so correct the behaviour now.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1242263010 .
|
|
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
|
|
Fully automatic change, execpt for cleanup in fx_system.h
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254703002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1249643003 .
|
|
- untabify as encountered.
- Only put single-statement method in .h file, move more
complex methods to .cpp (counting an if without braces as
a single statement, killing braces as needed).
- Move invariant arguments to constructor and make
corresponding members const.
- Make all members private and add accessor methods.
- Make existing accessor methods const where possible.
- Kill meaningless asserts.
- Add helper functions in place of duplicate code.
- Rename GetCurrentDoc() to GetSDKDocument(), since the class
has two document members, one of CPDF_Document and one of
CPDFSDK_Document, making it clear which one you get.
- Simplify some logic with early returns.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1235393002 .
|