Age | Commit message (Collapse) | Author |
|
Currently, annotation popups are placed at a fixed location relative to
the annotation. If an annotation is too much on the right or the bottom
of the page, then its popup will be clipped at the edge of the page.
This CL translates the popups appropriately to avoid getting clipped at
page edges. Also, if an annotation is at the bottom-right corner of the
page, then the popup is placed above and to the left of the annotation,
instead of below and to the right of it.
See a set of comparison screenshots here:
https://drive.google.com/drive/folders/0B7Fvv7JszRyGZXZXR05yVEFWSlE?usp=sharing
Bug=chromium:645367,pdfium:750
Change-Id: Ie048281e965523c292dcc704b51188d794f8877b
Reviewed-on: https://pdfium-review.googlesource.com/11470
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Idd656dcf372c0b8ed515a4e0635b5098c0781d76
Reviewed-on: https://pdfium-review.googlesource.com/10991
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Converted CFX_FloatRect::Init() and CFX_FloatRect::UpdateRect() to take
in a CFX_PointF object instead of two coordinates.
Bug=pdfium:770
Change-Id: Ibcb620f192d6c086158c39f23c411777286005d0
Reviewed-on: https://pdfium-review.googlesource.com/11450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Converted CFX_RenderDevice::DrawCosmeticLine() and IFX_RenderDeviceDriver::
DrawCosmeticLine() to take in CFX_PointF objects instead of two coordinates
per point.
Bug=pdfium:769
Change-Id: I6116e4106a61487184a71e79c1dca3a85e8c7c27
Reviewed-on: https://pdfium-review.googlesource.com/11410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also roll buildtools_revision to f90f6a5 and update Android code that
did not previously pass the Chromium style plugin.
TBR=dsinclair@chromium.org
Change-Id: Ifb1193cee8f68ac99a31c8d43195e4d7005eeafb
Reviewed-on: https://pdfium-review.googlesource.com/11293
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Re-enable individual image mask rendering to improve spool sizes, with
bug fixes and improvements:
- Fix bug with missing images by ensuring all masks are recorded
- Fix printing to landscape paper sizes
- Improve spool sizes by processing the location of the masks in the
progressive renderer when rendering to the printer instead of needlessly
fully rendering them (they will be rendered as bitmaps anyway).
Bug: chromium:753700
Change-Id: I86bdcce9f10855274c56ba2ddae2c2522b36426d
Reviewed-on: https://pdfium-review.googlesource.com/11115
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:754969
Change-Id: I4f92d301499c658c57393fde01f1252ea84e59a8
Reviewed-on: https://pdfium-review.googlesource.com/11250
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The count passed into ParseAndAppendCrossRefSubsectionData() may be
invalid.
BUG=chromium:752796
Change-Id: Ic7bbfd16761d1df0855e6c77e4abc68823b12395
Reviewed-on: https://pdfium-review.googlesource.com/11130
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetImageMetadata() for retriving the image metadata
of image objects, including its dimension, DPI, bits per pixel, and
colorspace.
* Added a corresponding embedder test.
Bug=pdfium:677
Change-Id: I4229334d1ac2125b21a46e2e44ea937ea2e94b51
Reviewed-on: https://pdfium-review.googlesource.com/10110
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Simplify some code along the way.
Change-Id: I0022c8a82188192c63b9ac0bc87e9b9dbf983040
Reviewed-on: https://pdfium-review.googlesource.com/10852
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I00d2097bca369aa4d1743716c4b2615e37a8444d
Reviewed-on: https://pdfium-review.googlesource.com/10910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:754993
Change-Id: I9444ef83fb62784fef3bf8d294b2ab88b6574b5a
Reviewed-on: https://pdfium-review.googlesource.com/11070
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:864
Change-Id: Iab03e1977c859f150452825650afed3520024cca
Reviewed-on: https://pdfium-review.googlesource.com/11030
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I2c5ea6a0c4487c0200229f4709214bda1f287de8
Reviewed-on: https://pdfium-review.googlesource.com/10990
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This method duplicates the behaviour of the const [] operator and
doesn't offer any additional safety. Folding them into one
implementation.
SetAt is retained, since implementing the non-const [] operator to
replace SetAt has potential performance concerns. Specifically many
non-obvious cases of reading an element using [] will cause a realloc
& copy.
BUG=pdfium:860
Change-Id: I3ef5e5e5a15376f040256b646eb0d90636e24b67
Reviewed-on: https://pdfium-review.googlesource.com/10870
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes CFDE_RenderDevice. For most of the proxy'd calls we call
the CFX_RenderDevice directly now. To set the clip rect an overload was
added to accept a CFX_RectF and handle the casting to FX_RECT. The one
needed method, DrawString, is move to a static on CFDE_TextOut.
Change-Id: I95ea7e1fa1fd4702074b797c06423c9c9cb51db9
Reviewed-on: https://pdfium-review.googlesource.com/10951
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Use ReadValidator to request exact data on object read.
Change-Id: I1d1863097fa2b037e1bb2e4e89b93d26c5d8e066
Reviewed-on: https://pdfium-review.googlesource.com/10510
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
It is allow us to walk on all non-null sub-objects
in an object in depth, include itself,
Change-Id: Ia23051073984411668112422b47cf7a4460aa078
Reviewed-on: https://pdfium-review.googlesource.com/8910
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Use ReadValidator to request exact data on object read.
Change-Id: Ie6c3f452e119fa3514e77f1824473c33bb6b855a
Reviewed-on: https://pdfium-review.googlesource.com/10491
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Specifically the index parameter passed in to GetAt(), SetAt() and
operator[] are now being tested to be in bounds.
BUG=chromium:752480, pdfium:828
Change-Id: I9e94d58c98a8eaaaae53cd0e3ffe2123ea17d8c4
Reviewed-on: https://pdfium-review.googlesource.com/10651
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:857
Change-Id: Ic1fb12459cad79b45466df10a24fe6743377ae14
Reviewed-on: https://pdfium-review.googlesource.com/10612
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This CL removes CFDE_Path. There is only one method, AddLine which is
required, the rest can be removed. That method is moved to CFX_PathData
which is what CFDE_Path is appending to anyway.
Change-Id: If50af8cf856a9f7379791fe1999174db5fd13e38
Reviewed-on: https://pdfium-review.googlesource.com/10454
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I5f240cb0779648dc5427fecb5561086e7c0fb16a
Reviewed-on: https://pdfium-review.googlesource.com/10650
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: Iec5523492eac3910f5ed105370e9092fd992b1b9
Reviewed-on: https://pdfium-review.googlesource.com/10471
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I782379cc7f93b93ed34a5d0a39ee2f198c650465
Reviewed-on: https://pdfium-review.googlesource.com/10430
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Also making CFX_ByteString(ostringstream) const.
Bug: pdfium:731
Change-Id: Iaee610248a5634e8731eaf05944c32d52c4e8015
Reviewed-on: https://pdfium-review.googlesource.com/10151
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change the CPDFParserEmbeddertest.Feature_Linearized_Loading test case
into FPDFViewEmbeddertest.LinearizedDocument, and add a call to
FPDF_GetFileVersion().
Change-Id: I0272c1e71c6f61393838bd3db41b154c4f5620ba
Reviewed-on: https://pdfium-review.googlesource.com/10450
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The CPDF_Parser::IsVersionUpdated is not used anymore.
Change-Id: I896c42daca3c5bed7b9d700eaea6ced686ab5acb
Reviewed-on: https://pdfium-review.googlesource.com/10490
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Move syntax parser initialization in separate method.
Change-Id: I701284b1fee26a474c24ca68948a3462cc68faec
Reviewed-on: https://pdfium-review.googlesource.com/10291
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
In the original code the method of writing of objects depends on a much unpredictable factors:
as:
1) Is there an updated version of the at least one object in the document.
2) The password is changed.
3) Was this object loaded earlier.
4) The Object is compressed and document have a password.
With these factors it is difficult to predict what will be the final file.
To reduce volatility use only one method that works in all cases mentioned.
This method is parse then serialize.
Change-Id: I3d7dcadd10abffbad68d1f993f2dd60b039ed989
Reviewed-on: https://pdfium-review.googlesource.com/9572
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9ee1da4d0a9751dae8d595b610cf77c074c22cdc
Reviewed-on: https://pdfium-review.googlesource.com/10350
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
This CL moves the cfx_cssdatatable tables and methods which are only
used in cfx_cssdeclaration to an anonymous namespace.
Change-Id: Ib5dc71cc85c348e2ae7feaab8d6495fc2aa88642
Reviewed-on: https://pdfium-review.googlesource.com/9253
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2cb20fd00436858f035f984fc104bae2c2d01057
Reviewed-on: https://pdfium-review.googlesource.com/9252
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I7fe8dcd8854e2f08b7b0ee53bde6c864108142ff
Reviewed-on: https://pdfium-review.googlesource.com/9571
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The xfa/fde/css code has no other links into xfa/. This CL moves the css
code to core/fxcrt/css and sets to only build when pdf_enable_xfa is
enabled.
Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be
Reviewed-on: https://pdfium-review.googlesource.com/9251
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Single no-op callback.
pdfium::clamp() where appropriate.
Use post-increment where appropriate.
Add helper functions for image type.
Change-Id: I1584a1c90b46bd87f6ee983b78b6a2119212d0fb
Reviewed-on: https://pdfium-review.googlesource.com/10270
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Mechanical change to bring into conformance with style guide.
Change-Id: I80d06708ed5c40af7e797ea5dc6279a0b4f3cf6a
Reviewed-on: https://pdfium-review.googlesource.com/10250
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Apply patch suggestions from reporter. Move all FX_Alloc'd memory
into unique_ptrs so that no bare FX_Alloc/Free_Free calls remain.
Fix a realloc / opj_realloc mismatch. Remove unused functions
color_apply_icc_profile() and color_apply_conversion(). Tidy along
the way, add some missing statics, and fix a confusing (but not quite
member shadowing) local name.
Bug: 752829
Change-Id: Ibf2d108a857e3de39e752c2c553a31e002a07caf
Reviewed-on: https://pdfium-review.googlesource.com/10230
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
New version of the CL that include fpdf_parser_utility.cpp where
there is an overload for CFX_ByteTextBuf << CPDF_Object* used by
CFDF_Document.
Bug: pdfium:731
Change-Id: I54f4e9ee7e10e94388f6f6584f3999f43689e84c
Reviewed-on: https://pdfium-review.googlesource.com/10170
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
This reverts commit aea80dcc0abc0c310316fa502f91a359bc684758.
Reason for revert: WriteBuf's behavior was altered
Original change's description:
> Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others.
>
> Bug: pdfium:731
> Change-Id: I61d38ab3f2b0ac68b8479ade25bab50f3a73c27b
> Reviewed-on: https://pdfium-review.googlesource.com/9770
> Reviewed-by: Tom Sepez <tsepez@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: pdfium:731
Change-Id: Ic66a2641c259173fb3792f7a4206e19ee4707fc9
Reviewed-on: https://pdfium-review.googlesource.com/10150
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I95d7c16e6c30e6675a17505359b5b7ae1dd5ff12
Reviewed-on: https://pdfium-review.googlesource.com/9950
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Added FPDFImageObj_GetImageDataDecoded() for retrieving the uncompressed
data of an image, and FPDFImageObj_GetImageDataRaw() for retrieving the
raw data of an image.
* Refactored out DecodeStreamMaybeCopyAndReturnLength(), which is
used to decode both attachment data and image data.
* Within DecodeStreamMaybeCopyAndReturnLength(), used a different
decoder function which takes care of multiple filters if exist. As
a result, CPDF_StreamParser::DecodeInlineStream() which was made
static previously is now moved back into namespace.
Bug=pdfium:677
Change-Id: I22a22c99acaca98ef8c15f88911f2646a2c854d5
Reviewed-on: https://pdfium-review.googlesource.com/9811
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image
object, and a FPDFBitmap_GetFormat() that returns the format of a
bitmap.
* Fixed a small bitmap conversion bug in cfx_dibsource.cpp.
* Enabled EmbedderTest::CompareBitmap() to support different formats
of bitmaps.
* Added an embedder test and a test PDF file with images of many
different formats.
Bug=pdfium:677
Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed
Reviewed-on: https://pdfium-review.googlesource.com/9690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
There isn't any work to NaCl PDFium at the moment, and it would
take a lot more than these few changes.
Change-Id: I6c4bf5f38bbfb9cf4f5a5688128c7720c38a8ce4
Reviewed-on: https://pdfium-review.googlesource.com/10050
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The only non-test caller is gone.
Change-Id: I261bc6d97c3047b2935d7b663c1a5f7d15670714
Reviewed-on: https://pdfium-review.googlesource.com/10010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
It is not needed to fix https://crbug.com/552046 and it causes different
bug.
BUG=chromium:750993
Change-Id: I11627045bd3e73fb439884c3362ab1c26eb95fe3
Reviewed-on: https://pdfium-review.googlesource.com/9990
Reviewed-by: Oliver Chang <ochang@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CPDF_Parser::StartLinearizedParse() calls StartParse(), but already
knows the PDF header offset. Refactor StartParse() so it does not have
to look for the header again.
Change-Id: Id8cc39301ae72da868dafc53921622d5b28ce26e
Reviewed-on: https://pdfium-review.googlesource.com/9830
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
|
|
Bug: pdfium:731
Change-Id: Iac887a8d3485b5511ec7f3d809efeb8af6ea9ce7
Reviewed-on: https://pdfium-review.googlesource.com/9930
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:731
Change-Id: I63532e06aa2c135f34a6adda24ae1cfbc5922ac9
Reviewed-on: https://pdfium-review.googlesource.com/9871
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|