summaryrefslogtreecommitdiff
path: root/core/src/fxge
AgeCommit message (Collapse)Author
2015-04-16Fix heap use after free in FT_Stream_ReleaseFrameJUN FANG
Adjust the release order of resource to fix this issue. BUG=452793 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1082023002
2015-04-14Merge to XFA: Kill CFX_Object.Tom Sepez
Not just a simple merge, but changes to remove CFX_Object from XFA. Original Review URL: https://codereview.chromium.org/1088733002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1087053002
2015-04-02Merge to XFA: Fix uninitialized face in fx_ge_font.cppJUN FANG
MSAN reported this issue when I tried to reproduce 460936 in the last version of freetype on Linux. BUG=N/A R=thestig@chromium.org Review URL: https://codereview.chromium.org/1050333002
2015-03-30Merge to XFA: Fix no text displayed issue when font embedded and font ↵JUN FANG
subsetting enabled BUG=465322 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1045553004
2015-02-27Merge to XFA: Cleanup: Fix some unused-function warnings.Lei Zhang
Original URL: https://codereview.chromium.org/891113002 (cherry picked from commit 44fc192f29a77c5864fabffe5ab63937dacdfd21) Review URL: https://codereview.chromium.org/966023002
2015-02-27Merge to XFA: Cleanup: Get rid of CRLF line endings.Lei Zhang
Original URL: https://codereview.chromium.org/837533003 (cherry picked from commit 256ef88a26cff56fc7c23119d2d9e1b41468bd1a) Review URL: https://codereview.chromium.org/963403002
2015-02-02Merge the following changes to XFA branch:John Abd-El-Malek
b3a788e Fix GN PDFium build when building all. by John Abd-El-Malek - 19 hours ago chromium/2293 f8af677 Always use the FreeType headers included in PDFium. by John Abd-El-Malek - 24 hours ago dc8c950 Don't export any OpenJPEG methods from PDFium. by John Abd-El-Malek - 3 days ago 71c24b8 Use system FreeType on Linux. by John Abd-El-Malek - 3 days ago R=tsepez@chromium.org Review URL: https://codereview.chromium.org/900433002
2014-12-30XFA: merge patch from CL 733693003, get rid of FX_LPCSTR castBo Xu
Get rid of FX_LPCSTR cast. Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
2014-12-19XFA: merge patch from CL 815103002Bo Xu
Update freetype to 2.5.4. Put freetype into third_party directory, cleaning up header files. Previously freetype header files are in core/src/fxge/freetype and core/include/thirdparties. There were also multiple fx_freetype.h. This patch removes the additional Foxit wrapper to make further update easier. Notice, for original freetype source code, the following files are modified and need to be updated accordingly in future update: third_party/freetype/include/config/ftmodule.h third_party/freetype/include/config/ftoption.h BUG=407341 R=thestig@chromium.org Review URL: https://codereview.chromium.org/815103002
2014-12-15XFA: merge patch from issue 801913002 and 804463003John Abd-El-Malek
Simplify PDFium by removing code that's not used in the open source repo. -remove parameter from FPDF_InitLibrary -remove a bunch of ifdefs that are unused Fix build after previous commit. TBR=tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/809513002
2014-11-14XFA: merge patch from issue 726033002Tom Sepez
Fixes android build error under stricter compilation modes. TBR=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/728943002
2014-11-10Merge to XFA: patch from CL 618073003Bo Xu
BUG=401988 R=vitalybuka@chromium.org Review URL: https://codereview.chromium.org/618073003
2014-11-03Merge XFA to PDFium master at 4dc95e7 on 10/28/2014Bo Xu
2014-10-30Undo an old change in freetype to account for size of USHORTBo Xu
BUG=418582 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/680833006
2014-10-14Glyph index is out of range in cff_get_glyph_name.Jun Fang
Glyph index shall be less than number of glyphs. BUG=418585 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/652363002
2014-09-15Add a boundary check before accessing the table of 'Index to Location'Jun Fang
Before this fix, only |gindex < face->num_locations| is checked. However, the pointer, p, will be moved to next location in the first FT_NEXT_ULONG or FT_NEXT_USHORT. It may cause a crashier. So a boundary check is needed before the second FT_NEXT_ULONG or FT_NEXT_USHORT. BUG=412457 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/571833002
2014-08-28Remove unused fields and stack locals.Chris Palmer
Edge closer to getting PDFium to build in chromium_code mode. BUG=https://code.google.com/p/pdfium/issues/detail?id=29 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/437343002
2014-08-22Bounds check in CFX_Font::LoadGlyphPath().Tom Sepez
Add a check to CFX_Font::LoadGlyphPath() similar to the one that exists in CFX_FaceCache::RenderGlyph(). Also replace some scattered magic numbers in the file with constants, and make arrays not used outside this file be statically scoped. BUG=406144 R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/497863002
2014-08-22Don't stretch bitmaps if destination size is empty.Vitaly Buka
BUG=405201 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/474093003
2014-08-13Add FX_OVERRIDE and use it for virtual functions of FX_FINAL classes.Tom Sepez
Should there be cases where this fails to compile, it indicates a mistake, either an incorrectly declared overrriden virtual method, or a method that should be declared non-virtual. The only issues were with CPDF_CustomAccess::GetBlock(), CPDF_CustomAccess::GetByte(), and CPDF_CustomAccess::GetFullPath(). These don't appear to be used anywhere, and are removed. Two members are removed that are no longer needed once those methods are removed. R=jam@chromium.org, jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/454983003
2014-08-12Fix missing or broken include guard macros in pdfium headers.Tom Sepez
This has no ill-effect at present, but may be distracting when viewing the file since it just looks wrong. R=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/461933003
2014-07-31Fix for min/max compile error on WindowsScott Graham
Patch from jschuh@chromium.org. BUG=pdfium:31 TBR=jschuh@chromium.org,thakis@chromium.org Review URL: https://codereview.chromium.org/438843003
2014-07-31Fix integer overflow when stretch bitmapBo Xu
When an image object is zoomed in by a big factor, the scaling factor in the transformation matrix is big as well, resulting in a large |dest_width| and |dest_height| value(they can be think of as the equivalent pixel size of the entire image, although most of it is outside the device). BUG=395636 R=vitalybuka@chromium.org Review URL: https://codereview.chromium.org/432543002
2014-07-30Remove a few unused variables, functions, and member variables.Nico Weber
No intended behavior change. BUG=pdfium:29 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/426763003
2014-07-29Fix a few more warnings in chromium_code mode.Nico Weber
No intended behavior change. - Remove more unused variables, functions, member variables. - Put a few constructor initializers in the order they execute in. - Add braces for subobject initializers. - Fix a handful of signed / unsigned comparisons. BUG=pdfium:29 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/429593005
2014-07-29Remove a few unused variables, functions, and tables.Nico Weber
Found by clang's -Wunused-variable, -Wunused-function, -Wunused-const-variable. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/404653005
2014-07-21Fix remaining -Wdelete-non-virtual-dtor violations on Windows.Nico Weber
Follow-up to https://codereview.chromium.org/370853002/ BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/406683005
2014-07-18Fix pdfium building issue on VS2010chromium/2098Jun Fang
BUG=pdfium_23 R=palmer@chromium.org Review URL: https://codereview.chromium.org/399233002
2014-07-18pdfium: Fix all -Wdelete-non-virtual-dtor violations on Mac.Nico Weber
Calling `delete` on an object of a type that has virtual functions but not a virtual destructor is questionable: Since the object has virtual functions, it likely has subclasses, so if it's deleted through the base pointer and the destructor isn't virtual, the subclass destructor won't be called. In most cases, the classes getting deleted can just be marked final to tell the compiler that it can't possibly have subclasses (this also enables the compiler to generate better code). Two classes didn't have any sub- or superclasses but virtual functions - this doesn't make sense, so make all methods of these classes non-virtual. (Also delete an unused function on one of the two classes.) In one case, a class actually did have a subclass that needs to be deleted virtually, so mark one destructor as virtual. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/370853002
2014-07-16Remove uninitialized const global g_GbFontNameMap.Nico Weber
C++11 makes uninitialized const PODs an error, because they contain uninitialized memory (they're uninitialized that can never be initialized (because they're const). In this case, the memory was only used by _GetSubFontName() if the lang parameter was 1, but _GetSubFontName() is only called from one place, with a lang parameter of 0. So remove _GetSubFontName()'s lang parameter too. (Using bsearch for searching an array that always has exactly 2 entries is overkill too, but I'm trying to keep the diff small.) No intended behavior change. Fixes this error on the clang/win bot: ..\..\third_party\pdfium\core\src\fxge\win32\fx_win32_device.cpp(207,20) : error(clang): default initialization of an object of const type 'const _FontNameMap [1]' const _FontNameMap g_GbFontNameMap[1]; ^ BUG=chromium:82385 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/369343003
2014-07-14Fix an out-of-boundary issue for wide stringBo Xu
BUG=381521 R=palmer@chromium.org Review URL: https://codereview.chromium.org/383563002
2014-07-08Remove custom memory managerBo Xu
BUG= R=palmer@chromium.org Review URL: https://codereview.chromium.org/372473003
2014-07-07Fix uninitialized font_offsetfoxit
BUG=387840 R=palmer@chromium.org Review URL: https://codereview.chromium.org/354413002
2014-06-30Fix checklicenses in chromiumJohn Abd-El-Malek
2014-06-11Bring back the Skia files from the old repo.John Abd-El-Malek
BUG=11
2014-06-09Fix a crash when parsing truetype fonts without any tables.Lei Zhang
BUG=chromium:381011 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/317203003
2014-06-05fix two uninitialized readsJohn Abd-El-Malek
https://code.google.com/p/pdfium/issues/detail?id=9 https://code.google.com/p/pdfium/issues/detail?id=10 BUG= R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/312273002
2014-05-27Fix licenses in headers to pass Chromium's checklicenses tool.Lei Zhang
BUG=chromium:374943 R=jam@chromium.org Review URL: https://codereview.chromium.org/303723004
2014-05-24Fix warnings in android build, fix font rendering issue, fix issue 357588: ↵Bo Xu
wrong characters representation, and addjust some code indent BUG= R=jam@chromium.org Review URL: https://codereview.chromium.org/294353002
2014-05-23remove Microsoft SDKJohn Abd-El-Malek
Original patch by Lucas Nihlen <luken@chromium.org>
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-21Fix clang warnings so we can treat warnings as errors.John Abd-El-Malek
2014-05-20Fixed or silenced all warnings and turned on warnings-as-errors.John Abd-El-Malek
- Silence -Wheader-hygiene warning on Clang. Between fx_agg_driver.cpp and fxjs_v8.h there are hundreds or thousands of things that depend on "using namespace", so it is best to just suppress this warning than fix it. - gzguts.h: Include unistd.h on all non-Windows platforms, not just Apple platforms. Fixes implicit include warnings on Linux. - Added parens to silence a warning about mixing && and ||. - Removed a check if an enum is negative. Enums can be unsigned, generating an always-false warning. The check isn't necessary. - Removed some statements that are just names of variables that do nothing. BUG=375114 Patch by Matt Giuca <mgiuca@chromium.org>
2014-05-20cf2hints: Fix early loop termination causing hints to be ignored.John Abd-El-Malek
There was a comparison that checks maskEndPtr >= maskEndPtr. It has been fixed to maskPtr >= maskEndPtr. BUG=375139 Patch by Matt Giuca <mgiuca@chromium.org>
2014-05-20Remove "using namespace agg" to make it clear which code is using agg, and ↵John Abd-El-Malek
also so we can turn compiler warnings into errors.
2014-05-17Initial commit.John Abd-El-Malek