Age | Commit message (Collapse) | Author |
|
This CL splits the fpdf_ap.h file apart into individual pieces and moves the
implementations to their own CPP files.
Review URL: https://codereview.chromium.org/1840413002
|
|
The code is changed or had been changed to no longer generate these
warnings. It is safe to re-enabled these warnings.
In this code change, we fixed some code which generates warnings 4018
(signed/unsigned mismatch) and 4146 (unary minus operator applied to
unsigned type, result still unsigned).
Warning 4333 (right shift by too large amount, data loss) and 4345
(an object of POD type constructed with an initializer of the form ()
will be default-initialized) are no longer generated.
The same setting is applied and verified for GN build as well.
BUG=pdfium:29
Review URL: https://codereview.chromium.org/1849443003
|
|
Needed to validate refactoring which was reverted.
Review URL: https://codereview.chromium.org/1847193002
|
|
This reverts commit ac88953dfa7c1a68c69989d61d7bc03c0595064b.
Reason for revert: Strings borked.
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1852453004
|
|
VS 2015 has a new or louder warning about 32-bit shifts that are then
assigned to a 64-bit target. This type of code triggers it:
int64_t size = 1 << shift_amount;
Because the '1' being shifted is a 32-bit int the result of the shift
will be a 32-bit result, so assigning it to a 64-bit variable is just
misleading.
In this case the code that triggers it is this:
m_IAID.resize(1 << SBSYMCODELEN);
The destination is a size_t so the warning only shows up on 64-bit
builds and doesn't indicate a real bug. But, casting the '1' constant
to size_t makes the behavior/intent more obvious and consistent and
allows enabling C4334 in Chromium.
BUG=593448
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1843253002 .
|
|
This moves the reference counts from an ad-hoc mechanism
to being automatically tracked.
Also:
Make StringData::Create() always return non-null.
Add better ctors for StringData itself.
Consolidate copies into StringData methods.
Simplify the concat() code.
Rename/reorder some parameter names to be simpler.
Review URL: https://codereview.chromium.org/1810823002
|
|
Review URL: https://codereview.chromium.org/1841313004
|
|
The macro _CRT_SECURE_NO_WARNINGS is no longer needed for chromium
code as pdfium code itself is warning free;
For standalone build, the macro may suppress warnings from third
party code. But it has no use now as it is shadowed by disabled 4996
warnings.
This is one of the efforts to re-enable warnings for pdfium code.
BUG=pdfium:29
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1836443002 .
|
|
This makes pdfium code on Linux and Mac sign-compare warning free.
The warning flag will be re-enabled after checking on windows clang build.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1841643002 .
|
|
It's going to be hard to fix some XFA object leaks without
this. Put this in fxcrt/ as we should be able to make the
FX strings take advantage of this.
BUG=pdfium:55
Review URL: https://codereview.chromium.org/1805683002
|
|
Every time I read this code, I have to make the mental substituion
that "Element value" means "de-ref indirect object", so it might
as well just say so.
BUG=
Review URL: https://codereview.chromium.org/1841173002
|
|
Remove unimplemented/unused class, and other cleanup
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1834063002 .
|
|
The warnings generated by Clang. This is part 1 for some simple cases.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1840483003 .
|
|
Review URL: https://codereview.chromium.org/1832173003
|
|
Correctly handle sign and out of range values.
R=dsinclair@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1828873002 .
|
|
To draw paths that are stroked and filled with a pair of colors,
reduce the fill by the width of the stroke. This is implemented
with path ops subtracting the resolved stroke shape from the
fill shape. This permits rendering the result without requiring
an offscreen bitmap.
The implementation for stroke+fill requires a new entry into
the graphics engine, so a bit was added to device caps for that.
Extract the gradient information out of the axial gradient
function descriptions, and when possible, use Skia to draw
the linear gradient directly. This requires making the function
descriptions non-opaque, and adding a bit to device caps for
another entry into the graphics engine.
BUG=
Review URL: https://codereview.chromium.org/1828283002
|
|
First step to getting rid of FX_DWORD.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1832113003 .
|
|
The last 3 params of CPDF_Image::SetImage are unused, remove and cleanup logic.
BUG=pdfium:194
Review URL: https://codereview.chromium.org/1831263002
|
|
This CL removes _FPDFAPI_GetInternalFontData which is not implemented,
FWL_PostMessageToMainRoop which has no body and the PostMessage which was
the only caller.
FWL_ShowCaret is moved to the only place where it's used.
BUG=pdfium:112
Review URL: https://codereview.chromium.org/1827343003
|
|
Patch by forshaw.
This patch adds bounds checking to the names buffer passed to GetNameFromTT.
There are observed crashes in this function where data is read outside of
the bounds allocated and passed to GetNameFromTT. There's no reason that
this function should ever try and read outside of the allocated bounds.
BUG=583037
TBR=forshaw@chromium.org
patch from issue 1829013002 at patchset 40001 (http://crrev.com/1829013002#ps40001)
Review URL: https://codereview.chromium.org/1830243003 .
|
|
Compilers have good inline memcmp nowadays, so we don't
have to resort to old tricks.
Remove FXDWORD_FROM_LSBFIRST and FXDWORD_FROM_MSBFIRST
while we're at it. MSBFIRST was technically wrong due
to promotion to int.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1834553002 .
|
|
We'd skip a test as the two strings would get joined, add the missing
comma so all tests are run correctly.
Found by: etienneb@
R=etienneb@chromium.org
Review URL: https://codereview.chromium.org/1826193002 .
|
|
Use FreeType instead of Direct Write on Windows. Since PDFium
currently uses the graphics engine to draw but not to measure,
the graphics engine needs to always use FreeType to get
consistent metrics.
Add a translation from PDF's blend modes to Skia's xfer modes.
Turn on subpixel positioning for text to get more precise
glyph placement.
Pass the alpha through to get proper bitmap transparency.
Address earlier nits.
R=dsinclair@chromium.org, tsepez@chromium.org, dsinclair
Review URL: https://codereview.chromium.org/1812263002 .
|
|
This CL splits apart the core/include/fpdfapi/fpdf_resource.h file and places
the classes into individual files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1824033002 .
|
|
This CL moves the fxcrt code into the core/fxcrt directory. The only exception
was fx_bidi.h which was moved into core/fxcrt as it is not used outside of
core/.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1825953002 .
|
|
After moving EmbeddedUnicodeFromCharcode the
IsValidEmbeddedCharcodeFromUnicodeCharset method is no longer used on windows.
TBR=weili@chromium.org
Review URL: https://codereview.chromium.org/1827823002 .
|
|
EmbeddedCharcodeFromUnicode is not used on windows anymore and clang complains.
TBR=weili@chromium.org
Review URL: https://codereview.chromium.org/1828673002 .
|
|
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1821423002 .
|
|
Add a few missing consts and remove a few extra externs.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1817283002 .
|
|
It isn't buying us anthing, and it looks strange in
a struct when other uint types are already present.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1821043003 .
|
|
Remove some tables from .h file (risk of duplication).
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1814233005 .
|
|
The only one that is ever used is FXDIB_PALETTE_loc, so remove
the option entirely. In turn, this allows deleting about 2KB
of unused constant tables.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1809943007 .
|
|
Re-enable the following warnings:
4245: signed/unsigned conversion mismatch;
4310: cast may truncate data;
4389: operator on signed/unsigned mismatch;
4701: use potentially uninitialized local variable;
4706: assignment within conditional expression
Clean up the code to avoid those warnings.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1801383002 .
|
|
When both text objects have no items, directly return TRUE;
The last if statement moved inside loop to make the intent more
obvious and free from warning (msvc warns using potentially
uninitialized var itemPer)
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1815453002 .
|
|
This CL splits the file into individual classes and moves them into
core/fpdfapi/fpdf_page as needed.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1811053002 .
|
|
Saves a few bytes here and there because the tables need
only 16 bits but wchar is 32 bits (except on windows).
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1815313003 .
|
|
Either by using the smallest possible data type, or
By accurately calcuating the bounds, or
Moving to array of pointers for varying length rows.
Notes:
The 929 is reassuring since PDF417 barcode uses GF(929).
FX_WCHAR is 4 bytes on unix (2 on windows).
Binary looks to be about 240k smaller on linux/64
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1807373002 .
|
|
More Skia driver cleanup.
Fix the GN build for Skia.
Remove unused functions from header.
Remove agg setup that is not required.
Change path construction to use the SkCanvas matrix to position the path
rather than converting the points directly.
Draw stroked paths using Skia rather than generated the filled path.
Pin the minimum stroke width to 1 px in device space to mimic PDF's stroke
dropout control.
Factor out flipped and non-flipped matrices.
Add some debugging code.
Set the bitmap filter quality to high. This helps a lot with 1 bit sources.
R=dsinclair@chromium.org, dsinclair, tsepez
Review URL: https://codereview.chromium.org/1806843002 .
|
|
This CL adds the necessary pieces so you can add pdf_use_skia=1 to GYP_DEFINES
and do a standalone build.
R=caryclark@google.com
Review URL: https://codereview.chromium.org/1812563002 .
|
|
This CL splits the fpdf_page.h header into the individual classes and moves
them to the correct core/fpdfapi locations.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1805663002 .
|
|
Fix warnings in win32_int.h
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1809473002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1797423002 .
|
|
This Cl moves a bunch of the files from core/include/fpdfapi to their correct
location outside the core/include tree.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1805603002 .
|
|
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1800793002 .
|
|
Fix an incorrect unit test result.
This reverts commit 2df269c52741c12d63300cee806e96ae5d0b038f.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1803043002 .
|
|
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1783933003 .
|
|
This reverts commit 48b934135171b55b1ffc510226317fdddef5f5b8.
Broke unit tests.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1800153002 .
|
|
sycc422_to_rgb was incorrect. This patch adds a similar check to the one
in sycc420, and fixes an issue with the previous sycc_420_size_is_valid
function where truncation from division wasn't accounted for.
BUG=591785
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1785323003 .
|
|
Make .h/.cpp filenames match.
Add header for unicodenormalization.cpp
Remove dead code.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1796303002 .
|
|
This is a first-cut at supporting bitmaps.
Also added a --skp option to pdfium_test to generate
a Skia picture file. The picture file can be loaded
in Skia's SampleApp, debugger, or skiaserver to
examine the generated picture.
(This also includes fixes suggested in the prior Skia CL.
My apologies for fat-fingers abandoning that one.)
R=dsinclair@chromium.org, tsepez@chromium.org, dsinclair
Review URL: https://codereview.chromium.org/1776313002 .
|