Another two bugs in TIpHtmlPanel one new introduced.
lazarus / 5-Lazarus Extra Components
----------------------------------------------------------------------
Soner · 2022-05-19 10:56
I found two bugs in TIpHtmlPanel, one bug is new introduced. Can
anyone look and confirm it, before I report it.
Look at the screenshot.
----------------------------------------------------------------------
wp · 2022-05-19 15:19
I looked at the
bug first and found that it can be fixed by
changing the TIpHtmlNodeTABLE.Enqueue in IpHtml.pas in the following
way:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i procedure
TIpHtmlNodeTABLE.Enqueue;begin//The commented code bellow prevent a
blank line before the table{ case Align of hiaTop, hiaMiddle,
hiaBottom, hiaCenter : EnqueueElement(Owner.SoftLF); end;}
EnqueueElement(Owner.SoftLF); EnqueueElement(Element);
EnqueueElement(Owner.SoftLF); EnqueueElement(Owner.HardLF); // LFs
needed otherwise next element is too close // wp: uncomment this
line{ case Align of hiaTop, hiaMiddle, hiaBottom, hiaCenter :
EnqueueElement(Owner.SoftLF); end;}end; The commented code is from
earlier versions indicating that there has been several experiments
with that routine. I must say that I never understood what IPro's
SoftLFs and HardLFs are good for.
So please carefully check out this corrected version and report back
if there are any side-effect (which I am expecting...)
----------------------------------------------------------------------
Soner · 2022-05-20 07:14
wp, I tried it, it looks okay.
Quote from: wp on May 19, 2022, 05:19:46 pm...
I must say that I never understood what IPro's SoftLFs and HardLFs are
good for.
...
I think softbreaks are linebreaks after some tags like
,
and hardbreaks are after
tag.
I found another new bug introduced in newer lazarus versions look at
the screenshot, the text "Free Pascal" should be transparent like in
lazarus 1.8.
I changed the html file, don't use html file from my first post, it
has error.
Edit: New bug is also in 2.0.11
Edit2: I had on my usb stick one lazarus version Revision 61029 maybe
lazarus 2.0.2 from year 2019/2020. Iphtml.pas file the last change
date 2019-04-22. This version has not the new color bug.
----------------------------------------------------------------------
wp · 2022-05-20 20:29
Quote from: Soner on May 20, 2022, 09:14:49 amwp, I tried it, it looks
okay.
Committed it. Did a few more tests, no apparent issues. Still, the
entire SoftLF/HardLF thing is a mess and should be reworked from
ground up. (For example, the same issue that you report exists for
list tags).
Quote from: Soner on May 20, 2022, 09:14:49 amI found another new bug
introduced in newer lazarus versions look at the screenshot, the text
"Free Pascal" should be transparent like in lazarus 1.8.
This must have come in when somebody asked for rendering text with
background color. I'll have a look, maybe I find it in the commit
notes (but I don't make promises - IpHtmlPanel is a pain to work
in...).
[EDIT]
Found the culprit and posted a bug report:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39756
Fixed in main (60731529).
----------------------------------------------------------------------
wp · 2022-05-21 18:20
As for the alignment error, I found that it works correctly when I
remove the style section, or more precisely, when I remove the "body"
style. Parsing the css seems to override the alignment props
somewhere...
----------------------------------------------------------------------
Soner · 2022-05-24 10:38
I knew it with css-part but not with body-tag, good investigation. I
see you created a bug reports.
I am using currently workaround, this version with lazarus 2.2.0.:
Quote from: Soner on May 20, 2022, 09:14:49 amEdit2: I had on my usb
stick one lazarus version Revision 61029 maybe lazarus 2.0.2 from year
2019/2020. Iphtml.pas file the last change date 2019-04-22. This
version has not the new color bug.
And I am using for the right aligment this:
"
"
|