Age | Commit message (Collapse) | Author |
|
The GetCapacity methods return a void* because they return different types of
internal class memory based on what the calling parameter was. This is confusing
and makes it difficult to tell when then enum values can be removed.
This CL removes GetCapacity and adds methods as needed to get the real values.
Change-Id: I64c2edc858220624880e27f4ed49c2dae080f462
Reviewed-on: https://pdfium-review.googlesource.com/2137
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the LoadString method from CPDFXFA_Context and, instead,
creates individual exception methods for each of the loaded strings and
calls as needed.
BUG=pdfium:549
Change-Id: I1d975f01f13f45a885946a9952f24b13387dc3e4
Reviewed-on: https://pdfium-review.googlesource.com/2135
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CFWL_MonthCalendar to return values instead of taking an
out parameter.
Change-Id: I347d0e85897be1359bad7971d82c70dfad0d69a0
Reviewed-on: https://pdfium-review.googlesource.com/2132
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the Huffman decoder in the JBig2 codex to check the low field
does not overflow.
BUG=chromium:675236
Change-Id: I7f5f6fe8329df4ece6f317fac521fe2373686479
Reviewed-on: https://pdfium-review.googlesource.com/2131
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also pass some unqiue_ptr further down while we're at it.
Review-Url: https://codereview.chromium.org/2594103002
|
|
I'd been waiting on this hoping the code would be refactored out
of existence, but it looks to be used.
Use tests against x.end() in place of a "null position".
This is greatly complicated by the use of "tail position", which
now calcluated by std::prev(x.end()) unless the list is empty.
Review-Url: https://codereview.chromium.org/2592163002
|
|
This method just proxies to the provided item now. Remove the method and call
GetText() directly if possible.
Change-Id: Ida49e0e878f859a69f7d5bec9d0f734feb7a763d
Reviewed-on: https://pdfium-review.googlesource.com/2130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up some of the out params in CPDFXFA_Context. In the process
several of the strings returned by ::LoadString() are inlined in their
call sites and the defines removed.
BUG=pdfium:549
Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea
Reviewed-on: https://pdfium-review.googlesource.com/2134
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CFWL_Scrollbar use return values instead of using out params.
In some cases, the same values is assigned and passed in, but passing in the
const ref is a lot clearer as to what is happening.
Change-Id: Iff72a845e09ac73ff8eac938482547eaf251f835
Reviewed-on: https://pdfium-review.googlesource.com/2133
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The previous implementation, FindPDFPage, was already doing this since
the recursive call was always with return. Currently, we were trying to
keep going even after reaching max level. The problem is that if the
page tree is not a tree, we might loop forever. This could also be
solved by keeping track of the dictionaries that have been visited, but
this solution takes much less space.
BUG=672172
Change-Id: Ia37aea58e92b6068de69f26736c612aa6a0ff4b3
Reviewed-on: https://pdfium-review.googlesource.com/2138
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL makes the fix to the bug equal to that which has now been
submitted upstream. Link:
https://github.com/vadz/libtiff/commit/fa6b22a5135fdeabe860097c04f298ca0ae7f2e1
Our original CL for fixing the bug:
https://codereview.chromium.org/2545723004/
BUG=657473
Change-Id: I52ae6a062ac07a0e20d0ba4ab823cbbf1d2b1ac1
Reviewed-on: https://pdfium-review.googlesource.com/2136
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Extends the PDFium tests to collect images and meta data to be uploaded
to Gold. This feature is triggered by adding the --gold_* flags.
It extends pdfium_test to output the MD5 hash of the underlying pixel
buffer for each page it renders.
That output is then processed by test_runner.py to generate the
gold meta data.
This behavior is modeled after the 'dm' tool in skia. See
https://skia.googlesource.com/skia/+/master/dm/DM.cpp#1090
This should not cause any change in the current behavior of the tests,
it will be trigger once we update the buildbot recipe.
BUG=skia:5973
Review-Url: https://codereview.chromium.org/2578893004
|
|
Also be sure that a loop terminates without relying on
specific behaviour of the callers.
Review-Url: https://codereview.chromium.org/2598473002
|
|
Fix some naming to make things clearer.
Review-Url: https://codereview.chromium.org/2587233002
|
|
TBR=dsinclair@chromium.org
BUG=675752
Review-Url: https://codereview.chromium.org/2585113004
|
|
BUG=pdfium:644
Review-Url: https://codereview.chromium.org/2581873002
|
|
This is partially backported from upstream
https://github.com/mm2/Little-CMS/commit/4011a6e3
BUG=chromium:665054
Review-Url: https://codereview.chromium.org/2577963007
|
|
Delete some dead code in the process.
Review-Url: https://codereview.chromium.org/2585873002
|
|
- Add unit tests for sha256 implementation.
- Remove void* types from API in favor of correct actual types.
Review-Url: https://codereview.chromium.org/2577223002
|
|
In turn, make CPDF_Stream() take an unique_ptr.
Review-Url: https://codereview.chromium.org/2584683002
|
|
Move code to make clear what is being masked.
Review-Url: https://codereview.chromium.org/2573163002
|
|
The Offscreen state was never set, removed.
Review-Url: https://codereview.chromium.org/2569663006
|
|
CFWL_Widget::HasEdge() always returns false. This CL removes it and the
supporting code.
Review-Url: https://codereview.chromium.org/2575093002
|
|
Remove more FWL Widget Styles which are never set.
Review-Url: https://codereview.chromium.org/2578473003
|
|
These widget state flags are not set and mostly unused. Removed.
Review-Url: https://codereview.chromium.org/2573133002
|
|
This CL removes the unused FWL_WGTSTYLE_MinimizeBox, FWL_WGTSTYLE_MaximizeBox,
and FWL_WGTSTYLE_CloseBox along with the supporting code.
Review-Url: https://codereview.chromium.org/2578603002
|
|
In turn, this makes CFX_BinaryBuf::AttachData() unused.
Review-Url: https://codereview.chromium.org/2578793002
|
|
Remove one unused CreateDoc variant.
Review-Url: https://codereview.chromium.org/2576893002
|
|
Review-Url: https://codereview.chromium.org/2572293002
|
|
Review-Url: https://codereview.chromium.org/2571863002
|
|
Rename GetAlphaMask => CloneAlphaMask since it does more than get.
Rename CopyAlphaMask => SetAlphaMask, as it copies IN, not OUT.
ditto for CopyPalette => SetPalette.
BUG=
Review-Url: https://codereview.chromium.org/2572243002
|
|
Remove unused flags in CFWL_MonthCalendar.
Review-Url: https://codereview.chromium.org/2570943002
|
|
Review-Url: https://codereview.chromium.org/2571313002
|
|
Cleanup flags in CFWL_Form which are never set.
Review-Url: https://codereview.chromium.org/2575573002
|
|
This CL removes the flags from CFWL_Edit which are never set. In turn, the
coresponding text edit engine flags are removed.
Review-Url: https://codereview.chromium.org/2570033003
|
|
Several of the widgets have flags which are no longer set. This CL
removes the flags and any flag conditional code.
Review-Url: https://codereview.chromium.org/2570083002
|
|
This CL removes states and settings from the CFWL_ListBox code which were never
enabled.
Review-Url: https://codereview.chromium.org/2576483002
|
|
Allows JPEG data to be copied into the file rather than left in a
separate file. This is needed to allow rasterized PDFs to avoid saving
image files for each page. See Chromium issue 2524143003 for chromium
changes.
BUG=534945, 550205, 480628
Review-Url: https://codereview.chromium.org/2529543003
|
|
Review-Url: https://codereview.chromium.org/2578663002
|
|
This CL updates the CFWL_ListBox code to work with return values instead
of out params. This also extracts the CFWL_ListItem code out of CFWL_ListBox
and puts into the correct class.
Review-Url: https://codereview.chromium.org/2572783002
|
|
Be suspicious of |new|. This removes some of the
easy cases.
Review-Url: https://codereview.chromium.org/2571913002
|
|
This CL updates the CalculateString method to make sure the number of digits
of precision is valid before doing the stringstream conversion.
BUG=chromium:673336
Review-Url: https://codereview.chromium.org/2572543004
|
|
Review-Url: https://codereview.chromium.org/2572843002
|
|
Review-Url: https://codereview.chromium.org/2567503002
|
|
Avoid another unique_ptr release and a separate flag.
Review-Url: https://codereview.chromium.org/2570913002
|
|
Found when adding pdf_use_skia_paths canary
to skia status
R=dsinclair@chromium.org, borenet@google.com
BUG=skia:5849
Review-Url: https://codereview.chromium.org/2569003002
|
|
While decoding among instances, variable "FIRSTS" should hold its
value, not be reset. This was accidently changed by earlier
refactoring.
BUG=chromium:625848,pdfium:636
Review-Url: https://codereview.chromium.org/2569023002
|
|
See https://skia-review.googlesource.com/c/5844/
BUG=
NOTRY=True
Review-Url: https://codereview.chromium.org/2569853002
|
|
The canvas clip op changed to a
enum class to safeguard against a
regular enum used as a bool in an
overloaded interface.
R=reed@google.com, dsinclair@chromium.org
Review-Url: https://codereview.chromium.org/2568193002
|
|
When GDI device driver draws a dotted line, it also clip the line
into the device context's bound before drawing. This CL includes
a couple fixes:
-- When this driver is used for EMF drawing, the drawing is not
bound to the device context so clipping is not needed;
-- Transformation needs to be applied before clipping since the
transformation may move the line into the bound;
-- While checking for out-of-bound flags, bit operations are needed
to make sure the discarded line is completely out of bound, not
partially inside the bound;
BUG=chromium:539533
Review-Url: https://codereview.chromium.org/2562533002
|