Age | Commit message (Collapse) | Author |
|
This CL moves CJS_Return to its own files and moves the remaining
function definitions from JS_Value to JS_Define.
Change-Id: Ic7058a02330153f22d1fff9fc6cdebd9167c498b
Reviewed-on: https://pdfium-review.googlesource.com/17038
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves JS_Object.{cpp|h} to cjs_object.{cpp|h} and splits the
cjs_embedobj out to its own files.
Change-Id: I8eced9c613455638f4adeefd60e67f38c0c3c1a6
Reviewed-on: https://pdfium-review.googlesource.com/17036
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames fpdfsdk/javascript/Document.{cpp|h} to
fpdfsdk/javascript/cjs_document.{cpp|h}. The CJS_PrintParamsObj is split
out into cjs_printparamsobj.{cpp|h}.
Change-Id: I29377e7e60b576790fab01e4293c0c1f86339a56
Reviewed-on: https://pdfium-review.googlesource.com/17032
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CJS_Array wrapper and uses the v8 objects directly.
Change-Id: I904f76e59e27d65db4b4d0bbd503fddb3e8cfc6f
Reviewed-on: https://pdfium-review.googlesource.com/16830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CJS_Date class and uses the v8::Local<v8::Date>
directly.
Change-Id: I4a59b0076bc0e5dc3142b36bd7125115605d416f
Reviewed-on: https://pdfium-review.googlesource.com/16811
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL converts CJS_Date to a thin wrapper around a
v8::Local<v8::Date>.
Change-Id: I1510ae5ff7757677e4fe18deac4593cc75493c1b
Reviewed-on: https://pdfium-review.googlesource.com/16810
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Not used anywhere, Removed.
Change-Id: Idbdbe36e34fe97deceeb68601b0ceee31f4fdc35
Reviewed-on: https://pdfium-review.googlesource.com/16770
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the out parameters from the JS methods and changes the
return from a |bool| to a |CJS_Return| value. The return value holds the
returned v8 object, error string and a status code.
Change-Id: I82488ff0d916475d7e3c8e51ed868639806181c9
Reviewed-on: https://pdfium-review.googlesource.com/16751
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the JS set_* methods and the JSMethod methods to accept
v8::Local<v8::Value> objects instead of CJS_Value objects.
Change-Id: I6de41305deff458eba515bdc3462522b502f74ad
Reviewed-on: https://pdfium-review.googlesource.com/16670
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves MaybeCoerceToNumber from CJS_Value to CJS_Runtime.
Change-Id: I22bb605045daa63f405ef256e4b8a5c7ffb78425
Reviewed-on: https://pdfium-review.googlesource.com/16617
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the IsArrayObject and IsDateObject methods and asks the
v8 objects directly.
Change-Id: I4e2b957dbdfcddb426270f72666fce83854d92e0
Reviewed-on: https://pdfium-review.googlesource.com/16616
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the GetType method from CJS_Value and, instead,
retrieves the value from the v8 object directly.
Change-Id: Ia8390f3ead163c09a39cae493e75fccdd41a0961
Reviewed-on: https://pdfium-review.googlesource.com/16615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes all of the To* methods on the CJS classes except for
ToV8Value.
Change-Id: If01263c8cfa557ef7b00f573ddbf68b591d5ae9a
Reviewed-on: https://pdfium-review.googlesource.com/16614
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes most of the CJS_Value constructors and leaves the
v8::Local<v8::Value> constructor as the only non-default construtor.
Change-Id: Ie98260d10eff645d0ca688b353e7d40ba1aac157
Reviewed-on: https://pdfium-review.googlesource.com/16611
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes all of the Set(*) methods from CJS_Value except for
Set(v8::Local<v8::Value>). All uses of Set are changed to convert to
a v8::Value before setting.
Change-Id: I6e4d2cebec42fce5c039dc0a3abe46086cfdd34f
Reviewed-on: https://pdfium-review.googlesource.com/16610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CJS_PropValue class and uses CJS_Value directly. The
various Set methods have been moved to CJS_Value and the runtime provided as
needed.
Change-Id: Ib5d3b9efc9b6cf8182be8f19af98599379c3d7db
Reviewed-on: https://pdfium-review.googlesource.com/16431
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes unused methods; renames Attach to Set and generally cleans up
the CJS_Value classes.
Change-Id: I858082100908f3bc51f4b58c11ceda3357fadc70
Reviewed-on: https://pdfium-review.googlesource.com/16430
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the fpdfsdk/javascript callbacks to have explicit
get/set methods instead of one method which worked differently
depending on the mode.
This allows better ownership of the passed in params, (get takes a *
and set takes a const&). The Value object was changed to have To*
and Set methods to make the code clearer compared to the operator<<
and operator>> overloading.
Bug:
Change-Id: Id6ff20a4e3252adfd0a78b643e50b9f095085018
Reviewed-on: https://pdfium-review.googlesource.com/16330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the FX_OS defines to have _OS_ in their names and drops
the _DESKTOP suffix. The FXM defines have been changed to just FX.
Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74
Reviewed-on: https://pdfium-review.googlesource.com/14833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Use one of the _FXM_PLATFORM_ macros we defined in fx_system.h
in its place.
Change-Id: Iabf56c2aa840927aa48532320b9cbf095b9b7b6e
Reviewed-on: https://pdfium-review.googlesource.com/10210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Because C++11 gives us std::isfinite(), std::isnan() and std::nan().
Bug: pdfium:459
Change-Id: I128f332ec908df6aff66ef76012288fd22d423ed
Reviewed-on: https://pdfium-review.googlesource.com/10190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Remove ifdef'd code for versions we know will no longer work.
Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb
Reviewed-on: https://pdfium-review.googlesource.com/10051
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Idcbff7db2f9cf0d6698702ca007be5a8b44c7760
Reviewed-on: https://pdfium-review.googlesource.com/6673
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Sed + minimal conversions to compile, including moving some
constructors into the .cpp file. Any that caused ASAN issues
during the tests were omitted rather than trying to resolve
the underlying issue.
Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335
Reviewed-on: https://pdfium-review.googlesource.com/5891
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This Cl drops the FXSYS_ from math methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I85c9ff841fd9095b1434f67319847ba0cd9df7ac
Reviewed-on: https://pdfium-review.googlesource.com/3598
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Save some space since none contain non-ascii characters.
Avoid allocating C++ WideStrings just to convert back to
UTF8 when defining properties.
Change-Id: Id94db21b32ee7a96856c35a09f7550b54599ae13
Reviewed-on: https://pdfium-review.googlesource.com/2826
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Move checks performed as part of JS_Value's object and array
handling back into FXJS, to ease removal of JS_Value in the future.
Remove some convenience routines in FXJS for objects, to shrink
API to be covered during testing.
Change some naming (number => double, string => widestring) to
make it clearer when there is a C++ type involved.
BUG=
Review-Url: https://codereview.chromium.org/2637503002
|
|
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
|
|
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
|
|
Review-Url: https://codereview.chromium.org/2227673005
|
|
Review-Url: https://codereview.chromium.org/2224113003
|
|
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
|
|
Also get rid of FXJS_ValueCopy() while we're at it.
BUG=pdfium:556
Review-Url: https://codereview.chromium.org/2215093002
|
|
Use ToV8Object() instead of CJS_Value cast operator.
Add some missing consts / explicits.
Move code into empty namespace.
Review-Url: https://codereview.chromium.org/2172813002
|
|
Review-Url: https://codereview.chromium.org/2174513002
|
|
Review-Url: https://codereview.chromium.org/2154503002
|
|
v8::Object::Clone() is deprecated, and gets us into trouble with
some corner cases. Create a new handle to the same object instead.
Remove FXJS_NewObject() and FXJS_NewObject2(), and replace with
direct assignments. Pass isolate to FXJS_NewNull() while were
at it, even though not needed, for consistency with all remaining
FXJS_New*() calls.
BUG=628106
R=jochen@chromium.org
Review-Url: https://codereview.chromium.org/2151023002
|
|
This change mainly contains files in fpdfsdk/ directory.
This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups plus removing an unused file and splitting
cxfa_eventparam out from fxfa.h
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2062313002
|
|
Review-Url: https://codereview.chromium.org/2031653003
|
|
The code may not cause error conditions, but can be improved. These
warnings include uninitialized variables, signed/unsigned mismatch,
redundant condition, and using bool in arithmetic operations.
Also remove a chunk of unused code.
BUG=chromium:613623, chromium:427616
Review-Url: https://codereview.chromium.org/2036203004
|
|
The Try-Catch object must live the whole lexical scope.
Without the giving a name to the object, this is equivalent to create a temporary that is destroy at the end of the statement.
/src/pdfium/pdfium/out/Debug/../../fpdfsdk/javascript/JS_Value.cpp:154:3: warning: object destroyed immediately after creation; did you mean to name the object? [misc-unused-raii]
This issue was found by clang-tidy
R=dsinclair
BUG=589955
Review-Url: https://codereview.chromium.org/1929513002
|
|
Avoid string duplication when the caller already has one.
Review URL: https://codereview.chromium.org/1883273003
|
|
This CL splits the IJavaScript.h file into the two inner classes and puts them
in the fpdfsdk/javascript folder.
Review URL: https://codereview.chromium.org/1847583004
|
|
The warnings generated by Clang. This is part 1 for some simple cases.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1840483003 .
|
|
BUG=
Review URL: https://codereview.chromium.org/1835693002
|
|
Added test case.
Several bugs going on here:
JS_LocalTime() ignoring argument and returning current time
and not factoring in the time zone adjustment.
Use of FXSYS_floor() silently casts result to float,
losing precision required to extract minutes and seconds.
Pre-existing wcsftime escapes not stripped.
BUG=pdfium:413
Review URL: https://codereview.chromium.org/1833053002
|
|
Remove some tables from .h file (risk of duplication).
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1814233005 .
|
|
This CL moves the files in fpdfsdk/src/ up one level to fpdfsdk/ and fixes
up the include paths, include guards and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1799773002 .
|