Age | Commit message (Collapse) | Author |
|
These are generally cheap enough to compute as needed, rather than
keeping around in memory all the time (plus the memory for the static
flag the compiler generates to check if initialized).
Change-Id: If3a5365521f6a7781e66fb11f04883a5c673ee11
Reviewed-on: https://pdfium-review.googlesource.com/27150
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Didn't find any bugs, but also doesn't require much boilerplate.
Bug: TODO
Change-Id: I5f30183c55216f1333c79fcb46476d281720873e
Reviewed-on: https://pdfium-review.googlesource.com/26210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
|
|
Bug: 806612
Change-Id: I22bd9046dd37a1b596762c46a6b29a323d6e9fa1
Reviewed-on: https://pdfium-review.googlesource.com/24410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
The CPWL_EditImpl::Backspace() instance occurred in commit 671a799. The
other two instances where known cases.
BUG=chromium:805881
Change-Id: Iae7cb8534e85342069d8753ced88543dad751e92
Reviewed-on: https://pdfium-review.googlesource.com/24050
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This completes jumbo build support for non-XFA builds.
BUG=pdfium:964
Change-Id: Ife4ed23f9b438623581a863685014e64a06cf0d8
Reviewed-on: https://pdfium-review.googlesource.com/22775
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17
Reviewed-on: https://pdfium-review.googlesource.com/22891
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Id403abaf3d142dc30a661bc64ff48dbd5b10948e
Reviewed-on: https://pdfium-review.googlesource.com/22736
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I98f3f1773b570dc525618ada997425000e1e4c58
Reviewed-on: https://pdfium-review.googlesource.com/22191
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: Id8012a5769df68d29da5c58cc821c71ca93240e1
Reviewed-on: https://pdfium-review.googlesource.com/22111
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: I8edb14c024860c66b5e6c014136393e71e38387d
Reviewed-on: https://pdfium-review.googlesource.com/21570
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9ebacd18252a837f1f5f13ccaec19b196bacc3ae
Reviewed-on: https://pdfium-review.googlesource.com/21072
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I6baab14c989e8ae692ed1c846b135af95c09ce37
Reviewed-on: https://pdfium-review.googlesource.com/20210
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL moves the Format and FormatV methods of ByteString to be static.
Bug: pdfium:934
Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a
Reviewed-on: https://pdfium-review.googlesource.com/18650
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the friend entries from the various pwl/ classes.
Change-Id: Ib93a2bedcde521eb92e53580b5d7cd9bca08902f
Reviewed-on: https://pdfium-review.googlesource.com/16150
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the use of CPVT_Color to CFX_Color and removes the
CPVT_Color class.
Change-Id: I86a2d06524cd8f0fbce2335f0185426cc41dbe84
Reviewed-on: https://pdfium-review.googlesource.com/16030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CPVT_Section only contained a single rect which was used in one
place. The place it was used never used the variable it assigned it too.
Removed.
Change-Id: I5c3fccff4fad6deca4945e301bffb5348692b23c
Reviewed-on: https://pdfium-review.googlesource.com/15675
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Only one of the props was being used and that prop always had the same
value. This CL removes CPVT_WordProps.
Change-Id: I8cf64f0e9b80c5af18b8fc40ef7b602ffeec7f93
Reviewed-on: https://pdfium-review.googlesource.com/15672
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CPVT_SecProps were assigned but never accessed. Removed.
Change-Id: I2ed15f44dc7a428261e729fc7a835885257d4807
Reviewed-on: https://pdfium-review.googlesource.com/15671
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove some unused parameters in cpwl_edit_impl.cpp
Change-Id: Ie56775ef671ae03b2b53a01cc2539683585a1c68
Reviewed-on: https://pdfium-review.googlesource.com/15690
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove unused params from CPDF_VariableText methods.
Change-Id: Ia02f99ea84f0c29e9f674a2cb837b422de390d33
Reviewed-on: https://pdfium-review.googlesource.com/15670
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the members of CPDF_RenderOptions to be private members
and adds accessor methods as needed.
Change-Id: Ie91665ff53ae00cc4c53741d089d375503fabe11
Reviewed-on: https://pdfium-review.googlesource.com/15531
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
SetVisible() may be called during Destroy() which may be called
during SetVisible().
This fixes the latest in a family of bugs that happen after an
instance is freed by code triggered by JS code while it's executing
a method.
The CL has a lot of protection for many of these points where JS
may be executed and potentially destroy objects. The return types
of many methods that may execute JS have been changed to bool,
indicating whether the instance is still alive after the call.
Bug: chromium:770148
Change-Id: If5a9db4d8d6aac10f4dd6b645922bb96c116684d
Reviewed-on: https://pdfium-review.googlesource.com/15190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Remove unused defines; Move to .cpp files where possible; Fixup values.
Change-Id: I88cd5deb04b14ab8e9f8097a695c3d0b52d64b4c
Reviewed-on: https://pdfium-review.googlesource.com/15130
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the FX_OS defines to have _OS_ in their names and drops
the _DESKTOP suffix. The FXM defines have been changed to just FX.
Change-Id: Iab172fba541713b5f6d14fb8098baf68e3364c74
Reviewed-on: https://pdfium-review.googlesource.com/14833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: chromium:766957
Change-Id: I61b282059fb4fc2c8ba6dafc502f030f31dd324d
Reviewed-on: https://pdfium-review.googlesource.com/14710
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves CFX_UnownedPtr to UnownedPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I6d1fa463f365e5cb3aafa8c8a7a5f7eff62ed8e0
Reviewed-on: https://pdfium-review.googlesource.com/14620
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_Observable to Observable and moves into the fxcrt
namespace.
The test suite names were updated to ObservedPtr from fxcrt.
Bug: pdfium:898
Change-Id: Ia507482bc0a1d6d8bbf12c0c55c4a88f6c8910e2
Reviewed-on: https://pdfium-review.googlesource.com/14615
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CFX_AutoRestorer to just AutoRestorer and places in the
fxcrt namespace.
Bug: pdfium:898
Change-Id: Id9f36df94e95f3b2a55054bc198ca1bfd249ee3d
Reviewed-on: https://pdfium-review.googlesource.com/14450
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Add some early returns where possible.
Change-Id: I9c53435e6e927057b085b1ccaa30a1637c185486
Reviewed-on: https://pdfium-review.googlesource.com/14350
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
When a widget has focus set, this can trigger an Invalidation call which
can trigger a page and annotation reload. This reload can destroy the
current widget we're handling.
This CL adds ObservedPtrs as needed so we can make sure the widgets are
still alive after we've done the Invalidation.
Bug: chromium:765921
Change-Id: I51cd24aa1ebd96abe9478efef5130a4e568dac1a
Reviewed-on: https://pdfium-review.googlesource.com/14290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
First step in passing ownership of this memory to the CPWL_Wnd.
In turn, nest two other classes that also require PrivateData to
satisfy nesting rules.
Move one stray #define to the appropriate file while at it.
Change-Id: I565934565421f5843a3b792b3bdc21b5e8839eb8
Reviewed-on: https://pdfium-review.googlesource.com/14170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This nesting makes so much more sense when I read the code.
Fix member naming for this in CPWL_Wnd.
Pass in/out CreateParams arg as pointer.
Kill Reset() method, only called during destroy and nothing needs
explicit cleanup.
Change-Id: If50e403e11c131e7656da09c0cb36866223d64c6
Reviewed-on: https://pdfium-review.googlesource.com/14070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This is to prevent use after free issues due to these calls causing
reloads of content that have the side of effect of destroying windows.
BUG=chromium:760455
Change-Id: I3f3947be8b32964783abf5577a24ba6a713b3476
Reviewed-on: https://pdfium-review.googlesource.com/14150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2a750c8e46b68dc4870e2dadd2ed3429008e1562
Reviewed-on: https://pdfium-review.googlesource.com/13551
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=pdfium:877
Change-Id: I6aa3e53057c27700c2d3c0c1692fa86ae9b3a03c
Reviewed-on: https://pdfium-review.googlesource.com/12711
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the fx_basic.h header and fixes up includes as needed.
Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040
Reviewed-on: https://pdfium-review.googlesource.com/12670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves CFX_AutoRestorer into its own file, separate from
fx_basic.h.
Change-Id: I415cb9207416bd4744b8ac8e2d7466852db53f0a
Reviewed-on: https://pdfium-review.googlesource.com/12390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Instead of using CFX_FloatRect::ToFxRect(), which always rounds down,
use GetOuterRect() which correctly rounds up / down depending on the
side of the rectangle.
Change-Id: I7abd3a65e8c0467ed4303292f26a72737a5d553b
Reviewed-on: https://pdfium-review.googlesource.com/12312
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I042c5e843dcf535b2d6676d41c0037e87c59c219
Reviewed-on: https://pdfium-review.googlesource.com/12050
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Currently, all three of CFX_Matrix::TransformRect() take in rect values
and modify them in place.
This CL converts them to take in constant values and return the
transformed values instead, and fixes all the call sites.
Bug=pdfium:874
Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b
Reviewed-on: https://pdfium-review.googlesource.com/11550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Simplify some code along the way.
Change-Id: I0022c8a82188192c63b9ac0bc87e9b9dbf983040
Reviewed-on: https://pdfium-review.googlesource.com/10852
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I15307562fcf8f0aebd6e14293b46a10106c4ace7
Reviewed-on: https://pdfium-review.googlesource.com/10858
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I529925b10fa43d4c9c6c9d398265d2ae7eccf93d
Reviewed-on: https://pdfium-review.googlesource.com/10853
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Return early in some methods.
- Make IsProceedtoOnChar() a static method.
Change-Id: I56b92d920b2c0bbdff84cb3024d80e379f1c6a2a
Reviewed-on: https://pdfium-review.googlesource.com/10857
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
So assert this is the case and remove all the pointer checks.
Change-Id: I8fa273b03c75ec169d1b03ef6fb239defddf7d67
Reviewed-on: https://pdfium-review.googlesource.com/10855
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This base class does not do anything useful.
Change-Id: Ib8c44c1778cdc992abb66177ea534bda0f1f15d3
Reviewed-on: https://pdfium-review.googlesource.com/10851
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
It's redundant with SetOprNotify().
Change-Id: Iee2741744017ea6bd1b9839fc6395197c560f1e7
Reviewed-on: https://pdfium-review.googlesource.com/10850
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This method replaces the selected text in a user-editable form text
area with another text string (which can be empty or non-empty). If
there is no selected text, FORM_ReplaceSelection() will append the
replacement text after the current caret position.
BUG=chromium:59266
Change-Id: I76448ef757d107888c33ebd5656457ebac93b952
Reviewed-on: https://pdfium-review.googlesource.com/8812
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Diana Gage <drgage@google.com>
|
|
Change-Id: I94b2e8f6fd522b97c917037e32fb3bcbeea0cbeb
Reviewed-on: https://pdfium-review.googlesource.com/8911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|