Age | Commit message (Collapse) | Author |
|
This CL updates the Origin x,y coordinates in FXTEXT_CHARPOS to be an
CFX_PointF.
Change-Id: I67281db2cb82687e12490145f7c99aee908e5fa8
Reviewed-on: https://pdfium-review.googlesource.com/2718
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL replaces the array of path points with a vector. Cleaning up the usage
as required.
Change-Id: Ifa386a2c847005fef68af748ebe99c4e08961238
Reviewed-on: https://pdfium-review.googlesource.com/2710
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit da83d3a5cc09c4056310b3cf299dbbccd5c70d11.
Reason for revert: Reverting chain to see if fixes Chrome roll.
Original change's description:
> Convert Origins to points
>
> This CL converts various OriginX, OriginY pairs into CFX_PointF objects.
>
> Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844
> Reviewed-on: https://pdfium-review.googlesource.com/2575
> Commit-Queue: dsinclair <dsinclair@chromium.org>
> Reviewed-by: Nicolás Peña <npm@chromium.org>
>
TBR=tsepez@chromium.org,dsinclair@chromium.org,npm@chromium.org,pdfium-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Change-Id: I949fb4ec712e2587e7d0ef0191c34db198b61dcc
Reviewed-on: https://pdfium-review.googlesource.com/2696
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts various OriginX, OriginY pairs into CFX_PointF objects.
Change-Id: I9141f7fc713c710b2014d4fdcdec7dc93501f844
Reviewed-on: https://pdfium-review.googlesource.com/2575
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Doing so reveals places where there are needless copies
and conversions.
Change-Id: I24a868d40aa63836f4167eaf4541964049df7916
Reviewed-on: https://pdfium-review.googlesource.com/2555
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes unused CFX_Matrix methods and cleans up the implementaion
of others.
Change-Id: I72d1d10d4a45cc9341a980054df5225e52a0c4f2
Reviewed-on: https://pdfium-review.googlesource.com/2574
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl removes the rect based transform method which internally just called
the matrix tranform method. The callers have been reversed to make it clearer
the matrix is transforming the rect.
Change-Id: I8ef57ccc2311e4e853b8180a6ff475f8eda2138e
Reviewed-on: https://pdfium-review.googlesource.com/2572
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL removes the CopyToLocal method and creates CFX_WideString's directly.
This fixes several memory leaks as the CopyToLocal strings were not cleaned
up correctly.
Change-Id: Ie5ba4cdc4d713cd0b8e3fb85e02f27dc09f38af1
Reviewed-on: https://pdfium-review.googlesource.com/2553
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl changes several Get methods to return their values instead of using
out parameters.
Change-Id: Ie9a930a5c2d0e809f2d7181ca033d801945c1cf9
Reviewed-on: https://pdfium-review.googlesource.com/2556
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl adds some unit tests for the CFDE_CSSValueListParser prior to
refactoring.
Change-Id: I2b32775ea1e70b721f5902cd3d88d68a01166d5e
Reviewed-on: https://pdfium-review.googlesource.com/2535
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl fixes the naming of the size types to match their purpose. This makes
the code clearer.
Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790
Reviewed-on: https://pdfium-review.googlesource.com/2551
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl updates the code to use the constructors instead of creating an
empty object and calling Set(). It also removes the various memsets of
the CFX_Rect{F} classes.
Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4
Reviewed-on: https://pdfium-review.googlesource.com/2550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This hopefully makes it less confusing what the description of a point is.
Currently we have defines for the types, which is confusing because a point
can only be one of the three. And it is mixed up with whether the point is
closing a figure or not.
Change-Id: Icd71355d69c77b3d52ca78e03bc379081ff87753
Reviewed-on: https://pdfium-review.googlesource.com/2552
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL converts some of the out parameters in the XFA layout code to pointers
instead of references.
Change-Id: I6246b91b975e7bc08f8cfb040de9dfdc3c3bedee
Reviewed-on: https://pdfium-review.googlesource.com/2531
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This will allow the compiler to distinguish between rectangle
initialization from a point and a size vs. two points.
Add corresponding ctors, and fix style noise induced in XFA,
now that rects have become a complex type.
Change-Id: Iaa5887db63dafd41ac95f5c623989ca1d6443fd6
Reviewed-on: https://pdfium-review.googlesource.com/2533
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Continuing cleaning up members and methods of CXFA_ItemLayoutProcessor.
Change-Id: Ie74fb83337c85820072b43352b734eafc3a0d5af
Reviewed-on: https://pdfium-review.googlesource.com/2513
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove some unused #defines as well.
Change-Id: Ie7dc1ae85100eae24f18a3ecd456e3c8d8043a43
Reviewed-on: https://pdfium-review.googlesource.com/2490
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Split XFA layout code into correct files, move static methods into anonymous
namespace blocks. Cleanup formatting where possible.
Change-Id: Ia342d7db42f947db02a52aa86bfa69e4fda916fd
Reviewed-on: https://pdfium-review.googlesource.com/2512
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The pPageView parameter is always set to nullptr when creating XFA widgets.
Change-Id: I4259ff7e523dc462242d2e37f0e2a919c5543035
Reviewed-on: https://pdfium-review.googlesource.com/2511
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Not needed with modern compilers, removed.
Change-Id: Ia8977262b5791bd4445f02be8456641d1a7e18f3
Reviewed-on: https://pdfium-review.googlesource.com/2431
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Simplify the code to what we support, remove unnecessary classes.
Change-Id: I7af79a4720e0c95c609f163ebb86cf67d643add1
Reviewed-on: https://pdfium-review.googlesource.com/2430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
These obfuscate control flow and save very few lines.
Mechanical change (mostly), sed + clang-format and adding a
few missing semicolons.
Change-Id: If8ae06c23edea8c455c79eab589fee5142dc3409
Reviewed-on: https://pdfium-review.googlesource.com/2472
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I21aeb1df387b60330d87a6cc82c615878c1f5596
Reviewed-on: https://pdfium-review.googlesource.com/2457
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I19f2e729b58de42506e8fc2811dd06d406470314
Reviewed-on: https://pdfium-review.googlesource.com/2470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL adds more unit tests to the css parser and removes some unused code.
Change-Id: If233040e19c7a79a907a3215877e042ac388d61b
Reviewed-on: https://pdfium-review.googlesource.com/2412
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes up the bare new calls in CFDE_CSSStyleSelector and replaces
them with unique_ptrs. Code massaged to work correclty with new types.
Change-Id: I90fce1ed7486da97fe7b5e597e9d423748c069c0
Reviewed-on: https://pdfium-review.googlesource.com/2353
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id2ece818c80e8cce4748b9a237871131a7acd6d1
Reviewed-on: https://pdfium-review.googlesource.com/2354
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2650773003
|
|
Remove the bare new and use CFX_RetainPtr to keep track of the computed styles.
Change-Id: Icf235623529797176707482c78676814b7a81b9e
Reviewed-on: https://pdfium-review.googlesource.com/2292
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl cleans up the memory for the CFDE_CSSRuleCollection::Data parameter.
Change-Id: I449ffdeebdc6463bf68b991fffecdc6cf0b25362
Reviewed-on: https://pdfium-review.googlesource.com/2296
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The UA style defined in CXFA_TextParser does not specify any ID, Class or
Universal selectors. Remove related code.
Change-Id: I9f2d760ee86f309a9cfa8a0f1f3e3dd7a15ef4c8
Reviewed-on: https://pdfium-review.googlesource.com/2295
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2653743002
|
|
We always match against the pseudo type NONE when matching selectors, so we
never end up using any pseudo selectors. This CL removes the pseudo selector
parsing code.
Change-Id: I7831d12dfff3a6f1dc98ff8e1d63c1090775562c
Reviewed-on: https://pdfium-review.googlesource.com/2294
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Fix callers conventions to avoid ambiguity.
Fix bad bounds check unmasked by change.
Directly include headers no longer pulled in by numerics itself.
Review-Url: https://codereview.chromium.org/2640143003
|
|
We only load atyles from the CXFA_TextParser which loads a static UserAgent
stylesheet. This CL removes the User and Author styles from the system
and simplifies the storage of the stylesheets.
Change-Id: I7abcf39333655f8dd6bc2cfe685c8cf73b779c7d
Reviewed-on: https://pdfium-review.googlesource.com/2293
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl removes unused CSS parsing code. The only caller of
CFDE_CSSStyleSheet::LoadeBuffer is from CXFA_TextParser which provides a static
string. So, we know there are no Media rules, Import rules, FontFace rules or
Page rules in the input style. These rules are also not allowed in inline
styles. This CL removes the supporting code.
Change-Id: I3a559352b2dd0769c465cbd3da40d1db5f9577b0
Reviewed-on: https://pdfium-review.googlesource.com/2330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2648773003
|
|
m_pSyntaxParser was unused.
Review-Url: https://codereview.chromium.org/2646203002
|
|
Also replace CFX_Int32Array typedef with CFX_ArrayTemplate<int32_t>.
Removing the typedefs makes subsequent conversion to std::vector<>
easier on a case-by-case basis.
Review-Url: https://codereview.chromium.org/2649563003
|
|
CFX_Points was unused.
Review-Url: https://codereview.chromium.org/2645523006
|
|
This CL splits the files in xfa/fde/css into class per file and renames any
needed files to match the class names.
Update some of the classes to use std::stack.
Change-Id: I4eca0fb3556d949a15a873bb0f0fd732f47e4fb1
Reviewed-on: https://pdfium-review.googlesource.com/2253
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2613143002
|
|
This CL splits the CFDE_CSSPrimitiveValue class into individual classes per
value type. This moves the numeric itypes out of the FDE_CSSPrimitiveType
list and creates a new CFDE_CSSNumberType list.
Change-Id: I6f55e9e3509de7ff1e82dcf018a1f1c472565e54
Reviewed-on: https://pdfium-review.googlesource.com/2250
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL converts the css syntax parser to use a std::stack instead of a
custom CFX stack.
Change-Id: I650c8340693d3608b9264bbf887f1d14847cb68f
Reviewed-on: https://pdfium-review.googlesource.com/2218
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This Cl removes the stream initializer from the FDE CSS parser. The only
consumer was the css fuzzer. The fuzzer has been moved to use the string
initializer to match the rest of the code.
Change-Id: I65445af1159058b7c71d5e1d7c12e60383da6dbd
Reviewed-on: https://pdfium-review.googlesource.com/2217
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
These methods are never called, removed.
Change-Id: I47930c209229c9e50effc433579809b882cd2dc9
Reviewed-on: https://pdfium-review.googlesource.com/2215
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I245d755814123f351a661bda1f38eaa96d4e68ae
Reviewed-on: https://pdfium-review.googlesource.com/2214
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I929b00204e05eea71c6fd4d52e480cc9c6d6018e
Reviewed-on: https://pdfium-review.googlesource.com/2230
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Start adding unit tests for the css parser. Fixup memory
leaks that are exposed by the tests.
Change-Id: Id863d9cd5f13ab82626bc7b945de925253c88d43
Reviewed-on: https://pdfium-review.googlesource.com/2180
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It's a ref-counted class, so if we're in the destructor, the ref
count has hit zero. We can't make a new ref pointer to itself here,
as it will re-invoke the destructor when it goes out of scope. This
should have been an obvious anti-pattern in hindsight.
The object in question can't be in the m_pFontManager, since the font
manager retains a reference, and we wouldn't get to this destructor
while that is present. So the cleanup isn't required.
Fixing this revealed a free-delete mismatch in cxfa_textlayout.cpp.
I also converted to use unique_ptrs in a few places near this issue.
Fixing this revealed a UAF in CFGAS_GEFont, memcpy'ing a RetainPtr
is not a good idea as it doesn't bump the ref count.
Also protect and friend the CFGAS_GEFont destructor, to make sure
random deletes don't happen.
Also kill off a const cast, and remove unnecessary conversion to
retain_ptr when we already have one.
TEST=look for absence of -11 in XFA corpus test logs, bots not
currently noticing the segv. Argh.
Review-Url: https://codereview.chromium.org/2631703003
|