Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Issue 1458173002: Fix CFWL_WidgetImpDelegate hierarchy. (Closed)

Created:
5 years, 1 month ago by Tom Sepez
Modified:
5 years, 1 month ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@xfa
Target Ref:
refs/heads/xfa
Visibility:
Public.

Description

Fix CFWL_WidgetImpDelegate hierarchy. Instead of casting to the unrelated IFWL_WidgetDelegate class and hoping that its vtables line up, make CFWL_WidgetImpDelegate inherit from it. We can then remove a lot of casting, even during delete given that it has a virtual dtor. R=thestig@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/a4754b4d4ebc5e518a1d1363648042a5c7add544

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -178 lines) Patch
M xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp View 1 chunk +3 lines, -5 lines 1 comment Download
M xfa/src/fwl/src/basewidget/fwl_caretimp.cpp View 2 chunks +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_checkboximp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_comboboximp.cpp View 4 chunks +9 lines, -16 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_datetimepickerimp.cpp View 4 chunks +10 lines, -19 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_editimp.cpp View 2 chunks +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_formproxyimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_listboximp.cpp View 2 chunks +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_monthcalendarimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_pictureboximp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_pushbuttonimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_scrollbarimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_spinbuttonimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/fwl_tooltipctrlimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_barcodeimp.h View 1 chunk +1 line, -1 line 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_caretimp.h View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_checkboximp.h View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_comboboximp.h View 4 chunks +9 lines, -9 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_datetimepickerimp.h View 3 chunks +6 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_editimp.h View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_formproxyimp.h View 1 chunk +1 line, -1 line 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_listboximp.h View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_monthcalendarimp.h View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_pictureboximp.h View 1 chunk +2 lines, -2 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_pushbuttonimp.h View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_scrollbarimp.h View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_spinbuttonimp.h View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/src/fwl/src/basewidget/include/fwl_tooltipctrlimp.h View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_formimp.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M xfa/src/fwl/src/core/fwl_gridimp.cpp View 2 chunks +5 lines, -9 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_formimp.h View 1 chunk +4 lines, -4 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_gridimp.h View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/src/fwl/src/core/include/fwl_widgetimp.h View 2 chunks +18 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Tom Sepez
Lei, for review. The finalize is pointless and should be performed by a dtor, but ...
5 years, 1 month ago (2015-11-19 18:54:06 UTC) #1
Tom Sepez
Actually adding reviewer.
5 years, 1 month ago (2015-11-19 20:19:56 UTC) #4
Lei Zhang
lgtm https://codereview.chromium.org/1458173002/diff/1/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp File xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp (left): https://codereview.chromium.org/1458173002/diff/1/xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp#oldcode54 xfa/src/fwl/src/basewidget/fwl_barcodeimp.cpp:54: m_pDelegate = (IFWL_WidgetDelegate*)new CFWL_BarcodeImpDelegate(this); Ya, umm, wow.
5 years, 1 month ago (2015-11-20 03:11:43 UTC) #5
Tom Sepez
5 years, 1 month ago (2015-11-20 18:35:10 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
a4754b4d4ebc5e518a1d1363648042a5c7add544 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698