Age | Commit message (Collapse) | Author |
|
Loop through the dirty page objects and streams and regenerate all
streams that are dirty.
Bug: pdfium:1051
Change-Id: I837b5a7cd9542b7777e7c7ae7ac9cc75f69f30b5
Reviewed-on: https://pdfium-review.googlesource.com/34330
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
GetOrCreateDefaultGraphics() has a side effect, and it needs to be
called regardless of whether a stream is generated of not. Failing
to do so causes default graphics to not exist in some cases.
Bug: pdfium:1051
Change-Id: I039cb6b755cc15c8ca667c92e581d085f3f2a124
Reviewed-on: https://pdfium-review.googlesource.com/35010
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This is a pure refactor, there should be no change in behavior. It
prepares for the next CL, which will allow modification of content
streams.
Bug: pdfium:1051
Change-Id: I01ca3e897efe423e89df75e1f31cd67539cc3d08
Reviewed-on: https://pdfium-review.googlesource.com/34470
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I153747ef587a184eaef58ff09dbf8f214c9ddfb3
Reviewed-on: https://pdfium-review.googlesource.com/17230
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
No reason to get it outside and pass it in.
Change-Id: I75e3bbd361c04e195004d7c538145dfd56294816
Reviewed-on: https://pdfium-review.googlesource.com/34731
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: If19338b63b09ca79aa07c6fbb8eb7e42a689360e
Reviewed-on: https://pdfium-review.googlesource.com/34730
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
m_IsIncremental and m_IsOriginal are extracted as soon as the flags
are set, so there is no more need for getters.
Change-Id: I34331a33d83c1fcbdea6ea1f3e39dfc58d6f85ea
Reviewed-on: https://pdfium-review.googlesource.com/34711
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Also remove the member variable m_dwEncryptObjNum which is never read.
Change-Id: Ieb674d6d9783ef298ba3ece1544437b15ad0afe2
Reviewed-on: https://pdfium-review.googlesource.com/34694
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This method is called, but it returns void and has no side effects:
all called methods are const, and no member or static variable is
modified.
Change-Id: I12084000621728b9994fe7b487852928e7b1180e
Reviewed-on: https://pdfium-review.googlesource.com/34690
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Renamed the underlying member m_pFormDict as well.
These names are misleading, as a page also uses the same field as
the page dict.
Change-Id: I52e0f1864a917a1e1b863725cb0d4f22faecacb3
Reviewed-on: https://pdfium-review.googlesource.com/34450
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Currently this case will lead to a crash, as pContent will be null
and pPageDict will be dereferenced.
This is a theoritical case, there is no concrete test case.
Change-Id: Ieedab26cd9f419ab49aa2cde15f1b8e3c230b61d
Reviewed-on: https://pdfium-review.googlesource.com/34430
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Only update state in CPDF_PageObjectHolder itself.
Make more data private.
Remove CPDF_Page::GetPageBBox() as exact duplicate of
CPDF_PageObjectHolder::GetBBox().
Change-Id: I083ec33f61a1490e7a5e673c9787751af15a6cd1
Reviewed-on: https://pdfium-review.googlesource.com/33810
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit d3d8287e143daf12a602a919c120b4e0c656abf8.
Reason for revert: Need to revert https://pdfium-review.googlesource.com/c/pdfium/+/33595 that this depends on.
Original change's description:
> Create m_ContentStream field in CPDF_PageObject.
>
> Content streams are now split and can set nonzero values to identify
> each parsed content stream.
>
> Bug: pdfium:1051
> Change-Id: Ia2cb1e0997db5264d468043af31f9b41e8d0d349
> Reviewed-on: https://pdfium-review.googlesource.com/33591
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: I5046b6a76508fccc0ff04cb7393cae6485dd091f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:1051
Reviewed-on: https://pdfium-review.googlesource.com/33990
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Content streams are now split and can set nonzero values to identify
each parsed content stream.
Bug: pdfium:1051
Change-Id: Ia2cb1e0997db5264d468043af31f9b41e8d0d349
Reviewed-on: https://pdfium-review.googlesource.com/33591
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
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>
|
|
BUG=pdfium:1093
Change-Id: I05f32018841dfa8b1c4512fb6350fc2a2fe4c5e4
Reviewed-on: https://pdfium-review.googlesource.com/33250
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
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>
|
|
GetObjectFor() and GetDirectObjectFor().
Change-Id: I588cd994dfccf0ffd4c8f91362a4806dc109251e
Reviewed-on: https://pdfium-review.googlesource.com/32991
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
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>
|
|
Remove some unused args along the way.
Change-Id: I234a674d4d6cc79b33087bc850f5df36bae25870
Reviewed-on: https://pdfium-review.googlesource.com/32596
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I959fe5dc30fcfe2176c7e5a64b07d082313a22b4
Reviewed-on: https://pdfium-review.googlesource.com/32595
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Provides more lifetime/bounds checking "for free".
Change-Id: Ifaf7a95c0f6f288777cd6ef35996e01b3dc4bc63
Reviewed-on: https://pdfium-review.googlesource.com/32594
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL folds the StartParse() method of CPDF_Form into the
ParserContent method. The no arguments ParseContent is removed and
ParseContentWithParams renamed to ParseContent. The callsites are
updated to pass the nullptr's.
Bug: chromium:813349
Change-Id: I304b77aef1de1b9aa20e4a3044db5023f5701584
Reviewed-on: https://pdfium-review.googlesource.com/32511
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit 466bd4f4e0cb2bc2a7b3626948609268c52c4690.
Reason for revert: On closer inspection, it seems the test is not
flaky, and the root cause of the failure is an SEH exception,
which is the true source of flakiness. Other tests are also affected.
Original change's description:
> Revert "Filter out "Type" and "DecodeParms" from trailer keys."
>
> This reverts commit 5f7c5be8b7072d46e8d8088a1ec14370ecfad44c.
>
> Reason for revert: New test is flaky, ID is not stable.
>
> Original change's description:
> > Filter out "Type" and "DecodeParms" from trailer keys.
> >
> > Bug: pdfium:873
> > Change-Id: I12ae5b8776f5a73c4be81bed53ada05c94d46882
> > Reviewed-on: https://pdfium-review.googlesource.com/32190
> > Reviewed-by: dsinclair <dsinclair@chromium.org>
> > Commit-Queue: dsinclair <dsinclair@chromium.org>
>
> TBR=dsinclair@chromium.org,hnakashima@chromium.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: pdfium:873
> Change-Id: I642771e12c61181c7b81681dae7b2f5549c14b18
> Reviewed-on: https://pdfium-review.googlesource.com/32430
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
TBR=dsinclair@chromium.org,hnakashima@chromium.org
Change-Id: I2552729610c9f8adf02c70a2a43e2383ceda19b5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:873
Reviewed-on: https://pdfium-review.googlesource.com/32397
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This reverts commit 5f7c5be8b7072d46e8d8088a1ec14370ecfad44c.
Reason for revert: New test is flaky, ID is not stable.
Original change's description:
> Filter out "Type" and "DecodeParms" from trailer keys.
>
> Bug: pdfium:873
> Change-Id: I12ae5b8776f5a73c4be81bed53ada05c94d46882
> Reviewed-on: https://pdfium-review.googlesource.com/32190
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=dsinclair@chromium.org,hnakashima@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: pdfium:873
Change-Id: I642771e12c61181c7b81681dae7b2f5549c14b18
Reviewed-on: https://pdfium-review.googlesource.com/32430
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Instead of having const methods that return non-const pointers.
BUG=pdfium:234
Change-Id: I61495543f67229500dfcf2248e93468e9a9b23cf
Reviewed-on: https://pdfium-review.googlesource.com/32183
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
The owned copy needs to be modified, so it should be non-const. Whereas
the unowned copy can be const.
Add a GetClonedDict() method for accessing the modifiable dictionary.
Change-Id: Ia7f6bcc5f917864cd1bbc7b5000a86f6e433ae9a
Reviewed-on: https://pdfium-review.googlesource.com/32181
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:873
Change-Id: I12ae5b8776f5a73c4be81bed53ada05c94d46882
Reviewed-on: https://pdfium-review.googlesource.com/32190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id9288d504f063759f69632ab59b0a21569ff76d8
Reviewed-on: https://pdfium-review.googlesource.com/32113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id31b9f6ac33971c47cdb378ff7f9ca7d33f899b9
Reviewed-on: https://pdfium-review.googlesource.com/32112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Applies std::remove_ptr to the public API types so that we can
deduce a correct unique ptr type no matter how that API might
change away from void* usage.
Creates shorter names for std::unique_ptr<std::remove_pointer<>, ...>
Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86
Reviewed-on: https://pdfium-review.googlesource.com/31292
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Add constants/stream_dict_common.h. The header lists all the constants
in the table in the same order. Constants that are not used at all are
commented out.
BUG=pdfium:1049
Change-Id: I6539090e0ad56319ea628883e388aeacef044e52
Reviewed-on: https://pdfium-review.googlesource.com/29090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Because the implementations are in fpdf_parser_utility.cpp
Add unit test for both.
Change-Id: Ibae90ecbe625a035c450614ddbe7f5969f9f92aa
Reviewed-on: https://pdfium-review.googlesource.com/30793
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Replace it with more narrowly focused methods to get specific bits from
the colorspace.
Change-Id: Ifd2980f0fd06230d4d94d28eddf72219d2e9e6eb
Reviewed-on: https://pdfium-review.googlesource.com/30590
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Rename it to SetValueForNonePattern() and combine the components
parameters into a std::vector. Fix the callers to use std::vector as
well.
Change-Id: I0edd7e7876e47b56821e63cc5073fc21fd4098ee
Reviewed-on: https://pdfium-review.googlesource.com/30470
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I4d7661716116969ae80fdac52f6b400a5ff68e50
Reviewed-on: https://pdfium-review.googlesource.com/29855
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I3ee8f8e9eb33d251dc00336bcd31e578e7ce5143
Reviewed-on: https://pdfium-review.googlesource.com/29854
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I7c639655c003527417255c134a4393d68cda3ef1
Reviewed-on: https://pdfium-review.googlesource.com/29852
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
When pdfium is imported into Google's internal repository, the recently
copied Skia decimal formatting code causes only-defined-once violations
because many Google internal projects depends on Skia through Google's
own copy. This patch puts pdfium's private copy of the needed function
into a namespace.
Change-Id: Id102b17f6f4652e4a50c4ff75825468fc3d90727
Reviewed-on: https://pdfium-review.googlesource.com/27530
Reviewed-by: Hal Canary <halcanary@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL copies the SkPDF code to convert floats into strings when
writing back to PDF files.
Change-Id: I8f8af3924a07aa67f93b9d951af1eef5d2c705db
Reviewed-on: https://pdfium-review.googlesource.com/21990
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Hal Canary <halcanary@chromium.org>
|
|
Do some additional checks in test cases where pages were rendered but
the resulting bitmap was immediately destroyed.
Change-Id: I2f4678140cdc672ab4ced70f748135464447ff59
Reviewed-on: https://pdfium-review.googlesource.com/25510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Add replacement methods that make themselves clear as to what they are
rendering, and return unique_ptrs to help prevent leakage. Mark existing
methods deprecated.
Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d
Reviewed-on: https://pdfium-review.googlesource.com/25470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Add LoadAllDataFiltered() and LoadAllDataRaw() and update callers.
Change-Id: I9b80ee34a358db204968acdc8b1adc9db0b6b83f
Reviewed-on: https://pdfium-review.googlesource.com/20810
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I3efc57cd7325d16e3ca8ebdeeaec06012b2c56e3
Reviewed-on: https://pdfium-review.googlesource.com/20110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL moves the Format and FormatV methods of ByteString to be static.
Bug: pdfium:934
Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a
Reviewed-on: https://pdfium-review.googlesource.com/18650
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Only the last trailer was written to the new PDF. In linearized PDFs,
this means Info and Root were not copied to the newly written PDF.
This CL makes CPDF_Parser remember the Root and provide that to
CPDF_Creator.
Bug: pdfium:614
Change-Id: Ia61f5f6a337f7de3010ee0ed39b022c1b2732ea2
Reviewed-on: https://pdfium-review.googlesource.com/17987
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Remove unused method params, impossible code, and mark methods const.
Change-Id: Iee95c7b931461e2aadcf2422650a0cd48c8f7696
Reviewed-on: https://pdfium-review.googlesource.com/17790
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL removes the friends from CPDF_TextObject and adds accessor
methods as needed.
Change-Id: I68d18297640b46113df79f58bea50b77dac89d39
Reviewed-on: https://pdfium-review.googlesource.com/15455
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Idbd205edcf7400ffc46edf4d9f09be6ace6d0e7f
Reviewed-on: https://pdfium-review.googlesource.com/13734
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I70d04f38767f2c17c41407fc9b4fc25519ba32f4
Reviewed-on: https://pdfium-review.googlesource.com/15330
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|