summaryrefslogtreecommitdiff
path: root/xfa/fwl
AgeCommit message (Collapse)Author
2017-01-24Use std::vector for CFX_RectF arraystsepez
Review-Url: https://codereview.chromium.org/2653743002
2017-01-05Properly ref-count CFGAS_GEFont with CFX_RetainPtr.tsepez
We worry about cyclical references, but no leaks found. Review-Url: https://codereview.chromium.org/2609423003
2017-01-03Cleanup ThemeProvider codeDan Sinclair
Remove unused methods, fold the arrow data into the CFWL_WidgetTP instead of a custom class and global object. Change-Id: Ie942052555d6c8668d27072c1fcc5e8e00597518 Reviewed-on: https://pdfium-review.googlesource.com/2139 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@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-03Convert CFWL_MonthCalendar to use return valuesDan Sinclair
This CL updates CFWL_MonthCalendar to return values instead of taking an out parameter. Change-Id: I347d0e85897be1359bad7971d82c70dfad0d69a0 Reviewed-on: https://pdfium-review.googlesource.com/2132 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-03Remove more CFX_ArrayTemplate in cfwl_notedriver.h.tsepez
Also pass some unqiue_ptr further down while we're at it. Review-Url: https://codereview.chromium.org/2594103002
2017-01-03Remove CFWL_ListBox::GetDataProviderItemTextDan Sinclair
This method just proxies to the provided item now. Remove the method and call GetText() directly if possible. Change-Id: Ida49e0e878f859a69f7d5bec9d0f734feb7a763d Reviewed-on: https://pdfium-review.googlesource.com/2130 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-01-03Cleaning out params in CPDFXFA_ContextDan Sinclair
This CL cleans up some of the out params in CPDFXFA_Context. In the process several of the strings returned by ::LoadString() are inlined in their call sites and the defines removed. BUG=pdfium:549 Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea Reviewed-on: https://pdfium-review.googlesource.com/2134 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@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-15Move window type mask up with masked flagsdsinclair
Move code to make clear what is being masked. Review-Url: https://codereview.chromium.org/2573163002
2016-12-15Remove widget offscreen code.dsinclair
The Offscreen state was never set, removed. Review-Url: https://codereview.chromium.org/2569663006
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-15Remove more unused widget stylesdsinclair
Remove more FWL Widget Styles which are never set. Review-Url: https://codereview.chromium.org/2578473003
2016-12-15Remove unused widget state flagsdsinclair
These widget state flags are not set and mostly unused. Removed. Review-Url: https://codereview.chromium.org/2573133002
2016-12-15Remove unused sysbtn codedsinclair
This CL removes the unused FWL_WGTSTYLE_MinimizeBox, FWL_WGTSTYLE_MaximizeBox, and FWL_WGTSTYLE_CloseBox along with the supporting code. Review-Url: https://codereview.chromium.org/2578603002
2016-12-14Remove unused flags in CFWL_PushButtonchromium/2952dsinclair
Review-Url: https://codereview.chromium.org/2571863002
2016-12-14Cleanup CFWL_MonthCalendar flagsdsinclair
Remove unused flags in CFWL_MonthCalendar. Review-Url: https://codereview.chromium.org/2570943002
2016-12-14Remove unused CFWL_Form flagsdsinclair
Cleanup flags in CFWL_Form which are never set. Review-Url: https://codereview.chromium.org/2575573002
2016-12-14Remove unused CFWL_Edit flags.dsinclair
This CL removes the flags from CFWL_Edit which are never set. In turn, the coresponding text edit engine flags are removed. Review-Url: https://codereview.chromium.org/2570033003
2016-12-14This CL removes some of the unused CFWL widget flags.dsinclair
Several of the widgets have flags which are no longer set. This CL removes the flags and any flag conditional code. Review-Url: https://codereview.chromium.org/2570083002
2016-12-14Remove unused CFWL_ListBox codedsinclair
This CL removes states and settings from the CFWL_ListBox code which were never enabled. Review-Url: https://codereview.chromium.org/2576483002
2016-12-14Update CFWL_ListBox to return instead of using out params.dsinclair
This CL updates the CFWL_ListBox code to work with return values instead of out params. This also extracts the CFWL_ListItem code out of CFWL_ListBox and puts into the correct class. Review-Url: https://codereview.chromium.org/2572783002
2016-12-14Avoid the ptr.reset(new XXX()) anti-patterntsepez
Be suspicious of |new|. This removes some of the easy cases. Review-Url: https://codereview.chromium.org/2571913002
2016-12-08Change CFWL_Widget::GetMatrix to return the matrixdsinclair
This CL switches to using a return value instead of an out parameter. The global flag was also removed and the call sites changed to just SetIdentity as appropriate. Review-Url: https://codereview.chromium.org/2564443003
2016-12-08Change layout item in CFWL_Widget type from voiddsinclair
Previously the LayoutItem was a void*. This Cl changes the LayoutItem to explicity be a CXFA_FFWidget. Review-Url: https://codereview.chromium.org/2559643004
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-08Remove unused list data pointerdsinclair
The list item data pointer was never assigned. Removed pointer and referencing code. Review-Url: https://codereview.chromium.org/2563693003
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
2016-12-07Convert GetWidgetRect to return rect.dsinclair
Current GetWidgetRect accepts the rect as an out-param. This CL converts the code to return the rect instead. Review-Url: https://codereview.chromium.org/2556873004
2016-12-07Split CFWL_Widget::GetWidgetRect into two partsdsinclair
This CL splits the inflation logic out of GetWidgetRect to allow subclasses to call that directly instead of the CFWL_Widget::GetWidgetRect method. Review-Url: https://codereview.chromium.org/2555253002
2016-12-07Cleanup return values in CFWL_ComboBoxdsinclair
This CL changes methods in CFWL_ComboBox to return values instead of taking out params. Review-Url: https://codereview.chromium.org/2555103005
2016-12-07Cleanup FWL default values part II.dsinclair
This CL cleans up the remaining default values in the fwl/core directory. Some methods are renamed to better represent what they do. Review-Url: https://codereview.chromium.org/2557103002
2016-12-07Cleanup default FWL params part Idsinclair
This Cl removes some of the default FWL parameters. Review-Url: https://codereview.chromium.org/2533623002
2016-12-07Cleanup caret show/hide codedsinclair
This CL splits the cursor code into specific show/hide methods to make it clearer what is happening at each point. Review-Url: https://codereview.chromium.org/2535623002
2016-12-07Cleanup FWL Event and Message code.dsinclair
This CL removes any CFWL_Evt classes for which nothing was listening to the events. For events with no parameters the override class was removed and the event type passed into CFWL_Event which is used instead. Any event or message parameters which are un-read have been removed. Review-Url: https://codereview.chromium.org/2530993002
2016-11-24Change TxtEdtEngine to return CFX_WideStringchromium/2935chromium/2934chromium/2933chromium/2932dan sinclair
This Cl updates the TxtEdtEngine and TxtEdtBuf to return CFX_WideStrings on a Get instead of taking an out param. The change is propagated out through the various Get methods that call into the edit engine. Change-Id: Iccf10a8ee06678ae3b59f3afd6e65308dacd16bd Reviewed-on: https://pdfium-review.googlesource.com/2070 Commit-Queue: ooo 11-24 -- 12-05 (dsinclair) <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2016-11-23Add CFWL_ListBox::IsMultiSelection().thestig
Review-Url: https://codereview.chromium.org/2527783004
2016-11-23Merge IFWL and CFWL classes.dsinclair
This CL merges the IFWL hierarchy into the CFWL hierachy. All CFWL proxy methods have been replaced by the IFWL implementations. Review-Url: https://codereview.chromium.org/2524173002
2016-11-23Rename IFWL classes which do not have CFWL equivalentsdsinclair
This CL moves the IFWL classes that do not have CFWL class buddies to have the CFWL name. This CL leaves the tree in a weird state of having CFWL be two hierarchies, one of which is intertwined with the IFWL hierarchy. This should be commited just before the CL to move the rest of IFWL to CFWL. Review-Url: https://codereview.chromium.org/2525083002
2016-11-23Remove DataProvider from CFWL_WidgetPropertieschromium/2931chromium/2930dsinclair
This CL removes the generic DataProvider code from CFWL_WidgetProperties and adds the specific providers to the two classes that require them. Review-Url: https://codereview.chromium.org/2527683002
2016-11-23Remove IFWL_CombobBox::DataProviderDan Sinclair
The height value returned is always 0. This CL removes the plumbing and uses the 0 value directly. R=npm@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/2525003002 .
2016-11-23Remove listbox providers and build into listboxDan Sinclair
This CL removes the IFWL_ListBox::DataProvider and builds the data storage for the list directly into IFWL_ListBox. This removes the need for the provider in CFWL_ComboBox and CFWL_ListBox. Change-Id: I74c2286757a0b73083908f1cc630a88e7d730fd9 Reviewed-on: https://pdfium-review.googlesource.com/2050 Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2016-11-23Remove plumbing for today valuedsinclair
The calendar always sets today to 2011/01/01. This Cl removes the various DataProviders needed to plumb this value and just sets it where needed. Review-Url: https://codereview.chromium.org/2524993002
2016-11-23Make Update and DrawWidget pure virtualdsinclair
These methods should be in all implementations, make them pure virtual to make that required. Review-Url: https://codereview.chromium.org/2525703004
2016-11-22Rename IFWL_App to CFWL_Appdsinclair
This class is not an interface but a concrete implementation. Rename to match. Review-Url: https://codereview.chromium.org/2521303002
2016-11-22Rename IFWL_Timer and IFWL_TimerInfodsinclair
These twho files are not interfaces. Renamed to be CFWL to signify they are concrete implementations. Review-Url: https://codereview.chromium.org/2526513002
2016-11-22Rename common methods between ifwl and cfwl.dsinclair
This CL renames some methods in IFWL which have the same name as the CFWL methods but the CFWL methods are not proxy methods. Review-Url: https://codereview.chromium.org/2520413002
2016-11-21Remove the GetCaption dataprovider methodchromium/2928dsinclair
This method mostly returns L"". In the one case where it returns something different the value is substituted into the callsite. The IFWL_Tooltip class was using the caption, but it is not currently being used. Removed as well. Review-Url: https://codereview.chromium.org/2522663002
2016-11-21Remove FwlEventMaskdsinclair
The only value being set from the enum was the All Mask. This was always set through the default value in the methods. This Cl removes the mask code completely and updates surrounding code as needed. Review-Url: https://codereview.chromium.org/2515243003
2016-11-21Split fwl/core class pt II.dsinclair
Split classes in FWL to be single class per file. In the case of data providers which added no new methods, removed and used the IFWL_Widget::DataProvider directly. Review-Url: https://codereview.chromium.org/2520063002