mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +02:00
iPro: remove test code, formatting
git-svn-id: trunk@45713 -
This commit is contained in:
parent
c1a4f8f48e
commit
ef8bf6836e
@ -2923,7 +2923,7 @@ type
|
|||||||
{$IFDEF IP_LAZARUS}
|
{$IFDEF IP_LAZARUS}
|
||||||
procedure ParseStyleSheet(Parent: TIpHtmlNode; HRef: String);
|
procedure ParseStyleSheet(Parent: TIpHtmlNode; HRef: String);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
procedure ParseBodyText(Parent : TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
procedure ParseBodyText(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
procedure ParseBlock(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
procedure ParseBlock(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
procedure ParseInline(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
procedure ParseInline(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
procedure ParseHeader(Parent : TIpHtmlNode; EndToken : TIpHtmlToken; Size : Integer);
|
procedure ParseHeader(Parent : TIpHtmlNode; EndToken : TIpHtmlToken; Size : Integer);
|
||||||
@ -5914,23 +5914,6 @@ begin
|
|||||||
if (CurToken <> IpHtmlTagUnknown) and EndFound then
|
if (CurToken <> IpHtmlTagUnknown) and EndFound then
|
||||||
if succ(CurToken) in IpEndTokenSet then
|
if succ(CurToken) in IpEndTokenSet then
|
||||||
PutToken(succ(CurToken));
|
PutToken(succ(CurToken));
|
||||||
|
|
||||||
(*
|
|
||||||
!!.10 logic moved inside GetChar
|
|
||||||
{clear white space after tag}
|
|
||||||
Ch := GetChar;
|
|
||||||
if (InPre = 0) and (CurToken <> IpHtmlTagPRE) then begin
|
|
||||||
if CurToken in IpEndTokenSet then begin
|
|
||||||
while (Ch > #0) and (Ch < #32) do
|
|
||||||
Ch := GetChar;
|
|
||||||
end else begin
|
|
||||||
while (Ch > #0) and (Ch < #32) do
|
|
||||||
Ch := GetChar;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
PutChar(Ch);
|
|
||||||
*)
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
CurToken := IpHtmlTagText;
|
CurToken := IpHtmlTagText;
|
||||||
@ -6267,8 +6250,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseHeader(Parent : TIpHtmlNode; EndToken : TIpHtmlToken;
|
procedure TIpHtml.ParseHeader(Parent : TIpHtmlNode; EndToken : TIpHtmlToken; Size : Integer);
|
||||||
Size : Integer);
|
|
||||||
var
|
var
|
||||||
NewHeader : TIpHtmlNodeHeader;
|
NewHeader : TIpHtmlNodeHeader;
|
||||||
begin
|
begin
|
||||||
@ -6288,8 +6270,7 @@ begin
|
|||||||
ReportExpectedToken(EndToken);
|
ReportExpectedToken(EndToken);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseParagraph(Parent : TIpHtmlNode;
|
procedure TIpHtml.ParseParagraph(Parent : TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
var
|
var
|
||||||
NewPara : TIpHtmlNodeP;
|
NewPara : TIpHtmlNodeP;
|
||||||
begin
|
begin
|
||||||
@ -7012,8 +6993,7 @@ begin
|
|||||||
NextToken;
|
NextToken;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseApplet(Parent: TIpHtmlNode;
|
procedure TIpHtml.ParseApplet(Parent: TIpHtmlNode; const EndTokens : TIpHtmlTokenSet);
|
||||||
const EndTokens : TIpHtmlTokenSet);
|
|
||||||
var
|
var
|
||||||
CurApplet : TIpHtmlNodeAPPLET;
|
CurApplet : TIpHtmlNodeAPPLET;
|
||||||
CurParam : TIpHtmlNodePARAM;
|
CurParam : TIpHtmlNodePARAM;
|
||||||
@ -7167,8 +7147,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseTableRows(Parent: TIpHtmlNode;
|
procedure TIpHtml.ParseTableRows(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
|
|
||||||
procedure FixupPercentages(CurRow: TIpHtmlNodeTR);
|
procedure FixupPercentages(CurRow: TIpHtmlNodeTR);
|
||||||
var
|
var
|
||||||
@ -7234,8 +7213,7 @@ begin
|
|||||||
FixupPercentages(CurRow);
|
FixupPercentages(CurRow);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseTableBody(Parent: TIpHtmlNode;
|
procedure TIpHtml.ParseTableBody(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
var
|
var
|
||||||
CurHead : TIpHtmlNodeTHEAD;
|
CurHead : TIpHtmlNodeTHEAD;
|
||||||
CurFoot : TIpHtmlNodeTFOOT;
|
CurFoot : TIpHtmlNodeTFOOT;
|
||||||
@ -7321,8 +7299,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseTABLE(Parent: TIpHtmlNode;
|
procedure TIpHtml.ParseTABLE(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
var
|
var
|
||||||
CurTable : TIpHtmlNodeTABLE;
|
CurTable : TIpHtmlNodeTABLE;
|
||||||
CurCaption : TIpHtmlNodeCAPTION;
|
CurCaption : TIpHtmlNodeCAPTION;
|
||||||
@ -7379,8 +7356,7 @@ begin
|
|||||||
EnsureClosure(IpHtmlTagTABLEend, EndTokens);
|
EnsureClosure(IpHtmlTagTABLEend, EndTokens);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseMAP(Parent: TIpHtmlNode;
|
procedure TIpHtml.ParseMAP(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
var
|
var
|
||||||
CurMap : TIpHtmlNodeMAP;
|
CurMap : TIpHtmlNodeMAP;
|
||||||
begin
|
begin
|
||||||
@ -7424,8 +7400,7 @@ begin
|
|||||||
NextToken;
|
NextToken;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseInline(Parent : TIpHtmlNode;
|
procedure TIpHtml.ParseInline(Parent : TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
begin
|
begin
|
||||||
case CurToken of
|
case CurToken of
|
||||||
IpHtmlTagP : ParseParagraph(Parent, EndTokens); {moved from block}
|
IpHtmlTagP : ParseParagraph(Parent, EndTokens); {moved from block}
|
||||||
@ -7478,8 +7453,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtml.ParseBlock(Parent : TIpHtmlNode;
|
procedure TIpHtml.ParseBlock(Parent : TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
begin
|
begin
|
||||||
case CurToken of
|
case CurToken of
|
||||||
IpHtmlTagH1 : ParseHeader(Parent, IpHtmlTagH1end, 1);
|
IpHtmlTagH1 : ParseHeader(Parent, IpHtmlTagH1end, 1);
|
||||||
@ -7493,8 +7467,7 @@ begin
|
|||||||
IpHtmlTagMENU : ParseUnorderedList(Parent, IpHtmlTagMENUend, EndTokens);
|
IpHtmlTagMENU : ParseUnorderedList(Parent, IpHtmlTagMENUend, EndTokens);
|
||||||
IpHtmlTagUL : ParseUnorderedList(Parent, IpHtmlTagULend, EndTokens);
|
IpHtmlTagUL : ParseUnorderedList(Parent, IpHtmlTagULend, EndTokens);
|
||||||
IpHtmlTagDL : ParseDefinitionList(Parent, EndTokens);
|
IpHtmlTagDL : ParseDefinitionList(Parent, EndTokens);
|
||||||
IpHtmlTagOL :
|
IpHtmlTagOL : ParseOrderedList(Parent, EndTokens);
|
||||||
ParseOrderedList(Parent, EndTokens);
|
|
||||||
IpHtmlTagPRE : ParsePre(Parent, EndTokens);
|
IpHtmlTagPRE : ParsePre(Parent, EndTokens);
|
||||||
IpHtmlTagBLOCKQUOTE : ParseBlockQuote(Parent, EndTokens);
|
IpHtmlTagBLOCKQUOTE : ParseBlockQuote(Parent, EndTokens);
|
||||||
IpHtmlTagFORM : ParseForm(Parent, EndTokens);
|
IpHtmlTagFORM : ParseForm(Parent, EndTokens);
|
||||||
@ -7504,8 +7477,7 @@ begin
|
|||||||
IpHtmlTagAPPLET : ParseApplet(Parent, EndTokens);
|
IpHtmlTagAPPLET : ParseApplet(Parent, EndTokens);
|
||||||
IpHtmlTagADDRESS : ParseAddress(Parent);
|
IpHtmlTagADDRESS : ParseAddress(Parent);
|
||||||
IpHtmlTagEof : Exit;
|
IpHtmlTagEof : Exit;
|
||||||
IpHtmlTagFRAMESET :
|
IpHtmlTagFRAMESET : ParseFrameSet(Parent, EndTokens + [IpHtmlTagFRAMESETend]);
|
||||||
ParseFrameSet(Parent, EndTokens + [IpHtmlTagFRAMESETend]);
|
|
||||||
IpHtmlTagUnknown :
|
IpHtmlTagUnknown :
|
||||||
if FlagErrors then
|
if FlagErrors then
|
||||||
ReportError(SHtmlUnknownTok)
|
ReportError(SHtmlUnknownTok)
|
||||||
@ -7541,8 +7513,7 @@ end;
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
|
||||||
procedure TIpHtml.ParseBodyText(Parent : TIpHtmlNode;
|
procedure TIpHtml.ParseBodyText(Parent: TIpHtmlNode; const EndTokens: TIpHtmlTokenSet);
|
||||||
const EndTokens: TIpHtmlTokenSet);
|
|
||||||
begin
|
begin
|
||||||
Inc(InBlock);
|
Inc(InBlock);
|
||||||
try
|
try
|
||||||
@ -9878,8 +9849,7 @@ end;
|
|||||||
|
|
||||||
{ TIpHtmlNodeFontStyle }
|
{ TIpHtmlNodeFontStyle }
|
||||||
|
|
||||||
procedure TIpHtmlNodeFontStyle.ApplyProps(
|
procedure TIpHtmlNodeFontStyle.ApplyProps(const RenderProps: TIpHtmlProps);
|
||||||
const RenderProps: TIpHtmlProps);
|
|
||||||
begin
|
begin
|
||||||
Props.Assign(RenderProps);
|
Props.Assign(RenderProps);
|
||||||
case Style of
|
case Style of
|
||||||
@ -10080,28 +10050,12 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
for i := 0 to Pred(FElementQueue.Count) do begin
|
for i := 0 to Pred(FElementQueue.Count) do begin
|
||||||
CurWord := PIpHtmlElement(FElementQueue[i]);
|
CurWord := PIpHtmlElement(FElementQueue[i]);
|
||||||
|
|
||||||
// *** Debug ***
|
|
||||||
{if CurWord.AnsiWord = '2)' then begin
|
|
||||||
Dec(CurWord.WordRect2.Top, 10);
|
|
||||||
Inc(CurWord.WordRect2.Left, 10);
|
|
||||||
end;
|
|
||||||
if CurWord.AnsiWord = 'Abanto1' then begin
|
|
||||||
Inc(CurWord.WordRect2.Top, 10);
|
|
||||||
Inc(CurWord.WordRect2.Left, 10);
|
|
||||||
end;
|
|
||||||
if CurWord.AnsiWord = 'Abanto2' then begin
|
|
||||||
Inc(CurWord.WordRect2.Top, 10);
|
|
||||||
Inc(CurWord.WordRect2.Left, 10);
|
|
||||||
end;
|
|
||||||
}
|
|
||||||
if (CurWord.Props <> nil) and (CurWord.Props <> FCurProps) then
|
if (CurWord.Props <> nil) and (CurWord.Props <> FCurProps) then
|
||||||
DoRenderFont(CurWord);
|
DoRenderFont(CurWord);
|
||||||
|
|
||||||
{$IFDEF IP_LAZARUS_DBG}
|
{$IFDEF IP_LAZARUS_DBG}
|
||||||
//DumpTIpHtmlProps(FCurProps);
|
//DumpTIpHtmlProps(FCurProps);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
//debugln(['TIpHtmlNodeBlock.RenderQueue ',i,' ',IntersectRect(R, CurWord.WordRect2, Owner.PageViewRect),' CurWord.WordRect2=',dbgs(CurWord.WordRect2),' Owner.PageViewRect=',dbgs(Owner.PageViewRect)]);
|
//debugln(['TIpHtmlNodeBlock.RenderQueue ',i,' ',IntersectRect(R, CurWord.WordRect2, Owner.PageViewRect),' CurWord.WordRect2=',dbgs(CurWord.WordRect2),' Owner.PageViewRect=',dbgs(Owner.PageViewRect)]);
|
||||||
if IntersectRect(R, CurWord.WordRect2, Owner.PageViewRect) then
|
if IntersectRect(R, CurWord.WordRect2, Owner.PageViewRect) then
|
||||||
case CurWord.ElementType of
|
case CurWord.ElementType of
|
||||||
@ -12825,12 +12779,9 @@ begin
|
|||||||
FTableWidth := MaxI2(MinW, MinI2(MaxW, ParentWidth));
|
FTableWidth := MaxI2(MinW, MinI2(MaxW, ParentWidth));
|
||||||
end;
|
end;
|
||||||
hlAbsolute :
|
hlAbsolute :
|
||||||
FTableWidth :=
|
FTableWidth := MaxI2(Width.LengthValue, MinW);
|
||||||
MaxI2(Width.LengthValue, MinW);
|
|
||||||
hlPercent :
|
hlPercent :
|
||||||
FTableWidth := MaxI2(MinW,
|
FTableWidth := MaxI2(MinW, round((Width.LengthValue * ParentWidth) / 100));
|
||||||
round(
|
|
||||||
(Width.LengthValue * ParentWidth) / 100));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
for i := 0 to Pred(ColCount) do
|
for i := 0 to Pred(ColCount) do
|
||||||
@ -13551,7 +13502,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{!!.02 new - logic moved here from .Destroy}
|
|
||||||
procedure TIpHtmlNodeIMG.UnloadImage;
|
procedure TIpHtmlNodeIMG.UnloadImage;
|
||||||
begin
|
begin
|
||||||
{$IFDEF IP_LAZARUS}
|
{$IFDEF IP_LAZARUS}
|
||||||
@ -14337,8 +14287,8 @@ end;
|
|||||||
|
|
||||||
procedure TIpHtmlNodeINPUT.CreateControl(Parent: TWinControl);
|
procedure TIpHtmlNodeINPUT.CreateControl(Parent: TWinControl);
|
||||||
var
|
var
|
||||||
iCurFontSize: integer;
|
iCurFontSize: integer;
|
||||||
aCanvas : TCanvas;
|
aCanvas : TCanvas;
|
||||||
|
|
||||||
function OwnerForm: TIpHtmlNode;
|
function OwnerForm: TIpHtmlNode;
|
||||||
begin
|
begin
|
||||||
@ -14626,7 +14576,7 @@ end;
|
|||||||
|
|
||||||
procedure TIpHtmlNodeINPUT.SubmitClick(Sender: TObject);
|
procedure TIpHtmlNodeINPUT.SubmitClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
vCancel: boolean;
|
vCancel: boolean;
|
||||||
begin
|
begin
|
||||||
vCancel := False;
|
vCancel := False;
|
||||||
Owner.ControlClick2(Self, vCancel);
|
Owner.ControlClick2(Self, vCancel);
|
||||||
@ -16262,8 +16212,7 @@ begin
|
|||||||
Min := Max;
|
Min := Max;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtmlNodeTableHeaderOrCell.Render(
|
procedure TIpHtmlNodeTableHeaderOrCell.Render(const RenderProps: TIpHtmlProps);
|
||||||
const RenderProps: TIpHtmlProps);
|
|
||||||
var
|
var
|
||||||
R : TRect;
|
R : TRect;
|
||||||
begin
|
begin
|
||||||
@ -16495,8 +16444,7 @@ procedure TIpHtmlNodeNv.InvalidateSize;
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtmlNodeNv.EnqueueElement(
|
procedure TIpHtmlNodeNv.EnqueueElement(const Entry: PIpHtmlElement);
|
||||||
const Entry: PIpHtmlElement);
|
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -17339,7 +17287,7 @@ begin
|
|||||||
{$IFDEF IP_LAZARUS}
|
{$IFDEF IP_LAZARUS}
|
||||||
while not (Result is TIpHtmlPanel) do
|
while not (Result is TIpHtmlPanel) do
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
while Assigned(Result) and (Result.ClassType <> TIpHtmlPanel) do //JMN
|
while Assigned(Result) and (Result.ClassType <> TIpHtmlPanel) do
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Result := TIpHtmlPanel(Result.Parent);
|
Result := TIpHtmlPanel(Result.Parent);
|
||||||
end;
|
end;
|
||||||
@ -17810,11 +17758,9 @@ begin
|
|||||||
FFramePanel.Parent := FParent;
|
FFramePanel.Parent := FParent;
|
||||||
FFramePanel.OnResize := FramePanelResize;
|
FFramePanel.OnResize := FramePanelResize;
|
||||||
FFramePanel.FullRepaint := False;
|
FFramePanel.FullRepaint := False;
|
||||||
ColW := CalcMultiLength(FHtml.FrameSet.Cols, FFramePanel.ClientWidth,
|
ColW := CalcMultiLength(FHtml.FrameSet.Cols, FFramePanel.ClientWidth, ColWCount);
|
||||||
ColWCount);
|
|
||||||
try
|
try
|
||||||
RowH := CalcMultiLength(FHtml.FrameSet.Rows, FFramePanel.ClientHeight,
|
RowH := CalcMultiLength(FHtml.FrameSet.Rows, FFramePanel.ClientHeight, RowHCount);
|
||||||
RowHCount);
|
|
||||||
try
|
try
|
||||||
R := 0;
|
R := 0;
|
||||||
C := 0;
|
C := 0;
|
||||||
@ -18177,14 +18123,13 @@ begin
|
|||||||
FFrames[i].EnumDocuments(Enumerator);
|
FFrames[i].EnumDocuments(Enumerator);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtmlFrame.ControlClick(Sender: TIpHtml;
|
procedure TIpHtmlFrame.ControlClick(Sender: TIpHtml; Node: TIpHtmlNodeControl);
|
||||||
Node: TIpHtmlNodeControl);
|
|
||||||
begin
|
begin
|
||||||
FViewer.ControlClick(Self, Sender, Node);
|
FViewer.ControlClick(Self, Sender, Node);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIpHtmlFrame.ControlClick2(Sender: TIpHtml;
|
procedure TIpHtmlFrame.ControlClick2(Sender: TIpHtml; Node: TIpHtmlNodeControl;
|
||||||
Node: TIpHtmlNodeControl; var cancel: boolean);
|
var cancel: boolean);
|
||||||
begin
|
begin
|
||||||
FViewer.ControlClick2(Self, Sender, Node, cancel);
|
FViewer.ControlClick2(Self, Sender, Node, cancel);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user