summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
AgeCommit message (Collapse)Author
2015-12-24Fix a bad virtual keyword removal from commit 0f6b51c.Lei Zhang
BUG=546744 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1542373002 .
2015-12-24Switch from nonstd::unique_ptr to std::unique_ptr.Lei Zhang
R=thakis@chromium.org Review URL: https://codereview.chromium.org/1547833002 .
2015-12-22Cleanup: Remove some dead code in CPWL_Note.Lei Zhang
TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1544953002 .
2015-12-10Remove CFX_AffineMatrix/CPDF_MatrixTom Sepez
These are synonyms for CFX_Matrix. Nothing but sed and manual deletion of 2 #defines in fpdf_parser.h and fx_coordinates.h R=thestig@chromium.org Review URL: https://codereview.chromium.org/1513363002 .
2015-11-24Add "Underlying types" to master.Tom Sepez
Change some master code to line up better with XFA, so that the XFA changes are additive when possible, rather than replacements. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1468253005 .
2015-11-20Add constant CPDFSDK_InterForm::kNumFieldTypesTom Sepez
Bumping this one line from 6 to 7 in XFA saves a bunch of diffs. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1458363005 .
2015-11-20Replace |CPWL_ComboBox::operator CPWL_Edit()| with explicit method.Tom Sepez
More casts go away. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1467653002 .
2015-11-19Add more overrides.Lei Zhang
Using Chromium's clang + build options, there's more override warnings. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1453643002 .
2015-11-12Remove relative includes.Lei Zhang
That refer to parent directories. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1434223002 .
2015-11-10Keep "static" objects per-context rather than per isolate.Tom Sepez
Every time we initialize a new v8::Context, we make a new set of pre-existing native objects, and overwrite the v8::Global handles to those in the previous set. Thus, we may be theoretically releasing some v8::Globals early. R=jochen@chromium.org Review URL: https://codereview.chromium.org/1424933013 .
2015-11-09Remove CFX_PtrArray usage in fpdfsdk.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1430213002 .
2015-11-06Fix all relative includes to core.Lei Zhang
Do some IWYU to fix build errors due to files that have no #includes but just happened to work previously because the #includes were in the right order. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1407423004 .
2015-11-06Fix all relative includes to public.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1415803007 .
2015-11-06Remove FXJS_GetRuntimeTom Sepez
Its pointless to have a function that gets the isolate given a v8::object, since v8 gives us that directly. Also remove some CreationContext() calls, since they are only used to get the isolate, and we can do so directly. R=jochen@chromium.org Review URL: https://codereview.chromium.org/1413733004 .
2015-11-05Fix all relative includes to third_party.chromium/2560chromium/2559chromium/2558chromium/2557Lei Zhang
- In non-standalone builds, use the provided jpeg library. - Run gn format over all the GN files. - Also roll DEPS for buildtools to c2f2598. BUG=541704 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425153006 .
2015-11-04Cleanup after syncing CPDFSDK_BAAnnotDan Sinclair
This cleans up various things after syncing BAAnnot to master. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1418043007 .
2015-11-04Backport CPDFSDK_BAAnnot from XFA.Dan Sinclair
On the XFA branch the CPDFSDK_Annot class has been turned into a base class with CPDFSDK_BAAnnot serving the purpose that was served by CPDFSDK_Annot. This CL pulls those changes into master to put it more in line with the XFA branch. (This removes ~600 lines from the fpdfsdk/ diff). R=thestig@chromium.org Review URL: https://codereview.chromium.org/1408073009 .
2015-10-30Clean up CPDF_AnnotList.Lei Zhang
- Remove dead code - Stop using CFX_PtrArray - Mark more things const - Fix style nits R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1425093003 .
2015-10-30Convert a bunch of raw pointers in fsdk_mgr to unique_ptrs.Oliver Chang
R=tsepez@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1425233002 .
2015-10-30Rip out the KillFocusAnnot call from CPDFSDK_PageView's destructorOliver Chang
Previously, blur event actions could potentially touch deleted PageViews as CPDFSDK_Document deletes the PageViews one by one. This also fixes a related issue: CPDFSDK_Document::SetFocusAnnot no longer does anything if the document is being destroyed. Otherwise, it eventually tries to use m_pEnv->GetSDKDocument() at which point has already been set to NULL by FPDFDOC_ExitFormFillEnvironment. R=tsepez@chromium.org, thestig@chromium.org BUG=512445 Review URL: https://codereview.chromium.org/1414353007 .
2015-10-30Fix incorrect CPDFSDK_PageView::CountAnnots(). (try 2)Lei Zhang
The original XFA version was correct, and the master version here is wrong. The two versions are now in sync, but incorrect. So we need to fix this here and then merge to XFA again. Also fix what are now incorrect uses of CountAnnots() and do some cleanups. BUG=543049 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1413973011 .
2015-10-30Revert "Fix incorrect CPDFSDK_PageView::CountAnnots()."Lei Zhang
This reverts commit 9dd9439d23d44d105db0950e33af0cc913a6cece. BUG=536967 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1421583005 .
2015-10-30Fix incorrect CPDFSDK_PageView::CountAnnots().Lei Zhang
The original XFA version was correct, and the master version here is wrong. The two versions are now in sync, but incorrect. So we need to fix this here and then merge to XFA again. BUG=536967 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406183007 .
2015-10-23Cleanup parts of CPDFSDK_AnnotIterator and CPDFSDK_PageView.chromium/2547chromium/2546Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1411203007 .
2015-10-22Remove unused CPDFSDK_InterForm::DoFDFBuffer.Dan Sinclair
This method isn't used anywhere and the implementation doesn't really do anything. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1405163003 .
2015-10-21More master side changes for convergence with XFA.Tom Sepez
- Add new CPDFSDK_Document::GetPDFDocument() - FPDFDocumentFromCPDFDocument() to match XFA - rename some JS variables to be consistent with XFA - remove unused param from CJS_GlobalData(). - kill dead code used XFA only. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1413883005 .
2015-10-21Remove FFL_Utils as it is unused.Dan Sinclair
None of the methods in this file are used and it is not included anywhere. Removing. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1417783004 .
2015-10-20Cosmetic changes in fsdk_define.hTom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1412123004 .
2015-10-19Remove unused CFFL_Notify.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1411963002 .
2015-10-19Remove dead code that was reactivated when fixing overrides.chromium/2545chromium/2544chromium/2543chromium/2542chromium/2541Lei Zhang
BUG=pdfium:205 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1409743004 .
2015-10-15Introduce CPDFPageFromFPFDPage()Tom Sepez
Abstracts the way that pages are passed to the embedder between XFA and master. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1406543004 .
2015-10-15Fix layering violation in CPDF_Document::FromFPDFDocument().Tom Sepez
Make this a function in the fpdfsdk/ layer, rather than a method in the core/ layer. Nothing in core should know about public FPDF types. BUG=pdfium:217 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1396283006 .
2015-10-14Next round of master changes to match XFATom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1401423004 .
2015-10-13Revert "Remove IPDFSDK_AnnotHandler interface."chromium/2535Tom Sepez
This reverts commit 633f1e436e1cced874a44a797f02c452eb3cf958. This restores IPDFSDK_AnnotHandler, which is pointless on master but useful on XFA. The small gain on master isn't worth the noise when diffing to XFA. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1408513002 .
2015-10-09Pass IJS_Runtime, not IJS_Context, to native object constructors.Tom Sepez
This better separates the two IJS_ classes, with the IJS_Context taking on its proper role of describing an event. There's no need for the event details for object creation, so this gets much cleaner. Move some JS error reporting code from CJS_Context to CJS_Runtime. Make InitInstance() and ExitInstance() voids, they always return TRUE and we never check the result anyways. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1389163007 .
2015-10-09Allow compiling PDFium without V8.Tom Sepez
Original patch from issue 1391843004 at patchset 1 (http://crrev.com/1391843004#ps1) Introduce a pdf_enable_v8 GYP variable, which controls a corresponding PDF_ENABLE_V8 #define, and bring in the real JS library when set. Otherwise, link against a stub JS runtime. BUG=pdfium:211 R=dml@google.com, jochen@chromium.org, thestig@chromium.org Review URL: https://codereview.chromium.org/1395733006 .
2015-10-07Rename IFXJS_Runtime and IFXJS_Context to IJS_.Tom Sepez
Nothing but sed. FXJS is a layer that makes it easier to define objects in V8, but has no knowledge of PDF-specific native objects. It could in theory be used to implement other sets of native objects. JS is the layer that implements PDF-specific native objects on top of FXJS. Therefore, the classes used to interface to JS should be named using IJS_. IFXJS_ is reserved for someday adding better API for FXJS iteslf. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1386173002 .
2015-10-06Remove unused global argument from FXJS_CONSTRUCTOR.Tom Sepez
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1389003003 .
2015-10-06Store object definition ID in each js_class.Tom Sepez
Avoids doing a lookup via FXJS_V8 for something already known in CJS layer. Also: Consolidate repeated code in JS macros. Remove knowledge that Document is global from FXJS layer R=thestig@chromium.org Review URL: https://codereview.chromium.org/1382263002 .
2015-10-06Make the vast majority of JS headers private to src/javascript.Tom Sepez
The fpdfsdk/include/javascript/IJavascript.h is the sole API. This required moving a creaton method to it from JS_Runtime. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1389783002 .
2015-10-05Remove JavaScript.hTom Sepez
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 .
2015-10-04Remove pointless CPDFSDK_PageView usage in CJS_Object / CJS_EmbedObj.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1374723004 .
2015-10-04Only call DefineJSObjects() once for the global V8 isolate.Lei Zhang
BUG=539106 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1386823002 .
2015-10-04CJS_Timer should observe CJS_Runtime destruction.Lei Zhang
Also remove dead CJS_EmbedObj::{Begin,End}Timer code. BUG=539107 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1384883002 .
2015-10-02Pass v8::Isolate to PDFium at init time.Tom Sepez
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 .
2015-10-02Do not call into formfiller code with a NULL PageView.Lei Zhang
BUG=537173 R=jun_fang@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/1376093002 .
2015-09-28Introduce kPerIsolateDataIndex and tidy JS_Define.hTom Sepez
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 .
2015-09-25Revert "Revert "Merge to master: contention over isolate data slots""Tom Sepez
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 .
2015-09-22Revert "Merge to master: contention over isolate data slots"Tom Sepez
Reason for revert: embeddertests failed. This reverts commit 70bc04b16646c92f221c5aa56831b01d6ec7c1ca. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1358263004 .
2015-09-22Merge to master: contention over isolate data slotsTom Sepez
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 .