summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_caret.cpp
AgeCommit message (Collapse)Author
2017-08-17Change XFA DrawWidget() code to take its CFX_Matrix by const-ref.chromium/3192chromium/3191chromium/3190chromium/3189Lei Zhang
Change-Id: Idc9dfcafe6727c1689443ce8f9568567e55d51c8 Reviewed-on: https://pdfium-review.googlesource.com/11114 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-07-14Fixup naming of XFA graphics classesDan Sinclair
These files were originally renamed thinking they'd move with the colour class up to core/. It was decided that CPWL_Color was a better core colour class the the xfa colour so these are being renamed back to XFA based names to make it clear where they live. Change-Id: Ie89f2306be0609add29bd445e719567e7b439211 Reviewed-on: https://pdfium-review.googlesource.com/7754 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-05-16Introduce CFX_UnownedPtr to detect lifetime inversion issues.Tom Sepez
There are places where an object "child" has a raw pointer back to object "owner" with the understanding that owner will always outlive child. Violating this constraint can lead to use after free, but this requires finding two paths: one that frees the objects in the wrong order, and one that uses the object after the free. The purpose of this patch is to detect the constraint violation even when the second path is not hit. We create a template that is used in place of TYPE*. It's dtor, when a memory tool is present, goes out and probes the first byte of the object to which it points. Used in "child", this allows the memory tool to prove that the "owner" is still alive at the time the child is destroyed, and hence the constraint is never violated. Change-Id: I2a6d696d51dda4a79ee2f00a6752965e058a6417 Reviewed-on: https://pdfium-review.googlesource.com/5475 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-05-01Remove more |new|s, part 5Tom Sepez
Many of these are already unique_ptrs. Change-Id: I3695d4ff5a8f7483ad994ac7657897fd55069cd5 Reviewed-on: https://pdfium-review.googlesource.com/4690 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-02-08Update to use CFX_Rect{F} and CFX_Matrix constructors.Dan Sinclair
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>
2016-12-08Cleanup CFWL_Widget code to return CFX_RectFs where appropriatedsinclair
This Cl changes the various Get*Rect methods in CFWL_Widget to return CFX_RectF classes instead of taking an out parameter. The Repaint method is split into Repaint() and RepaintRect() in order to change the param to a const CFX_RectF& from a CFX_RectF*. Review-Url: https://codereview.chromium.org/2560873005
2016-12-08Move xfa/fwl/core to xfa/fwl.dsinclair
The core/ directory in FWL no-longer provides any context. This Cl moves all of the core/ files up to the fwl/ folder. As well, the CFWL_EvtFoo files are renamed CFWL_EventFoo and the CFWL_MsgFoo files are renamed CFWL_MessageFoo. The event and message preceed the type in order to keep the files sorted together and to make it clear that they're all related. Review-Url: https://codereview.chromium.org/2559173002