Age | Commit message (Collapse) | Author |
|
Only bad people do that, since it's prohibited by the C standards.
Review-Url: https://codereview.chromium.org/2459603004
|
|
Review-Url: https://codereview.chromium.org/2454263002
|
|
Review-Url: https://codereview.chromium.org/2457943002
|
|
Review-Url: https://codereview.chromium.org/2461543002
|
|
Replace most of these with ints since the are used in integer
operations. If it walks like a duck, and quacks like a duck
... despite what the hungarian notation might say.
Review-Url: https://codereview.chromium.org/2455523005
|
|
Review-Url: https://codereview.chromium.org/2459673002
|
|
Review-Url: https://codereview.chromium.org/2450183003
|
|
Review-Url: https://codereview.chromium.org/2453163002
|
|
BUG=chromium:659519
Review-Url: https://codereview.chromium.org/2456553002
|
|
Try 2: main fix was recursively popping elements from the stack. Since
the Traverse method can be called on non-root nodes from GetPage(), we
have to make sure to properly update the parents.
Try 1 at https://codereview.chromium.org/2414423002/
In our current implementation of CPDF_Document::GetPage, we traverse
the PDF page tree until we find the index we are looking for. This is
slow when we do calls GetPage(0), GetPage(1), ... since in this case
the page tree will be traversed n times if there are n pages. This CL
makes sure the page tree is only traversed once.
Time to load the PDF from the bug below in chrome official build:
Before this CL: around 1 minute 25 seconds
After this CL: around 4 seconds
BUG=chromium:638513
Review-Url: https://codereview.chromium.org/2442403002
|
|
NEXTBIT() is particularly pernicious in that it isn't syntactically
an expression, but rather two expressions. Replace it with an inline
along the way.
Review-Url: https://codereview.chromium.org/2452123002
|
|
Found by winxfa bot when fx_bool defined to bool.
Review-Url: https://codereview.chromium.org/2449293002
|
|
- Rename files so that they correspond to class names.
- Remove OS_Android ifs, since they are unneeded.
- Split fpf_skiafontmgr.h into classes, one per file.
Review-Url: https://codereview.chromium.org/2448293002
|
|
When CGFontGetGlyphWithGlyphName returns 0, it means the glyph name
was not recognized. In this case, try using the glyph index to load the
glyph.
BUG=pdfium:625
Review-Url: https://codereview.chromium.org/2445933002
|
|
It's been troubling for some time that an IFX_FileStream might
actually be an in-memory buffer with no backing file.
Review-Url: https://codereview.chromium.org/2443723002
|
|
The CPDF_Document does not own its root dictionary, so add ownership in
CPDF_TestDocumentForPages, using ReleaseDeleter because the dictionary
cannot be deleted.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/2445753002 .
|
|
Added a nontrivial page tree and a test that pages are being fetched
properly, both when requested in order and in reverse order. This will
help prevent introducing bugs while changing the way the page tree is
processed.
BUG=chromium:638513
Review-Url: https://chromiumcodereview.appspot.com/2435783006
|
|
Review-Url: https://chromiumcodereview.appspot.com/2424933002
|
|
Remove unused methods, create namespace, nits.
Review-Url: https://chromiumcodereview.appspot.com/2433543002
|
|
https://codereview.chromium.org/2437773003/ )
Reason for revert:
CPDF_DataAvail::IsPageAvail is causing crashes.
BUG=chromium:658168, chromium:658170
Original issue's description:
> Fix loading page using hint tables.
>
> When linearized document have hint table,
> The FPDFAvail_IsPageAvail return true, but
> FPDF_LoadPage return nullptr, for non first pages.
>
> This happens, bacause document not use hint tables, to load page.
>
> To fix this, I force save the page's ObjNum in document.
>
> R=npm, dsinclair
>
> Committed: https://pdfium.googlesource.com/pdfium/+/ef38283688c1ee7c08bcf4204cfb78e09c039782
TBR=dsinclair@chromium.org,tsepez@chromium.org,thestig@chromium.org,art-snake@yandex-team.ru
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://chromiumcodereview.appspot.com/2442663005
|
|
When linearized document have hint table,
The FPDFAvail_IsPageAvail return true, but
FPDF_LoadPage return nullptr, for non first pages.
This happens, bacause document not use hint tables, to load page.
To fix this, I force save the page's ObjNum in document.
R=npm, dsinclair
Review-Url: https://chromiumcodereview.appspot.com/2437773003
|
|
id:60001 of https://codereview.chromium.org/2414423002/ )
Reason for revert:
Possible cause of crbug.com/657897 reverting to find out.
BUG=657897
Original issue's description:
> Traverse PDF page tree only once in CPDF_Document
>
> In our current implementation of CPDF_Document::GetPage, we traverse
> the PDF page tree until we find the index we are looking for. This is
> slow when we do calls GetPage(0), GetPage(1), ... since in this case
> the page tree will be traversed n times if there are n pages. This CL
> makes sure the page tree is only traversed once.
>
> Time to load the PDF from the bug below in chrome official build:
> Before this CL: 1 minute 40 seconds
> After this CL: 5 seconds
>
> BUG=chromium:638513
>
> Committed: https://pdfium.googlesource.com/pdfium/+/7c29e27dae139a205755c1a29b7f3ac8b36ec0da
TBR=thestig@chromium.org,tsepez@chromium.org,npm@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:638513
Review-Url: https://chromiumcodereview.appspot.com/2430313006
|
|
This Cl merges the implementation classes up into the IFWL classes as the
intermediate classes were just acting as proxies.
Review-Url: https://chromiumcodereview.appspot.com/2432423002
|
|
In our current implementation of CPDF_Document::GetPage, we traverse
the PDF page tree until we find the index we are looking for. This is
slow when we do calls GetPage(0), GetPage(1), ... since in this case
the page tree will be traversed n times if there are n pages. This CL
makes sure the page tree is only traversed once.
Time to load the PDF from the bug below in chrome official build:
Before this CL: 1 minute 40 seconds
After this CL: 5 seconds
BUG=chromium:638513
Review-Url: https://codereview.chromium.org/2414423002
|
|
The assumption that only indirect objects would be passed is wrong.
Restore old behaviour despite muddying ownership constraints.
R=thestig@chromium.org
BUG=656145
Review-Url: https://codereview.chromium.org/2425843002
|
|
core/fxge/android files all have if _FX_OS_ == _FX_ANDROID_. Instead,
put the files inside if (is_android) on Build.gn. Also, the skia file
is already under if (pdf_use_skia), so the if defined(_SKIA_SUPPORT_)
can be removed.
Review-Url: https://codereview.chromium.org/2413983004
|
|
Avoid confusing this class with other ref-counted objects.
Review-Url: https://codereview.chromium.org/2426673002
|
|
This reverts commit 1d023881cd53485303c0fcc0b5878e700dc470fd.
Reason for revert -- fuzzers hit issues.
TBR=thestig@chromium.org
Review-Url: https://codereview.chromium.org/2425783002
|
|
This CL implemented a better version of CWeightTable::GetPixelWeightSize(), which will calculate the size of array PixelWeight.m_Weights correctly to prevent potential heap buffer overflow conditions.
BUG=chromium:654183
R=ochang@chromium.org, thestig@chromium.org, dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2404453003
|
|
Review-Url: https://codereview.chromium.org/2395693002
|
|
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920.
TBR=thestig@chromium.org,weili@chromium.org
Review URL: https://codereview.chromium.org/2424533003 .
|
|
Doing so highlights a few places where ownership is dubious.
Add convenience functions to return an unowned reference to
a newly-created indirect object.
Review-Url: https://codereview.chromium.org/2419173002
|
|
This tweaks the implementation while leaving the API the
same. The API change is more disruptive, so break this
part off first.
Review-Url: https://codereview.chromium.org/2385293002
|
|
Also move code that belongs in an anonymous namespace into one.
Review-Url: https://codereview.chromium.org/2416703002
|
|
Introduce the UniqueDictionary typedef and friends, to allow
moving to unique_ptrs before the Release() deleter issue is
fully resolved. This will go away down the road.
Review-Url: https://codereview.chromium.org/2420743002
|
|
No functional changes.
Make many of its methods private.
Review-Url: https://codereview.chromium.org/2415943003
|
|
- Nit fixes.
- Remove unused methods.
- Replace FX_BOOL with bool.
Review-Url: https://codereview.chromium.org/2419433004
|
|
Small step before making CPDF_Image stream ownership saner.
Review-Url: https://codereview.chromium.org/2416733002
|
|
Currently the JBig2 decoder can leak subimages in the case where we mark
more items in EXFLAGS then we have SDNUMEXSYMS. This Cl checks for this
condition and fails the decode if it happens.
BUG=chromium:654365
Review-Url: https://codereview.chromium.org/2419553002
|
|
The CPDF_Page::GetDisplayMatrix expects to set float values into the
|display_matrix| but all of the input values are currently int. It is possible
to overflow the int values, so this CL changes the variables to be int which
closer reflects what they're being used for.
BUG=chromium:652038
Review-Url: https://codereview.chromium.org/2412983002
|
|
Added methods SetExtGID and CalcExtGID for this purpose.
Changed protected to private: no one inherits CPDF_Type1Font.
Review-Url: https://codereview.chromium.org/2412483006
|
|
BUG=chromium:639792
Review-Url: https://codereview.chromium.org/2415483002
|
|
They won't work with std::unique_ptr down the road, so replace
with std::vector.
Review-Url: https://codereview.chromium.org/2411703003
|
|
Rolling 0 times is a no-op.
Rolling 0 items is a no-op.
Rolling N items J times is the same as rolling N items J % N times.
This also avoids an integer overflow corner case.
BUG=chromium:648077
Review-Url: https://codereview.chromium.org/2412833002
|
|
Review-Url: https://codereview.chromium.org/2409173003
|
|
Prevent having to remember what an object number of 0 implies.
Review-Url: https://codereview.chromium.org/2412673002
|
|
Review-Url: https://codereview.chromium.org/2408213002
|
|
Review-Url: https://codereview.chromium.org/2409283002
|
|
Notice that this is just making it analoguous to how it works when the
font is positive: the b and d components are reversed. Currently, when
the font is negative, only the a component is reversed. The c one needs
to be reversed as well.
BUG=chromium:653941
Review-Url: https://codereview.chromium.org/2411833002
|
|
- Deleted useless flag FXFONT_SUBST_STANDARD
- Change kExternalFontIndex to something more meaningful
- Fetch symbolic fonts using UseInternalSubst too
Review-Url: https://codereview.chromium.org/2400773002
|