summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
2016-04-22Fix standalone mac builddsinclair
Missing default statement in the switch. Duplicated the method signature on both sides of the #ifdef to make it clearer what was going on. Review URL: https://codereview.chromium.org/1905303003
2016-04-21Remove IFDE_CSSTagProvider.dsinclair
There is only one subsclass, use that instead. Remove the use of WideStringC in the API. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1911843002
2016-04-21Remove CFWL_Note.dsinclair
This CL removes the CFWL_Note class. The two subclasses, CFWL_Event and CFWL_Message are distinct types and should not be related by the subclass. The code has been updated to pass the correct types as needed. The various FWL_EVTHASH and FWL_MSGHASH defines have all been removed and turned into an FWL_EventType and FWL_MessageType enum classes. BUG=pdfium:474 Review URL: https://codereview.chromium.org/1901183002
2016-04-21Make CFX_BasicArray non-copyable.tsepez
Its implicit copy constructor is unsafe, since it ends up sharing the underlying data. Fix one place where it was being unintentionally invoked. Review URL: https://codereview.chromium.org/1908073003
2016-04-21Cleanup FDE interfaces.dsinclair
This CL removes IFDE_TextOut, IFDE_Path, IFDE_RenderContext, IFDE_RenderDevice, and IFDE_VisualSetIterator in favour of the concrete classes. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1896893003
2016-04-21Remove unused FWL flagsdsinclair
No usages, removed. Review URL: https://codereview.chromium.org/1903993003
2016-04-21Convert some FWL defines to enums.dsinclair
This CL converts FWL_WGTCAPACITY_* defines to the CFWL_WidgetCapacity enum class. The FWL_PART_* defines to the FWL_Part enum class and the FWL_PartState_* defines to an enum. Review URL: https://codereview.chromium.org/1898713003
2016-04-20Cleanups from prior CLs.dsinclair
This cleans up the Initialize methods and the ownership in CPDF_Creator. Review URL: https://codereview.chromium.org/1902713003
2016-04-20fix issue of Heap Use-After-Free in CXFA_LayoutItem::AddChildjinming_wang
BUG=chromium:590711 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1901013002 .
2016-04-19Remove a few more char* members from structs/classes.tsepez
This is a result of looking for the anti-paterns /char\*\sm_/ and /m_.*=.*\.c_str/ which indicate that a class may be using the contents of a string without extending the lifetime of the underlying storage. Along the way, change to uint8_t in fx_dib; this is unrelated but avoids grep hits (it is binary, not chars anyways). Also remove two string operators that make it easy to assign in a manner that does not extend contents lifetime. Review URL: https://codereview.chromium.org/1902953002
2016-04-19Store WideString, not raw pointer, in FX_TXTRUNtsepez
Storing raw pointers in structs is a questionable idea, given that we've got string classes to auto-manage lifetimes of the underlying storage. Also, return FX_TXTRUN while we're at it, since we count on RVO removing copies nowadays. BUG=pdfium:480 Review URL: https://codereview.chromium.org/1900743004
2016-04-19Remove fullscreen code.dsinclair
The FWL_SetFullScreen() method is never called, remove and all the supporting fullscreen code. Review URL: https://codereview.chromium.org/1902083002
2016-04-19XFA unused function cleanupdsinclair
This CL removes a series of unused XFA methods. Review URL: https://codereview.chromium.org/1899103002
2016-04-18Make FWL_CornerEnlarge a constdsinclair
This CL changes the FWL_CornerEnlarge define into a const value in the anonymous namespace. Review URL: https://codereview.chromium.org/1896923002
2016-04-18Remove unused FWL Panel code.dsinclair
This code was used to subclass Form only, the one method in Panel is overridden in Form. Review URL: https://codereview.chromium.org/1899743002
2016-04-18Fold the FWL NoteThread classes up to the Thread classes.dsinclair
The NoteThread classes only contained one member and don't provide any added clarity. This CL moves the NoteDriver up to the Thread classes and removes the NoteThread classes. Review URL: https://codereview.chromium.org/1887703003
2016-04-15Avoid narrowing of strings in FWL SetEditText methods.tsepez
Review URL: https://codereview.chromium.org/1892813004
2016-04-15Remove unused IFDE_CSSStyleSheetCache/CFDE_CSSStyleSheetCache.tsepez
Review URL: https://codereview.chromium.org/1896553004
2016-04-14Simplify XFA event handling.thestig
- Avoid casting to void* - Don't bother firing events that no one listens for Review URL: https://codereview.chromium.org/1890563003
2016-04-14Change string argument type to GetFormatDataValue.tsepez
Avoid string duplication, since the first thing these routines do is allocate a new string from the static string argument. Review URL: https://codereview.chromium.org/1889983002
2016-04-14Pass CFX_WideString to CXFA_FFDocView::GetWidgetByName.tsepez
Avoids downgrade followed by duplication of existing strings. Review URL: https://codereview.chromium.org/1891673003
2016-04-14Avoid needless construction of CFX_ByteStrings during string buildingtsepez
There are perfectly fine operators for adding to an existing string without first duplicating the arguments. Review URL: https://codereview.chromium.org/1891953002
2016-04-14Rename CFX_ByteTextBuf::GetByteString() to AsStringC().tsepez
Do the same for CFX_WideTextBuf as well. The name is confusing because these return CFX_ByteStringC, not CFX_ByteString. The AsStringC naming gives parallelism with the string types themselves, and may help to indicate that the result is only good for the lifetime of the object being operated upon. Review URL: https://codereview.chromium.org/1886263003
2016-04-14Replace calls to deprecated CFX_{Wide,Byte}String::Empty()tsepez
Use the more standard name "clear()" instead. Review URL: https://codereview.chromium.org/1888103002
2016-04-13Remove implicit cast from CFX_WideString to (const wchar_t*)tsepez
BUG= Review URL: https://codereview.chromium.org/1882043004
2016-04-13Unused FWL Classes.dsinclair
This Cl removes several FWL classes that aren't removed. These include: * IFWL_Content * CFWL_ContentImp * CFWL_CustomPanelImp * CFWL_CustomImp * IFWL_Custom * IFWL_CustomPanel * IFWL_Proxy * CFWL_App BUG=pdfium:468 Review URL: https://codereview.chromium.org/1883943002
2016-04-13Remove implicit cast from CFX_ByteString to (const char*).tsepez
BUG= Review URL: https://codereview.chromium.org/1885973002
2016-04-13Remove unused FWL methodsdsinclair
This CL removes various methods from FWL that are not called. Review URL: https://codereview.chromium.org/1886703005
2016-04-13Cleanup CPDFXFA_Page.thestig
- Use std::unique_ptr. - Make dtor protected. - Simplify logic. - Remove unused bits from CXFA_FFPageView as well. Review URL: https://codereview.chromium.org/1878963004
2016-04-13Remove some FWL code.dsinclair
Remove unused or ifdef'd code from FWL. Review URL: https://codereview.chromium.org/1874963002
2016-04-13Remove IFDE_Image, IFDE_PathSet, IFDE_ImageSet, and IFDE_WidgetSet.dsinclair
These interfaces were not implemented, removed. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1866333003
2016-04-13Re-enable warning 4701 for GN build and some cleanupweili
Clean up three 4701 warnings (use potientially uninitialized variable) which are the only ones left; Re-enable warning 4701 for GN build; Remove an unused data structure; BUG=pdfium:29 Review URL: https://codereview.chromium.org/1885093002
2016-04-13Remove IFX_Barcode.dsinclair
This CL replaces IFX_Barcode with the concrete class. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1890443002
2016-04-12Cleanup various IFX_ text interfaces.dsinclair
This CL removes IFX_ArabicChar, IFX_RTFBreak, IFX_TxtBreak, IFX_WordBreak, IFX_FormatString, and IFX_GSUBTable. References were updated to be the concrete classes. The CFX_GSUBTable was also removed as it is unused. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1882213002
2016-04-12Remove IFDE_Pen and IFDE_Brush.dsinclair
This Cl removes the two interfaces and renames CFDE_SolidBrush to CFDE_Brush. Uncalled methods are removed from both CFDE_Brush and CFDE_Pen and code simplified to match. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1881803003
2016-04-12Remove ICodec_* Interfaces.dsinclair
All of the ICodec_* interfaces had a single implementation. This CL removes the interfaces and uses the concrete classes in their place. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1876023003
2016-04-12Record all fonts, not just one per charset.dsinclair
Attempting to open bug_434.pdf on my Linux box would fail with: ../../xfa/fxfa/app/xfa_fwltheme.cpp:96: virtual FWL_ERR CXFA_FWLTheme::Initialize(): Assertion `__null != m_pCalendarFont' failed. I tracked the regression back to [1]. The issue seems to be in CFX_FontManager::AddInstalledFont we will only add one font for a given Charset. In my case I end up loading 6 charsets, but the fonts are all strange ones. When I open the PDF, it fails to find 'Arial' because I've registered these other fonts. To fix this I changed the m_FaceArray into a struct of {name, chraset}. Then we record all fonts into this list and search over that list for the charset when needed. This allows bug_434.pdf to open and the test to pass successfully. 1- https://pdfium.googlesource.com/pdfium/+/fe73e7849b8b4ce49408d2f52f3fc29b370b82b5 Review URL: https://codereview.chromium.org/1874433002
2016-04-12Remove unused FWL_WidgetMgrSnapshot() and FWL_WriteBMP().tsepez
Review URL: https://codereview.chromium.org/1878293002
2016-04-12Only SolidBrush types are created, remove other brushes.dsinclair
We only ever create a CFDE_SolidBrush, there is nothing which creates Texture, Hatch or LinearGradient brushes. This Cl removes all the code that isn't used for SolidBrush. A followup Cl will rename SolidBrush to Brush and remove the Brush interface in favour of the concrete class. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1877383002
2016-04-11Cleaning up FDE_CSS Classes.dsinclair
This Cl removes the IFDE_CSSAccelerator header and replaces the usage with the concrete class. The interfaces and methods in the CSSComputedStyle class are cleanedup to remove any unused methods. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1876253002
2016-04-11Use std::vector as internal storage for CPDF_ArrayWei Li
Replace the usage of CFX_ArrayTemplate inside CPDF_Array, which has non-standard APIs such as GetSize() returns int. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1867183002 .
2016-04-11Remove IFX_AdditionalFontMgr and IFX_FontMgrDelegate.dsinclair
Neither are implemented. Removed. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1872463002
2016-04-08Make converstion explicit from CFX_ByteString to uint8_t*tsepez
BUG= Review URL: https://codereview.chromium.org/1868293002
2016-04-08Rename both As{Byte,Wide}StringC() helpers to AsStringC().tsepez
The naming is redundant given the base type, and will stand in the way of consolidating Byte and Wide code. BUG= Review URL: https://codereview.chromium.org/1862123003
2016-04-08Make CFX_WideString::FromLocal() take a CFX_ByteStringC argtsepez
It doesn't persist the string beyond the duration of the call, hence it should take the *StringC variant. Doing so avoids some allocs by changing to the *StringC ctor in a few places, at the cost of some explicit .ToByteStringC() calls (which are cheap). Review URL: https://codereview.chromium.org/1862953004
2016-04-07Cleanup DEPS files after include/ changes.dsinclair
This cleans up left over DEPS files or DEPS file entries from moving the code into subfolder include/ directories. Review URL: https://codereview.chromium.org/1865313002
2016-04-06Move remaining xfa/include/fxfa filesdsinclair
This CL moves the remaining files in xfa/include/fxfa to xfa/fxfa/include. Review URL: https://codereview.chromium.org/1864973005
2016-04-06Remove IFWL_Grid and other grid classes.dsinclair
The IFWL_Grid class wasn't an interface, it was a concrete class. Even as a concrete class it was never instantiated. The various other CFWL_Grid* class were also not instantiated. BUG=pdfium:468 Review URL: https://codereview.chromium.org/1862243002
2016-04-06Make static FX_WCHAR arrays more const.thestig
Review URL: https://codereview.chromium.org/1867463002
2016-04-06Move include/fxcodec to fxcodec/includedsinclair
Review URL: https://codereview.chromium.org/1864153002