summaryrefslogtreecommitdiff
path: root/fxjs
AgeCommit message (Collapse)Author
2018-06-04Lowercase JS_Define.{h,cpp} and CJS_Define.hTom Sepez
Consistency with file naming conventions. No functional change. Change-Id: I596c4be5bbf0510950c44a7d9d80f59537739c3b Reviewed-on: https://pdfium-review.googlesource.com/33593 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-06-04Make CJS_Objects track CJS_Runtime (and hence the document itself)Tom Sepez
Precursor to removing some more v8::Context slot dependency. There's a cost to maintaining the set of observers, but since these objects are tied to V8 lifetimes, not C++ lifetimes, we want to be very wary of the document going away unexpectedly. Change-Id: I579f58a460aa50b88cb861227c9aca9a8a83ce12 Reviewed-on: https://pdfium-review.googlesource.com/33471 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-04cjs_globalconsts.cpp need not use v8::Context slotsTom Sepez
Small step towards deprecating FXJS's use of v8::Context slots. Reduces some string constant storage size while were at it by avoiding wide literals for ascii strings. Change-Id: Ibc651cff264302681645fde7c53bf77517b97651 Reviewed-on: https://pdfium-review.googlesource.com/33470 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-06-04Revert "Make CPDF_Document cache CPDF_Pages"Tom Sepez
This reverts commit f0d9d28a034fe3650c3c2d662090c1e8687ddb16. Reason for revert: avoid parsing page. Change-Id: Id3478f7e38f1cbe95d098e00158b1d7d9dc6f76e Reviewed-on: https://pdfium-review.googlesource.com/33750 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04Revert "Make common page base class for XFA and non-XFA."Tom Sepez
This reverts commit d06cc38b76685b002c51b227ae43b8314d926ad8. Reason for revert: blocking previous revert Change-Id: I74f8b80852c671440cca5fabef30e69cde9e2063 Reviewed-on: https://pdfium-review.googlesource.com/33713 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-06-04[xfa] Get properties from the non-xfa global if possibleDan Sinclair
When script variables are used the methods are set on the non-xfa global object. This CL updates the NormalPropertyGetter to check the non-xfa global object for methods which allows the variables methods to be found. Bug: pdfium:1097 Change-Id: I13d9d49ad654cad776883aef74de6250de5e756b Reviewed-on: https://pdfium-review.googlesource.com/33433 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-06-01Fix XFA guardsRyan Harrison
These guards are using #if, when they should be using #ifdef. Caught using Clang's static analyzer. Change-Id: I86e99c5e4142cf84fff5f2365ad534f09ae40511 Reviewed-on: https://pdfium-review.googlesource.com/33510 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-05-31Update fxjs READMETom Sepez
TBR=dsinclair@chromium.org Change-Id: I6f2a4a4b39c38a1bcfcf817a5c2aa51414291ad9 Reviewed-on: https://pdfium-review.googlesource.com/33451 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-31Make FXJSE variable context compatible with FXJS.Tom Sepez
Allows FXJS to be entered directly from V8 when the variable context gets a reference to an FXJS object. Bug: pdfium:1066 Change-Id: I48e39ed9104cc6df31c19d94fa7e0f8c7760932f Reviewed-on: https://pdfium-review.googlesource.com/33450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-31[xfa] Remove unused methods from CFXJSE_ScopeUtil_IsolateHandleContextDan Sinclair
Methods are not called, removed. Bug: pdfium:1097 Change-Id: I0c7bc8ded070002dd5eb980a4705eabb829fb6ec Reviewed-on: https://pdfium-review.googlesource.com/33390 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-30Make common page base class for XFA and non-XFA.Tom Sepez
Now that both are ref-counted, we can replace ifdef's with some polymorphism. Bug: pdfium:760 Change-Id: Ie22ea259c9af56fa569f0af268b8e7065789a3f2 Reviewed-on: https://pdfium-review.googlesource.com/32892 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-30[xfa] Dump JS errors to console in debug modechromium/3446Dan Sinclair
This CL writes any JS exceptions to the console in XFA if running in Debug mode. This makes it possible to see when an error happens in JS execution. Bug: pdfium:1097 Change-Id: Ida14050328c5e6e85ab2704bb5dddfec370dddf1 Reviewed-on: https://pdfium-review.googlesource.com/33154 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-30Make CPDF_Document cache CPDF_PagesTom Sepez
We cache pages not by page number, which can bounce around as pages are inserted or removed, but by page dictionary's object number. Since the page may be created under one function and used under another, we can't take the shortcut of not instantiating a render cache nor not parsing the page. Change-Id: I9a325cda8b3141153544ac53e78a51a44e6b411a Reviewed-on: https://pdfium-review.googlesource.com/32830 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-29[xfa] Propagate the xfa change data for text to JS and back.Dan Sinclair
This CL adds the necessary plumbing to propagate the change information for a text widget from FWL out to JS and handle the returned value as necessary. Bug: pdfium:1066 Change-Id: I78fd81761b90294f1836e9f09dba12ed238963cc Reviewed-on: https://pdfium-review.googlesource.com/33070 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-25Make CPDF_Page retainable.Tom Sepez
Small step to reducing the differences between XFA and non-XFA. We still use the RetainPtr pretty much as if it were an unique_ptr, in that we're not yet caching pages and handing out multiple pointers to the same page in the non-XFA case. The one change is in page view cleanup, where we no longer need a boolean and can take (sufficient) page ownership with a RetainPtr. Tidy up some document.h -> page.h -> document.h circular inclusion while we're at it. NOTE: Wait for imminent branch to pass before landing. We'll want this to bake a while. Change-Id: I64a2f12ac3424ece1063d40583995b834117cf34 Reviewed-on: https://pdfium-review.googlesource.com/32790 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-05-25[xfa] Generate CXFA_EventParam.newText dynamicallyDan Sinclair
When an xfa.event is sent it is possible to change the selStart, selEnd and change values of the event. This should cause the value of newText to be changed as needed. This CL removes m_wsNewText from CXFA_EventParam and instead generates the new text based on the previous text, the selection and the change. Bug: 1066 Change-Id: I35d126fad9771c8980654a8af64d2b98989bff3f Reviewed-on: https://pdfium-review.googlesource.com/32970 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-25[xfa] Add missing xfa.event.cancelAction propertyDan Sinclair
This CL adds the missing cancleAction property from the xfa.event object. Bug: 1066 Change-Id: I7d38956e2985c1f6ac0eba6de090874f1f72003c Reviewed-on: https://pdfium-review.googlesource.com/32950 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-25[xfa] Clamp selStart, selEnd values in CJX_EventPseudoModelDan Sinclair
This CL adds bounds checking for the selStart and selEnd settings of the event object. The selEnd is not allowed to be less then selStart. They are also not allowed to be negative. This also clamps them to the length of the prevText string. Bug: 1066 Change-Id: Ifc9113c669c83a4a97655554affbbce30c2bfc64 Reviewed-on: https://pdfium-review.googlesource.com/32933 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-25[xfa] Restrict the editable xfa.change propertiesDan Sinclair
According to the XFA Spec only the cancelAction, selStart, selEnd and change properties of xfa.event are editable. This CL adds checking to early out if attempting to set any of the other properties. Bug: 1066 Change-Id: Ie6129e1f65de7584f0b5f3072a1acf6e25d44a2c Reviewed-on: https://pdfium-review.googlesource.com/32932 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-25[xfa] Rename pValue to pReturn for clarityDan Sinclair
This CL renames the pValue parameters to the CJX_EventPseudoModel Property helpers. This makes it a little clearer that the thing we're setting is _not_ pValue but wsValue. Bug: 1066 Change-Id: I1f468659c4e241059da0bbe43c461be788cd62a0 Reviewed-on: https://pdfium-review.googlesource.com/32931 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-25[xfa] Allow accessing the event changed parameter from JS.Dan Sinclair
This CL updates the CFXJSE_Engine code to access the defined properties of a class if we fail to find the property in any other way. This fixes up an issue where we were unable to read the 'change' property of the CJX_EventPseudoModel because we could not find the 'change' property. Bug: 1066 Change-Id: I4ad205bc527beeca1c3e24a36cdde0c21287d9fb Reviewed-on: https://pdfium-review.googlesource.com/32930 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-25Add code to display XFA JS log messagesDan Sinclair
This CL adds a bit of commented out code to CJX_LogPseudoModel to dump any xfa.log.message() commands to the terminal. It's commented out as we don't want it running normally but we can enable as needed. Change-Id: Ia53759253391cbaa249a1801aa1541213020ad68 Reviewed-on: https://pdfium-review.googlesource.com/32915 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-22Fix nits in fxjs.Lei Zhang
- Make parameter checking more consistent in a several places. - Remove unnecessary parameter size checks. - Get rid of new statements / FX_Free() calls. Change-Id: I7bac8e678f590815a398a318cd62a2947e1dd973 Reviewed-on: https://pdfium-review.googlesource.com/32836 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-17Convert JS execute methods to return Optional<IJS_Runtime::JS_Error>Dan Sinclair
This CL changes several of the JS execution methods to to return an Optional<IJS_Runtime::JS_Error> instead of a bool with a WideString out param. The IJS_Runtime::JS_Error will contain the line, column and exception message if an error occurs during execution. Change-Id: I37785ae6cd133a4c94ad8d25289473600b8a5d19 Reviewed-on: https://pdfium-review.googlesource.com/32614 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-05-17Update third_party/base/compiler_specific.h.Lei Zhang
Import Chromium's base/compiler_specific.h from r537069. Now that FALLTHROUGH is available via compiler_specific.h, remove FX_FALLTHROUGH. Change-Id: I8b9631a4f007673e10e0c26951dfd61e9dcada30 Reviewed-on: https://pdfium-review.googlesource.com/32639 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-05-16Remove two unused #defines in cjs_globaldata.cpp.Tom Sepez
Bug: pdfium:1085 Change-Id: I121152527333e143d23e7cb852c8c1a745026453 Reviewed-on: https://pdfium-review.googlesource.com/32618 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-16Convert CJX_Object::Set* methods to return voidDan Sinclair
We never use the return values of these methods, switch to void from bool. Change-Id: I8b0d96e5be90ac08281bbb82d2c7205d94abea2b Reviewed-on: https://pdfium-review.googlesource.com/32616 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-16Convert Formcalc ToJavascript to a pointer WideTextBufDan Sinclair
This CL converts the WidetextBuf reference to a pointer in the formcalc ToJavaScript methods. Change-Id: Ia05c7255a99a2eaa3d9a57f77580969896ad90a0 Reviewed-on: https://pdfium-review.googlesource.com/32612 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-10Cleanup formcalc method generationchromium/3427Dan Sinclair
This CL simplifies the FormCalc method call generation when converted to JavaScript. Currently we output the same chunk of code to run the given method on an array or object per method call. This CL pulls out the common execution code to a pfm_method_runner function which is used instead. An embedder test has been added to verify that method invocation from formcalc works correctly. Bug: chromium:814848 Change-Id: I1ec052eab051053fedcb464d57e0e15228b8c5a2 Reviewed-on: https://pdfium-review.googlesource.com/32372 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-08Rename CPDF_Document::GetPage() to GetPageDictionary().Tom Sepez
Avoids a conflict should we wish to have the document actually track pages, with a GetPage() that returns CPDF_Page. Do the same thing to CPDF_DataAvail along the way. Add some missing consts as well. Change-Id: I2cb2213cc4c0649662fceab80407ee4a3f4cf30e Reviewed-on: https://pdfium-review.googlesource.com/32158 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-07Mark parts of CJS_EventHandler as private.Lei Zhang
Also change Initial() to Initialize(). Change-Id: Ic63ee1cace0012ad570db25447ced752bddd7f86 Reviewed-on: https://pdfium-review.googlesource.com/28150 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-05-02Add a CFX_XMLDocument class.Dan Sinclair
This CL adds a CFX_XMLDocument to act as the XML node container. All nodes are now owned by the document and the document is returned by the CFX_XMLParser. Classes which parse XML files now store the document instead of the root node. BUG: chromium:835636 Change-Id: I1e07d6115cf14714911d6fd4c3fa920c94fd5faf Reviewed-on: https://pdfium-review.googlesource.com/31313 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-30Make CPDFSDK_FormFillEnvironment always hold a CPDF_Document.Tom Sepez
Small step towards removing UnderlyingDocumentType and making FPDF documents always be CPDF documents, regardless of XFA. This improves layering a bit in the process. Change-Id: Ice5ed7ba1ffdd7edfc9c4719f0e3a9cfb22f5790 Reviewed-on: https://pdfium-review.googlesource.com/31672 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-27Remove argument from CPDFSDK_FormFillEnvironment::GetCurrentPageTom Sepez
Small tidying. The form fill environment is 1:1 with documents, and already knows its underlying document. The callers all first obtain this from the FFE and then pass it back into it. Change-Id: I33835c1dc847ca67f2cc633c87af2f6e003ef58a Reviewed-on: https://pdfium-review.googlesource.com/31591 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-26Replace some c-style cast with static_cast<>Tom Sepez
Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2 Reviewed-on: https://pdfium-review.googlesource.com/31350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-25Replace reinterpret_cast with static_cast where possibleTom Sepez
Change-Id: Ic62f1def8e043494c9fa6c08a937d7d872513567 Reviewed-on: https://pdfium-review.googlesource.com/31314 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-24Fix include order for cpdfxfa_context.hchromium/3407Tom Sepez
It should include cpdfsdk_helpers, not the other way around. Change-Id: Id2cc3018e8c38f82ce8a35b03bb90e936aa1d446 Reviewed-on: https://pdfium-review.googlesource.com/31294 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-23Revert "Change CFX_XML Save to take a write stream"dsinclair
This reverts commit 9a3a7709103a872037dcea1f3cf0b7785a3da191. Reason for revert: Gerrit did not do what I expected.... Original change's description: > Change CFX_XML Save to take a write stream > > This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more > generic IFX_SeekableStream. > > Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10 > Reviewed-on: https://pdfium-review.googlesource.com/30877 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Tom Sepez <tsepez@chromium.org> TBR=tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: I137e53bf93285b88ade6832dedefca66e3b61e13 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/31211 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-23Change CFX_XML Save to take a write streamDan Sinclair
This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more generic IFX_SeekableStream. Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10 Reviewed-on: https://pdfium-review.googlesource.com/30877 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-04-23Disable JavaScript entirely if no JSPlatform passed by embedder.Tom Sepez
Allows run-time selection of whether to permit JS inside PDF. Previously, this was a link-time decision only. This requires a little more caution before we decide that we have the CJS_Runtime, and not the CJS_RuntimeStub in a few casts. Adds a kDisableJavaScript option to the form fill embeddertests. Adds a --disable-javascript flag to the pdfium_test executable. Also adds a --disable-xfa flag while we're at it. Change-Id: I8d8ac95f6474459cadba9a60572fbb342e984646 Reviewed-on: https://pdfium-review.googlesource.com/31090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-18Always build JS Runtime stubs even if V8 present.Tom Sepez
Prerequisite for switching V8 off at run-time. Change-Id: I4b9f867185758350f5de3f57e771f63020df6e65 Reviewed-on: https://pdfium-review.googlesource.com/30994 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-17Add ownership to CFX_XMLNode childrendan sinclair
This CL sets the CFX_XML tree ownership. The pointers set into the tree must be unique_ptrs and the CFX_XMLNode children are set to be either unique_ptrs or UnownedPtrs. Change-Id: Ib0db495c81471e40f5b4533503f7bbe5a784fd77 Reviewed-on: https://pdfium-review.googlesource.com/30711 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-17Avoid some string -> ptr -> string duplicate allocations in FF EnvironmentTom Sepez
Change-Id: I4bd89b64cd77a4e2fe0ffc2dcc415cc8fe34667a Reviewed-on: https://pdfium-review.googlesource.com/30871 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-17Use IFX_SeekableStream in xfa_utilsdan sinclair
This CL converts xfa_utils to use an IFX_SeekableStream instead of a CFX_SeekableStreamProxy. Change-Id: I824b477351ac29d54118df2f3c5442c503aa3671 Reviewed-on: https://pdfium-review.googlesource.com/30852 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-04-17Use an IFX_SeekableStream for XML savingdan sinclair
This CL converts the CFX_XML Save methods to take an IFX_SeekableStream instead of a CFX_SeekableStreamProxy. Change-Id: I6b3f6acc9f51e73b3c863b965b4dcdcbd25ba949 Reviewed-on: https://pdfium-review.googlesource.com/30850 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-04-17Re-land "Return pdfium::span<char> from ByteString::GetBuffer().""Tom Sepez
This reverts commit 3d523e3cf89440e2ffc6571b1c687ad5e3f0318f. Fixes bounding errors now caught by tests. Change-Id: I4d0f1791bdcc45a10615a62abf7a4d20e7e538f2 Reviewed-on: https://pdfium-review.googlesource.com/30799 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-17Reland "Return pdfium::span<wchar_t> from WideString::GetBuffer().""Tom Sepez
This reverts commit 0d32b8fda53e02c1036d39f7290d4f59f2b58ca4. Restore behaviour on trunk. TBR: dsinclair@chromium.org Change-Id: Ia867f09ae9d2885595c4d9b300a058431dfd84f2 Reviewed-on: https://pdfium-review.googlesource.com/30811 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-16Merge CFX_XMLElement and CFX_XMLAttributeNodedan sinclair
CFX_XMLElement is the only subclass of CFX_XMLAttributeNode. This CL merges the two classes together. The {Set|Get}String method has been renamed to {Set|Get}Attribute to make it clearer what you're retrieving. Change-Id: I158c961d4d8c5f563d937a3e7a35321a33622562 Reviewed-on: https://pdfium-review.googlesource.com/30710 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-16Revert "Return pdfium::span<wchar_t> from WideString::GetBuffer()."Tom Sepez
This reverts commit 154e18f9a862975abecebe77b8f5fb418418d14c. Reason for revert: Generate CL to merge to beta branch Original change's description: > Return pdfium::span<wchar_t> from WideString::GetBuffer(). > > Adds bounds checking "for free", but beware of span outliving > a ReleaseBuffer() call. Scoping as such avoids the possibility > of using an invalid span (and it is flagged as a lifetime issue). > > Change-Id: Ica63f4b1429823d0254ec6951aeaeb08160cb93c > Reviewed-on: https://pdfium-review.googlesource.com/30310 > Reviewed-by: dsinclair <dsinclair@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=tsepez@chromium.org,dsinclair@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ie1ec9434215584a024538ca8edeb59dea555af48 Reviewed-on: https://pdfium-review.googlesource.com/30830 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-16Revert "Return pdfium::span<char> from ByteString::GetBuffer()."Tom Sepez
This reverts commit 80a6cbe0a427e155de8555bc867af745d10f9777. Reason for revert: too many abrts in beta branch. TBR: dsinclair@chromium.org Bug: 832557, 832978, 832992, 833062, 833097 Change-Id: I7d511dbb224ddc644be96ea2f3770ad6f73debf5 Reviewed-on: https://pdfium-review.googlesource.com/30792 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>