TurboPower_iPro: Add "inherited Create" to all classes in iphtml.pas inheriting from TObject (to simplify switching to a different base class if needed). Patch by Zaher Dirkey, issue #37930).

git-svn-id: trunk@64028 -
This commit is contained in:
wp 2020-10-16 15:35:17 +00:00
parent 8088c1378b
commit 70240d5335
2 changed files with 8 additions and 0 deletions

View File

@ -3841,6 +3841,7 @@ end;
constructor TIpHtmlInteger.Create(AValue: Integer); constructor TIpHtmlInteger.Create(AValue: Integer);
begin begin
inherited Create;
FValue := AValue; FValue := AValue;
end; end;
@ -3981,6 +3982,7 @@ end;
constructor TIpHtmlMultiLengthList.Create; constructor TIpHtmlMultiLengthList.Create;
begin begin
inherited Create;
List := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create; List := {$ifdef IP_LAZARUS}TFPList{$else}TList{$endif}.Create;
end; end;
@ -4007,6 +4009,7 @@ end;
constructor TIpHtmlBaseLayouter.Create(AOwner: TIpHtmlNodeCore); constructor TIpHtmlBaseLayouter.Create(AOwner: TIpHtmlNodeCore);
begin begin
inherited Create;
FOwner := AOwner; FOwner := AOwner;
FBlockMin := -1; FBlockMin := -1;
FBlockMax := -1; FBlockMax := -1;
@ -4111,6 +4114,7 @@ end;
constructor TIpHtmlNode.Create(ParentNode : TIpHtmlNode); constructor TIpHtmlNode.Create(ParentNode : TIpHtmlNode);
begin begin
inherited Create;
if assigned(ParentNode) then if assigned(ParentNode) then
if ParentNode is TIpHtmlNodeMulti then if ParentNode is TIpHtmlNodeMulti then
TIpHtmlNodeMulti(ParentNode).FChildren.Add(Self) TIpHtmlNodeMulti(ParentNode).FChildren.Add(Self)
@ -9161,6 +9165,7 @@ end;
constructor TIpHtmlGifQueueEntry.Create(AGraphic: TGraphic; ARect: TRect); constructor TIpHtmlGifQueueEntry.Create(AGraphic: TGraphic; ARect: TRect);
begin begin
inherited Create;
{$IFDEF IP_LAZARUS_DBG} {$IFDEF IP_LAZARUS_DBG}
DebugLn('TIpHtmlGifQueueEntry.Create ToDo NOT IMPLEMENTED YET'); DebugLn('TIpHtmlGifQueueEntry.Create ToDo NOT IMPLEMENTED YET');
{$ELSE} {$ELSE}
@ -14781,6 +14786,7 @@ constructor TIpHtmlFrame.Create(Viewer: TIpHtmlCustomPanel; Parent: TCustomPanel
DataProvider : TIpAbstractHtmlDataProvider; FlagErrors, NoScroll: Boolean; DataProvider : TIpAbstractHtmlDataProvider; FlagErrors, NoScroll: Boolean;
MarginWidth, MarginHeight: Integer); MarginWidth, MarginHeight: Integer);
begin begin
inherited Create;
FNoScroll := NoScroll; FNoScroll := NoScroll;
FParent := Parent; FParent := Parent;
FViewer := Viewer; FViewer := Viewer;
@ -15461,6 +15467,7 @@ end;
constructor TIpHtmlNvFrame.Create(Scanner: TIpHtmlCustomScanner; constructor TIpHtmlNvFrame.Create(Scanner: TIpHtmlCustomScanner;
DataProvider : TIpAbstractHtmlDataProvider; FlagErrors: Boolean); DataProvider : TIpAbstractHtmlDataProvider; FlagErrors: Boolean);
begin begin
inherited Create;
FScanner := Scanner; FScanner := Scanner;
FDataProvider := DataProvider; FDataProvider := DataProvider;
FHtml := TIpHtml.Create; FHtml := TIpHtml.Create;

View File

@ -361,6 +361,7 @@ end;
constructor TIpHtmlProps.Create(APropsAList: TIpHtmlPropsAList; APropsBList: TIpHtmlPropsBList); constructor TIpHtmlProps.Create(APropsAList: TIpHtmlPropsAList; APropsBList: TIpHtmlPropsBList);
begin begin
inherited Create;
FPropsACache := APropsAList; FPropsACache := APropsAList;
FPropsBCache := APropsBList; FPropsBCache := APropsBList;
FPropA := FPropsACache.FDummyA; FPropA := FPropsACache.FDummyA;