diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-11-20 15:06:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-11-22 11:48:58 +0000 |
commit | daa093eea7c773db06799a13bd7e4e2e2a9f8f14 (patch) | |
tree | 96cc5e7b9194c1b29eab927730bfa419e7111c25 /chromium/third_party/pdfium/public | |
parent | be59a35641616a4cf23c4a13fa0632624b021c1b (diff) | |
download | qtwebengine-chromium-daa093eea7c773db06799a13bd7e4e2e2a9f8f14.tar.gz |
BASELINE: Update Chromium to 63.0.3239.58
Change-Id: Ia93b322a00ba4dd4004f3bcf1254063ba90e1605
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/pdfium/public')
6 files changed, 86 insertions, 14 deletions
diff --git a/chromium/third_party/pdfium/public/fpdf_annot.h b/chromium/third_party/pdfium/public/fpdf_annot.h index b92763855bc..1fbc3668720 100644 --- a/chromium/third_party/pdfium/public/fpdf_annot.h +++ b/chromium/third_party/pdfium/public/fpdf_annot.h @@ -343,7 +343,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_GetRect(FPDF_ANNOTATION annot, // Check if |annot|'s dictionary has |key| as a key. // // annot - handle to an annotation. -// key - the key to look for. +// key - the key to look for, encoded in UTF-8. // // Returns true if |key| exists. FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_HasKey(FPDF_ANNOTATION annot, @@ -353,7 +353,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFAnnot_HasKey(FPDF_ANNOTATION annot, // Get the type of the value corresponding to |key| in |annot|'s dictionary. // // annot - handle to an annotation. -// key - the key to look for. +// key - the key to look for, encoded in UTF-8. // // Returns the type of the dictionary value. FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV @@ -365,7 +365,7 @@ FPDFAnnot_GetValueType(FPDF_ANNOTATION annot, FPDF_BYTESTRING key); // FPDF_OBJECT_STRING after this function call succeeds. // // annot - handle to an annotation. -// key - the key to the dictionary entry to be set, encoded in UTF16-LE. +// key - the key to the dictionary entry to be set, encoded in UTF-8. // value - the string value to be set, encoded in UTF16-LE. // // Returns true if successful. @@ -384,7 +384,7 @@ FPDFAnnot_SetStringValue(FPDF_ANNOTATION annot, // be added to |buffer| and the return value would be 0. // // annot - handle to an annotation. -// key - the key to the requested dictionary entry. +// key - the key to the requested dictionary entry, encoded in UTF-8. // buffer - buffer for holding the value string, encoded in UTF16-LE. // buflen - length of the buffer. // @@ -402,7 +402,7 @@ FPDFAnnot_GetStringValue(FPDF_ANNOTATION annot, // longer needed. // // annot - handle to an annotation. -// key - the key to the requested dictionary entry. +// key - the key to the requested dictionary entry, encoded in UTF-8. // // Returns a handle to the linked annotation object, or NULL on failure. FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV diff --git a/chromium/third_party/pdfium/public/fpdf_attachment.h b/chromium/third_party/pdfium/public/fpdf_attachment.h index 411ee219af0..7b559748007 100644 --- a/chromium/third_party/pdfium/public/fpdf_attachment.h +++ b/chromium/third_party/pdfium/public/fpdf_attachment.h @@ -77,7 +77,7 @@ FPDFAttachment_GetName(FPDF_ATTACHMENT attachment, // Check if the params dictionary of |attachment| has |key| as a key. // // attachment - handle to an attachment. -// key - the key to look for. +// key - the key to look for, encoded in UTF-8. // // Returns true if |key| exists. FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV @@ -88,7 +88,7 @@ FPDFAttachment_HasKey(FPDF_ATTACHMENT attachment, FPDF_BYTESTRING key); // the embedded |attachment|. // // attachment - handle to an attachment. -// key - the key to look for. +// key - the key to look for, encoded in UTF-8. // // Returns the type of the dictionary value. FPDF_EXPORT FPDF_OBJECT_TYPE FPDF_CALLCONV @@ -100,7 +100,7 @@ FPDFAttachment_GetValueType(FPDF_ATTACHMENT attachment, FPDF_BYTESTRING key); // type should be FPDF_OBJECT_STRING after this function call succeeds. // // attachment - handle to an attachment. -// key - the key to the dictionary entry, encoded in UTF16-LE. +// key - the key to the dictionary entry, encoded in UTF-8. // value - the string value to be set, encoded in UTF16-LE. // // Returns true if successful. @@ -120,7 +120,7 @@ FPDFAttachment_SetStringValue(FPDF_ATTACHMENT attachment, // and the return value would be 0. // // attachment - handle to an attachment. -// key - the key to the requested string value. +// key - the key to the requested string value, encoded in UTF-8. // buffer - buffer for holding the string value encoded in UTF16-LE. // buflen - length of the buffer. // diff --git a/chromium/third_party/pdfium/public/fpdf_dataavail.h b/chromium/third_party/pdfium/public/fpdf_dataavail.h index 12a77146d71..3ce92110acc 100644 --- a/chromium/third_party/pdfium/public/fpdf_dataavail.h +++ b/chromium/third_party/pdfium/public/fpdf_dataavail.h @@ -103,6 +103,7 @@ typedef struct _FX_DOWNLOADHINTS { // Applications should call this function whenever new data arrives, and process // all the generated download hints, if any, until the function returns // |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|. +// if hints is nullptr, the function just check current document availability. // // Once all data is available, call |FPDFAvail_GetDocument| to get a document // handle. @@ -150,6 +151,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc); // all the generated download |hints|, if any, until this function returns // |PDF_DATA_ERROR| or |PDF_DATA_AVAIL|. Applications can then perform page // loading. +// if hints is nullptr, the function just check current availability of +// specified page. FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsPageAvail(FPDF_AVAIL avail, int page_index, FX_DOWNLOADHINTS* hints); @@ -171,6 +174,8 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsPageAvail(FPDF_AVAIL avail, // The application should call this function whenever new data arrives and // process all the generated download |hints|, if any, until the function // |PDF_FORM_ERROR|, |PDF_FORM_AVAIL| or |PDF_FORM_NOTEXIST|. +// if hints is nullptr, the function just check current form availability. +// // Applications can then perform page loading. It is recommend to call // |FPDFDOC_InitFormFillEnvironment| when |PDF_FORM_AVAIL| is returned. FPDF_EXPORT int FPDF_CALLCONV FPDFAvail_IsFormAvail(FPDF_AVAIL avail, diff --git a/chromium/third_party/pdfium/public/fpdf_edit.h b/chromium/third_party/pdfium/public/fpdf_edit.h index c547f078901..f2dad739ca9 100644 --- a/chromium/third_party/pdfium/public/fpdf_edit.h +++ b/chromium/third_party/pdfium/public/fpdf_edit.h @@ -42,6 +42,12 @@ #define FPDF_PAGEOBJ_SHADING 4 #define FPDF_PAGEOBJ_FORM 5 +// The path segment constants. +#define FPDF_SEGMENT_UNKNOWN -1 +#define FPDF_SEGMENT_LINETO 0 +#define FPDF_SEGMENT_BEZIERTO 1 +#define FPDF_SEGMENT_MOVETO 2 + #define FPDF_FILLMODE_ALTERNATE 1 #define FPDF_FILLMODE_WINDING 2 @@ -144,8 +150,17 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertObject(FPDF_PAGE page, // page - handle to a page. // // Returns the number of objects in |page|. +// +// DEPRECATED. Please use FPDFPage_CountObjects. FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObject(FPDF_PAGE page); +// Get number of page objects inside |page|. +// +// page - handle to a page. +// +// Returns the number of objects in |page|. +FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObjects(FPDF_PAGE page); + // Get object in |page| at |index|. // // page - handle to a page. @@ -385,7 +400,7 @@ FPDFImageObj_GetImageFilterCount(FPDF_PAGEOBJECT image_object); // // image_object - handle to an image object. // index - the index of the filter requested. -// buffer - buffer for holding filter string, encoded in UTF16-LE. +// buffer - buffer for holding filter string, encoded in UTF-8. // buflen - length of the buffer. // // Returns the length of the filter string. @@ -552,6 +567,56 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path, unsigned int* B, unsigned int* A); +// Experimental API. +// Get number of segments inside |path|. +// +// path - handle to a path. +// +// A segment is a command, created by e.g. FPDFPath_MoveTo(), +// FPDFPath_LineTo() or FPDFPath_BezierTo(). +// +// Returns the number of objects in |path| or -1 on failure. +FPDF_EXPORT int FPDF_CALLCONV FPDFPath_CountSegments(FPDF_PAGEOBJECT path); + +// Experimental API. +// Get segment in |path| at |index|. +// +// path - handle to a path. +// index - the index of a segment. +// +// Returns the handle to the segment, or NULL on faiure. +FPDF_EXPORT FPDF_PATHSEGMENT FPDF_CALLCONV +FPDFPath_GetPathSegment(FPDF_PAGEOBJECT path, int index); + +// Experimental API. +// Get coordinates of |segment|. +// +// segment - handle to a segment. +// x - the horizontal position of the segment. +// y - the vertical position of the segment. +// +// Returns TRUE on success, otherwise |x| and |y| is not set. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFPathSegment_GetPoint(FPDF_PATHSEGMENT segment, float* x, float* y); + +// Experimental API. +// Get type of |segment|. +// +// segment - handle to a segment. +// +// Returns one of the FPDF_SEGMENT_* values on success, +// FPDF_SEGMENT_UNKNOWN on error. +FPDF_EXPORT int FPDF_CALLCONV FPDFPathSegment_GetType(FPDF_PATHSEGMENT segment); + +// Experimental API. +// Gets if the |segment| closes the current subpath of a given path. +// +// segment - handle to a segment. +// +// Returns close flag for non-NULL segment, FALSE otherwise. +FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV +FPDFPathSegment_GetClose(FPDF_PATHSEGMENT segment); + // Move a path's current point. // // path - the handle to the path object. diff --git a/chromium/third_party/pdfium/public/fpdf_sysfontinfo.h b/chromium/third_party/pdfium/public/fpdf_sysfontinfo.h index 4acaa033b2c..c9aa33856d4 100644 --- a/chromium/third_party/pdfium/public/fpdf_sysfontinfo.h +++ b/chromium/third_party/pdfium/public/fpdf_sysfontinfo.h @@ -20,7 +20,7 @@ #define FXFONT_CHINESEBIG5_CHARSET 136 /* Font pitch and family flags */ -#define FXFONT_FF_FIXEDPITCH 1 +#define FXFONT_FF_FIXEDPITCH (1 << 0) #define FXFONT_FF_ROMAN (1 << 4) #define FXFONT_FF_SCRIPT (4 << 4) diff --git a/chromium/third_party/pdfium/public/fpdfview.h b/chromium/third_party/pdfium/public/fpdfview.h index c74fcb99d03..370b84ed0ff 100644 --- a/chromium/third_party/pdfium/public/fpdfview.h +++ b/chromium/third_party/pdfium/public/fpdfview.h @@ -52,6 +52,7 @@ typedef void* FPDF_SCHHANDLE; typedef void* FPDF_STRUCTELEMENT; typedef void* FPDF_STRUCTTREE; typedef void* FPDF_TEXTPAGE; +typedef void const* FPDF_PATHSEGMENT; #ifdef PDF_ENABLE_XFA typedef void* FPDF_STRINGHANDLE; @@ -666,7 +667,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, // by FPDFBitmap_Create or retrieved by // FPDFImageObj_GetBitmap. // page - Handle to the page. Returned by FPDF_LoadPage -// matrix - The transform matrix. +// matrix - The transform matrix. It must be invertible. // clipping - The rect to clip to. // flags - 0 for normal display, or combination of the Page // Rendering flags defined above. With the FPDF_ANNOT @@ -674,7 +675,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmap(FPDF_BITMAP bitmap, // user-interaction, which are all annotations except // widget and popup annotations. // Return value: -// None. +// None. Note that behavior is undefined if det of |matrix| is 0. FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPageBitmapWithMatrix(FPDF_BITMAP bitmap, FPDF_PAGE page, @@ -1011,7 +1012,8 @@ FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document); // be of type "name". // Parameters: // document - Handle to the loaded document. -// key - Name of the key in the viewer pref dictionary. +// key - Name of the key in the viewer pref dictionary, +// encoded in UTF-8. // buffer - A string to write the contents of the key to. // length - Length of the buffer. // Return value: |