[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: KDE1.1.2/PATCH: khtmlw (#Bug 1647)
From: Waldo Bastian <bastian () suse ! de>
Date: 1999-08-11 9:36:39
[Download RAW message or body]
Hiya,
Please test this patch so that I can commit it.
Cheers,
Waldo
-- Bug report --
Package: kfm
Version: 1.167.2.11
There is a little bug in kfm handling html.
In the attached html file each line has two break tags at the end, <BR><BR>
so there are blank lines in between the lines
(like a <p> tag does as well).
In kfm there is no blank line if there is a space between the break tags.
<BR> <BR>
The page shows up with a wrong lay out: the first lines do
not have a blank line in between.
Best regards,
Ante
-- End of bug report --
["kdelibs.khtmlw.11-08-99.diff" (text/x-c++)]
Index: khtmlw/html.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtmlw/Attic/html.cpp,v
retrieving revision 1.149.2.5
diff -u -r1.149.2.5 html.cpp
--- html.cpp 1999/08/11 07:25:58 1.149.2.5
+++ html.cpp 1999/08/11 09:30:33
@@ -2833,19 +2833,10 @@
if (!flow)
newFlow(_clue);
- HTMLObject *last = flow->lastChild();
- if (!last || last->isNewline())
- {
- // Start of line, add vertical space based on current font.
- flow->append( new HTMLVSpace(
- currentFont()->pointSize(),
- clear ));
- }
- else
- {
- // Terminate current line
- flow->append( new HTMLVSpace(0, clear));
- }
+ // Start of line, add vertical space based on current font.
+ flow->append( new HTMLVSpace(
+ currentFont()->pointSize(),
+ clear ));
vspace_inserted = false;
}
Index: khtmlw/htmlclue.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtmlw/Attic/htmlclue.cpp,v
retrieving revision 1.41
diff -u -r1.41 htmlclue.cpp
--- htmlclue.cpp 1999/01/10 20:47:28 1.41
+++ htmlclue.cpp 1999/08/11 09:30:34
@@ -1479,9 +1479,10 @@
// line will be aligned, and the next line prepared.
if ( obj->isNewline() )
{
- if ( obj->getAscent() > a )
+// WABA: Only update the height if this line has no height already
+ if ( !a )
a = obj->getAscent();
- if ( obj->getDescent() > d )
+ if ( !a && (obj->getDescent() > d) )
d = obj->getDescent();
newLine = true;
HTMLVSpace *vs = (HTMLVSpace *)obj;
Index: khtmlw/test/tag_br.html
===================================================================
RCS file: /home/kde/kdelibs/khtmlw/test/Attic/tag_br.html,v
retrieving revision 1.1
diff -u -r1.1 tag_br.html
--- tag_br.html 1998/11/01 20:12:50 1.1
+++ tag_br.html 1999/08/11 09:30:34
@@ -27,6 +27,29 @@
<H2>This is a <H2> tag</H2>
This is a line of text without a <BR> tag followed by a <H2> tag.
<H2>This is a <H2> tag</H2>
+
+<HR>
+<P>
+This is the first line followed by <BR>.<BR>
+This is the second line followed by <BR>.<BR>
+After this line, two empty lines follow:<BR>
+<BR>
+<BR>
+<HR>
+<P>
+This is the first line followed by <BR>.<BR>
+This is the second line followed by <BR>.<BR>
+After this line, two empty lines follow:<BR>
+<BR><BR>
+<HR>
+<P>
+This is the first line followed by <BR>.<BR>
+This is the second line followed by <BR>.<BR>
+After this line, two empty lines follow:<BR>
+<BR> <BR>
+<HR>
+
+
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic