Age | Commit message (Collapse) | Author |
|
Also add a presubmit that checks for this so I don't have to keep doing it.
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
BUG=none
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1272653005 .
|
|
(Having renamed CFontFaceInfo to follow naming pattern).
Also cleanup some initialization-order noise in CFX_FontMapper.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1277883004 .
|
|
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
|
|
Nearly a naming-only change, but add one argument to constructor.
grep now shows:
class CFX_AndroidFontInfo : public IFX_SystemFontInfo
class CFX_Win32FontInfo final : public IFX_SystemFontInfo
class CFX_ExternalFontInfo final : public IFX_SystemFontInfo
class CFX_FolderFontInfo : public IFX_SystemFontInfo
class CFX_MacFontInfo : public CFX_FolderFontInfo
class CFX_LinuxFontInfo : public CFX_FolderFontInfo
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1257743005 .
|
|
The design envisioned two kinds of font mappers: internal
(of type CFX_FontMapper), and external, both of which
implement a common interface. But there isn't any means of
making an external one, so the interface is redundant.
IFX_FontMapper also appears in an apple-specific struct,
but was never non-null or used in any way.
The CFX_FontMapper class provides its own mechanism to
include platform-specific features, as it turns out.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1259123005 .
|
|
If you want to check the number of bytes read, you need to
change the order of arguments.
TEST=testing/corpus/fx/mulobj/1/1_10_watermark.pdf.0.png
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1262453006 .
|
|
This is the cause of the mac embeddertest failure when fx_bool is
replaced by bool (an incorrect overload). The types still
match on master, prior to the conversion, so it's not noticed.
Find other instances as well.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1262683003 .
|
|
- Bool functions should not return -1 for error.
- Bool variables should not be assigned 2
- Bool / int32_t prototypes should match.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254973004 .
|
|
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255293002 .
|
|
Try to reland this patch after fixing underlying issues that
caused it to be reverted.
fx_system.h is the only manual edit.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1258093002 .
|
|
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
|
|
Fully automatic change, execpt for cleanup in fx_system.h
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254703002 .
|
|
Extracted from https://codereview.chromium.org/1252613002/
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1253603002 .
|
|
Revert "Revert "Fix else-after-returns throughout pdfium.""
This reverts commit 4eb4d7f6c707cc2c23c806aa540d055c8832b55d.
Fix one naming conflict.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1243953004 .
|
|
This reverts commit 7cc97521db1e52d5927f5605de5f9a7102f8af40.
|
|
Driven by CS search for
pcre:yes file:third_party/pdfium/ -file:pdfium/third_party/
\breturn\b[^;]*;\s*\n*\s*\}*\s*\n*\r*else
Note: Care is required to ensure the preceding block is not an else-if.
As usual, removed any tabs I saw.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1243883003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1249643003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1195363002 .
|
|
BUG=issue179
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1217093006 .
|
|
BUG=505296
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1221673007.
|
|
BUG=504699
R=raymes@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1213433005.
|
|
BUG=none
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1223433002.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1181593003.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1192743004.
|
|
Creates a separate library so we can apply less-strict warnings to
the code we can't change from upstream vs. the code we can change,
reducing noise in the standalone build.
Remove needless foo.{cpp,h} files that merely perform indirection
via #include "some_other_path/foo.{cpp,h}".
BUG=pdfium:166
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1152743007.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1176333002.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1177973008.
|
|
If the font is 'tricky', it needs to be hinted by default according to the description in freetype.
BUG=490814
R=tsepez@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/7a2fcd8d1256c267380b40f2d2d8e98c3b181cee
Review URL: https://codereview.chromium.org/1170313003.
|
|
At one point in time, it may have made sense to indicate the
expected alignment of the memory you're about to copy, but that
was last century. The compiler will take care of it just fine.
I stopped short of removing the FXSYS_ wrapper macros entirely.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1179693003.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1173223002.
|
|
These stand for const CFX_{Byte,Wide}StringC&, which is just
monumentally confusing, since there are so many string types
running around here.
The following had manual changes:
core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fpdfdoc/doc_form.cpp
fpdfsdk/src/fpdf_ext.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1180593004.
|
|
This regressed in https://pdfium.googlesource.com/pdfium/+/71c24b839498fb89184002ed30fcff353e1e402c. The code would reach into FreeType internals and reset transform_flags. This would effectively set the font's transform matrix to the identity (since a transform is only used if the flag is set). I removed it because I assumed this is only a cache, and any other place that would call FT_Load_Glyph would have set a transform first. Apparently that's not the case (verified through adding some additional code). The fix is to reset the transform matrix after changing it. This is functionally equivalent to the previous behavior, since if the flag was 0 but there was a transform, it would be ignored until another transform is set.
BUG=479434
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1163423005.
|
|
This involves fixing some multiple variable per line
declarations, as the textually-substituted "*" applies
only to the first one.
This involves moving some consts around following the
substitution.
This involves replacing some typedefs used as constructors
with better code.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1171733003
|
|
TBR=tsepez@chromium.org
BUG=N/A
Review URL: https://codereview.chromium.org/1174583003
|
|
If the font is 'tricky', it needs to be hinted by default according to the description in freetype.
BUG=490814
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1170313003
|
|
It's redundant nowadays to provide our own equivalents, now
that this is done for us by the system header.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1177483002
|
|
- include system headers first and alphabetize.
- remove unsupported FX_WIN32_MOBILE symbol.
- actually define a FX_WIN64 symbol and make consistent.
- use final/override, not FX_FINAL.
- let stdint.h resolve FX_WORDSIZE concerns.
- unused FX_ERR and FX_SUCCESS() macros.
- unused FX_LSB_FIRST macro.
- outline FX type deprecation plan.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1169963003
|
|
Get rid of leading _CAPITAL identifiers.
A large number of these didn't actually match the filename.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1160443004
|
|
Fixes the ordering of some assignments broken when converting to checked
numerics in CFX_PathData::AddPointCount().
Original Review URL: https://codereview.chromium.org/1142713005
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1135893008
|
|
This reverts commit eb6527763171cdb4b0fbfea5a20d691f4d67b660.
Reason for revert: broke javascript tests.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1145843005
|
|
This permits some functions to become void's since
they, in turn, can't fail.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1142713005
|
|
This avoids unchecked multiplications when computing a size argument
to malloc(). Such an overflow is very scary, and can result in
exploitable bugs.
Along the way, kill off some return checks, since we know this can't
return NULL.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1143663004
|
|
Add a FX_TryAlloc() for those few cases where we might need to continue
in face of OOM.
Remove FX_AllocNL() (the context of its use would suggest that NL
means "No Limit"). This is used for some big allocations, so replace
it with TryAlloc(). Large allocations may be worth trying to continue
from, since there are few and they have a large chance of failing.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1128043009
|
|
Also fix typos and remove trailing spaces/tabs.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1141123002
|
|
- fread() returns the number of items read.
- fix a memory leak in error handling.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1135713004
|
|
Also fix a few nits and other errors along the way.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1098583002
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1084613006
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1062863006
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1081443004
|
|
CFX_Object is a type that implements its own new operators that return
NULL on error. There's no need for this given the |new (std::nothrow)|
syntax; in fact, the current code can only work if there is no activity
in the constructors. This may explain the pervasive lack of
constructors and reliance on Init() methods throughout the codebase.
The activity takes place in fx_memory.h, where FX_NEW is mapped onto
the std::nothrow syntax. The rest is just cleanup.
Down the road, we will simply throw and remove all the error-checking
paths for new objects. Landing this patch first will at least show a
simple path back to the old behaviour without having to re-introduce
CFX_Object should someone want to do so in their own fork.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1088733002
|