From d2ea3893b2ee59db4eed87740b1e8faf49346539 Mon Sep 17 00:00:00 2001 From: Inca Date: Sat, 13 Sep 2025 15:55:40 -0400 Subject: [PATCH 1/2] Fix missing image with display:none showing box --- source/HTMLSubs.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/HTMLSubs.pas b/source/HTMLSubs.pas index 23d2b948..2fc3551e 100644 --- a/source/HTMLSubs.pas +++ b/source/HTMLSubs.pas @@ -11852,7 +11852,8 @@ function TSection.AddImage(L: TAttributeList; ACell: TCellBasic; Index: Integer; begin Result := TImageObj.Create(ACell, Len, L, Prop); Images.Add(Result); - AddChar(ImgPan, Index); {marker for image} + if Result.Display <> pdNone then + AddChar(ImgPan, Index); {marker for image} end; function TSection.AddPanel(L: TAttributeList; ACell: TCellBasic; Index: Integer; Prop: TProperties): TPanelObj; @@ -13792,7 +13793,7 @@ function TSection.Draw1(Canvas: TCanvas; const ARect: TRect; begin CP1x := CPx + CharacterJustification(Start, Tmp); ExtTextOutW(Canvas.Handle, CPx, CPy, 0, nil, Start, Tmp, pDx); - end + end; end else begin {Win95} @@ -16953,4 +16954,3 @@ finalization ErrorStream.Free; WaitStream.Free; end. - From 02aa050ec640d6550680fd81b99a757c684e53c4 Mon Sep 17 00:00:00 2001 From: Inca Date: Sat, 13 Sep 2025 15:58:08 -0400 Subject: [PATCH 2/2] Revert unrelated changes --- source/HTMLSubs.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/HTMLSubs.pas b/source/HTMLSubs.pas index 2fc3551e..740751b8 100644 --- a/source/HTMLSubs.pas +++ b/source/HTMLSubs.pas @@ -13793,7 +13793,7 @@ function TSection.Draw1(Canvas: TCanvas; const ARect: TRect; begin CP1x := CPx + CharacterJustification(Start, Tmp); ExtTextOutW(Canvas.Handle, CPx, CPy, 0, nil, Start, Tmp, pDx); - end; + end end else begin {Win95} @@ -16954,3 +16954,4 @@ finalization ErrorStream.Free; WaitStream.Free; end. +