summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_scrollbar.cpp
AgeCommit message (Collapse)Author
2018-10-09Do IWYU for ptr_util.h.Lei Zhang
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d Reviewed-on: https://pdfium-review.googlesource.com/c/43609 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-08-21Use UnownedPtr<> to theme provider in cfwl_widgetproperties.hTom Sepez
Mark two other fields which must remain raw. Change-Id: Idcd9b074aad23f35dc6607feeaa4fa6701efffaa Reviewed-on: https://pdfium-review.googlesource.com/40916 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-03-08Unset timer in XFA scrollbar after stopping it.Henrique Nakashima
This fixes a crash that happens after interacting with the scrollbar a few times. Bug: chromium:820210 Change-Id: I458337f21c9322351474a1574ab596c600dcbbbf Reviewed-on: https://pdfium-review.googlesource.com/28290 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-05Cleanup CFWL_ScrollBar::Timer::Run.Henrique Nakashima
Change-Id: Icd76a6a98a66c977e45ed82663b68f6b05479e76 Reviewed-on: https://pdfium-review.googlesource.com/27891 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-03-05Fix crash when dragging scrollbar in XFA form.Henrique Nakashima
Bug: chromium:809612 Change-Id: I171d836927fc707388444726d3918b2cbbb39002 Reviewed-on: https://pdfium-review.googlesource.com/27890 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
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-03-17Add pdfium::clamp() as a placeholder for std::clamp().chromium/3046Lei Zhang
Ue it to fix a typo as well. BUG=pdfium:634 Change-Id: I2d686242ffb841aedc2fae6a3cf7a00bea667404 Reviewed-on: https://pdfium-review.googlesource.com/3113 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-03-14Replace FX_FLOAT with underlying float type.Dan Sinclair
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56 Reviewed-on: https://pdfium-review.googlesource.com/3031 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-02-21Convert CFWL messages to use CFX_PointFDan Sinclair
This Cl updates the various CFWL_Message classes to take CFX_PointF instead of x,y values. Change-Id: I5d9d01d68be64fc9e69c04574994c01286ad24e1 Reviewed-on: https://pdfium-review.googlesource.com/2811 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@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>
2017-01-03Remove the ::GetCapacity methods.Dan Sinclair
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>
2017-01-03Use return values in CFWL_Scrollbar instead of out paramsDan Sinclair
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>
2016-12-15Cleanup widget edge related codedsinclair
CFWL_Widget::HasEdge() always returns false. This CL removes it and the supporting code. Review-Url: https://codereview.chromium.org/2575093002
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