summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_wnd.cpp
AgeCommit message (Collapse)Author
2017-07-17Move CPWL_Utils Draw methods to CFX_RenderDeviceDan Sinclair
This CL removes the drawing code from the AP stream generation code in CPWL_Utils and places it in CFX_RenderDevice. Change-Id: I5335fc38368740ba3ddc676ee856201a358979fc Reviewed-on: https://pdfium-review.googlesource.com/7715 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-17Add CFX_FloatRect::GetDeflateddan sinclair
This CL adds a method to CFX_FloatRect to get a new deflated rectangle from a given rectangle. Change-Id: I781222257c82baf94d5f77deede52fbe4e97c701 Reviewed-on: https://pdfium-review.googlesource.com/7850 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-13Rename CPWL_Color to CFX_ColorDan Sinclair
This CL moves fpdfsdk/pdfwindow/cpwl_color to core/fxge/cfx_color. Change-Id: Ia95b7fba2c76a1b9a438014d3598c7aa55bbb2ab Reviewed-on: https://pdfium-review.googlesource.com/7753 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-13Remove CPWL_Utils::{In,De}flateRectdan sinclair
This CL removes the custom InflateRect and Deflate rect code in CPWL_Utils in favour of calling the CFX_FloatRect version. This required inlining some extra code at each callsite to check the rect size and normalize. Change-Id: I7f60e5de03fc1db0c1d8e51eaa1d0e0700ebf157 Reviewed-on: https://pdfium-review.googlesource.com/7710 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-05Cleanup some CPWL_Wnd definesDan Sinclair
This CL removes unused #define's and moves ones that are only used in a single .cpp class to that file. Change-Id: I6c503d5d4c031a870b7a1362086205a810d31478 Reviewed-on: https://pdfium-review.googlesource.com/7256 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-05Remove PNM_ mouse methods and OnNotifyDan Sinclair
This CL removes the remaining PNM_* messages and converts them to individual methods. Change-Id: I44791a35bc720f29f8f5d4d7c26a8c899b54132d Reviewed-on: https://pdfium-review.googlesource.com/7255 Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-05Remove PNM_SCROLLWINDOW and replace with direct methodDan Sinclair
This CL removes PNM_SCROLLWINDOW from OnNotify and replaces it with a call to ScrollWindowVerticallyTo. Change-Id: I62f6da60cdcd4926b0c74b980b3855a28a834411 Reviewed-on: https://pdfium-review.googlesource.com/7253 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-07-05Move PNM_SETSCROLLPOS to custom methodDan Sinclair
This CL splits PNM_SETSCROLLPOS out of OnNotify and places into a method which is called as needed. Change-Id: Ic144bc30bca57869f0679bef40e07b6a130e944c Reviewed-on: https://pdfium-review.googlesource.com/7252 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-05Move PNM_SETSCROLLINFO out of OnNotifyDan Sinclair
This CL moves the SETSCROLLINFO from a OnNotify message to a method which is called directly. Change-Id: I5d793c1c7a54c0fa3bdadffac72aae934cb9da57 Reviewed-on: https://pdfium-review.googlesource.com/7251 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-07-05Remove PNM_{ADD|REMOVE}ChildDan Sinclair
This OnNotify message is only handled in CPWL_Wnd and it is only emited in CPWL_Wnd. This CL inlines the resulting calls into the original OnNotify callsites and removes the messages. Change-Id: If419f0f51db00dbecc960d80bb10b17ad8bec7e1 Reviewed-on: https://pdfium-review.googlesource.com/7232 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-06-29Change SetReverse to GetInverse in CFX_MatrixNicolas Pena
CFX_Matrix::GetInverse is much clearer. Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834 Reviewed-on: https://pdfium-review.googlesource.com/7090 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-06-29Converted low-hanging cpwl classes in CFX_ByteTextBuf to ostringstream.Henrique Nakashima
Bug: pdfium:731 Change-Id: I3faf5a4ec4b2af6145348e526f39ccbc2055e62e Reviewed-on: https://pdfium-review.googlesource.com/7050 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-20Add FORM_GetSelectedText() function.Diana Gage
This function copies the selected text from a form text field or form combobox text field into the buffer parameter and returns the length of the selected text string. When buffer is a nullptr or buflen is less than the length of the selected text, this function does not modify the buffer and only returns the selected text length. BUG=chromium:59266 Change-Id: Ie77de38e45bbe6f9ea033826c961435304eedfc7 Reviewed-on: https://pdfium-review.googlesource.com/6413 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-06-13Implement CPWL_ComboBox::OnDestroy() to manage unowned pointers.Lei Zhang
CPWL_ComboBox's unowned pointers to other CPWL_Wnds need to be released at the right time. Also release the unowned pointer for CPWL_Wnd's vertical scroll bar at the right time. BUG=729041 Change-Id: I06a1da35fcb18dae8faf9cd4fbc0b75d38f115b0 Reviewed-on: https://pdfium-review.googlesource.com/6418 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-06-02Rename PWL_FooBar files to cpwl_foo_bar.Lei Zhang
Change-Id: I7ed0ba0acbbee291e285555974ebf50c0073668f Reviewed-on: https://pdfium-review.googlesource.com/6250 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>