[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

gramps gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:57:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b94651c54f922a66eadb201c7f067bc48c027c26
Author: gramps <gramps at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 7 06:38:21 2002 +0000

    	Removed unused files in kdelibs.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@706 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/kjs/README b/JavaScriptCore/kjs/README
deleted file mode 100644
index b4a0fcc..0000000
--- a/JavaScriptCore/kjs/README
+++ /dev/null
@@ -1,25 +0,0 @@
-This library provides an ECMAScript compatible interpreter. The ECMA standard
-is based on well known scripting languages such as Netscape's JavaScript and
-Microsoft's JScript.
-
-I'm currently pursuing to be compliant with Edition 3 of ECMA-262. Postscript
-and pdf versions of the standard are avaiable at:
-
-http://www.ecma.ch
-
-About 90% of the required features should be covered by now. Note that this
-number covers the core language elements only. Features like the famous
-roll-over buttons on the www are NOT part of the standard. Those extensions
-are added via a module loaded dynamically by the KHTML Widget.
-
-I'll provide some examples of how to extend this library for various needs at
-a later point in time. Feel free to contact me via mail if you have any
-questions on how to provide scripting capabilites for your application.
-
-A debugger is being worked on. To compile it, add -DKJS_DEBUGGER to the CXXFLAGS
-section in the Makefile.am of kdelibs/kjs and kdelibs/khtml/ecma.
-
-Bug reports, patches or feedback of any kind is very welcome.
-
-Harri Porten <porten at kde.org>
-
diff --git a/JavaScriptCore/kjs/THANKS b/JavaScriptCore/kjs/THANKS
deleted file mode 100644
index 036e5e7..0000000
--- a/JavaScriptCore/kjs/THANKS
+++ /dev/null
@@ -1,7 +0,0 @@
-I would like to thank the following people for their help:
-
-Richard Moore <rich at kde.org> - for filling the Math object with some life
-Daegeun Lee <realking at mizi.com> - for pointing out some bugs and providing
-                                  much code for the String and Date object.
-Marco Pinelli <pinmc at libero.it> - for his patches
-Christian Kirsch <ck at held.mind.de> - for his contribution to the Date object
diff --git a/JavaScriptCore/kjs/create_hash_table b/JavaScriptCore/kjs/create_hash_table
deleted file mode 100755
index 85c6744..0000000
--- a/JavaScriptCore/kjs/create_hash_table
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /usr/bin/perl
-
-$file = $ARGV[0];
-open(IN, $file) or die "No such file $file";
-
- at keys = ();
- at values = ();
- at attrs = ();
-
-my $inside = 0;
-my $name;
-my $size;
-my $hashsize;
-my $banner = 0;
-
-while (<IN>) {
-  chop; 
-  s/^\s*//g; 
-  if (/^\#|^$/) {
-      # comment. do nothing
-    } elsif (/^\@begin\s*(\w+)\s*(\d+)\s*$/ && !$inside) {
-      $inside = 1;
-      $name = $1;
-      $hashsize = $2;
-    } elsif (/^\@end\s*$/ && $inside) {
-      calcTable();
-      output();
-      @keys = ();
-      @values = ();
-      @attrs = ();
-      $inside = 0;
-    } elsif (/^(\w+)\s*([\w\:]+)\s*([\w\|]*)\s*$/ && $inside) {
-      push(@keys, $1);
-      push(@values, $2);
-      push(@attrs, length($3) > 0 ? $3 : "0");
-    } else {
-      die "invalid data";
-    }
-}
-
-die "missing closing \@end" if ($inside);
-
-sub calcTable() {
-  @table = ();
-  @links = ();
-  $size = $hashsize;
-  my $collisions = 0;
-  my $i = 0;
-  foreach $key (@keys) {
-    my $h = hashValue($key) % $hashsize;
-    while (defined($table[$h])) {
-      if (defined($links[$h])) {
-	$h = $links[$h];
-      } else {
-	$collisions++;
-	$links[$h] = $size;
-	$h = $size;
-	$size++;
-      }
-    }
-    $table[$h] = $i;
-    $i++;
-  }
-
-# print "// Number of collisions: $collisions\n";
-#  printf "total size: $size\n";
-#  my $i = 0;
-#  foreach $entry (@table) {
-#    print "$i " . $entry;
-#    print " -> " . $links[$i] if (defined($links[$i]));
-#    print "\n";
-#    $i++;
-#  }
-}
-
-sub hashValue {
-  @chars = split(/ */, @_[0]);
-  my $val = 0;
-  foreach $c (@chars) {
-    $val += ord($c);
-  }
-  return $val;
-}
-
-sub output {
-  if (!$banner) {
-    $banner = 1;
-    print "/* automatically generated from $file. DO NOT EDIT ! */\n";
-  }
-
-  print "\nnamespace KJS {\n";
-  print "\nconst struct HashEntry2 ${name}Entries[] = {\n";
-  my $i = 0;
-  foreach $entry (@table) {
-    if (defined($entry)) {
-      my $key = $keys[$entry];
-      print "   \{ \"" . $key . "\"";
-      print ", " . $values[$entry];
-      print ", " . $attrs[$entry] . ", ";
-      if (defined($links[$i])) {
-	print "&${name}Entries[$links[$i]]" . " \}";
-      } else {
-	print "0 \}"
-      }
-    } else {
-      print "   \{ 0, 0, 0, 0 \}";
-    }
-    print "," unless ($i == $size - 1);
-    print "\n";
-    $i++;
-  }
-  print "};\n";
-  print "\nconst struct HashTable2 $name = ";
-  print "\{ 2, $size, ${name}Entries, $hashsize \};\n\n";
-  print "}; // namespace\n";
-}
diff --git a/JavaScriptCore/kjs/keywords.table b/JavaScriptCore/kjs/keywords.table
deleted file mode 100644
index 391aa34..0000000
--- a/JavaScriptCore/kjs/keywords.table
+++ /dev/null
@@ -1,66 +0,0 @@
-# main keywords
- at begin mainTable 41
-# types
-null		NULLTOKEN
-true		TRUETOKEN
-false		FALSETOKEN
-# keywords
-break		BREAK
-case		CASE
-catch		CATCH
-default		DEFAULT
-finally		FINALLY
-for		FOR
-instanceof	INSTANCEOF
-new		NEW
-var		VAR
-continue	CONTINUE
-function	FUNCTION
-return		RETURN
-void		VOID
-delete		DELETE
-if		IF
-this		THIS
-do		DO
-while		WHILE
-else		ELSE
-in		IN
-switch		SWITCH
-throw		THROW
-try		TRY
-typeof		TYPEOF
-with		WITH
-# reserved for future use
-abstract	RESERVED
-boolean		RESERVED
-byte		RESERVED
-char		RESERVED
-class		RESERVED
-const		RESERVED
-debugger	RESERVED
-double		RESERVED
-enum		RESERVED
-export		RESERVED
-extends		RESERVED
-final		RESERVED
-float		RESERVED
-goto		RESERVED
-implements	RESERVED
-import		RESERVED
-int		RESERVED
-interface	RESERVED
-long		RESERVED
-native		RESERVED
-package		RESERVED
-private		RESERVED
-protected	RESERVED
-public		RESERVED
-short		RESERVED
-static		RESERVED
-super		RESERVED
-synchronized	RESERVED
-throws		RESERVED
-transient	RESERVED
-volatile	RESERVED
- at end
-
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 6b48bf8..3a00ddf 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,110 @@
 2002-03-06  Don Melton  <gramps at apple.com>
 
+	Removed unused files in kdelibs.
+
+	* src/kdelibs/AUTHORS:
+	* src/kdelibs/README:
+	* src/kdelibs/khtml/CHANGES:
+	* src/kdelibs/khtml/DESIGN.html:
+	* src/kdelibs/khtml/README.HTMLWidget:
+	* src/kdelibs/khtml/README.tags:
+	* src/kdelibs/khtml/SECURITY:
+	* src/kdelibs/khtml/TODO:
+	* src/kdelibs/khtml/design.h:
+	* src/kdelibs/khtml/domtreeview.cpp:
+	* src/kdelibs/khtml/domtreeview.h:
+	* src/kdelibs/khtml/ecma/AUTHORS:
+	* src/kdelibs/khtml/ecma/README:
+	* src/kdelibs/khtml/ecma/THANKS:
+	* src/kdelibs/khtml/ecma/TODO:
+	* src/kdelibs/khtml/ecma/jsk.html:
+	* src/kdelibs/khtml/ecma/testecma.cpp:
+	* src/kdelibs/khtml/html/dtd.dtd:
+	* src/kdelibs/khtml/java/KJAS_GRAMMAR.txt:
+	* src/kdelibs/khtml/java/README:
+	* src/kdelibs/khtml/java/TODO:
+	* src/kdelibs/khtml/java/build.xml:
+	* src/kdelibs/khtml/java/javaembed.cpp:
+	* src/kdelibs/khtml/java/kjava.jar:
+	* src/kdelibs/khtml/java/kjava.policy.in:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletContext.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletStub.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASConsole.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASSecurityManager.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/Main.java:
+	* src/kdelibs/khtml/java/tests/badapplets/BadApplet.jar:
+	* src/kdelibs/khtml/java/tests/badapplets/BadApplet.java:
+	* src/kdelibs/khtml/java/tests/badapplets/applet.html:
+	* src/kdelibs/khtml/java/tests/good_sites:
+	* src/kdelibs/khtml/java/tests/testkjavaappletserver.cpp:
+	* src/kdelibs/khtml/khtml.desktop:
+	* src/kdelibs/khtml/khtml.rc:
+	* src/kdelibs/khtml/khtml_browser.rc:
+	* src/kdelibs/khtml/khtml_ext.cpp:
+	* src/kdelibs/khtml/khtml_factory.cpp:
+	* src/kdelibs/khtml/khtml_find.cpp:
+	* src/kdelibs/khtml/khtml_find.h:
+	* src/kdelibs/khtml/khtml_pagecache.cpp:
+	* src/kdelibs/khtml/khtml_pagecache.h:
+	* src/kdelibs/khtml/khtml_part.cpp:
+	* src/kdelibs/khtml/khtml_popupmenu.rc:
+	* src/kdelibs/khtml/khtml_run.cpp:
+	* src/kdelibs/khtml/khtml_run.h:
+	* src/kdelibs/khtml/khtmldefaults.h:
+	* src/kdelibs/khtml/khtmlimage.cpp:
+	* src/kdelibs/khtml/khtmlimage.desktop:
+	* src/kdelibs/khtml/khtmlimage.h:
+	* src/kdelibs/khtml/pics/hi16-action-images_display.png:
+	* src/kdelibs/khtml/pics/hi22-action-images_display.png:
+	* src/kdelibs/khtml/pics/hi32-action-images_display.png:
+	* src/kdelibs/khtml/test/README:
+	* src/kdelibs/khtml/test/URL1.html:
+	* src/kdelibs/khtml/test/URL2.html:
+	* src/kdelibs/khtml/test/align.html:
+	* src/kdelibs/khtml/test/align1.html:
+	* src/kdelibs/khtml/test/align2.html:
+	* src/kdelibs/khtml/test/anchor1.html:
+	* src/kdelibs/khtml/test/anchor2.html:
+	* src/kdelibs/khtml/test/badpages.html:
+	* src/kdelibs/khtml/test/buggy.html:
+	* src/kdelibs/khtml/test/button.html:
+	* src/kdelibs/khtml/test/color.html:
+	* src/kdelibs/khtml/test/fixed-background.html:
+	* src/kdelibs/khtml/test/image.gif:
+	* src/kdelibs/khtml/test/image_map.html:
+	* src/kdelibs/khtml/test/index.html:
+	* src/kdelibs/khtml/test/java.html:
+	* src/kdelibs/khtml/test/javascript.html:
+	* src/kdelibs/khtml/test/jsplugins.html:
+	* src/kdelibs/khtml/test/konqi.gif:
+	* src/kdelibs/khtml/test/lake.class:
+	* src/kdelibs/khtml/test/listing.html:
+	* src/kdelibs/khtml/test/lists.html:
+	* src/kdelibs/khtml/test/nav_bar.gif:
+	* src/kdelibs/khtml/test/nbsp.html:
+	* src/kdelibs/khtml/test/notitle.html:
+	* src/kdelibs/khtml/test/object.html:
+	* src/kdelibs/khtml/test/pseudo.html:
+	* src/kdelibs/khtml/test/renders.html:
+	* src/kdelibs/khtml/test/supsub.html:
+	* src/kdelibs/khtml/test/testpages.html:
+	* src/kdelibs/khtml/test/textarea.html:
+	* src/kdelibs/khtml/test/title.html:
+	* src/kdelibs/khtml/testcss.cpp:
+	* src/kdelibs/khtml/testkhtml.cpp:
+	* src/kdelibs/khtml/testkhtml.h:
+	* src/kdelibs/khtml/testrender.cpp:
+	* src/kdelibs/khtml/testrender.h:
+	* src/kdelibs/kjs/README:
+	* src/kdelibs/kjs/THANKS:
+	* src/kdelibs/kjs/create_hash_table:
+	* src/kdelibs/kjs/keywords.table:
+
+2002-03-06  Don Melton  <gramps at apple.com>
+
 	Cleaned up all our changes to kdelibs, removed bitrot, and replaced use
 	of _KWQ_ with new APPLE_CHANGES define.
 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6b48bf8..3a00ddf 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,110 @@
 2002-03-06  Don Melton  <gramps at apple.com>
 
+	Removed unused files in kdelibs.
+
+	* src/kdelibs/AUTHORS:
+	* src/kdelibs/README:
+	* src/kdelibs/khtml/CHANGES:
+	* src/kdelibs/khtml/DESIGN.html:
+	* src/kdelibs/khtml/README.HTMLWidget:
+	* src/kdelibs/khtml/README.tags:
+	* src/kdelibs/khtml/SECURITY:
+	* src/kdelibs/khtml/TODO:
+	* src/kdelibs/khtml/design.h:
+	* src/kdelibs/khtml/domtreeview.cpp:
+	* src/kdelibs/khtml/domtreeview.h:
+	* src/kdelibs/khtml/ecma/AUTHORS:
+	* src/kdelibs/khtml/ecma/README:
+	* src/kdelibs/khtml/ecma/THANKS:
+	* src/kdelibs/khtml/ecma/TODO:
+	* src/kdelibs/khtml/ecma/jsk.html:
+	* src/kdelibs/khtml/ecma/testecma.cpp:
+	* src/kdelibs/khtml/html/dtd.dtd:
+	* src/kdelibs/khtml/java/KJAS_GRAMMAR.txt:
+	* src/kdelibs/khtml/java/README:
+	* src/kdelibs/khtml/java/TODO:
+	* src/kdelibs/khtml/java/build.xml:
+	* src/kdelibs/khtml/java/javaembed.cpp:
+	* src/kdelibs/khtml/java/kjava.jar:
+	* src/kdelibs/khtml/java/kjava.policy.in:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletContext.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletStub.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASConsole.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASSecurityManager.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/Main.java:
+	* src/kdelibs/khtml/java/tests/badapplets/BadApplet.jar:
+	* src/kdelibs/khtml/java/tests/badapplets/BadApplet.java:
+	* src/kdelibs/khtml/java/tests/badapplets/applet.html:
+	* src/kdelibs/khtml/java/tests/good_sites:
+	* src/kdelibs/khtml/java/tests/testkjavaappletserver.cpp:
+	* src/kdelibs/khtml/khtml.desktop:
+	* src/kdelibs/khtml/khtml.rc:
+	* src/kdelibs/khtml/khtml_browser.rc:
+	* src/kdelibs/khtml/khtml_ext.cpp:
+	* src/kdelibs/khtml/khtml_factory.cpp:
+	* src/kdelibs/khtml/khtml_find.cpp:
+	* src/kdelibs/khtml/khtml_find.h:
+	* src/kdelibs/khtml/khtml_pagecache.cpp:
+	* src/kdelibs/khtml/khtml_pagecache.h:
+	* src/kdelibs/khtml/khtml_part.cpp:
+	* src/kdelibs/khtml/khtml_popupmenu.rc:
+	* src/kdelibs/khtml/khtml_run.cpp:
+	* src/kdelibs/khtml/khtml_run.h:
+	* src/kdelibs/khtml/khtmldefaults.h:
+	* src/kdelibs/khtml/khtmlimage.cpp:
+	* src/kdelibs/khtml/khtmlimage.desktop:
+	* src/kdelibs/khtml/khtmlimage.h:
+	* src/kdelibs/khtml/pics/hi16-action-images_display.png:
+	* src/kdelibs/khtml/pics/hi22-action-images_display.png:
+	* src/kdelibs/khtml/pics/hi32-action-images_display.png:
+	* src/kdelibs/khtml/test/README:
+	* src/kdelibs/khtml/test/URL1.html:
+	* src/kdelibs/khtml/test/URL2.html:
+	* src/kdelibs/khtml/test/align.html:
+	* src/kdelibs/khtml/test/align1.html:
+	* src/kdelibs/khtml/test/align2.html:
+	* src/kdelibs/khtml/test/anchor1.html:
+	* src/kdelibs/khtml/test/anchor2.html:
+	* src/kdelibs/khtml/test/badpages.html:
+	* src/kdelibs/khtml/test/buggy.html:
+	* src/kdelibs/khtml/test/button.html:
+	* src/kdelibs/khtml/test/color.html:
+	* src/kdelibs/khtml/test/fixed-background.html:
+	* src/kdelibs/khtml/test/image.gif:
+	* src/kdelibs/khtml/test/image_map.html:
+	* src/kdelibs/khtml/test/index.html:
+	* src/kdelibs/khtml/test/java.html:
+	* src/kdelibs/khtml/test/javascript.html:
+	* src/kdelibs/khtml/test/jsplugins.html:
+	* src/kdelibs/khtml/test/konqi.gif:
+	* src/kdelibs/khtml/test/lake.class:
+	* src/kdelibs/khtml/test/listing.html:
+	* src/kdelibs/khtml/test/lists.html:
+	* src/kdelibs/khtml/test/nav_bar.gif:
+	* src/kdelibs/khtml/test/nbsp.html:
+	* src/kdelibs/khtml/test/notitle.html:
+	* src/kdelibs/khtml/test/object.html:
+	* src/kdelibs/khtml/test/pseudo.html:
+	* src/kdelibs/khtml/test/renders.html:
+	* src/kdelibs/khtml/test/supsub.html:
+	* src/kdelibs/khtml/test/testpages.html:
+	* src/kdelibs/khtml/test/textarea.html:
+	* src/kdelibs/khtml/test/title.html:
+	* src/kdelibs/khtml/testcss.cpp:
+	* src/kdelibs/khtml/testkhtml.cpp:
+	* src/kdelibs/khtml/testkhtml.h:
+	* src/kdelibs/khtml/testrender.cpp:
+	* src/kdelibs/khtml/testrender.h:
+	* src/kdelibs/kjs/README:
+	* src/kdelibs/kjs/THANKS:
+	* src/kdelibs/kjs/create_hash_table:
+	* src/kdelibs/kjs/keywords.table:
+
+2002-03-06  Don Melton  <gramps at apple.com>
+
 	Cleaned up all our changes to kdelibs, removed bitrot, and replaced use
 	of _KWQ_ with new APPLE_CHANGES define.
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6b48bf8..3a00ddf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,110 @@
 2002-03-06  Don Melton  <gramps at apple.com>
 
+	Removed unused files in kdelibs.
+
+	* src/kdelibs/AUTHORS:
+	* src/kdelibs/README:
+	* src/kdelibs/khtml/CHANGES:
+	* src/kdelibs/khtml/DESIGN.html:
+	* src/kdelibs/khtml/README.HTMLWidget:
+	* src/kdelibs/khtml/README.tags:
+	* src/kdelibs/khtml/SECURITY:
+	* src/kdelibs/khtml/TODO:
+	* src/kdelibs/khtml/design.h:
+	* src/kdelibs/khtml/domtreeview.cpp:
+	* src/kdelibs/khtml/domtreeview.h:
+	* src/kdelibs/khtml/ecma/AUTHORS:
+	* src/kdelibs/khtml/ecma/README:
+	* src/kdelibs/khtml/ecma/THANKS:
+	* src/kdelibs/khtml/ecma/TODO:
+	* src/kdelibs/khtml/ecma/jsk.html:
+	* src/kdelibs/khtml/ecma/testecma.cpp:
+	* src/kdelibs/khtml/html/dtd.dtd:
+	* src/kdelibs/khtml/java/KJAS_GRAMMAR.txt:
+	* src/kdelibs/khtml/java/README:
+	* src/kdelibs/khtml/java/TODO:
+	* src/kdelibs/khtml/java/build.xml:
+	* src/kdelibs/khtml/java/javaembed.cpp:
+	* src/kdelibs/khtml/java/kjava.jar:
+	* src/kdelibs/khtml/java/kjava.policy.in:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletContext.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletStub.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASConsole.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASSecurityManager.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java:
+	* src/kdelibs/khtml/java/org/kde/kjas/server/Main.java:
+	* src/kdelibs/khtml/java/tests/badapplets/BadApplet.jar:
+	* src/kdelibs/khtml/java/tests/badapplets/BadApplet.java:
+	* src/kdelibs/khtml/java/tests/badapplets/applet.html:
+	* src/kdelibs/khtml/java/tests/good_sites:
+	* src/kdelibs/khtml/java/tests/testkjavaappletserver.cpp:
+	* src/kdelibs/khtml/khtml.desktop:
+	* src/kdelibs/khtml/khtml.rc:
+	* src/kdelibs/khtml/khtml_browser.rc:
+	* src/kdelibs/khtml/khtml_ext.cpp:
+	* src/kdelibs/khtml/khtml_factory.cpp:
+	* src/kdelibs/khtml/khtml_find.cpp:
+	* src/kdelibs/khtml/khtml_find.h:
+	* src/kdelibs/khtml/khtml_pagecache.cpp:
+	* src/kdelibs/khtml/khtml_pagecache.h:
+	* src/kdelibs/khtml/khtml_part.cpp:
+	* src/kdelibs/khtml/khtml_popupmenu.rc:
+	* src/kdelibs/khtml/khtml_run.cpp:
+	* src/kdelibs/khtml/khtml_run.h:
+	* src/kdelibs/khtml/khtmldefaults.h:
+	* src/kdelibs/khtml/khtmlimage.cpp:
+	* src/kdelibs/khtml/khtmlimage.desktop:
+	* src/kdelibs/khtml/khtmlimage.h:
+	* src/kdelibs/khtml/pics/hi16-action-images_display.png:
+	* src/kdelibs/khtml/pics/hi22-action-images_display.png:
+	* src/kdelibs/khtml/pics/hi32-action-images_display.png:
+	* src/kdelibs/khtml/test/README:
+	* src/kdelibs/khtml/test/URL1.html:
+	* src/kdelibs/khtml/test/URL2.html:
+	* src/kdelibs/khtml/test/align.html:
+	* src/kdelibs/khtml/test/align1.html:
+	* src/kdelibs/khtml/test/align2.html:
+	* src/kdelibs/khtml/test/anchor1.html:
+	* src/kdelibs/khtml/test/anchor2.html:
+	* src/kdelibs/khtml/test/badpages.html:
+	* src/kdelibs/khtml/test/buggy.html:
+	* src/kdelibs/khtml/test/button.html:
+	* src/kdelibs/khtml/test/color.html:
+	* src/kdelibs/khtml/test/fixed-background.html:
+	* src/kdelibs/khtml/test/image.gif:
+	* src/kdelibs/khtml/test/image_map.html:
+	* src/kdelibs/khtml/test/index.html:
+	* src/kdelibs/khtml/test/java.html:
+	* src/kdelibs/khtml/test/javascript.html:
+	* src/kdelibs/khtml/test/jsplugins.html:
+	* src/kdelibs/khtml/test/konqi.gif:
+	* src/kdelibs/khtml/test/lake.class:
+	* src/kdelibs/khtml/test/listing.html:
+	* src/kdelibs/khtml/test/lists.html:
+	* src/kdelibs/khtml/test/nav_bar.gif:
+	* src/kdelibs/khtml/test/nbsp.html:
+	* src/kdelibs/khtml/test/notitle.html:
+	* src/kdelibs/khtml/test/object.html:
+	* src/kdelibs/khtml/test/pseudo.html:
+	* src/kdelibs/khtml/test/renders.html:
+	* src/kdelibs/khtml/test/supsub.html:
+	* src/kdelibs/khtml/test/testpages.html:
+	* src/kdelibs/khtml/test/textarea.html:
+	* src/kdelibs/khtml/test/title.html:
+	* src/kdelibs/khtml/testcss.cpp:
+	* src/kdelibs/khtml/testkhtml.cpp:
+	* src/kdelibs/khtml/testkhtml.h:
+	* src/kdelibs/khtml/testrender.cpp:
+	* src/kdelibs/khtml/testrender.h:
+	* src/kdelibs/kjs/README:
+	* src/kdelibs/kjs/THANKS:
+	* src/kdelibs/kjs/create_hash_table:
+	* src/kdelibs/kjs/keywords.table:
+
+2002-03-06  Don Melton  <gramps at apple.com>
+
 	Cleaned up all our changes to kdelibs, removed bitrot, and replaced use
 	of _KWQ_ with new APPLE_CHANGES define.
 
diff --git a/WebCore/khtml/CHANGES b/WebCore/khtml/CHANGES
deleted file mode 100644
index 6843163..0000000
--- a/WebCore/khtml/CHANGES
+++ /dev/null
@@ -1,5 +0,0 @@
-KHTML CHANGES
-=============
-
-* new start with DOM (Lars 10.8.99)
-
diff --git a/WebCore/khtml/DESIGN.html b/WebCore/khtml/DESIGN.html
deleted file mode 100644
index ad26e37..0000000
--- a/WebCore/khtml/DESIGN.html
+++ /dev/null
@@ -1,345 +0,0 @@
-<html>
-<head>
-<title>Internal design of khtml</title>
-<style>
-dt { font-weight: bold; }
-</style>
-<body bgcolor=white>
-<h1>Internal design of khtml</h1>
-
-<p>
-This document tries to give a short overview about the internal design of the khtml
-library. I've written this, because the lib has gotten quite big, and it is hard at first to find your
-way in the source code. This doesn't mean that you'll understand khtml after reading this
-document, but it'll hopefully make it easier for you to read the source code.
-</p>
-<p>
-The library is build up out of several different parts. Basically, when you use the lib, you
-create an instance of a KHTMLPart, and feed data to it. That's more or less all you need to 
-know if you want to use khtml for another application. If you want to start hacking khtml,
-here's a sketch of the objects that will get constructed, when eg. running testkhtml with
-a url argument.
-</p>
-<p>
-In the following I'll assume that you're familiar with all the buzzwords used in current web 
-techology. In case you aren't here's a more or less complete list of references:
-</p>
-<blockquote>
-<p>
-<b>Document Object model (DOM):</b><br>
-<a href="http://www.w3.org/DOM/">DOM Level1 and 2</a><br>
-We support DOM Level2 except for the events model at the moment.
-</p>
-<p>
-<b>HTML:</b><br>
-<a href="http://www.w3.org/TR/html4/">HTML4 specs</a><br>
-<a href="http://www.w3.org/TR/xhtml1/">xhtml specs</a><br>
-We support almost all of HTML4 and xhtml.
-</p>
-<p>
-<b>Cascading style sheets (CSS):</b><br>
-<a href="http://www.w3.org/TR/REC-CSS2/">CSS2 specs</a><br>
-We support almost all of CSS1, and most parts of CSS2.
-</p>
-<p>
-<b>Javascript:</b><br>
-insert some links here...<br>
-<a href="http://msdn.microsoft.com/workshop/author/dhtml/reference/objects.asp">Microsoft javascript bindings</a><br>
-<a href="http://docs.iplanet.com/docs/manuals/js/client/jsref/contents.htm">Netscape javascript reference</a><br>
-Netscapes javascript bindings are outdated. We shouldn't follow them. Let's focus on getting the bindings
-compatible to IE.
-</p>
-</blockquote>
-
-<p>
-<a href="khtml_part.h">KHTMLPart</a> creates one instance of a
-<a href="khtmlview.h">KHTMLView</a> (derived from QScrollView),
-the widget showing the whole thing.  At the same time a DOM tree
-is built up from the HTML or XML found in the specified file.
-<p>
-Let me describe this with an example.
-<p>
-khtml makes use of the document object model (DOM) for storing the document
-in a tree like structure. Imagine a some html like
-<pre>
-&lt;html&gt;
-    &lt;head&gt;
-        &lt;style&gt;
-            h1: { color: red; }
-        &lt;/style&gt;
-    &lt;/head&gt;
-    &lt;body&gt;
-        &lt;H1&gt;
-            some red text
-        &lt;/h1&gt;
-        more text
-        &lt;p&gt;
-            a paragraph with an
-            &lt;img src="foo.png"&gt;
-            embedded image.
-        &lt;/p&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
-</pre>
-In the following I'll show how this input will be processed step by step to generate the visible output
-you will finally see on your screen. I'm describing the things as if they happen one after the other,
-to make the priniciple more clear. In reality, to get visible output on the screen as soon as possible,
-all these things (from tokenization to the build up and layouting of the rendering tree) happen
-more or less in parallel.
-
-<h2>Tokenizer and parser</h2>
-<p>
-The first thing that happens when you start parsing a new document is that a
-DocumentImpl* (for XML documents) or an HTMLDocumentImpl* object will get
-created by the Part (in khtml_part.cpp::begin()). A Tokenizer*
-object is created as soon as DocumentImpl::open() is called by the part, also
-in begin() (can be either an XMLTokenizer or an HTMLTokenizer).
-<p>
-The XMLTokenizer uses the QXML classes in Qt to parse the document, and it's SAX interface 
-to parse the stuff into khtmls DOM.
-<p>
-For HTML, the tokenizer is located in khtmltokenizer.cpp. The tokenizer uses the contents
-of a HTML-file as input and breaks this contents up in a linked list of
-tokens. The tokenizer recognizes HTML-entities and HTML-tags. Text between
-begin- and end-tags is handled distinctly for several tags. The distinctions
-are in the way how spaces, linefeeds, HTLM-entities and other tags are
-handled.
-<p>
-The tokenizer is completly state-driven on a character by character base.
-All text passed over to the tokenizer is directly tokenized. A complete
-HTML-file can be passed to the tokenizer as a whole, character by character
-(not very efficient) or in blocks of any (variable) size.
-<p>
-The HTMLTokenizer creates an HTMLParser which
-interprets the stream of tokens provided by the tokenizer
-and constructs the tree of Nodes representing the document according
-to the Document Object Model.
-<p>
-One big difference between HTML and XML at the moment is, that the HTML parser and Tokenizer
-can parse incrementally as the data arrives, while the XML Tokenizer (due to a limitation of
-Qts XML parser) can at the moment only parse the document, once it has been loaded completely.
-
-<h2>The DOM in khtml</h2>
-<p>
-Parsing the document given above gives the following DOM tree:
-
-<pre>
-HTMLDocumentElement
-  |--> HTMLHeadElement
-  |       \--> HTMLStyleElement
-  |              \--> CSSStyleSheet
-  \--> HTMLBodyElement
-         |--> HTMLHeadingElement
-         |      \--> Text
-         |--> Text
-         \--> HTMLParagraphElement
-                |--> Text
-                |--> HTMLImageElement
-                \--> Text
-</pre>
-<p>
-Actually, the classes mentioned above are the interfaces for accessing the 
-DOM. The actual data is stored in *Impl classes, providing the implementation
-for all of the above mentioned elements. So internally we have a tree 
-looking like:
-<pre>
-HTMLDocumentElementImpl*
-  |--> HTMLHeadElementImpl*
-  |       \--> HTMLStyleElementImpl*
-  |              \--> CSSStyleSheetImpl*
-  \--> HTMLBodyElementImpl*
-         |--> HTMLHeadingElementImpl*
-         |      \--> TextImpl*
-         |--> TextImpl*
-         \--> HTMLParagraphElementImpl*
-                |--> TextImpl*
-                |--> HTMLImageElementImpl*
-                \--> TextImpl*
-</pre>
-<p>
-We use a refcounting scheme to assure, that all the objects get deleted, in 
-case the root element get deleted (as long as there's no interface class 
-holding a pointer to the Implementation).
-<p>
-The interface classes (the ones without the Impl) are defined in the <code>dom/</code>
-subdirectory, and are not used by khtml itself at all. The only place they are used are in the
-javascript bindings, which uses them to access the DOM tree. The big advantage of having this 
-separation between interface classes and imlementation classes, is that we can have several 
-interface objects pointing to the same implementation. This implements the requirement of
-explicit sharing of the DOM specs.
-<p>
-Another advantage is, that (as the implementation classes are not exported) it gives us a lot
-more freedom to make changes in the implementation without breaking binary compatibility.
-<p>
-You will find almost a one to one correspondence between the interface classes and the implementation
-classes. In the implementation classes we have added a few more intermediate classes, that can
-not be seen from the outside for various reasons (make implementation of shared features easier
-or to reduce memory consumption).
-<p>
-In C++, you can access the whole DOM tree from outside KHTML by using the interface classes. 
-For a description see the <a href="http://developer.kde.org/kde2arch/khtml/index.html">introduction to khtml</a> on<a href="http://developer.kde.org/">developer.kde.org</a>.
-
-One thing that has been omitted in the discussion above is the style sheet defined inside the 
-<code>&lt;style&gt;</code> element (as an example of a style sheet) and the image element 
-(as an example of an external resource that needs to be loaded). This will be done in the following
-two sections.
-
-<h2>CSS</h2> The contents of the <code>&lt;style&gt;</code> element (in this
-case the <code>h1 { color: red; }</code> rule) will get passed to the
-<a href="html/html_headimpl.h">HTMLStyleElementImpl object</a>.  This object creates an
-<a href="css/cssstylesheetimpl.h">CSSStyleSheetImpl object</a> and passes the
-data to it. The <a href="css/cssparser.h">CSS parser</a> will take
-the data, and parse it into a DOM structure for CSS (similar to the one for
-HTML, see also the DOM level 2 specs). This will be later on used to define the
-look of the HTML elements in the DOM tree.
-<p>
-Actually "later on" is relative, as we will see later, that this happens partly in parallel to 
-the build up of the DOM tree.
-
-<h2>Loading external objects</h2>
-<p>
-Some HTML elements (as <code>&lt;img&gt;, &lt;link&gt;, &lt;object&gt;, etc.</code>) contain
-references to extrenal objects, that have to be loaded. This is done by the
-Loader and related classes (misc/loader.*). Objects that might need to load external objects
-inherit from <a href="misc/loader_client.h">CachedObjectClient</a>, and can ask
-the <a href="misc/loader.h">loader</a> (that also acts as a memory cache) to
-download the object they need for them from the web.
-<p>
-Once the <a href="misc/loader.h">loader</a> has the requested object ready, it will notify the
-<a href="misc/loader_client.h">CachedObjectClient</a> of this, and the client can
-then process the received data.
-
-<h2>Making it visible</h2>
-
-Now once we have the DOM tree, and the associated style sheets and external objects, how
-do we get the stuff actually displayed on the screen?
-<p>
-For this we have a rendering engine, that is completely based on CSS. The first
-thing that is done is to collect all style sheets that apply to the document
-and create a nice list of style rules that need to be applied to the
-elements. This is done in the <a href="css/cssstyleselector.h">CSSStyleSelector</a> class.
-It takes the <a href="css/html4.css">default HTML style sheet</a> (defined in css/html4.css),
-an optional user defined style sheet, and all style sheets from the document,
-and combines them to a nice list of parsed style rules (optimised for fast
-lookup). The exact rules of how these style sheets should get applied to HTML
-or XML documents can be found in the CSS2 specs.
-<p>
-Once we have this list, we can get a <a
-href="rendering/render_style.h">RenderStyle object</a>
-for every DOM element from the <a
-href="css/cssstyleselector.h">CSSStyleSelector</a> by calling
-"styleForElement(DOM::ElementImpl *".
-The style object describes in a compact form all the
-<a href="css/css_properties.in">CSS properties</a>
-that should get applied to the Node.
-<p>
-After that, a rendering tree gets built up. Using the style object, the
-<a href="xml/dom_nodeimpl.h">DOM Node</a> creates an appropriate render object
-(all these are defined in the rendering subdirectory) and adds it to the
-rendering tree.  This will give another tree like structure, that resembles in
-it's general structure the DOM tree, but might have some significant
-differences too. First of all, so called
- <a href="http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous-block-level">anonymous boxes</a> - (see
- <a href="http://www.w3.org/TR/REC-CSS2/">CSS specs</a>) that
-have no DOM counterpart might get inserted into the rendering tree to satify
-DOM requirements. Second, the display propery of the style affects which type
-of rendering object is chosen to represent the current DOM object.
-
-<p>
-In the above example we would get the following rendering tree:
-<pre>
-RenderRoot*
-  \--> RenderBody*
-         |--> RenderFlow* (&lt;H1&gt;)
-         |      \--> RenderText* ("some red text")
-         |--> RenderFlow* (anonymous box)
-         |      \--> RenderText* ("more text")
-         \--> RenderFlow* (&lt;P&gt;)
-                |--> RenderText* ("a paragraph with an")
-                |--> RenderImage*
-                \--> RenderText* ("embedded image.")
-</pre>
-
-<p>
-A call to of <a href="rendering/render_root.cpp">layout()</a> on the
-<a href="rendering/render_root.h">RenderRoot </a> (the root of the rendering tree)
-object causes the rendering tree to layout itself into the available space
-(width) given by the the KHTMLView. After that, the drawContents() method of
-KHTMLView can call RenderRoot->print() with appropriate parameters to actually
-paint the document. This is not 100% correct, when parsing incrementally, but
-is exactly what happens when you resize the document.
-
-
-As you can see, the conversion to the rendering tree removed the head part of
-the HTML code, and inserted an anonymous render object around the string "more
-text". For an explanation why this is done, see the CSS specs.
-<p>
-
-<h2>Directory structure</h2>
-
-A short explanation of the subdirectories in khtml.
-<dl>
-<dt><a href="css/">css:</a>
-<dd>Contains all the stuff relevant to the CSS part of DOM Level2 (implementation classes only), 
-the <a href="css/cssparser.h">CSS parser</a>, and the stuff to create
-RenderStyle object out of Nodes and the CSS style sheets.
-<dt><a href="dom/">dom: </a>
-<dd>Contains the external DOM API (the DOM interface classes) for all of the DOM
-<dt><a href="ecma/">ecma:</a>
-<dd>The javascript bindings to the DOM and khtml.
-<dt><a href="html/">html:</a>
-<dd>The html subpart of the DOM (implementation only), the HTML tokenizer and parser and a class
-that defines the DTD to use for HTML (used mainly in the parser).
-<dt><a href="java/">java:</a>
-<dd>Java related stuff.
-<dt><a href="misc/>misc:</a>
-<dd>Some misc stuff needed in khtml. Contains the image loader, some misc definitions and the
-decoder class that converts the incoming stream to unicode.
-<dt><a href="rendering">rendering:</a>
-<dd>Everything thats related to bringing a DOM tree with CSS declarations to the screen. Contains
-the definition of the objects used in the rendering tree, the layouting code, and the RenderStyle objects.
-<dt><a href="xml/">xml:</a>
-<dd>The XML part of the DOM implementation, the xml tokenizer.
-</dl>
-
-<h2>Final words...</h2>
-<p>
-All the above is to give you a quick introduction into the way khtml brings an HTML/XML file to the screen.
-It is by no way complete or even 100% correct. I left out many problems, I will perhaps add either on request
-or when I find some time to do so. Let me name some of the missing things:
-<ul>
-<li>The decoder to convert the incoming stream to Unicode
-<li>interaction with konqueror/applications
-<li>javascript
-<li>dynamic reflow and how to use the DOM to manipulate khtmls visual ouput
-<li>mouse/event handling
-<li>real interactions when parsing incrementally
-<li>java
-</ul>
-
-Still I hope that this short introduction will make it easier for you to get a first hold of khtml and the way it works.
-<p>
-Now before I finish let me add a small <b>warning</b> and <b>advice</b> to all of you who plan hacking khtml themselves:
-<p>
-khtml is by now a quite big library and it takes some time to understand how it works. Don't let yourself get frustrated
-if you don't immediatly understand how it works. On the other hand, it is by now one of the libraries that
-get used a lot, that probably has the biggest number of remaining bugs (even though it's sometimes hard to
-know if some behaviour is really a bug).
-<blockquote>
-Some parts of it's code are however <b>extremely touchy</b> (especially the layouting algorithms), 
-and making changes there (that might fix a bug on on web page) might introduce severe bugs.
-All the people developing khtml have already spend huge amounts of time searching for such bugs,
-that only showed up on some web pages, and thus were found only a week after the change that
-introduced the bug was made. This can be very frustrating for us, und we'd appreciate if people
-that are not completely familiar with khtml post changes touching these critical regions to kfm-devel
-for review before applying them.
-</blockquote>
-
-<div style="margin-top: 2em; font-size: large;">
-And now have fun hacking khtml.
-<div style="margin-left: 10em; margin-bottom: 1em;">Lars</div>
-</div>
-<hr>
-<center>$Id$</center>
-</body>
-</html>
diff --git a/WebCore/khtml/README.HTMLWidget b/WebCore/khtml/README.HTMLWidget
deleted file mode 100644
index 571d4a9..0000000
--- a/WebCore/khtml/README.HTMLWidget
+++ /dev/null
@@ -1,66 +0,0 @@
-KDE HTML Widget
-===============
-
-Developers
-----------
-
-The first version was written by
-
-Torben Weis <weis at stud.uni-frankfurt.de>
-
-It was extended by
-
-Josip A. Gracin <grac at fly.cc.fer.hr>,
-Martin Jones <mjones at kde.org>,
-Waldo Bastian <bastian at kde.org>
-Lars Knoll <knoll at kde.org>
-Antti Koivisto <koivisto at iki.fi>
-Dirk Mueller <mueller at kde.org>
-Peter Kelly <pmk at post.com>
-
-It is currently primarily maintained and developed by
-Lars Knoll, Dirk Mueller and Antti Koivisto.
-
-
-Revision History
-----------------
-
-This library is called libkhtml.
-This library used to be called libkhtmlw. With the release of KDE 1.1 a 
-source incompatible version called libkhtml has been created. 
-libkhtmlw will not be maintained any more, all application writers are 
-urgently requested to make use of the new libkhtml library.
-
-
-Starting Point
---------------
-
-You can add the widget to your program by doing something like:
-
-#include <khtml.h>
-
-   .
-   .
-   .
-
-    KHTMLWidget *view = new KHTMLWidget( parent, "Name" );
-	view->show();
-
-	view->begin( "file:/tmp/test.html" );
-	view->parse();
-	view->write( "<HTML><TITLE>...." );
-	view->write( "..." );
-	    .
-		.
-		.
-	view->write( "</HTML>" );
-	view->end();
-
-
-After doing this, control must be returned to the event loop as the HTML
-is parsed in the background using a Qt timer.
-
-For more information see the full documentation in JavaDoc format included
-in the header files.
-
-
diff --git a/WebCore/khtml/README.tags b/WebCore/khtml/README.tags
deleted file mode 100644
index 093cc3f..0000000
--- a/WebCore/khtml/README.tags
+++ /dev/null
@@ -1,24 +0,0 @@
-All tags known by KHTML are listed in khtmltags.in.
-The maketags script generates a header file from this list.
-It also makes a gperf input file. gperf is than used to create
-the khtmltags.c file which contains a (almost) perfect hash 
-function for recognizing HTML-tags.
-
-The HTML-tokenizer converts during parsing all tags to numeric
-tag-IDs. These IDs can then be used to select functions fast and
-to look up relevant CSS data.
-
-khtmlparser.cpp contains a jump-table which indexes from tag-ID
-to the relevant tag-open and tag-close functions. A 0-entry means
-that no function should be called for this tag. 
-
-ADDING NEW TAGS
-===============
-
-If you want to add a new tag, you can do so in the file "khtmltags.in".
-Please keep this file sorted. You then have to run ./maketags to 
-generate a new khtmltags.h and a new hash-function so that the new tag
-will be recognized. Then you should manually update the jumptable in
-"khtmlparer.cpp". If you do not want to implement the tag you can add
-an entry for the tag at the right position and fill it with two zeros.
-
diff --git a/WebCore/khtml/SECURITY b/WebCore/khtml/SECURITY
deleted file mode 100644
index e3c289b..0000000
--- a/WebCore/khtml/SECURITY
+++ /dev/null
@@ -1,57 +0,0 @@
-This document contains internet security issues.  Discussion of security 
-issues should be directed to kfm-devel at kde.org. 
-
-Note to KDE-developers: When adding entries to this document, provide name, 
-date and additional URLs.
-
-
-Malicious Redirects
-===================
-Entry By: Waldo Bastian <bastian at kde.org>
-Created: May 9th, 2000 
-See also: http://lwn.net/2000/features/Redirect.phtml
-          http://www.zope.org/Members/jim/ZopeSecurity/ClientSideTrojan
-
-I advice the following:
-
-* We should never allow a redirect from a HTTP to any other protocol, including 
-  HTTPS. (OK. The current implementation does not allow redirects to other 
-  protocols)
-
-* We should provide a HTTP referer header iff the referer is on the same host
-as the requested object. (We currently don't support referer headers)
-
-* Either a) Don't allow POST or GET actions from javascript.
-  or b) _Always_ ask the user for confirmation when javascript requests a 
-        POST or GET action.
-  Additional note: Simple requests for e.g. images are also GET actions, 
-  disabling them would break a lot of javascript scripts.
-
-
-SSL certificates
-================
-Entry By: Waldo Bastian <bastian at kde.org>
-Created: May 13th, 2000
-See also: http://www.cert.org/advisories/CA-2000-05.html
-
-We never check SSL certificates. This makes https just as insecure as http.
-
-
-ECMAScript
-==========
-Entry By: Peter Kelly <pmk at post.com>
-Created: May 26th, 2000
-See also: http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm
-          (chapter 14)
-
-Before KDE 2.0 is released we *MUST* make sure there are checks in place for
-what DOM properties are accessable/writable for the ECMAScript binding. Otherwise
-malicious page authors may be able to access/set cookies from other sites, create
-auto-submitting forms that upload files, and a whole host of other attacks. The
-URL above has information about what properties netscape gives protection to.
-
-We will need to make sure we do this at the right level, as if it is done too
-close to the ECMAScript binding, there could be loopholes such as using
-getAttributeNode(), etc to fool it into letting a script change the wrong properties.
-
-
diff --git a/WebCore/khtml/TODO b/WebCore/khtml/TODO
deleted file mode 100644
index 8cf22e9..0000000
--- a/WebCore/khtml/TODO
+++ /dev/null
@@ -1,60 +0,0 @@
-Here's what's still missing (without order):
-
-Rendering:
-	* text-align: Justify missing
-	* allow font elements in a block level context.
-
-StyleSheets:
-	* @ rules in sheets
-	* lots of properties
-	* delete the old cssproperties in a style attribute in case
-	  the style attribute changes.
-	* border shorthand properties. Unspecified properties get their default
-	  values. border-width: medium; border-color: undefined (== text color)
-
-DOM:
-	* some functions in the Impl classes
-	* fix the set/retrieve functions, which use boolean values
-	  -->> mostly done, still need to fix parseAttribute() calls	
-	* DOM level 2
-	* DOM stylesheets, changes need to trigger the appropriate changes
-	  in the rendering tree
-	* Implementation of NamedAttrMapImpl and Attributes in DOMElementImpl
-	  is ugly. MOve aatributes to the elementImpl and make the namedNodeMap
-	  point to an element. Think of creating AttrImpl's directly in
-	  khtmltoken.cpp
-
-XML:
-	* lots of stuff in the Impl classes
-	* parsing
-	* entities
-	* style sheet processing instructions
-	* proper mimetype detection
-
-misc:
-	* <font size=+3> works as size=+1
-
-Java:
-	* support for the object element
-	    --> mostly done
-	* Java <--> HTMLWidget communication
-	* turn kjava into a kpart
-
-Attributes:
-	* check for unimplemented attributes
-
-Memory usage:
-	* use bitfields for lots of things (especially in the
-	  DOM/CSS/rendering stuff)
-	* try to make better use of shared objects, especially in the
-	  RenderStyle
-	* check for leaks
-	* there's a mem leak with the style objects of anonymous
-	  boxes (and ListMarkers).
-
-Other:
-        * there's a bug on correctly retrieving <textarea> text.
-          see test/forms.html and compare it with the way all other
-          browsers handle that code
-        * paste should be enabled (and implemented) if there's pasteable clipboard
-          content and a form element has the focus
diff --git a/WebCore/khtml/design.h b/WebCore/khtml/design.h
deleted file mode 100644
index 49cd5bc..0000000
--- a/WebCore/khtml/design.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This file is part of the KDE project
-
-   Copyright (C) 1997 Martin Jones (mjones at kde.org)
-              (C) 1998 Waldo Bastian (bastian at kde.org)
-              (C) 1998, 1999 Torben Weis (weis at kde.org)
-              (C) 1999 Lars Knoll (knoll at kde.org)
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-
-/**
- * @libdoc KDE HTML widget
- *
- * This library provides a full-featured HTML parser and widget. It is
- * used for rendering in all KDE applications which allow HTML viewing,
- * including the Konqueror browser/file manager and the KDE Help
- * system.
- *
- * This library provides (will provide)
- * full HTML4 support, support for embedding Java applets, and will at some
- * point provide support for cascading style sheets
- * (CSS) and JavaScript.
- *
- * If you want to add to your application a widget that only needs simple text
- * browsing, you can also use the @ref KTextBrowser widget in kdeui.
- *
- * @ref KHTMLPart :
- *   The main part/widget for using khtml.
- *
- * @ref DOM :
- *   The dom implementation used in khtml.
- *
- */
-
-/**
- *
- * The Document Object Model (DOM) is divided into two parts, the
- * @ref COREDOM core
- * DOM, specifying some core functionality, and the @ref HTMLDOM HTML DOM,
- * which deals with the extensions needed for HTML.
- *
- *
- */
-namespace DOM
-{
-};
diff --git a/WebCore/khtml/domtreeview.cpp b/WebCore/khtml/domtreeview.cpp
deleted file mode 100644
index 48843a4..0000000
--- a/WebCore/khtml/domtreeview.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/***************************************************************************
-                               domtreeview.cpp
-                             -------------------
-
-    copyright            : (C) 2001 - The Kafka Team
-    email                : kde-kafka at master.kde.org
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#include "khtml_part.h"
-#include "domtreeview.moc"
-
-DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
-{
-    setCaption(name);
-    setRootIsDecorated(true);
-    addColumn("Name");
-    addColumn("Value");
-    setSorting(-1);
-    part = currentpart;
-    connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
-    connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
-    m_nodedict.setAutoDelete(true);
-}
-
-DOMTreeView::~DOMTreeView()
-{
-    disconnect(part);
-}
-
-void DOMTreeView::showTree(const DOM::Node &pNode)
-{
-    if(pNode.isNull() || document != pNode.ownerDocument())
-    {
-	clear();
-	m_itemdict.clear();
-	m_nodedict.clear();
-	if(pNode.isNull())
-	    return;
-	else if(pNode.ownerDocument().isNull())
-	    recursive(0, pNode);
-	else
-	    recursive(0, pNode.ownerDocument());
-    }
-    setCurrentItem(m_itemdict[pNode.handle()]);
-    ensureItemVisible(m_itemdict[pNode.handle()]);
-}
-
-void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
-{
-    QListViewItem *cur_item;
-    if(pNode.ownerDocument() != document)
-    {
-	cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), node.nodeValue().string());
-	document = pNode.ownerDocument();
-    }
-    else
-	cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), node.nodeValue().string());
-
-    if(node.handle())
-    {
-	m_itemdict.insert(node.handle(), cur_item);
-	m_nodedict.insert(cur_item, new DOM::Node(node));
-    }
-
-    DOM::Node cur_child = node.lastChild();
-    while(!cur_child.isNull())
-    {
-	recursive(node, cur_child);
-	cur_child = cur_child.previousSibling();
-    }
-}
-
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
-{
-    DOM::Node *handle = m_nodedict[cur_item];
-    if(handle)
-	emit part->setActiveNode(*handle);
-}
diff --git a/WebCore/khtml/domtreeview.h b/WebCore/khtml/domtreeview.h
deleted file mode 100644
index 47f79e8..0000000
--- a/WebCore/khtml/domtreeview.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************
-                               domtreeview.cpp
-                             -------------------
-
-    copyright            : (C) 2001 - The Kafka Team
-    email                : kde-kafka at master.kde.org
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#ifndef DOMTREEVIEW_H
-#define DOMTREEVIEW_H
-
-#include <klistview.h>
-#include <kdebug.h>
-#include <qlistview.h>
-#include <qptrdict.h>
-#include <dom/dom_core.h>
-
-class DOMTreeView : public KListView
-{
-    Q_OBJECT
-    public: 
-	DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
-	~DOMTreeView();
-
-	void recursive(const DOM::Node &pNode, const DOM::Node &node);
-
-    signals:
-	void sigNodeClicked(const DOM::Node &);
-	
-    public slots:
-	void showTree(const DOM::Node &pNode);
-
-    protected slots:
-	void slotItemClicked(QListViewItem *);
-
-    private:
-	QPtrDict<QListViewItem> m_itemdict;
-	QPtrDict<DOM::Node> m_nodedict;
-	DOM::Node document;
-
-	KHTMLPart *part;
-
-};
-
-#endif
diff --git a/WebCore/khtml/ecma/AUTHORS b/WebCore/khtml/ecma/AUTHORS
deleted file mode 100644
index 2a12933..0000000
--- a/WebCore/khtml/ecma/AUTHORS
+++ /dev/null
@@ -1,4 +0,0 @@
-Harri Porten		<porten at kde.org>
-Peter Kelly             <pmk at post.com>
-Dirk Mueller            <mueller at kde.org>
-Daniel Molkentin        <molkentin at kde.org>
diff --git a/WebCore/khtml/ecma/README b/WebCore/khtml/ecma/README
deleted file mode 100644
index c808197..0000000
--- a/WebCore/khtml/ecma/README
+++ /dev/null
@@ -1,29 +0,0 @@
-This module contains the ECMAScript a.k.a. JavaScript language bindings for
-the KHTML Part. A series of functions and properties will be added in
-kjs_html_init() to the pre-existing set of the KJS library. The module will
-be loaded into KHTML's address space on demand.
-
-To test the non-HTML DOM functions you may compile a little interactive
-interpreter called 'testecma' with 'make check' (see testecma.cpp for
-further details).
-
-Harri Porten <porten at kde.org>
-
-========================================================================
-Appendix A: Currently supported properties
-
-Non-DOM properties:
-
-window.status, alert(), confirm(), open()
-navigator.appCodeName, appName, appVersion, userAgent, vendor, product
-Image.src
-
-DOM Bindings:
-
-all DOM level 1 core & HTML
-
-========================================================================
-Appendix B: Web sites with useful tests
-
-http://oucsace.cs.ohiou.edu/~ywang/JavaScript
-http://www.xs4all.nl/~ppk/js/index.html?version5.html
diff --git a/WebCore/khtml/ecma/THANKS b/WebCore/khtml/ecma/THANKS
deleted file mode 100644
index b21dce7..0000000
--- a/WebCore/khtml/ecma/THANKS
+++ /dev/null
@@ -1,9 +0,0 @@
-Vadim Plessky <lucy-ples at mtu-net.ru> for dissecting an endless number
-of bug reports and therefore taking quite some load of our shoulders.
-
-Ferdinand Gassauer <f.gassauer at aon.at> for numerous useful bug reports
-and keeping track of them later.
-
-David Faure <faure at kde.org> for taking some time off from Konqueror
-and making a lotto site working fixing bugs along the way.
-
diff --git a/WebCore/khtml/ecma/TODO b/WebCore/khtml/ecma/TODO
deleted file mode 100644
index ba6638c..0000000
--- a/WebCore/khtml/ecma/TODO
+++ /dev/null
@@ -1,13 +0,0 @@
-Has to be done
-==============
-- frame[] correct search and sorting order (DONE ?)
-- optional error message output
-- set this.form in event handlers of form elements (DONE ?)
-- change KParts::WindowArgs && friends 
-  that we can detect if a locationbar is on/or not
-
-Could be done
-=============
-- Make the graphical debugger useable
-- Improve internal structures to give a really useful
-  output on errors (i.e. improve backtrance capabilities)
diff --git a/WebCore/khtml/ecma/jsk.html b/WebCore/khtml/ecma/jsk.html
deleted file mode 100644
index fb5b123..0000000
--- a/WebCore/khtml/ecma/jsk.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<html>
-<!--
-Javascript Konsole (c) 2001 Till Krech <till at snafu.de>
-Dieser Code unterliegt den Bedingungen der Gnu Public License Version 2.
--->
-<head>
-<title>Javascript Konsole</title>
-<style type="text/css">
-code {
-        color:#444488;
-}
-em {
-        font-weight: bold;
-}
-</style>
-<script language="JavaScript">
-
-function do_eval() {
-        var fo = document.forms.fo;
-	fo.restyp.value = "";
-	fo.field.value = "";
-	var fo = document.fo;
-	var expr = fo.zeile.value;
-	var result = eval(expr);
-	fo.restyp.value = typeof(result);
-        var tuedel = "";
-        if (typeof(result) == "string") {
-                tuedel = '"';
-        }
-	fo.field.value = tuedel + result + tuedel;
-}
-
-function do_properties() {
-        var fo = document.forms.fo;
-	fo.restyp.value = "";
-	fo.field.value = "";
-	var fo = document.fo;
-	var expr = fo.zeile.value;
-	var result = eval(expr);
-        var i;
-	fo.restyp.value = typeof(result);
-        if (typeof(result) != "undefined") {
-           for (i in result) {
-                var tuedel = "";
-                var propval = result[i];
-                if (typeof(propval) == "string") {
-                        tuedel = '"';
-                }
-                fo.field.value +=
-                        i
-                        + " [" + typeof(propval) + "] = "
-                        + tuedel + propval + tuedel + "\n";
-           }
-
-        }
-}
-
-
-</script>
-</head>
-<body bgcolor="#dddddd">
-<h1>JavaScript Konsole</h1>
-<form name="fo">
-<table bgcolor="#cccccc" cellspacing="1" cellpadding="8">
- <tr bgcolor="#ffeeee"><th  height="40" align="right">Expression</th><td><input name="zeile" type="text" size="60"></td></tr>
- <tr bgcolor="#eeeeee"><th align="right">Result Type</th><td><input name="restyp" readonly type="text" size="60"></td></tr>
- <tr bgcolor="#eeeeee"><th align="right">Result(s)</th><td><textarea readonly name="field" rows="10" cols="60"></textarea></td></tr>
-<tr bgcolor="#ffeeee"><td>&nbsp;</td><td>
- <input type="button" value="list properties" onclick="do_properties()">
- <input type="button" value="evaluate" onclick="do_eval()">
- <input type="reset" value="clear fields"
-</td></tr>
-</table>
-</form>
-<h2>Explanation</h2>
-<h3>Operation</h3>
-<blockquote>
-When <em>evaluate</em> is pressed, the given expression is evaluated and the result is displayed in the result(s) field.
-In case of <em>list properties</em> beeing pressed, the result of the expression is taken as an object
-and the objects properties are displayed with their type and value in the the result(s) field.
-</blockquote>
-<h3>Expression</h3>
-<blockquote>
-Expression must be a valid javascript expression, e.g.<br><code>window</code>
-<br>or<br><code>document.body.innerHTML</code><br>or<br>
-<code>"Today: " + (new Date()).toString()</code><br>
-or<br>
-<code>"Cablecar".match(/ab.*c/)</code>
-<br>It is also possible to assign a value,
-e.g.<br><code>document.getElementsByTagName('H1').item(0).innerText="Hello World"</code><br>
-You may execute these examples by pasting them into the expression field.
-</blockquote>
-<h3>Result Type</h3>
-<blockquote>
-The type of the result of the given expression.
-</blockquote>
-<h3>Result(s)</h3>
-<blockquote>
-The result of the expression is implicitly converted to a primitive type by the javascript interpreter,
-if <em>evaluate</em> was pressed. When <em>list properties</em> was pressed, a <code>for (var i in obj)</code> loop
-is executed to list the properties. These object properties are in turn evaluated and their types and values
-are displayed.
-</blockquote>
-<p>
-<a href="mailto:till at snafu.de?subject=JavaScript%20Konsole">Till Krech</a>
-</p>
-<p>
-<br>
-</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/khtml/ecma/testecma.cpp b/WebCore/khtml/ecma/testecma.cpp
deleted file mode 100644
index dd3be39..0000000
--- a/WebCore/khtml/ecma/testecma.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2000 Harri Porten (porten at kde.org)
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/**
- * An interactive interpreter to test the ECMA Script language bindings
- * for the DOM of KHTML.
- * The 'document' property is preset to an instance of Document and serves
- * as an entrypoint.
- *
- * Example session:
- *
- *   KJS> text = document.createTextNode('foo');
- *   KJS> document.appendChild(text);
- *   KJS> debug(document.firstChild.nodeValue);
- *   ---> foo
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <kjs/kjs.h>
-#include <dom_doc.h>
-#include "kjs_dom.h"
-
-#include <dom_string.h>
-
-using namespace KJS;
-
-int main(int, char **)
-{
-  KJScript kjs;
-  kjs.enableDebug();
-  DOM::Document doc;
-
- DOMDocument *dd = new DOMDocument(&doc);
- Global::current().put("document", KJSO(dd));
-
-  printf("Entering interactive mode.\n"
-	 "You may access the DOM via the 'document' property.\n"
-	 "Use debug() to print to the console. Press C-d or C-c to exit.\n\n");
-
-  char buffer[1000];
-  FILE *in = fdopen(0, "r");
-
-  while (1) {
-    printf("KJS> ");
-    if (!fgets(buffer, 999, in))
-      break;
-    kjs.evaluate(buffer);
-  }
-  printf("\n");
-}
diff --git a/WebCore/khtml/html/dtd.dtd b/WebCore/khtml/html/dtd.dtd
deleted file mode 100644
index d6a5ac8..0000000
--- a/WebCore/khtml/html/dtd.dtd
+++ /dev/null
@@ -1,1072 +0,0 @@
-<!--
-    This is the HTML 4.0 Transitional DTD, which includes
-    presentation attributes and elements that W3C expects to phase out
-    as support for style sheets matures. Authors should use the Strict
-    DTD when possible, but may use the Transitional DTD when support
-    for presentation attribute and elements is required.
-
-    HTML 4.0 includes mechanisms for style sheets, scripting,
-    embedding objects, improved support for right to left and mixed
-    direction text, and enhancements to forms for improved
-    accessibility for people with disabilities.
-
-          Draft: $Date$
-
-          Authors:
-              Dave Raggett <dsr at w3.org>
-              Arnaud Le Hors <lehors at w3.org>
-              Ian Jacobs <ij at w3.org>
-
-    Further information about HTML 4.0 is available at:
-
-        http://www.w3.org/TR/REC-html40
--->
-<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.0 Transitional//EN"
-  -- Typical usage:
-
-    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-            "http://www.w3.org/TR/REC-html40/loose.dtd">
-    <html>
-    <head>
-    ...
-    </head>
-    <body>
-    ...
-    </body>
-    </html>
-
-    The URI used as a system identifier with the public identifier allows
-    the user agent to download the DTD and entity sets as needed.
-
-    The FPI for the Strict HTML 4.0 DTD is:
-
-        "-//W3C//DTD HTML 4.0//EN"
-
-    and its URI is:
-
-        http://www.w3.org/TR/REC-html40/strict.dtd
-
-    Authors should use the Strict DTD unless they need the
-    presentation control for user agents that don't (adequately)
-    support style sheets.
-
-    If you are writing a document that includes frames, use 
-    the following FPI:
-
-        "-//W3C//DTD HTML 4.0 Frameset//EN"
-
-    with the URI:
-
-        http://www.w3.org/TR/REC-html40/frameset.dtd
-
-    The following URIs are supported in relation to HTML 4.0
-
-    "http://www.w3.org/TR/REC-html40/strict.dtd" (Strict DTD)
-    "http://www.w3.org/TR/REC-html40/loose.dtd" (Loose DTD)
-    "http://www.w3.org/TR/REC-html40/frameset.dtd" (Frameset DTD)
-    "http://www.w3.org/TR/REC-html40/HTMLlat1.ent" (Latin-1 entities)
-    "http://www.w3.org/TR/REC-html40/HTMLsymbol.ent" (Symbol entities)
-    "http://www.w3.org/TR/REC-html40/HTMLspecial.ent" (Special entities)
-
-    These URIs point to the latest version of each file. To reference
-    this specific revision use the following URIs:
-
-    "http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent"
-
--->
-
-<!--================== Imported Names ====================================-->
-
-<!ENTITY % ContentType "CDATA"
-    -- media type, as per [RFC2045]
-    -->
-
-<!ENTITY % ContentTypes "CDATA"
-    -- comma-separated list of media types, as per [RFC2045]
-    -->
-
-<!ENTITY % Charset "CDATA"
-    -- a character encoding, as per [RFC2045]
-    -->
-
-<!ENTITY % Charsets "CDATA"
-    -- a space separated list of character encodings, as per [RFC2045]
-    -->
-
-<!ENTITY % LanguageCode "NAME"
-    -- a language code, as per [RFC1766]
-    -->
-
-<!ENTITY % Character "CDATA"
-    -- a single character from [ISO10646] 
-    -->
-
-<!ENTITY % LinkTypes "CDATA"
-    -- space-separated list of link types
-    -->
-
-<!ENTITY % MediaDesc "CDATA"
-    -- single or comma-separated list of media descriptors
-    -->
-
-<!ENTITY % URI "CDATA"
-    -- a Uniform Resource Identifier,
-       see [URI]
-    -->
-
-<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
-
-
-<!ENTITY % Script "CDATA" -- script expression -->
-
-<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
-
-<!ENTITY % FrameTarget "CDATA" -- render in this frame -->
-
-
-<!ENTITY % Text "CDATA">
-
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL |  DIR | MENU">
-
-<!ENTITY % preformatted "PRE">
-
-<!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
-
-<!-- There are also 16 widely known color names with their sRGB values:
-
-    Black  = #000000    Green  = #008000
-    Silver = #C0C0C0    Lime   = #00FF00
-    Gray   = #808080    Olive  = #808000
-    White  = #FFFFFF    Yellow = #FFFF00
-    Maroon = #800000    Navy   = #000080
-    Red    = #FF0000    Blue   = #0000FF
-    Purple = #800080    Teal   = #008080
-    Fuchsia= #FF00FF    Aqua   = #00FFFF
- -->
-
-<!ENTITY % bodycolors "
-  bgcolor     %Color;        #IMPLIED  -- document background color --
-  text        %Color;        #IMPLIED  -- document text color --
-  link        %Color;        #IMPLIED  -- color of links --
-  vlink       %Color;        #IMPLIED  -- color of visited links --
-  alink       %Color;        #IMPLIED  -- color of selected links --
-  ">
-
-<!--=================== Generic Attributes ===============================-->
-
-<!ENTITY % coreattrs
- "id          ID             #IMPLIED  -- document-wide unique id --
-  class       CDATA          #IMPLIED  -- space separated list of classes --
-  style       %StyleSheet;   #IMPLIED  -- associated style info --
-  title       %Text;         #IMPLIED  -- advisory title/amplification --"
-  >
-
-<!ENTITY % i18n
- "lang        %LanguageCode; #IMPLIED  -- language code --
-  dir         (ltr|rtl)      #IMPLIED  -- direction for weak/neutral text --"
-  >
-
-<!ENTITY % events
- "onclick     %Script;       #IMPLIED  -- a pointer button was clicked --
-  ondblclick  %Script;       #IMPLIED  -- a pointer button was double clicked--
-  onmousedown %Script;       #IMPLIED  -- a pointer button was pressed down --
-  onmouseup   %Script;       #IMPLIED  -- a pointer button was released --
-  onmouseover %Script;       #IMPLIED  -- a pointer was moved onto --
-  onmousemove %Script;       #IMPLIED  -- a pointer was moved within --
-  onmouseout  %Script;       #IMPLIED  -- a pointer was moved away --
-  onkeypress  %Script;       #IMPLIED  -- a key was pressed and released --
-  onkeydown   %Script;       #IMPLIED  -- a key was pressed down --
-  onkeyup     %Script;       #IMPLIED  -- a key was released --"
-  >
-
-<!-- Reserved Feature Switch -->
-<!ENTITY % HTML.Reserved "IGNORE">
-
-<!-- The following attributes are reserved for possible future use -->
-<![ %HTML.Reserved; [
-<!ENTITY % reserved
- "datasrc     %URI;          #IMPLIED  -- a single or tabular Data Source --
-  datafld     CDATA          #IMPLIED  -- the property or column name --
-  dataformatas (plaintext|html) plaintext -- text or html --"
-  >
-]]>
-
-<!ENTITY % reserved "">
-
-<!ENTITY % attrs "%coreattrs; %i18n; %events;">
-
-<!ENTITY % align "align (left|center|right|justify)  #IMPLIED"
-                   -- default is left for ltr paragraphs, right for rtl --
-  >
-
-<!--=================== Text Markup ======================================-->
-
-<!ENTITY % fontstyle
- "TT | I | B | U | S | STRIKE | BIG | SMALL">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE |
-                   SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
-
-<!ENTITY % special
-   "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
-    MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">
-
-<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
-
-<!-- %inline; covers inline or "text-level" elements -->
-<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
-
-<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
-<!ATTLIST (%fontstyle;|%phrase;)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT (SUB|SUP) - - (%inline;)*    -- subscript, superscript -->
-<!ATTLIST (SUB|SUP)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT SPAN - - (%inline;)*         -- generic language/style container -->
-<!ATTLIST SPAN
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %reserved;			       -- reserved for possible future use --
-  >
-
-<!ELEMENT BDO - - (%inline;)*          -- I18N BiDi over-ride -->
-<!ATTLIST BDO
-  %coreattrs;                          -- id, class, style, title --
-  lang        %LanguageCode; #IMPLIED  -- language code --
-  dir         (ltr|rtl)      #REQUIRED -- directionality --
-  >
-
-<!ELEMENT BASEFONT - O EMPTY           -- base font size -->
-<!ATTLIST BASEFONT
-  id          ID             #IMPLIED  -- document-wide unique id --
-  size        CDATA          #REQUIRED -- base font size for FONT elements --
-  color       %Color;        #IMPLIED  -- text color --
-  face        CDATA          #IMPLIED  -- comma separated list of font names --
-  >
-
-<!ELEMENT FONT - - (%inline;)*         -- local change to font -->
-<!ATTLIST FONT
-  %coreattrs;                          -- id, class, style, title --
-  %i18n;		               -- lang, dir --
-  size        CDATA          #IMPLIED  -- [+|-]nn e.g. size="+1", size="4" --
-  color       %Color;        #IMPLIED  -- text color --
-  face        CDATA          #IMPLIED  -- comma separated list of font names --
-  >
-
-<!ELEMENT BR - O EMPTY                 -- forced line break -->
-<!ATTLIST BR
-  %coreattrs;                          -- id, class, style, title --
-  clear       (left|all|right|none) none -- control of text flow --
-  >
-
-<!--================== HTML content models ===============================-->
-
-<!--
-    HTML has two basic content models:
-
-        %inline;     character level elements and text strings
-        %block;      block-like elements e.g. paragraphs and lists
--->
-
-<!ENTITY % block
-     "P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
-      NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
-      TABLE | FIELDSET | ADDRESS">
-
-<!ENTITY % flow "%block; | %inline;">
-
-<!--=================== Document Body ====================================-->
-
-<!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->
-<!ATTLIST BODY
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  onload          %Script;   #IMPLIED  -- the document has been loaded --
-  onunload        %Script;   #IMPLIED  -- the document has been removed --
-  background      %URI;      #IMPLIED  -- texture tile for document
-                                          background --
-  %bodycolors;                         -- bgcolor, text, link, vlink, alink --
-  >
-
-<!ELEMENT ADDRESS - - ((%inline;)|P)*  -- information on author -->
-<!ATTLIST ADDRESS
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT DIV - - (%flow;)*            -- generic language/style container -->
-<!ATTLIST DIV
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %align;                              -- align, text alignment --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT CENTER - - (%flow;)*         -- shorthand for DIV align=center -->
-<!ATTLIST CENTER
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!--================== The Anchor Element ================================-->
-
-<!ENTITY % Shape "(rect|circle|poly|default)">
-<!ENTITY % Coords "CDATA" -- comma separated list of lengths -->
-
-<!ELEMENT A - - (%inline;)* -(A)       -- anchor -->
-<!ATTLIST A
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
-  type        %ContentType;  #IMPLIED  -- advisory content type --
-  name        CDATA          #IMPLIED  -- named link end --
-  href        %URI;          #IMPLIED  -- URI for linked resource --
-  hreflang    %LanguageCode; #IMPLIED  -- language code --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  rel         %LinkTypes;    #IMPLIED  -- forward link types --
-  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  shape       %Shape;        rect      -- for use with client-side image maps --
-  coords      %Coords;       #IMPLIED  -- for use with client-side image maps --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
-     separate document although this isn't yet widely supported -->
-
-<!ELEMENT MAP - - ((%block;)+ | AREA+) -- client-side image map -->
-<!ATTLIST MAP
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #REQUIRED -- for reference by usemap --
-  >
-
-<!ELEMENT AREA - O EMPTY               -- client-side image map area -->
-<!ATTLIST AREA
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  shape       %Shape;        rect      -- controls interpretation of coords --
-  coords      %Coords;       #IMPLIED  -- comma separated list of lengths --
-  href        %URI;          #IMPLIED  -- URI for linked resource --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  nohref      (nohref)       #IMPLIED  -- this region has no action --
-  alt         %Text;         #REQUIRED -- short description --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  >
-
-<!--================== The LINK Element ==================================-->
-
-<!--
-  Relationship values can be used in principle:
-
-   a) for document specific toolbars/menus when used
-      with the LINK element in document head e.g.
-        start, contents, previous, next, index, end, help
-   b) to link to a separate style sheet (rel=stylesheet)
-   c) to make a link to a script (rel=script)
-   d) by stylesheets to control how collections of
-      html nodes are rendered into printed documents
-   e) to make a link to a printable version of this document
-      e.g. a postscript or pdf version (rel=alternate media=print)
--->
-
-<!ELEMENT LINK - O EMPTY               -- a media-independent link -->
-<!ATTLIST LINK
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
-  href        %URI;          #IMPLIED  -- URI for linked resource --
-  hreflang    %LanguageCode; #IMPLIED  -- language code --
-  type        %ContentType;  #IMPLIED  -- advisory content type --
-  rel         %LinkTypes;    #IMPLIED  -- forward link types --
-  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
-  media       %MediaDesc;    #IMPLIED  -- for rendering on these media --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  >
-
-<!--=================== Images ===========================================-->
-
-<!-- Length defined in strict DTD for cellpadding/cellspacing -->
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
-
-<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
-
-<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
-
-<!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? -->
-
-<!-- To avoid problems with text-only UAs as well as 
-   to make image content understandable and navigable 
-   to users of non-visual UAs, you need to provide
-   a description with ALT, and avoid server-side image maps -->
-<!ELEMENT IMG - O EMPTY                -- Embedded image -->
-<!ATTLIST IMG
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  src         %URI;          #REQUIRED -- URI of image to embed --
-  alt         %Text;         #REQUIRED -- short description --
-  longdesc    %URI;          #IMPLIED  -- link to long description
-                                          (complements alt) --
-  height      %Length;       #IMPLIED  -- override height --
-  width       %Length;       #IMPLIED  -- override width --
-  usemap      %URI;          #IMPLIED  -- use client-side image map --
-  ismap       (ismap)        #IMPLIED  -- use server-side image map --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  border      %Length;       #IMPLIED  -- link border width --
-  hspace      %Pixels;       #IMPLIED  -- horizontal gutter --
-  vspace      %Pixels;       #IMPLIED  -- vertical gutter --
-  >
-
-<!-- USEMAP points to a MAP element which may be in this document
-  or an external document, although the latter is not widely supported -->
-
-<!--==================== OBJECT ======================================-->
-<!--
-  OBJECT is used to embed objects as part of HTML pages 
-  PARAM elements should precede other content. SGML mixed content
-  model technicality precludes specifying this formally ...
--->
-
-<!ELEMENT OBJECT - - (PARAM | %flow;)*
- -- generic embedded object -->
-<!ATTLIST OBJECT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  declare     (declare)      #IMPLIED  -- declare but don't instantiate flag --
-  classid     %URI;          #IMPLIED  -- identifies an implementation --
-  codebase    %URI;          #IMPLIED  -- base URI for classid, data, archive--
-  data        %URI;          #IMPLIED  -- reference to object's data --
-  type        %ContentType;  #IMPLIED  -- content type for data --
-  codetype    %ContentType;  #IMPLIED  -- content type for code --
-  archive     %URI;          #IMPLIED  -- space separated archive list --
-  standby     %Text;         #IMPLIED  -- message to show while loading --
-  height      %Length;       #IMPLIED  -- override height --
-  width       %Length;       #IMPLIED  -- override width --
-  usemap      %URI;          #IMPLIED  -- use client-side image map --
-  name        CDATA          #IMPLIED  -- submit as part of form --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  border      %Length;       #IMPLIED  -- link border width --
-  hspace      %Pixels;       #IMPLIED  -- horizontal gutter --
-  vspace      %Pixels;       #IMPLIED  -- vertical gutter --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT PARAM - O EMPTY              -- named property value -->
-<!ATTLIST PARAM
-  id          ID             #IMPLIED  -- document-wide unique id --
-  name        CDATA          #REQUIRED -- property name --
-  value       CDATA          #IMPLIED  -- property value --
-  valuetype   (DATA|REF|OBJECT) DATA   -- How to interpret value --
-  type        %ContentType;  #IMPLIED  -- content type for value
-                                          when valuetype=ref --
-  >
-
-<!--=================== Java APPLET ==================================-->
-<!--
-  One of code or object attributes must be present.
-  Place PARAM elements before other content.
--->
-<!ELEMENT APPLET - - (PARAM | %flow;)* -- Java applet -->
-<!ATTLIST APPLET
-  %coreattrs;                          -- id, class, style, title --
-  codebase    %URI;          #IMPLIED  -- optional base URI for applet --
-  archive     CDATA          #IMPLIED  -- comma separated archive list --
-  code        CDATA          #IMPLIED  -- applet class file --
-  object      CDATA          #IMPLIED  -- serialized applet file --
-  alt         %Text;         #IMPLIED  -- short description --
-  name        CDATA          #IMPLIED  -- allows applets to find each other --
-  width       %Length;       #REQUIRED -- initial width --
-  height      %Length;       #REQUIRED -- initial height --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  hspace      %Pixels;       #IMPLIED  -- horizontal gutter --
-  vspace      %Pixels;       #IMPLIED  -- vertical gutter --
-  >
-
-<!--=================== Horizontal Rule ==================================-->
-
-<!ELEMENT HR - O EMPTY -- horizontal rule -->
-<!ATTLIST HR
-  %coreattrs;                          -- id, class, style, title --
-  %events;
-  align       (left|center|right) #IMPLIED
-  noshade     (noshade)      #IMPLIED
-  size        %Pixels;       #IMPLIED
-  width       %Length;       #IMPLIED
-  >
-
-<!--=================== Paragraphs =======================================-->
-
-<!ELEMENT P - O (%inline;)*            -- paragraph -->
-<!ATTLIST P
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %align;                              -- align, text alignment --
-  >
-
-<!--=================== Headings =========================================-->
-
-<!--
-  There are six levels of headings from H1 (the most important)
-  to H6 (the least important).
--->
-
-<!ELEMENT (%heading;)  - - (%inline;)* -- heading -->
-<!ATTLIST (%heading;)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %align;                              -- align, text alignment --
-  >
-
-<!--=================== Preformatted Text ================================-->
-
-<!-- excludes markup for images and changes in font size -->
-<!ENTITY % pre.exclusion "IMG|OBJECT|APPLET|BIG|SMALL|SUB|SUP|FONT|BASEFONT">
-
-<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
-<!ATTLIST PRE
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  width       NUMBER         #IMPLIED
-  >
-
-<!--===================== Inline Quotes ==================================-->
-
-<!ELEMENT Q - - (%inline;)*            -- short inline quotation -->
-<!ATTLIST Q
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  cite        %URI;          #IMPLIED  -- URI for source document or msg --
-  >
-
-<!--=================== Block-like Quotes ================================-->
-
-<!ELEMENT BLOCKQUOTE - - (%flow;)*     -- long quotation -->
-<!ATTLIST BLOCKQUOTE
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  cite        %URI;          #IMPLIED  -- URI for source document or msg --
-  >
-
-<!--=================== Inserted/Deleted Text ============================-->
-
-
-<!-- INS/DEL are handled by inclusion on BODY -->
-<!ELEMENT (INS|DEL) - - (%flow;)*      -- inserted text, deleted text -->
-<!ATTLIST (INS|DEL)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  cite        %URI;          #IMPLIED  -- info on reason for change --
-  datetime    %Datetime;     #IMPLIED  -- date and time of change --
-  >
-
-<!--=================== Lists ============================================-->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+              -- definition list -->
-<!ATTLIST DL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  compact     (compact)      #IMPLIED  -- reduced interitem spacing --
-  >
-
-<!ELEMENT DT - O (%inline;)*           -- definition term -->
-<!ELEMENT DD - O (%flow;)*             -- definition description -->
-<!ATTLIST (DT|DD)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!-- Ordered lists (OL) Numbering style
-
-    1   arablic numbers     1, 2, 3, ...
-    a   lower alpha         a, b, c, ...
-    A   upper alpha         A, B, C, ...
-    i   lower roman         i, ii, iii, ...
-    I   upper roman         I, II, III, ...
-
-    The style is applied to the sequence number which by default
-    is reset to 1 for the first list item in an ordered list.
-
-    This can't be expressed directly in SGML due to case folding.
--->
-
-<!ENTITY % OLStyle "CDATA"      -- constrained to: "(1|a|A|i|I)" -->
-
-<!ELEMENT OL - - (LI)+                 -- ordered list -->
-<!ATTLIST OL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %OLStyle;      #IMPLIED  -- numbering style --
-  compact     (compact)      #IMPLIED  -- reduced interitem spacing --
-  start       NUMBER         #IMPLIED  -- starting sequence number --
-  >
-
-<!-- Unordered Lists (UL) bullet styles -->
-<!ENTITY % ULStyle "(disc|square|circle)">
-
-<!ELEMENT UL - - (LI)+                 -- unordered list -->
-<!ATTLIST UL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %ULStyle;      #IMPLIED  -- bullet style --
-  compact     (compact)      #IMPLIED  -- reduced interitem spacing --
-  >
-
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu list -->
-<!ATTLIST DIR
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  compact     (compact)      #IMPLIED
-  >
-<!ATTLIST MENU
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  compact     (compact)      #IMPLIED
-  >
-
-<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle;|%OLStyle;)" -->
-
-<!ELEMENT LI - O (%flow;)*             -- list item -->
-<!ATTLIST LI
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %LIStyle;      #IMPLIED  -- list item style --
-  value       NUMBER         #IMPLIED  -- reset sequence number --
-  >
-
-<!--================ Forms ===============================================-->
-<!ELEMENT FORM - - (%flow;)* -(FORM)   -- interactive form -->
-<!ATTLIST FORM
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  action      %URI;          #REQUIRED -- server-side form handler --
-  method      (GET|POST)     GET       -- HTTP method used to submit the form--
-  enctype     %ContentType;  "application/x-www-form-urlencoded"
-  onsubmit    %Script;       #IMPLIED  -- the form was submitted --
-  onreset     %Script;       #IMPLIED  -- the form was reset --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  accept-charset %Charsets;  #IMPLIED  -- list of supported charsets --
-  >
-
-<!-- Each label must not contain more than ONE field -->
-<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
-<!ATTLIST LABEL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  for         IDREF          #IMPLIED  -- matches field ID value --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  >
-
-<!ENTITY % InputType
-  "(TEXT | PASSWORD | CHECKBOX |
-    RADIO | SUBMIT | RESET |
-    FILE | HIDDEN | IMAGE | BUTTON)"
-   >
-
-<!-- attribute name required for all but submit & reset -->
-<!ELEMENT INPUT - O EMPTY              -- form control -->
-<!ATTLIST INPUT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %InputType;    TEXT      -- what kind of widget is needed --
-  name        CDATA          #IMPLIED  -- submit as part of form --
-  value       CDATA          #IMPLIED  -- required for radio and checkboxes --
-  checked     (checked)      #IMPLIED  -- for radio buttons and check boxes --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  readonly    (readonly)     #IMPLIED  -- for text and passwd --
-  size        CDATA          #IMPLIED  -- specific to each type of field --
-  maxlength   NUMBER         #IMPLIED  -- max chars for text fields --
-  src         %URI;          #IMPLIED  -- for fields with images --
-  alt         CDATA          #IMPLIED  -- short description --
-  usemap      %URI;          #IMPLIED  -- use client-side image map --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  onselect    %Script;       #IMPLIED  -- some text was selected --
-  onchange    %Script;       #IMPLIED  -- the element value was changed --
-  accept      %ContentTypes; #IMPLIED  -- list of MIME types for file upload --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
-<!ATTLIST SELECT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #IMPLIED  -- field name --
-  size        NUMBER         #IMPLIED  -- rows visible --
-  multiple    (multiple)     #IMPLIED  -- default is single selection --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  onchange    %Script;       #IMPLIED  -- the element value was changed --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
-<!ATTLIST OPTGROUP
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  label       %Text;         #REQUIRED -- for use in hierarchical menus --
-  >
-
-<!ELEMENT OPTION - O (#PCDATA)         -- selectable choice -->
-<!ATTLIST OPTION
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  selected    (selected)     #IMPLIED
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  label       %Text;         #IMPLIED  -- for use in hierarchical menus --
-  value       CDATA          #IMPLIED  -- defaults to element content --
-  >
-
-<!ELEMENT TEXTAREA - - (#PCDATA)       -- multi-line text field -->
-<!ATTLIST TEXTAREA
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #IMPLIED
-  rows        NUMBER         #REQUIRED
-  cols        NUMBER         #REQUIRED
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  readonly    (readonly)     #IMPLIED
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  onselect    %Script;       #IMPLIED  -- some text was selected --
-  onchange    %Script;       #IMPLIED  -- the element value was changed --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!--
-  #PCDATA is to solve the mixed content problem,
-  per specification only whitespace is allowed there!
- -->
-<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
-<!ATTLIST FIELDSET
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT LEGEND - - (%inline;)*       -- fieldset legend -->
-<!ENTITY % LAlign "(top|bottom|left|right)">
-
-<!ATTLIST LEGEND
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  align       %LAlign;       #IMPLIED  -- relative to fieldset --
-  >
-
-<!ELEMENT BUTTON - -
-     (%flow;)* -(A|%formctrl;|FORM|ISINDEX|FIELDSET|IFRAME)
-     -- push button -->
-<!ATTLIST BUTTON
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #IMPLIED
-  value       CDATA          #IMPLIED  -- sent to server when submitted --
-  type        (button|submit|reset) submit -- for use as form button --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!--======================= Tables =======================================-->
-
-<!-- IETF HTML table standard, see [RFC1942] -->
-
-<!--
- The BORDER attribute sets the thickness of the frame around the
- table. The default units are screen pixels.
-
- The FRAME attribute specifies which parts of the frame around
- the table should be rendered. The values are not the same as
- CALS to avoid a name clash with the VALIGN attribute.
-
- The value "border" is included for backwards compatibility with
- <TABLE BORDER> which yields frame=border and border=implied
- For <TABLE BORDER=1> you get border=1 and frame=implied. In this
- case, it is appropriate to treat this as frame=border for backwards
- compatibility with deployed browsers.
--->
-<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
-
-<!--
- The RULES attribute defines which rules to draw between cells:
-
- If RULES is absent then assume:
-     "none" if BORDER is absent or BORDER=0 otherwise "all"
--->
-
-<!ENTITY % TRules "(none | groups | rows | cols | all)">
-  
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cellhalign
-  "align      (left|center|right|justify|char) #IMPLIED
-   char       %Character;    #IMPLIED  -- alignment char, e.g. char=':' --
-   charoff    %Length;       #IMPLIED  -- offset for alignment char --"
-  >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cellvalign
-  "valign     (top|middle|bottom|baseline) #IMPLIED"
-  >
-
-<!ELEMENT TABLE - -
-     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
-<!ELEMENT CAPTION  - - (%inline;)*     -- table caption -->
-<!ELEMENT THEAD    - O (TR)+           -- table header -->
-<!ELEMENT TFOOT    - O (TR)+           -- table footer -->
-<!ELEMENT TBODY    O O (TR)+           -- table body -->
-<!ELEMENT COLGROUP - O (col)*          -- table column group -->
-<!ELEMENT COL      - O EMPTY           -- table column -->
-<!ELEMENT TR       - O (TH|TD)+        -- table row -->
-<!ELEMENT (TH|TD)  - O (%flow;)*       -- table header cell, table data cell-->
-
-<!ATTLIST TABLE                        -- table element --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  summary     %Text;         #IMPLIED  -- purpose/structure for speech output--
-  width       %Length;       #IMPLIED  -- table width --
-  border      %Pixels;       #IMPLIED  -- controls frame width around table --
-  frame       %TFrame;       #IMPLIED  -- which parts of frame to render --
-  rules       %TRules;       #IMPLIED  -- rulings between rows and cols --
-  cellspacing %Length;       #IMPLIED  -- spacing between cells --
-  cellpadding %Length;       #IMPLIED  -- spacing within cells --
-  align       %TAlign;       #IMPLIED  -- table position relative to window --
-  bgcolor     %Color;        #IMPLIED  -- background color for cells --
-  %reserved;                           -- reserved for possible future use --
-  datapagesize CDATA         #IMPLIED  -- reserved for possible future use --
-  >
-
-<!ENTITY % CAlign "(top|bottom|left|right)">
-
-<!ATTLIST CAPTION
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  align       %CAlign;       #IMPLIED  -- relative to table --
-  >
-
-<!--
-COLGROUP groups a set of COL elements. It allows you to group
-several semantically related columns together.
--->
-<!ATTLIST COLGROUP
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  span        NUMBER         1         -- default number of columns in group --
-  width       %MultiLength;  #IMPLIED  -- default width for enclosed COLs --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  >
-
-<!--
- COL elements define the alignment properties for cells in
- one or more columns.
-
- The WIDTH attribute specifies the width of the columns, e.g.
-
-     width=64        width in screen pixels
-     width=0.5*      relative width of 0.5
-
- The SPAN attribute causes the attributes of one
- COL element to apply to more than one column.
--->
-<!ATTLIST COL                          -- column groups and properties --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  span        NUMBER         1         -- COL attributes affect N columns --
-  width       %MultiLength;  #IMPLIED  -- column width specification --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  >
-
-<!--
-    Use THEAD to duplicate headers when breaking table
-    across page boundaries, or for static headers when
-    TBODY sections are rendered in scrolling panel.
-
-    Use TFOOT to duplicate footers when breaking table
-    across page boundaries, or for static footers when
-    TBODY sections are rendered in scrolling panel.
-
-    Use multiple TBODY sections when rules are needed
-    between groups of table rows.
--->
-<!ATTLIST (THEAD|TBODY|TFOOT)          -- table section --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  >
-
-<!ATTLIST TR                           -- table row --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  bgcolor     %Color;        #IMPLIED  -- background color for row --
-  >
-
-
-<!-- Scope is simpler than axes attribute for common tables -->
-<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
-
-<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
-<!ATTLIST (TH|TD)                      -- header or data cell --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  abbr        %Text;         #IMPLIED  -- abbreviation for header cell --
-  axis        CDATA          #IMPLIED  -- names groups of related headers--
-  headers     IDREFS         #IMPLIED  -- list of id's for header cells --
-  scope       %Scope;        #IMPLIED  -- scope covered by header cells --
-  rowspan     NUMBER         1         -- number of rows spanned by cell --
-  colspan     NUMBER         1         -- number of cols spanned by cell --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  nowrap      (nowrap)       #IMPLIED  -- suppress word wrap --
-  bgcolor     %Color;        #IMPLIED  -- cell background color --
-  width       %Pixels;       #IMPLIED  -- width for cell --
-  height      %Pixels;       #IMPLIED  -- height for cell --
-  >
-
-<!--================== Document Frames ===================================-->
-
-<!--
-  The content model for HTML documents depends on whether the HEAD is
-  followed by a FRAMESET or BODY element. The widespread omission of
-  the BODY start tag makes it impractical to define the content model
-  without the use of a marked section.
--->
-
-<!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision-->
-<!ATTLIST FRAMESET
-  %coreattrs;                          -- id, class, style, title --
-  rows        %MultiLengths; #IMPLIED  -- list of lengths,
-                                          default: 100% (1 row) --
-  cols        %MultiLengths; #IMPLIED  -- list of lengths,
-                                          default: 100% (1 col) --
-  onload      %Script;       #IMPLIED  -- all the frames have been loaded  -- 
-  onunload    %Script;       #IMPLIED  -- all the frames have been removed -- 
-  >
-
-<!-- reserved frame names start with "_" otherwise starts with letter -->
-<!ELEMENT FRAME - O EMPTY              -- subwindow -->
-<!ATTLIST FRAME
-  %coreattrs;                          -- id, class, style, title --
-  longdesc    %URI;          #IMPLIED  -- link to long description
-                                          (complements title) --
-  name        CDATA          #IMPLIED  -- name of frame for targetting --
-  src         %URI;          #IMPLIED  -- source of frame content --
-  frameborder (1|0)          1         -- request frame borders? --
-  marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
-  marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
-  noresize    (noresize)     #IMPLIED  -- allow users to resize frames? --
-  scrolling   (yes|no|auto)  auto      -- scrollbar or none --
-  >
-
-<!ELEMENT IFRAME - - (%flow;)*         -- inline subwindow -->
-<!ATTLIST IFRAME
-  %coreattrs;                          -- id, class, style, title --
-  longdesc    %URI;          #IMPLIED  -- link to long description
-                                          (complements title) --
-  name        CDATA          #IMPLIED  -- name of frame for targetting --
-  src         %URI;          #IMPLIED  -- source of frame content --
-  frameborder (1|0)          1         -- request frame borders? --
-  marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
-  marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
-  scrolling   (yes|no|auto)  auto      -- scrollbar or none --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  height      %Length;       #IMPLIED  -- frame height --
-  width       %Length;       #IMPLIED  -- frame width --
-  >
-
-<![ %HTML.Frameset; [
-<!ENTITY % noframes.content "(BODY) -(NOFRAMES)">
-]]>
-
-<!ENTITY % noframes.content "(%flow;)*">
-
-<!ELEMENT NOFRAMES - - %noframes.content;
- -- alternate content container for non frame-based rendering -->
-<!ATTLIST NOFRAMES
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!--================ Document Head =======================================-->
-<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
-
-<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
-<!ATTLIST HEAD
-  %i18n;                               -- lang, dir --
-  profile     %URI;          #IMPLIED  -- named dictionary of meta info --
-  >
-
-<!-- The TITLE element is not considered part of the flow of text.
-       It should be displayed, for example as the page header or
-       window title. Exactly one title is required per document.
-    -->
-<!-- Lars: small correction here... -->
-<!--ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -- -->
-<!ELEMENT TITLE - - (#PCDATA)  -- document title -->
-<!ATTLIST TITLE %i18n>
-
-<!ELEMENT ISINDEX - O EMPTY            -- single line prompt -->
-<!ATTLIST ISINDEX
-  %coreattrs;                          -- id, class, style, title --
-  %i18n;                               -- lang, dir --
-  prompt      %Text;         #IMPLIED  -- prompt message -->
-
-<!ELEMENT BASE - O EMPTY               -- document base URI -->
-<!ATTLIST BASE
-  href        %URI;          #IMPLIED  -- URI that acts as base URI --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  >
-
-<!ELEMENT META - O EMPTY               -- generic metainformation -->
-<!ATTLIST META
-  %i18n;                               -- lang, dir, for use with content --
-  http-equiv  NAME           #IMPLIED  -- HTTP response header name  --
-  name        NAME           #IMPLIED  -- metainformation name --
-  content     CDATA          #REQUIRED -- associated information --
-  scheme      CDATA          #IMPLIED  -- select form of content --
-  >
-
-<!ELEMENT STYLE - - %StyleSheet        -- style info -->
-<!ATTLIST STYLE
-  %i18n;                               -- lang, dir, for use with title --
-  type        %ContentType;  #REQUIRED -- content type of style language --
-  media       %MediaDesc;    #IMPLIED  -- designed for use with these media --
-  title       %Text;         #IMPLIED  -- advisory title --
-  >
-
-<!ELEMENT SCRIPT - - %Script;          -- script statements -->
-<!ATTLIST SCRIPT
-  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
-  type        %ContentType;  #REQUIRED -- content type of script language --
-  language    CDATA          #IMPLIED  -- predefined script language name --
-  src         %URI;          #IMPLIED  -- URI for an external script --
-  defer       (defer)        #IMPLIED  -- UA may defer execution of script --
-  event       CDATA          #IMPLIED  -- reserved for possible future use --
-  for         %URI;          #IMPLIED  -- reserved for possible future use --
-  >
-
-<!ELEMENT NOSCRIPT - - (%flow;)*
-  -- alternate content container for non script-based rendering -->
-<!ATTLIST NOSCRIPT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!--================ Document Structure ==================================-->
-<!ENTITY % version "version CDATA %HTML.Version;">
-
-<!--[ %HTML.Frameset; [
-<!ENTITY % html.content "HEAD, FRAMESET">
-]]-->
-
-<!-- Lars: slight correction here: include FRAMESET -->
-<!ENTITY % html.content "HEAD, (BODY|(FRAMESET&NOFRAMES?))">
-
-<!ELEMENT HTML O O (%html.content;)    -- document root element -->
-<!ATTLIST HTML
-  %i18n;                               -- lang, dir --
-  %version;
-  >
diff --git a/WebCore/khtml/java/KJAS_GRAMMAR.txt b/WebCore/khtml/java/KJAS_GRAMMAR.txt
deleted file mode 100644
index 5632f8d..0000000
--- a/WebCore/khtml/java/KJAS_GRAMMAR.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-This is documentation for the updated KJAS protocol.
-
-KJAS Grammar
-===============================================================================
-
-## Commands From KAppletWidget(C++) to KJAS(Java Process)
-<KJAS Command>   -> <CMD Length><CMD>
-<CMD Length>     -> <StringNum>
-<CMD>            -> <createContext>  |
-                    <destroyContext> |
-                    <createApplet>   |
-                    <destroyApplet>  |
-                    <startApplet>    |
-                    <stopApplet>     |
-                    <initApplet>     |
-                    <showURLInFrame> |
-                    <showDocument>   |
-                    <showStatus>     |
-                    <resizeApplet>   |
-                    <getURLData>     |
-                    <URLData>        |
-                    <shutDownServer>
-
-<createContext>  -> <1 byte equal to 1 when cast as int><SEP><ContextID><END>
-<destroyContext> -> <1 byte equal to 2 when cast as int><SEP><ContextID><END>
-
-<createApplet>   -> <1 byte equal to 3 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><SEP><AppletName><SEP><ClassName><SEP>
-                    <BaseURL><SEP><CodeBase><SEP><Archives>
-                    <SEP><Width><SEP><Height><SEP><WindowTitle><SEP><ParamList>
-<destroyApplet>  -> <1 byte equal to 4 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-<startApplet>    -> <1 byte equal to 5 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-<stopApplet>     -> <1 byte equal to 6 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-<initApplet>     -> <1 byte equal to 7 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-
-
-## Commands from KJAS(Java Process) to KAppletWidget(C++)
-<showDocument>   -> <1 byte equal to 8 when cast as int><SEP><ContextID>
-                    <SEP><URL><END>
-<showURLInFrame> -> <1 byte equal to 9 when cast as int><SEP><ContextID>
-                    <SEP><URL><SEP><targetFrame><END>
-<showStatus>     -> <1 byte equal to 10 when cast as int><SEP><ContextID>
-                    <SEP><string><END>
-<resizeApplet>   -> <1 byte equal to 11 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><SEP><Width><SEP><Height><END>
-<getURLData>     -> <1 byte equal to 12 when cast as int><SEP><ClassLoaderID>
-                    <SEP><URL><END>
-<URLData>        -> <1 byte equal to 13 when cast as int><SEP><ClassLoaderID>
-                    <SEP><URL><SEP><DATA><END>
-
-<shutDownServer> -> <1 byte equal to 14 when cast as int><END>
-
-## basic data types
-<CMD Length>     -> <StringNum>
-<ContextID>      -> string
-<AppletID>       -> string
-<AppletName>     -> string
-<ParamList>      -> <StringNum><SEP><ParamPairList>
-<ParamPairList>  -> StringNum of ParamPair
-<ParamPair>      -> <ParamName><SEP><ParamValue><SEP>
-<ClassName>      -> string
-<BaseURL>        -> <URL>
-<CodeBase>       -> <URL>
-<Archives>       -> string (list of jarfile names)
-<Width>          -> string representation of integer
-<Height>         -> string representation of integer
-<Title>          -> string
-<ParamName>      -> string
-<ParamValue>     -> string
-<Host>           -> string (must be a valid URL)
-<URL>            -> string (must be a valid URL)
-<targetFrame>    -> string
-<WindowTitle>    -> string
-<END>            -> <SEP>
-<SEP>            -> Null character- 1 byte = 0
-<StringNum>      -> padded string representation of integer, 8 characters long
-<ClassLoaderID>  -> string
-<DATA>           -> byte array
diff --git a/WebCore/khtml/java/README b/WebCore/khtml/java/README
deleted file mode 100644
index 5d64e74..0000000
--- a/WebCore/khtml/java/README
+++ /dev/null
@@ -1,20 +0,0 @@
-Wynn Wilkes- November 14, 2000
-I've just completed a large update that fixes a large number of bugs.  The
-update also adds applet security.  The security update requires a Java 2
-jvm.  
-
-This is libkdejava, the KDE Java support library.
-
-Directory map:
-
-$CWD			CPP sources for KDE binding to KJAS and some
-			additional utility classes.
-kjava-classes.zip	An *uncompressed* ZIP file containing the .class files
-			for the KJAS server. The files must be uncompressed to
-			support some crappy JVMs.
-org/kde/kjas/server	Java sources for KJAS server process
-
-You can find more information at http://developer.kde.org/language-bindings/java/
-
-Richard Moore.
-rich at kde.org
diff --git a/WebCore/khtml/java/TODO b/WebCore/khtml/java/TODO
deleted file mode 100644
index 2b9289e..0000000
--- a/WebCore/khtml/java/TODO
+++ /dev/null
@@ -1,22 +0,0 @@
-Wynn Wilkes (November 14, 2000)
-As of now, KJAS requires a Java 2 platform for classloading
-and the default security manager.  If anyone wants to implement
-a Java 1.1 security manager, please feel free and we can integrate
-both versions.
-
-- Get the keyboard focus issues fixed
-- Fix khtml_part to have one applet context per Document
-- add a context cache someplace so we can reload contexts-
-  this will keep us from having to restart the jvm over
-  and over- this is the biggest performance problem I think
-- fix khtml_part so it will start and stop applets??
-- Implement class loading via html proxies if one is set
-
-
-- Use of QGuardedPointer
-- LiveScript support
-- Custom applet types
-- Better support for Java 2
-  - Use a factory to create the classloader and security managers
-  - Use URLClassLoader- this is done
-- Support for KIO URLs
diff --git a/WebCore/khtml/java/build.xml b/WebCore/khtml/java/build.xml
deleted file mode 100644
index 5208e50..0000000
--- a/WebCore/khtml/java/build.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="KJAS" basedir="." default="all">
-
-  <target name="init">
-    <mkdir dir="classes" />
-  </target>
-
-  <target name="compile" depends="init">
-    <javac srcdir="org" destdir="classes" deprecation="true" />
-  </target>
-
-  <target name="jar" depends="init,compile">
-    <jar jarfile="kjava.jar" compress="false" basedir="classes" />
-  </target>
-
-  <target name="all" depends="jar" description="Build everything.">
-    <echo message="Application built." />
-  </target>
-
-  <target name="clean" depends="init" description="Clean all build products.">
-    <delete file="kjava.jar" />
-    <delete dir="classes" />
-  </target>
-
-  <target name="test-init" depends="">
-    <mkdir dir="tests/classes" />
-  </target>
-
-  <target name="test" depends="test-init" description="Build the test applets">
-    <javac srcdir="tests" destdir="tests/classes" debug="true" deprecation="true" />
-  </target>
-
-  <target name="test-clean" depends="">
-    <delete dir="tests/classes" />
-  </target>
-
-</project>
diff --git a/WebCore/khtml/java/javaembed.cpp b/WebCore/khtml/java/javaembed.cpp
deleted file mode 100644
index 8112414..0000000
--- a/WebCore/khtml/java/javaembed.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/****************************************************************************
-    Implementation of QXEmbed class
-
-   Copyright (C) 1999-2000 Troll Tech AS
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-    Boston, MA 02111-1307, USA.
-*****************************************************************************/
-
-#include "javaembed.h"
-
-#include <kdebug.h>
-#include <klocale.h>
-
-#include <qapplication.h>
-#include <qevent.h>
-
-class KJavaEmbedPrivate
-{
-friend class KJavaEmbed;
-};
-
-QString getQtEventName( QEvent* e )
-{
-    QString s;
-
-    switch( e->type() )
-    {
-        case QEvent::None:
-            s = "None";
-            break;
-        case QEvent::Timer:
-            s = "Timer";
-            break;
-        case QEvent::MouseButtonPress:
-            s = "MouseButtonPress";
-            break;
-        case QEvent::MouseButtonRelease:
-            s = "MouseButtonRelease";
-            break;
-        case QEvent::MouseButtonDblClick:
-            s = "MouseButtonClick";
-            break;
-        case QEvent::MouseMove:
-            s = "MouseMove";
-            break;
-        case QEvent::KeyPress:
-            s = "KeyPress";
-            break;
-        case QEvent::KeyRelease:
-            s = "KeyRelease";
-            break;
-        case QEvent::FocusIn:
-            s = "FocusIn";
-            break;
-        case QEvent::FocusOut:
-            s = "FocusOut";
-            break;
-        case QEvent::Enter:
-            s = "Enter";
-            break;
-        case QEvent::Leave:
-            s = "Leave";
-            break;
-        case QEvent::Paint:
-            s = "Paint";
-            break;
-        case QEvent::Move:
-            s = "Move";
-            break;
-        case QEvent::Resize:
-            s = "Resize";
-            break;
-        case QEvent::Create:
-            s = "Create";
-            break;
-        case QEvent::Destroy:
-            s = "Destroy";
-            break;
-        case QEvent::Show:
-            s = "Show";
-            break;
-        case QEvent::Hide:
-            s = "Hide";
-            break;
-        case QEvent::Close:
-            s = "Close";
-            break;
-        case QEvent::Quit:
-            s = "Quit";
-            break;
-        case QEvent::Reparent:
-            s = "Reparent";
-            break;
-        case QEvent::ShowMinimized:
-            s = "ShowMinimized";
-            break;
-        case QEvent::ShowNormal:
-            s = "ShowNormal";
-            break;
-        case QEvent::WindowActivate:
-            s = "WindowActivate";
-            break;
-        case QEvent::WindowDeactivate:
-            s = "WindowDeactivate";
-            break;
-        case QEvent::ShowToParent:
-            s = "ShowToParent";
-            break;
-        case QEvent::HideToParent:
-            s = "HideToParent";
-            break;
-        case QEvent::ShowMaximized:
-            s = "ShowMaximized";
-            break;
-        case QEvent::Accel:
-            s = "Accel";
-            break;
-        case QEvent::Wheel:
-            s = "Wheel";
-            break;
-        case QEvent::AccelAvailable:
-            s = "AccelAvailable";
-            break;
-        case QEvent::CaptionChange:
-            s = "CaptionChange";
-            break;
-        case QEvent::IconChange:
-            s = "IconChange";
-            break;
-        case QEvent::ParentFontChange:
-            s = "ParentFontChange";
-            break;
-        case QEvent::ApplicationFontChange:
-            s = "ApplicationFontChange";
-            break;
-        case QEvent::ParentPaletteChange:
-            s = "ParentPaletteChange";
-            break;
-        case QEvent::ApplicationPaletteChange:
-            s = "ApplicationPaletteChange";
-            break;
-        case QEvent::Clipboard:
-            s = "Clipboard";
-            break;
-        case QEvent::Speech:
-            s = "Speech";
-            break;
-        case QEvent::SockAct:
-            s = "SockAct";
-            break;
-        case QEvent::AccelOverride:
-            s = "AccelOverride";
-            break;
-        case QEvent::DragEnter:
-            s = "DragEnter";
-            break;
-        case QEvent::DragMove:
-            s = "DragMove";
-            break;
-        case QEvent::DragLeave:
-            s = "DragLeave";
-            break;
-        case QEvent::Drop:
-            s = "Drop";
-            break;
-        case QEvent::DragResponse:
-            s = "DragResponse";
-            break;
-        case QEvent::ChildInserted:
-            s = "ChildInserted";
-            break;
-        case QEvent::ChildRemoved:
-            s = "ChildRemoved";
-            break;
-        case QEvent::LayoutHint:
-            s = "LayoutHint";
-            break;
-        case QEvent::ShowWindowRequest:
-            s = "ShowWindowRequest";
-            break;
-        case QEvent::ActivateControl:
-            s = "ActivateControl";
-            break;
-        case QEvent::DeactivateControl:
-            s = "DeactivateControl";
-            break;
-        case QEvent::User:
-            s = "User Event";
-            break;
-
-        default:
-            s = "Undefined Event, value = " + QString::number( e->type() );
-            break;
-    }
-
-    return s;
-}
-
-/*!\reimp
- */
-bool KJavaEmbed::eventFilter( QObject* o, QEvent* e)
-{
-    QEvent::Type t = e->type();
-
-    if( t != QEvent::MouseMove && t != QEvent::Timer && t <= QEvent::User )
-    {
-        kdDebug(6100) << "KJavaEmbed::eventFilter, event = " << getQtEventName( e ) << endl;
-
-        if( o == this )
-            kdDebug(6100) << "event is for me:)" << endl;
-
-        switch ( e->type() )
-        {
-            case QEvent::FocusIn:
-                break;
-
-            case QEvent::FocusOut:
-                break;
-
-            case QEvent::Leave:
-                /* check to see if we are entering the applet somehow... */
-                break;
-
-            case QEvent::Enter:
-                break;
-
-            case QEvent::WindowActivate:
-    	        break;
-
-            case QEvent::WindowDeactivate:
-    	        break;
-
-            default:
-                break;
-        }
-
-    }
-
-    return FALSE;
-}
-
-
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-QString getX11EventName( XEvent* e )
-{
-    QString s;
-
-    switch( e->type )
-    {
-        case KeyPress:
-            s = "KeyPress";
-            break;
-        case KeyRelease:
-            s = "KeyRelease";
-            break;
-        case ButtonPress:
-            s = "ButtonPress";
-            break;
-        case ButtonRelease:
-            s = "ButtonRelease";
-            break;
-        case MotionNotify:
-            s = "MotionNotify";
-            break;
-        case EnterNotify:
-            s = "EnterNotify";
-            break;
-        case LeaveNotify:
-            s = "LeaveNotify";
-            break;
-        case FocusIn:
-            s = "FocusIn";
-            break;
-        case FocusOut:
-            s = "FocusOut";
-            break;
-        case KeymapNotify:
-            s = "KeymapNotify";
-            break;
-        case Expose:
-            s = "Expose";
-            break;
-        case GraphicsExpose:
-            s = "GraphicsExpose";
-            break;
-        case NoExpose:
-            s = "NoExpose";
-            break;
-        case VisibilityNotify:
-            s = "VisibilityNotify";
-            break;
-        case CreateNotify:
-            s = "CreateNotify";
-            break;
-        case DestroyNotify:
-            s = "DestroyNotify";
-            break;
-        case UnmapNotify:
-            s = "UnmapNotify";
-            break;
-        case MapNotify:
-            s = "MapNotify";
-            break;
-        case MapRequest:
-            s = "MapRequest";
-            break;
-        case ReparentNotify:
-            s = "ReparentNotify";
-            break;
-        case ConfigureNotify:
-            s = "ConfigureNotify";
-            break;
-        case ConfigureRequest:
-            s = "ConfigureRequest";
-            break;
-        case GravityNotify:
-            s = "GravityNotify";
-            break;
-        case ResizeRequest:
-            s = "ResizeRequest";
-            break;
-        case CirculateNotify:
-            s = "CirculateNofify";
-            break;
-        case CirculateRequest:
-            s = "CirculateRequest";
-            break;
-        case PropertyNotify:
-            s = "PropertyNotify";
-            break;
-        case SelectionClear:
-            s = "SelectionClear";
-            break;
-        case SelectionRequest:
-            s = "SelectionRequest";
-            break;
-        case SelectionNotify:
-            s = "SelectionNotify";
-            break;
-        case ColormapNotify:
-            s = "ColormapNotify";
-            break;
-        case ClientMessage:
-            s = "ClientMessage";
-            break;
-        case MappingNotify:
-            s = "MappingNotify";
-            break;
-        case LASTEvent:
-            s = "LASTEvent";
-            break;
-
-        default:
-            s = "Undefined";
-            break;
-    }
-
-    return s;
-}
-
-/*!
-  Constructs a xembed widget.
-
-  The \e parent, \e name and \e f arguments are passed to the QFrame
-  constructor.
- */
-KJavaEmbed::KJavaEmbed( QWidget *parent, const char *name, WFlags f )
-  : QWidget( parent, name, f )
-{
-    d = new KJavaEmbedPrivate;
-
-    setFocusPolicy( StrongFocus );
-    setKeyCompression( FALSE );
-    setAcceptDrops( TRUE );
-
-    window = 0;
-}
-
-/*!
-  Destructor. Cleans up the focus if necessary.
- */
-KJavaEmbed::~KJavaEmbed()
-{
-    if ( window != 0 )
-    {
-        XUnmapWindow( qt_xdisplay(), window );
-        QApplication::flushX();
-    }
-
-    delete d;
-}
-
-/*!\reimp
- */
-void KJavaEmbed::resizeEvent( QResizeEvent* e )
-{
-//    kdDebug(6100) << "KJavaEmbed::resizeEvent" << endl;
-    QWidget::resizeEvent( e );
-
-    if ( window != 0 )
-        XResizeWindow( qt_xdisplay(), window, e->size().width(), e->size().height() );
-}
-
-bool  KJavaEmbed::event( QEvent* e)
-{
-//    kdDebug(6100) << "KJavaEmbed::event, event type = " << getQtEventName( e ) << endl;
-    switch( e->type() )
-    {
-        case QEvent::ShowWindowRequest:
-            XMapRaised( qt_xdisplay(), window );
-            break;
-
-        default:
-            break;
-    }
-
-    return QWidget::event( e );
-}
-
-/*!\reimp
- */
-void KJavaEmbed::focusInEvent( QFocusEvent* )
-{
-//    kdDebug(6100) << "KJavaEmbed::focusInEvent" << endl;
-
-    if ( !window )
-        return;
-
-    XEvent ev;
-    memset( &ev, 0, sizeof( ev ) );
-    ev.xfocus.type = FocusIn;
-    ev.xfocus.window = window;
-
-    XSendEvent( qt_xdisplay(), window, true, NoEventMask, &ev );
-}
-
-/*!\reimp
- */
-void KJavaEmbed::focusOutEvent( QFocusEvent* )
-{
-//    kdDebug(6100) << "KJavaEmbed::focusOutEvent" << endl;
-
-    if ( !window )
-        return;
-
-    XEvent ev;
-    memset( &ev, 0, sizeof( ev ) );
-    ev.xfocus.type = FocusOut;
-    ev.xfocus.window = window;
-    XSendEvent( qt_xdisplay(), window, true, NoEventMask, &ev );
-}
-
-
-/*!
-  Embeds the window with the identifier \a w into this xembed widget.
-
-  This function is useful if the server knows about the client window
-  that should be embedded.  Often it is vice versa: the client knows
-  about its target embedder. In that case, it is not necessary to call
-  embed(). Instead, the client will call the static function
-  embedClientIntoWindow().
-
-  \sa embeddedWinId()
- */
-void KJavaEmbed::embed( WId w )
-{
-//    kdDebug(6100) << "KJavaEmbed::embed" << endl;
-
-    if ( w == 0 )
-        return;
-
-    window = w;
-
-    //first withdraw the window
-    XWithdrawWindow( qt_xdisplay(), window, qt_xscreen() );
-    QApplication::flushX();
-
-    //now reparent the window to be swallowed by the KJavaEmbed widget
-    XReparentWindow( qt_xdisplay(), window, winId(), 0, 0 );
-    QApplication::syncX();
-
-    //now resize it
-    XResizeWindow( qt_xdisplay(), window, width(), height() );
-    XMapRaised( qt_xdisplay(), window );
-
-    setFocus();
-}
-
-/*!\reimp
- */
-bool KJavaEmbed::focusNextPrevChild( bool next )
-{
-    if ( window )
-        return FALSE;
-    else
-        return QWidget::focusNextPrevChild( next );
-}
-
-/*!\reimp
- */
-bool KJavaEmbed::x11Event( XEvent* e)
-{
-//    kdDebug(6100) << "KJavaEmbed::x11Event, event = " << getX11EventName( e )
-//        << ", window = " << e->xany.window << endl;
-
-    switch ( e->type )
-    {
-        case DestroyNotify:
-            if ( e->xdestroywindow.window == window )
-            {
-                window = 0;
-            }
-            break;
-
-        default:
-	        break;
-    }
-
-    return false;
-}
-
-/*!
-  Specifies that this widget can use additional space, and that it can
-  survive on less than sizeHint().
-*/
-
-QSizePolicy KJavaEmbed::sizePolicy() const
-{
-    return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
-}
-
-/*!
-  Returns a size sufficient for the embedded window
-*/
-QSize KJavaEmbed::sizeHint() const
-{
-    return minimumSizeHint();
-}
-
-/*!
-  Returns the minimum size specified by the embedded window.
-*/
-QSize KJavaEmbed::minimumSizeHint() const
-{
-    if ( window )
-    {
-        kdDebug(6100) << "KJavaEmbed::minimumSizeHint, getting hints from window" << endl;
-
-        XSizeHints size;
-        long msize;
-        if( XGetWMNormalHints( qt_xdisplay(), window, &size, &msize ) &&
-            ( size.flags & PMinSize) )
-        {
-            kdDebug(6100) << "XGetWMNormalHints succeeded, width = " << size.min_width
-                          << ", height = " << size.min_height << endl;
-
-            return QSize( size.min_width, size.min_height );
-        }
-    }
-
-    return QSize( 0, 0 );
-}
-
-// for KDE
-#include "javaembed.moc"
diff --git a/WebCore/khtml/java/kjava.jar b/WebCore/khtml/java/kjava.jar
deleted file mode 100644
index af97041..0000000
Binary files a/WebCore/khtml/java/kjava.jar and /dev/null differ
diff --git a/WebCore/khtml/java/kjava.policy.in b/WebCore/khtml/java/kjava.policy.in
deleted file mode 100644
index 536930b..0000000
--- a/WebCore/khtml/java/kjava.policy.in
+++ /dev/null
@@ -1,4 +0,0 @@
-grant codeBase "file:@prefix@/share/apps/kjava/-"
-{
-    permission java.security.AllPermission;
-};
\ No newline at end of file
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java b/WebCore/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java
deleted file mode 100644
index 0a3bef6..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java
+++ /dev/null
@@ -1,421 +0,0 @@
-package org.kde.kjas.server;
-
-import java.net.*;
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-import java.util.jar.*;
-import java.security.*;
-
-
-/**
- * ClassLoader used to download and instantiate Applets.
- * <P>
- * NOTE: The class loader extends Java 1.2 specific class.
- */
-public class KJASAppletClassLoader
-    extends SecureClassLoader
-{
-    private static Hashtable loaders = new Hashtable();
-    public static KJASAppletClassLoader getLoader( String docBase, String codeBase )
-    {
-        URL docBaseURL;
-        KJASAppletClassLoader loader = null;
-        try
-        {
-            docBaseURL = new URL( docBase );
-        
-            URL key = getCodeBaseURL( docBaseURL, codeBase );
-            Main.debug( "CL: getLoader: key = " + key );
-
-            loader = (KJASAppletClassLoader) loaders.get( key.toString() );
-            if( loader == null )
-            {
-                loader = new KJASAppletClassLoader( docBaseURL, key );
-                loaders.put( key.toString(), loader );
-            }
-            else
-            {
-                Main.debug( "CL: reusing classloader" );
-                loader.setActive();
-            }
-        } catch( MalformedURLException e ) { Main.kjas_err( "bad DocBase URL", e ); }
-        return loader;
-    }
-
-    public static URL getCodeBaseURL( URL docBaseURL, String codeBase )
-    {
-        URL codeBaseURL = null;
-        try
-        {
-            //first determine what the real codeBase is: 3 cases
-            //#1. codeBase is absolute URL- use that
-            //#2. codeBase is relative to docBase, create url from those
-            //#3. last resort, use docBase as the codeBase
-            if(codeBase != null)
-            {
-                //we need to do this since codeBase should be a directory
-                if( !codeBase.endsWith("/") )
-                    codeBase = codeBase + "/";
-
-                try
-                {
-                    codeBaseURL = new URL( codeBase );
-                } catch( MalformedURLException mue )
-                {
-                    try
-                    {
-                        codeBaseURL = new URL( docBaseURL, codeBase );
-                    } catch( MalformedURLException mue2 ) {}
-                }
-            }
-
-            if(codeBaseURL == null)
-            {
-                //fall back to docBase but fix it up...
-                String file = docBaseURL.getFile();
-                if( file == null || (file.length() == 0)  )
-                    codeBaseURL = docBaseURL;
-                else if( file.endsWith( "/" ) )
-                    codeBaseURL = docBaseURL;
-                else
-                {
-                    //delete up to the ending '/'
-                    String urlString = docBaseURL.toString();
-                    int dot_index = urlString.lastIndexOf( '/' );
-                    String newfile = urlString.substring( 0, dot_index+1 );
-                    codeBaseURL = new URL( newfile );
-                }
-            }
-        }catch( Exception e ) { Main.kjas_err( "CL: exception ", e ); }
-        return codeBaseURL;    
-    }
-
-    public static KJASAppletClassLoader getLoader( String key )
-    {
-        if( loaders.containsKey( key ) )
-            return (KJASAppletClassLoader) loaders.get( key );
-        
-        return null;
-    }
-
-    /*********************************************************************************
-     ****************** KJASAppletClassLoader Implementation *************************
-     **********************************************************************************/
-    private URL docBaseURL;
-    private URL codeBaseURL;
-    private Vector archives;
-    private Hashtable rawdata;
-    private Hashtable certificates;
-    private boolean archives_loaded;
-    private int archive_count;
-    private String dbgID;
-    private boolean active;
-    
-    public KJASAppletClassLoader( URL _docBaseURL, URL _codeBaseURL )
-    {
-        docBaseURL   = _docBaseURL;
-        codeBaseURL  = _codeBaseURL;
-        archives     = new Vector();
-        rawdata      = new Hashtable();
-        certificates = new Hashtable();
-        
-        archives_loaded = false;
-        archive_count   = 0;
-        active          = true;
-        
-        dbgID = "CL(" + codeBaseURL.toString() + "): ";
-    }
-
-    public void setActive()
-    {
-        active = true;
-    }
-
-    public void setInactive()
-    {
-        active = false;
-    }
-
-    public void paramsDone()
-    {
-        //if we have archives, send download requests
-        if( archives.size() > 0 )
-        {
-            if( !archives_loaded )
-            {
-                for( int i = 0; i < archives.size(); ++i )
-                {
-                    String tmp = (String)archives.elementAt( i );
-                    Main.protocol.sendGetURLDataCmd( codeBaseURL.toString(), tmp );
-                }
-            }
-        }
-        else archives_loaded = true;
-    }
-
-    public void addArchiveName( String jarname )
-    {
-        if( !archives.contains( jarname ) )
-        {
-            archives.add( jarname );
-            archives_loaded = false;
-        }
-    }
-    
-    public void addResource( String url, byte[] data )
-    {
-        Main.debug( dbgID + "addResource for url: " + url + ", size of data = " + data.length );
-        String res = url.substring( codeBaseURL.toString().length() ).replace( '/', '.' );
-
-        if( archives.size() > 0 && !res.endsWith( ".class" ) )
-        {   //if we have archives, it's an archive( i think )
-        try
-            {
-                JarInputStream jar = new JarInputStream( new ByteArrayInputStream( data ) );
-                JarEntry entry;
-                while( (entry = jar.getNextJarEntry()) != null )
-                {
-                    //skip directories...
-                    if( entry.isDirectory() )
-                        continue;
-
-                    String entryName = entry.getName().replace('/','.');
-                    int    entrySize = (int) entry.getSize();
-                    Main.debug( dbgID + "reading ZipEntry, name = " + entryName + ", size = " + entrySize );
-
-                    int numread = 0;
-                    int total = 0;
-                    byte[] entryData = new byte[0];
-                    while( numread > -1 )
-        {
-                        byte[] curr = new byte[1024];
-                        numread = jar.read( curr, 0, 1024 );
-                        if( numread == -1 )
-                            break;
-
-                        byte[] old = entryData;
-                        entryData = new byte[ old.length + numread];
-                       // Main.debug( "old.length = " + old.length );
-                        if( old.length > 0 )
-                            System.arraycopy( old, 0, entryData, 0, old.length );
-                        System.arraycopy( curr, 0, entryData, old.length, numread );
-
-                        total += numread;
-                    }
-
-                    byte[] old = entryData;
-                    entryData = new byte[ total ];
-                    System.arraycopy( old, 0, entryData, 0, total );
-                    rawdata.put( entryName, entryData );
-
-                    java.security.cert.Certificate[] c = entry.getCertificates();
-                    if( c == null )
-                    {
-                        c = new java.security.cert.Certificate[0];
-                        Main.debug( "making a dummy certificate array" );
-                    } else Main.debug( "got some real certificates with archive" );
-                    certificates.put( entryName, c );
-        }
-            }
-            catch( IOException e )
-        {
-                Main.kjas_err( "Problem reading resource", e );
-        }
-            finally
-            {
-                if( (++archive_count) == archives.size() )
-                {
-                    Main.debug( dbgID + "all archives loaded" );
-                    archives_loaded = true;
-    }
-            }
-        }
-        else
-    {
-            String resName = url.substring( codeBaseURL.toString().length() ).replace( '/', '.' );
-            Main.debug( dbgID + "resource isn't a jar, putting it straight in with name = " + resName );
-            rawdata.put( resName, data );
-    }
-    }
-
-    public URL getDocBase()
-    {
-        return docBaseURL;
-    }
-
-    public URL getCodeBase()
-    {
-        return codeBaseURL;
-    }
-
-    /***************************************************************************
-     **** Class Loading Methods
-     **************************************************************************/
-    public Class findClass( String name )
-    {
-        Class rval;
-        
-        try
-        {
-            //check for a system class
-            rval = findSystemClass( name );
-            if( rval != null )
-                return rval;
-        } catch (ClassNotFoundException e )
-        {
-            //check the loaded classes 
-            rval = findLoadedClass( name );
-            if( rval != null )
-                return rval;
-
-            //check in the archives
-            String fixed_name = name + ".class";
-            while( !archives_loaded && active )
-            {
-                Main.debug( dbgID + "archives not loaded yet, sleeping" );
-                try { Thread.sleep( 200 ); }
-                catch( InterruptedException te ) {}
-            }
-            if( rawdata.containsKey( fixed_name ) )
-            {
-                Main.debug( dbgID + "class is in our rawdata table" );
-                byte[] data = (byte[]) rawdata.get( fixed_name );
-                if( data.length > 0 )
-                {
-                    java.security.cert.Certificate[] c = 
-                        (java.security.cert.Certificate[])certificates.get( fixed_name );
-                    CodeSource cs = new CodeSource( codeBaseURL, c );
-                    rval = defineClass( name, data, 0, data.length, cs );
-                    return rval;
-                } else return null;
-            }
-
-            //check from the webserver...
-            Main.debug( dbgID + "now checking the webserver" );
-            String new_name = name.replace( '.', '/' );
-            new_name += ".class";
-            Main.protocol.sendGetURLDataCmd( codeBaseURL.toString(), new_name );
-
-            //now wait until we get an answer
-            while( !rawdata.containsKey( fixed_name ) && active )
-            {
-                Main.debug( dbgID + "waiting for the webserver to answer for class: " + new_name );
-                try { Thread.sleep( 200 ); } 
-                catch( InterruptedException ie ) {}
-            }
-            if( rawdata.containsKey( fixed_name ) )
-            {
-                byte[] data = (byte[]) rawdata.get( fixed_name );
-                if( data.length > 0 )
-            {
-                    Main.debug( "we got the data" );
-                    CodeSource cs = new CodeSource( codeBaseURL, new java.security.cert.Certificate[0] );
-                    rval = defineClass( name, data, 0, data.length, cs );
-                    return rval;
-                } else return null;
-            }
-        }
-        
-        Main.debug( "CL: findClass returning null" );
-            return null;
-    }
-    
-    public Class loadClass( String name )
-    {
-        Main.debug( dbgID + "loadClass, class name = " + name );
-        //We need to be able to handle foo.class, so strip off the suffix
-        String fixed_name = name;
-        Class rval = null;
-        if( name.endsWith( ".class" ) )
-        {
-            fixed_name = name.substring( 0, name.lastIndexOf( ".class" ) );
-        }
-
-        rval = findClass( fixed_name );
-        return rval;
-    }
-
-    public InputStream getResourceAsStream( String name )
-    {
-        Main.debug( dbgID + "getResourceAsStream, name = " + name );
-        
-        String res = name.replace( '/', '.' );
-        if( rawdata.containsKey( res ) )
-        {
-            byte[] data = (byte[]) rawdata.get( res );
-            if( data.length > 0 )
-            {
-                return new ByteArrayInputStream( data );
-            } else return null;
-        }
-        
-        return super.getResourceAsStream( name );
-    }
-    
-    public URL getResource( String name )
-    {
-        Main.debug( dbgID + "getResource, name = " + name );
-        return super.getResource( name );
-    }
-    
-    /***************************************************************************
-     * Security Manager stuff
-     **************************************************************************/
-    protected PermissionCollection getPermissions( CodeSource cs )
-    {
-        //get the permissions from the SecureClassLoader
-        final PermissionCollection perms = super.getPermissions( cs );
-        final URL url = cs.getLocation();
-
-        //first add permission to connect back to originating host
-        perms.add(new SocketPermission(url.getHost(), "connect,accept"));
-
-        //add ability to read from it's own directory...
-        if ( url.getProtocol().equals("file") )
-        {
-            String path = url.getFile().replace('/', File.separatorChar);
-
-            if (!path.endsWith(File.separator))
-            {
-                int endIndex = path.lastIndexOf(File.separatorChar);
-                if (endIndex != -1)
-                {
-                    path = path.substring(0, endIndex+1) + "-";
-                    perms.add(new FilePermission(path, "read"));
-                }
-            }
-
-            AccessController.doPrivileged(
-                new PrivilegedAction()
-                {
-                    public Object run()
-                    {
-                        try
-                        {
-                            if (InetAddress.getLocalHost().equals(InetAddress.getByName(url.getHost())))
-                            {
-                                perms.add(new SocketPermission("localhost", "connect,accept"));
-                            }
-                        } catch (UnknownHostException uhe)
-                        {}
-                        return null;
-                    }
-                }
-            );
-        }
-
-        return perms;
-    }
-
-    private void dump2File( String filename, byte[] data )
-    {
-        Main.debug( "dump2File: " + filename );
-        try
-        {
-            FileOutputStream output = new FileOutputStream( filename );
-            output.write( data );
-            output.close();
-        }catch( IOException e ){}
-    }
-}
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASAppletContext.java b/WebCore/khtml/java/org/kde/kjas/server/KJASAppletContext.java
deleted file mode 100644
index 89e42ea..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASAppletContext.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package org.kde.kjas.server;
-
-import java.applet.*;
-import java.util.*;
-import java.net.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-
-/**
- * The context in which applets live.
- */
-public class KJASAppletContext implements AppletContext
-{
-    private Hashtable stubs;
-    private Hashtable images;
-
-    private String myID;
-    private KJASAppletClassLoader loader;
-    private boolean active;
-    /**
-     * Create a KJASAppletContext
-     */
-    public KJASAppletContext( String _contextID )
-    {
-        stubs  = new Hashtable();
-        images = new Hashtable();
-        myID   = _contextID;
-        active = true;
-    }
-
-    public String getID()
-    {
-        return myID;
-    }
-
-    public void createApplet( String appletID, String name,
-                              String className, String docBase,
-                              String codeBase, String archives,
-                              String width, String height,
-                              String windowName, Hashtable params )
-    {
-        //do kludges to support mess with parameter table and
-        //the applet variables
-        String key = new String( "archive" ).toUpperCase();
-        if( archives == null )
-        {
-            if( params.containsKey( key ) )
-                archives = (String)params.get( key );
-        }
-        else
-        {
-            if( !params.containsKey( key ) )
-                params.put( key, archives );
-        }
-
-        key = new String( "codebase" ).toUpperCase();
-        if( codeBase == null )
-        {
-            if( params.containsKey( key ) )
-                codeBase = (String) params.get( key );
-        }
-
-        key = new String( "width" ).toUpperCase();
-        if( !params.containsKey( key ) )
-            params.put( key, width );
-        key = new String( "height" ).toUpperCase();
-        if( !params.containsKey( key ) )
-            params.put( key, height );
-
-        try
-        {
-            KJASAppletClassLoader loader =
-                KJASAppletClassLoader.getLoader( docBase, codeBase );
-            if( archives != null )
-            {
-                StringTokenizer parser = new StringTokenizer( archives, ",", false );
-                while( parser.hasMoreTokens() )
-                {
-                    String jar = parser.nextToken().trim();
-                    loader.addArchiveName( jar );
-                }
-            }
-            loader.paramsDone();
-
-            KJASAppletStub stub = new KJASAppletStub
-            (
-                this, appletID, loader.getCodeBase(),
-                loader.getDocBase(), name, className,
-                new Dimension( Integer.parseInt(width), Integer.parseInt(height) ),
-                params, windowName, loader
-            );
-            stubs.put( appletID, stub );
-
-            stub.createApplet();
-        }
-        catch ( Exception e )
-        {
-            Main.kjas_err( "Something bad happened in createApplet: " + e, e );
-        }
-    }
-
-    public void initApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-        if( stub == null )
-        {
-            Main.debug( "could not init and show applet: " + appletID );
-        }
-        else
-        {
-            stub.initApplet();
-        }
-    }
-
-    public void destroyApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-
-        if( stub == null )
-        {
-            Main.debug( "could not destroy applet: " + appletID );
-        }
-        else
-        {
-            Main.debug( "stopping applet: " + appletID );
-            stub.die();
-
-            stubs.remove( appletID );
-        }
-    }
-
-    public void startApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-        if( stub == null )
-        {
-            Main.debug( "could not start applet: " + appletID );
-        }
-        else
-        {
-            stub.startApplet();
-        }
-    }
-
-    public void stopApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-        if( stub == null )
-        {
-            Main.debug( "could not stop applet: " + appletID );
-        }
-        else
-        {
-            stub.stopApplet();
-        }
-    }
-
-    public void destroy()
-    {
-        Enumeration e = stubs.elements();
-        while ( e.hasMoreElements() )
-        {
-            KJASAppletStub stub = (KJASAppletStub) e.nextElement();
-            stub.die();
-        }
-
-        stubs.clear();
-        active = false;
-    }
-
-    /***************************************************************************
-    **** AppletContext interface
-    ***************************************************************************/
-    public Applet getApplet( String appletName )
-    {
-        if( active )
-        {
-            Enumeration e = stubs.elements();
-            while( e.hasMoreElements() )
-            {
-                KJASAppletStub stub = (KJASAppletStub) e.nextElement();
-
-                if( stub.getAppletName().equals( appletName ) )
-                    return stub.getApplet();
-            }
-        }
-
-        return null;
-    }
-
-    public Enumeration getApplets()
-    {
-        if( active )
-        {
-            Vector v = new Vector();
-            Enumeration e = stubs.elements();
-            while( e.hasMoreElements() )
-            {
-                KJASAppletStub stub = (KJASAppletStub) e.nextElement();
-                v.add( stub );
-            }
-
-            return v.elements();
-        }
-
-        return null;
-    }
-
-    public AudioClip getAudioClip( URL url )
-    {
-        Main.debug( "getAudioClip, url = " + url );
-
-        return new KJASSoundPlayer( url );
-    }
-
-    public void addImage( String url, byte[] data )
-    {
-        Main.debug( "addImage for url = " + url );
-        images.put( url, data );
-    }
-    
-    public Image getImage( URL url )
-    {
-        if( active && url != null )
-        {
-            //check with the Web Server        
-            String str_url = url.toString();
-            Main.debug( "getImage, url = " + str_url );
-            Main.protocol.sendGetURLDataCmd( myID, str_url );
-
-            while( !images.containsKey( str_url ) && active )
-        {
-                try { Thread.sleep( 200 ); }
-                catch( InterruptedException e ){}
-            }
-            if( images.containsKey( str_url ) )
-            {
-                byte[] data = (byte[]) images.get( str_url );
-                if( data.length > 0 )
-                {
-            Toolkit kit = Toolkit.getDefaultToolkit();
-                    return kit.createImage( data );
-                } else return null;
-            }
-        }
-
-        return null;
-    }
-
-    public void showDocument( URL url )
-    {
-        Main.debug( "showDocument, url = " + url );
-
-        if( active && (url != null) )
-        {
-            Main.protocol.sendShowDocumentCmd( myID, url.toString()  );
-        }
-    }
-
-    public void showDocument( URL url, String targetFrame )
-    {
-        Main.debug( "showDocument, url = " + url + " targetFrame = " + targetFrame );
-
-        if( active && (url != null) && (targetFrame != null) )
-        {
-                Main.protocol.sendShowDocumentCmd( myID, url.toString(), targetFrame );
-        }
-    }
-
-    public void showStatus( String message )
-    {
-        if( active && (message != null) )
-        {
-            Main.protocol.sendShowStatusCmd( myID, message );
-        }
-    }
-
-}
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASAppletStub.java b/WebCore/khtml/java/org/kde/kjas/server/KJASAppletStub.java
deleted file mode 100644
index 4cf007a..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASAppletStub.java
+++ /dev/null
@@ -1,266 +0,0 @@
-package org.kde.kjas.server;
-
-import java.applet.*;
-import java.util.*;
-import java.net.*;
-import java.awt.*;
-
-
-/**
- * The stub used by Applets to communicate with their environment.
- *
- */
-public class KJASAppletStub extends Frame
-    implements AppletStub
-{
-    KJASAppletContext context;    // The containing context.
-    Hashtable         params;     // Maps parameter names to values
-    URL               codeBase;   // The URL directory where files are
-    URL               docBase;    // The document that referenced the applet
-    boolean           active;     // Is the applet active?
-    String            appletName; // The name of this applet instance
-    String            appletID;   // The id of this applet- for use in callbacks
-    Dimension         appletSize;
-    String            windowName;
-    String            className;
-    Class             appletClass;
-
-    KJASAppletClassLoader loader;
-    KJASAppletPanel       panel;
-    Applet                app;
-    Thread                runThread;
-    KJASAppletStub        me;
-
-    /**
-     * Create an AppletStub for the specified applet. The stub will be in
-     * the specified context and will automatically attach itself to the
-     * passed applet.
-     */
-    public KJASAppletStub( KJASAppletContext _context, String _appletID,
-                           URL _codeBase, URL _docBase,
-                           String _appletName, String _className,
-                           Dimension _appletSize, Hashtable _params,
-                           String _windowName, KJASAppletClassLoader _loader )
-    {
-        super( _windowName );
-
-        context    = _context;
-        appletID   = _appletID;
-        codeBase   = _codeBase;
-        docBase    = _docBase;
-        appletName = _appletName;
-        className  = _className.replace( '/', '.' );
-        appletSize = _appletSize;
-        params     = _params;
-        windowName = _windowName;
-        loader     = _loader;
-
-        appletClass = null;
-        me = this;
-    }
-
-    /*************************************************************************
-     *********************** Runnable Interface ******************************
-     *************************************************************************/
-    public void createApplet()
-    {
-        runThread = new Thread
-        (
-            new Runnable()
-            {
-                public void run()
-                {
-                    active = true;
-            	    try
-                    {
-                        panel = new KJASAppletPanel( appletSize );
-                        add( "Center", panel );
-                        pack();
-                	
-                        synchronized( loader )
-                        {
-                	    appletClass = loader.loadClass( className );
-                        }
-                		
-                        if( appletClass != null )
-                        {
-                            Main.debug( "loaded class, creating applet" );
-                            //this order is very important and took a long time
-                            //to figure out- don't modify it unless there are
-                            //real bug fixes
-                            app = (Applet) appletClass.newInstance();
-                            app.setStub( me );
-                            app.resize( appletSize );
-                            app.setVisible( false );
-                            panel.add( "Center", app );
-                            panel.validate();
-
-                            initApplet();
-
-                            panel.validate();
-                            app.resize( appletSize );
-                            app.start();  //We're already in a thread, so don't create a new one
-                            panel.validate();
-                            app.setVisible( true );
-                        }
-                        else
-                        {
-                            panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) );
-                        }
-            	    }catch( InstantiationException e )
-                    {
-                        Main.kjas_err( "Could not instantiate applet", e );
-                        panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) );
-                    }
-                    catch( IllegalAccessException e )
-                    {
-                        Main.kjas_err( "Could not instantiate applet", e );
-                        panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) );
-                    }
-                    finally
-                    {
-                        show();
-                    }
-                }
-            }
-        );
-        runThread.start();
-    }
-
-    public void startApplet()
-    {
-        if( app != null )
-            app.start();
-    }
-
-    public void stopApplet()
-    {
-        if( app != null )
-            app.stop();
-    }
-
-    public void initApplet()
-    {
-        if( app != null )
-            app.init();
-    }
-
-    public void die()
-    {
-        if( app != null )
-            app.stop();
-
-         if( runThread.isAlive() )
-            Main.debug( "runThread is active when stub is dying" );
-
-        loader.setInactive();
-        active = false;
-        dispose();
-    }
-
-    public Applet getApplet()
-    {
-        return app;
-    }
-
-    public Dimension getAppletSize()
-    {
-        return appletSize;
-    }
-
-
-    /*************************************************************************
-     ********************** AppletStub Interface *****************************
-     *************************************************************************/
-    public void appletResize( int width, int height )
-    {
-        if( active )
-        {
-            if ( (width >= 0) && (height >= 0))
-            {
-                Main.debug( "Applet #" + appletID + ": appletResize to : (" + width + ", " + height + ")" );
-                Main.protocol.sendResizeAppletCmd( context.getID(), appletID, width, height );
-                appletSize = new Dimension( width, height );
-
-                app.resize( appletSize );
-                panel.setAppletSize( appletSize );
-                pack();
-            }
-        }
-    }
-
-    public AppletContext getAppletContext()
-    {
-        if( active )
-            return context;
-
-        return null;
-    }
-
-    public URL getCodeBase()
-    {
-        if( active )
-            return codeBase;
-
-        return null;
-    }
-
-    public URL getDocumentBase()
-    {
-        if( active )
-            return docBase;
-
-        return null;
-    }
-
-    public String getAppletName()
-    {
-        if( active )
-            return appletName;
-
-        return null;
-    }
-
-    public String getParameter( String name )
-    {
-        if( active )
-            return (String) params.get( name.toUpperCase() );
-
-        return null;
-    }
-
-    public boolean isActive()
-    {
-        return active;
-    }
-
-    /*************************************************************************
-     ************************* Layout methods ********************************
-     *************************************************************************/
-    class KJASAppletPanel extends Panel
-    {
-        private Dimension size;
-
-        public KJASAppletPanel( Dimension _size )
-        {
-            super( new BorderLayout() );
-            size = _size;
-        }
-
-        public void setAppletSize( Dimension _size )
-        {
-            size = _size;
-        }
-
-        public Dimension getPreferredSize()
-        {
-            return size;
-        }
-
-        public Dimension getMinimumSize()
-        {
-            return size;
-        }
-    }
-
-}
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASConsole.java b/WebCore/khtml/java/org/kde/kjas/server/KJASConsole.java
deleted file mode 100644
index 3b04187..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASConsole.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.kde.kjas.server;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-
-public class KJASConsole
-    extends Frame
-{
-    private TextArea txt;
-
-    public KJASConsole()
-    {
-        super("Konqueror Java Console");
-
-        txt = new TextArea();
-        txt.setEditable(false);
-
-        Panel main = new Panel(new BorderLayout());
-        Panel btns = new Panel(new BorderLayout());
-
-        Button clear = new Button("Clear");
-        Button close = new Button("Close");
-        
-        btns.add(clear, "West");
-        btns.add(close, "East");
-
-        main.add(txt, "Center");
-        main.add(btns, "South");
-        
-        add( main );
-
-        clear.addActionListener
-        (
-            new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    txt.setText("");
-                }
-            }
-        );
-
-        close.addActionListener
-        (
-            new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    setVisible(false);
-                }
-            }
-        );
-
-        addWindowListener
-        (
-            new WindowAdapter() {
-                public void windowClosing(WindowEvent e) {
-                    setVisible(false);
-                }
-            }
-        );
-
-        setSize(300, 300);
-
-        PrintStream st = new PrintStream( new KJASConsoleStream(txt) );
-        System.setOut(st);
-        System.setErr(st);
-        
-        System.out.println( "Java VM version: " +
-                            System.getProperty("java.version") );
-        System.out.println( "Java VM vendor:  " +
-                            System.getProperty("java.vendor") );
-    }
-}
-
-class KJASConsoleStream
-    extends OutputStream
-{
-    private TextArea txt;
-    private FileOutputStream dbg_log;
-
-    public KJASConsoleStream( TextArea _txt )
-    {
-        txt = _txt;
-
-        try
-        {
-            if( Main.log )
-            {
-                dbg_log = new FileOutputStream( "/tmp/kjas.log" );
-            }
-        }
-        catch( FileNotFoundException e ) {}
-    }
-
-    public void close() {}
-    public void flush() {}
-    public void write(byte[] b) {}
-    public void write(int a) {}
-
-    // Should be enough for the console
-    public void write( byte[] bytes, int offset, int length )
-    {
-        try  // Just in case
-        {
-            String msg = new String( bytes, offset, length );
-            synchronized( txt )
-            {
-                //get the caret position, and then get the new position
-                int old_pos = txt.getCaretPosition();
-                txt.append(msg);
-                txt.setCaretPosition( old_pos + length );
-
-                if( Main.log && dbg_log != null )
-                {
-                    dbg_log.write( msg.getBytes() );
-                }
-            }
-        }
-        catch(Throwable t) {}
-    }
-}
-
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java b/WebCore/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java
deleted file mode 100644
index 3ec19d6..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java
+++ /dev/null
@@ -1,473 +0,0 @@
-package org.kde.kjas.server;
-
-import java.io.*;
-import java.util.*;
-import java.awt.*;
-import java.net.*;
-
-/**
- * Encapsulates the KJAS protocol and manages the contexts
- *
- */
-public class KJASProtocolHandler
-{
-    // Command codes- always need to be synced up with
-    // what's in kjavaappletserver.cpp
-    private static final int CreateContextCode   = 1;
-    private static final int DestroyContextCode  = 2;
-    private static final int CreateAppletCode    = 3;
-    private static final int DestroyAppletCode   = 4;
-    private static final int StartAppletCode     = 5;
-    private static final int StopAppletCode      = 6;
-    private static final int InitAppletCode      = 7;
-    private static final int ShowDocumentCode    = 8;
-    private static final int ShowURLInFrameCode  = 9;
-    private static final int ShowStatusCode      = 10;
-    private static final int ResizeAppletCode    = 11;
-    private static final int GetURLDataCode      = 12;
-    private static final int URLDataCode         = 13;
-    private static final int ShutdownServerCode  = 14;
-
-    //Holds contexts in contextID-context pairs
-    private Hashtable contexts;
-
-    private PushbackInputStream commands;    //Stream for reading in commands
-    private PrintStream         signals;     //Stream for writing out callbacks
-
-    //used for parsing each command as it comes in
-    private int cmd_index;
-    private final char sep = (char) 0;
-
-    public KJASProtocolHandler( InputStream  _commands,
-                                OutputStream _signals )
-    {
-        commands = new PushbackInputStream( _commands );
-        signals  = new PrintStream( _signals );
-        contexts = new Hashtable();
-    }
-
-    public void commandLoop()
-    {
-        try
-        {
-            while( true )
-            {
-                try
-                {
-                    int cmd_length = readPaddedLength( 8 );
-                    Main.debug( "PH: cmd_length = " + cmd_length );
-
-                    //We need to have this while loop since we're not guaranteed to get
-                    //all the bytes we want back, especially with large jars
-                    byte[] cmd_data = new byte[cmd_length];
-                    int total_read = 0;
-                    while( total_read < cmd_length )
-                    {
-                        int numread = commands.read( cmd_data, total_read, cmd_length-total_read );
-                        Main.debug( "PH: read in " + numread + " bytes for command" );
-                        total_read += numread;
-                    }
-
-                    //parse the rest of the command and execute it
-                    processCommand( cmd_data );
-                }
-                catch( NumberFormatException e )
-                {
-                    Main.kjas_err( "Could not parse out message length", e );
-                    System.exit( 1 );
-                }
-                catch( Throwable t )
-                {
-                    Main.debug( "commandLoop caught a throwable, still going" );
-                    t.printStackTrace();
-                }
-            }
-        }
-        catch( Exception i )
-        {
-            Main.kjas_err( "commandLoop exited on exception: ", i );
-            System.exit( 1 );
-        }
-    }
-
-    public void processCommand( byte[] command )
-    {
-        // Sanity checks
-        if ( command == null )
-            return;
-
-        //do all the parsing here and pass arguments as individual variables to the
-        //handler functions
-        int cmd_length = command.length;
-        cmd_index = 0;
-
-        int cmd_code_value = (int) command[cmd_index++];
-        if( cmd_code_value == CreateContextCode )
-        {
-            //parse out contextID- 1 argument
-            String contextID = getArg( command );
-            Main.debug( "createContext, id = " + contextID );
-
-            KJASAppletContext context = new KJASAppletContext( contextID );
-            contexts.put( contextID, context );
-        } else
-        if( cmd_code_value == DestroyContextCode )
-        {
-            //parse out contextID- 1 argument
-            String contextID = getArg( command );
-            Main.debug( "destroyContext, id = " + contextID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if( contexts != null )
-            {
-                context.destroy();
-                contexts.remove( contextID );
-            }
-        } else
-        if( cmd_code_value == CreateAppletCode )
-        {
-            //9 arguments- this order is important...
-            final String contextID  = getArg( command );
-            final String appletID   = getArg( command );
-            final String appletName = getArg( command );
-            final String className  = getArg( command );
-            final String baseURL    = getArg( command );
-            final String codeBase   = getArg( command );
-            final String archives   = getArg( command );
-            final String width      = getArg( command );
-            final String height     = getArg( command );
-            final String title      = getArg( command );
-
-            //get the number of parameter pairs...
-            String str_params = getArg( command );
-            int num_params = Integer.parseInt( str_params.trim() );
-            final Hashtable params = new Hashtable();
-            for( int i = 0; i < num_params; i++ )
-            {
-                String name  = getArg( command );
-                if( name == null )
-                    name = new String();
-
-                String value = getArg( command );
-                if( value == null )
-                    value = new String();
-                params.put( name.toUpperCase(), value );
-                //Main.debug( "parameter, name = " + name + ", value = " + value );
-            }
-
-            Main.debug( "createApplet, context = " + contextID + ", applet = " + appletID );
-            Main.debug( "              name = " + appletName + ", classname = " + className );
-            Main.debug( "              baseURL = " + baseURL + ", codeBase = " + codeBase );
-            Main.debug( "              archives = " + archives + ", width = " + width + 
-                        ", height = " + height );
-
-            final KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if( context != null )
-            {
-                context.createApplet( appletID, appletName, className,
-                                      baseURL, codeBase, archives,
-                                      width, height, title, params );
-            }
-
-        } else
-        if( cmd_code_value == DestroyAppletCode )
-        {
-            //2 arguments
-            String contextID = getArg( command );
-            String appletID  = getArg( command );
-            Main.debug( "destroyApplet, context = " + contextID + ", applet = " + appletID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if ( context != null )
-                context.destroyApplet( appletID );
-        } else
-        if( cmd_code_value == StartAppletCode )
-        {
-            //2 arguments
-            String contextID = getArg( command );
-            String appletID  = getArg( command );
-            Main.debug( "startApplet, context = " + contextID + ", applet = " + appletID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if ( context != null )
-                context.startApplet( appletID );
-        } else
-        if( cmd_code_value == StopAppletCode )
-        {
-            //2 arguments
-            String contextID = getArg( command );
-            String appletID  = getArg( command );
-            Main.debug( "stopApplet, context = " + contextID + ", applet = " + appletID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if ( context != null )
-                context.stopApplet( appletID );
-        } else
-        if( cmd_code_value == ShutdownServerCode )
-        {
-            Main.debug( "shutDownServer recieved" );
-            System.exit( 1 );
-        }
-        else
-        if( cmd_code_value == URLDataCode )
-        {
-            Main.debug( "URLData recieved" );
-            
-            String loaderID = getArg( command );
-            String requestedURL = getArg( command );
-            Main.debug( "data is for loader: " + loaderID );
-            Main.debug( "URL is " + requestedURL );
-
-            //rest of the command should be the data...
-            byte[] data = new byte[ cmd_length - cmd_index ];
-            System.arraycopy( command, cmd_index, data, 0, data.length );
-
-            KJASAppletClassLoader loader = KJASAppletClassLoader.getLoader( loaderID );
-            if( loader != null )
-            {
-                Main.debug( "this is a class loader request" );
-                loader.addResource( requestedURL, data );
-            }
-            else //see if there is a context with that ID, could be an image request
-            {
-                KJASAppletContext context = (KJASAppletContext) contexts.get( loaderID );
-                if( context != null )
-                {
-                    Main.debug( "this is  a context request for an image" );
-                    context.addImage( requestedURL, data );
-                }
-            }
-        }
-        else
-        {
-           throw new IllegalArgumentException( "Unknown command code" );
-        }
-    }
-
-    /**************************************************************
-     *****  Methods for talking to the applet server **************
-     **************************************************************/
-    public void sendGetURLDataCmd( String loaderID, String file )
-    {
-        Main.debug( "sendGetURLCmd from loader: " + loaderID + " url = " + file );
-        String ID_str = null;
-        String file_str = null;
-        try
-        {
-            ID_str = loaderID;
-            file_str = new URL( new URL(loaderID), file ).toString();
-        } catch( MalformedURLException e ) 
-        {
-            //this is an image request, take the file argument as is
-            ID_str = loaderID;
-            file_str = file;
-        }
-        finally
-        {
-            //length  = length of args plus 1 for code, 2 for seps and 1 for end
-            int length = ID_str.length() + file_str.length() + 4;
-            char[] chars = new char[ length + 8 ];
-            char[] tmpchar = getPaddedLength( length );
-            int index = 0;
-
-            System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-            index += tmpchar.length;
-            chars[index++] = (char) GetURLDataCode;
-            chars[index++] = sep;
-
-                tmpchar = ID_str.toCharArray();
-            System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-            index += tmpchar.length;
-            chars[index++] = sep;
-
-                tmpchar = file_str.toCharArray();
-            System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-            index += tmpchar.length;
-            chars[index++] = sep;
-
-            signals.print( chars );
-        }
-    }
-
-    public void sendShowDocumentCmd( String loaderKey, String url )
-    {
-        Main.debug( "sendShowDocumentCmd from context#" + loaderKey + " url = " + url );
-
-        //length = length of args + 2 for seps + 1 for end + 1 for code
-        int length = loaderKey.length() + url.length() + 4;
-        char[] chars = new char[ length + 8 ]; //8 for the length of this message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowDocumentCode;
-        chars[index++] = sep;
-
-        tmpchar = loaderKey.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = url.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    public void sendShowDocumentCmd( String contextID, String url, String frame)
-    {
-        Main.debug( "sendShowDocumentCmd from context#" + contextID +
-                         " url = " + url + ", frame = " + frame );
-
-        //length = length of args plus code, 3 seps, end
-        int length = contextID.length() + url.length() + frame.length() + 5;
-        char[] chars = new char[ length + 8 ]; //for length of message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowURLInFrameCode;
-        chars[index++] = sep;
-
-        tmpchar = contextID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = url.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = frame.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    public void sendShowStatusCmd( String contextID, String msg )
-    {
-        Main.debug( "sendShowStatusCmd, contextID = " + contextID + " msg = " + msg );
-
-        int length = contextID.length() + msg.length() + 4;
-        char[] chars = new char[ length + 8 ]; //for length of message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowStatusCode;
-        chars[index++] = sep;
-
-        tmpchar = contextID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = msg.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    public void sendResizeAppletCmd( String contextID, String appletID,
-                                     int width, int height )
-    {
-        Main.debug( "sendResizeAppletCmd, contextID = " + contextID + ", appletID = " + 
-                    appletID + ", width = " + width + ", height = " + height );
-
-        String width_str = String.valueOf( width );
-        String height_str = String.valueOf( height );
-
-        //lenght = length of args plus code, 4 seps, end
-        int length = contextID.length() + appletID.length() + width_str.length() +
-                     height_str.length() + 6;
-        char[] chars = new char[ length + 8 ]; //for length of message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowStatusCode;
-        chars[index++] = sep;
-
-        tmpchar = contextID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = appletID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = width_str.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = height_str.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    /**************************************************************
-     *****  Utility functions for parsing commands ****************
-     **************************************************************/
-    private String getArg( byte[] command )
-    {
-        int begin = cmd_index;
-        while( 0 != ((int) command[cmd_index++]) );
-
-        if( cmd_index > (begin + 1) )
-        {
-            String rval = new String( command, begin, (cmd_index - begin - 1) );
-            return rval;
-        }
-        else
-            return null;
-    }
-
-    private char[] getPaddedLength( int length )
-    {
-        String length_str = String.valueOf( length );
-
-        int pads = 8 - length_str.length();
-        String space = new String( " " );
-        String rval = length_str;
-        for( int i = 0; i < pads; i++ )
-        {
-            rval = space.concat( rval );
-        }
-
-        if( rval.length() != 8 )
-        {
-           throw new IllegalArgumentException( "can't create string number of length = 8" );
-        }
-
-        return rval.toCharArray();
-    }
-
-    private int readPaddedLength( int string_size )
-        throws IOException
-    {
-            //read in 8 bytes for command length- length will be sent as a padded string
-            byte[] length = new byte[string_size];
-            commands.read( length, 0, string_size );
-
-            String length_str = new String( length );
-            return Integer.parseInt( length_str.trim() );
-    }
-
-}
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASSecurityManager.java b/WebCore/khtml/java/org/kde/kjas/server/KJASSecurityManager.java
deleted file mode 100644
index d3b1281..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASSecurityManager.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.kde.kjas.server;
-
-import java.security.*;
-
-
-public class KJASSecurityManager extends SecurityManager
-{
-    public KJASSecurityManager()
-    {
-    }
-}
diff --git a/WebCore/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java b/WebCore/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java
deleted file mode 100644
index 8761e9b..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.kde.kjas.server;
-
-import java.applet.*;
-import java.net.*;
-
-public class KJASSoundPlayer implements AudioClip
-{
-    private URL file;
-
-    public KJASSoundPlayer( URL _file )
-    {
-        file = _file;
-    }
-
-    public void loop()
-    {
-    }
-
-    public void play()
-    {
-    }
-
-    public void stop()
-    {
-    }
-}
-
diff --git a/WebCore/khtml/java/org/kde/kjas/server/Main.java b/WebCore/khtml/java/org/kde/kjas/server/Main.java
deleted file mode 100644
index 53da10a..0000000
--- a/WebCore/khtml/java/org/kde/kjas/server/Main.java
+++ /dev/null
@@ -1,133 +0,0 @@
-    package org.kde.kjas.server;
-
-import java.io.*;
-import java.security.*;
-import java.net.*;
-
-/**
- *  KJAS server recognizes these variablers:
- *    kjas.debug - makes server actions verbose
- *    kjas.showConsole - shows Java Console window
- *    kjas.log - save a transcript of the debug output to /tmp/kjas.log
- */
-
-public class Main
-{
-    //We need to save a reference to the original stdout
-    //for sending messages back
-    public  static final PrintStream         protocol_stdout;
-    public  static final KJASProtocolHandler protocol;
-    public  static final KJASConsole         console;
-    private static final boolean             show_console;
-    public  static final boolean             Debug;
-    public  static final boolean             log;
-    private static boolean                   good_jdk = true;
-
-    /**************************************************************************
-     * Initialization
-     **************************************************************************/
-    static
-    {
-        if( System.getProperty( "kjas.debug" ) != null )
-            Debug = true;
-        else
-            Debug = false;
-
-        if( System.getProperty( "kjas.showConsole" ) != null )
-            show_console = true;
-        else
-            show_console = false;
-
-        if( System.getProperty( "kjas.log" ) != null )
-            log = true;
-        else
-            log = false;
-
-        protocol_stdout = System.out;
-        console         = new KJASConsole();
-        protocol        = new KJASProtocolHandler( System.in, protocol_stdout );
-
-        Main.debug( "JVM version = " + System.getProperty( "java.version" ) );
-        String version = System.getProperty("java.version").substring( 0, 3 );
-        Main.debug( "JVM numerical version = " + version );
-        try
-        {
-            float java_version = Float.parseFloat( version );
-            if( java_version < 1.2 )
-                good_jdk = false;
-        } catch( NumberFormatException e )
-        {
-            good_jdk = false;
-        }
-    }
-
-    /**************************************************************************
-     * Public Utility functions available to the KJAS framework
-     **************************************************************************/
-    public static void debug( String msg )
-    {
-        if( Debug )
-        {
-            System.out.println( "KJAS: " + msg );
-        }
-    }
-
-    public static void kjas_err( String msg, Exception e )
-    {
-        System.err.println( msg );
-        System.err.println( "Backtrace: " );
-        e.printStackTrace();
-    }
-
-    public static void kjas_err( String msg, Throwable t )
-    {
-        System.err.println( msg );
-        t.printStackTrace();
-    }
-
-
-    /**************************************************************************
-     * Main- create the command loop
-     **************************************************************************/
-    public static void main( String[] args )
-    {
-        if( !good_jdk )
-        {
-            console.setVisible( true );
-            System.err.println( "ERROR: This version of Java is not supported for security reasons." );
-            System.err.println( "\t\tPlease use Java version 1.2 or higher." );
-            return;
-        }
-
-        if( show_console )
-            console.setVisible( true );
-
-
-        try  //Check for the JSSE packages, and install them
-        {
-            //set this property first
-            System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
-            if( Security.getProvider( "SunJSSE" ) == null )
-            {
-                Class provider = Class.forName("com.sun.net.ssl.internal.ssl.Provider");
-                if( provider != null )
-                {
-                    Main.debug( "adding Security Provider" );
-                    Provider p = (Provider) provider.newInstance();
-                    Security.addProvider( p );
-                }
-                else
-                    Main.debug( "could not get class: com.sun.net.ssl.internal.ssl.Provider" );
-            }
-            else
-                Main.debug( "could not get provider: SunJSSE" );
-        } catch( Exception e )
-        {
-            System.out.println( "Unable to load JSSE SSL stream handler, https support not available" );
-        }
-
-        //start the command parsing
-        protocol.commandLoop();
-    }
-
-}
diff --git a/WebCore/khtml/java/tests/badapplets/BadApplet.jar b/WebCore/khtml/java/tests/badapplets/BadApplet.jar
deleted file mode 100644
index fc9c274..0000000
Binary files a/WebCore/khtml/java/tests/badapplets/BadApplet.jar and /dev/null differ
diff --git a/WebCore/khtml/java/tests/badapplets/BadApplet.java b/WebCore/khtml/java/tests/badapplets/BadApplet.java
deleted file mode 100644
index 6334097..0000000
--- a/WebCore/khtml/java/tests/badapplets/BadApplet.java
+++ /dev/null
@@ -1,202 +0,0 @@
-import java.awt.*;
-import java.awt.event.*;
-import java.applet.*;
-import javax.swing.*;
-import java.io.*;
-import java.net.*;
-import java.awt.datatransfer.*;
-
-public class BadApplet extends JApplet {
-    JTabbedPane tabs        = new JTabbedPane();
-    JPanel FileSystemTests  = new JPanel();
-    JPanel NetworkTests     = new JPanel();
-    JPanel EnvironmentTests = new JPanel();
-
-    JButton writeFileButton      = new JButton("Write File");
-    JButton readFileButton       = new JButton("Read File");
-    JButton connectSocketButton  = new JButton("Connect Socket");
-    JButton frameButton          = new JButton("Open Frame Without Warning Tag");
-    JButton readSystemPropButton = new JButton("Read System Property");
-    JButton printButton          = new JButton("Print");
-    JButton clipBoardButton      = new JButton("Read Clipboard");
-
-    JTextField writePath         = new JTextField( "/amd/ns/root/home/sbarnes/test.txt" );
-    JTextField readPath          = new JTextField("/amd/ns/root/home/sbarnes/test.txt");
-    JTextField url               = new JTextField("URL");
-    JTextField port              = new JTextField("port");
-    JTextField systemProp        = new JTextField("os.name");
-    JTextField output            = new JTextField();
-
-    //Construct the applet
-    public BadApplet() {
-        try {
-            //event handlers ******************************************************
-            writeFileButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    writeFileButton_actionPerformed(e);
-                }
-            });
-            readFileButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    readFileButton_actionPerformed(e);
-                }
-            });
-            connectSocketButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    connectSocketButton_actionPerformed(e);
-                }
-            });
-            frameButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                frameButton_actionPerformed(e);
-                }
-            });
-            readSystemPropButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    readSystemPropButton_actionPerformed(e);
-                }
-            });
-            printButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    printButton_actionPerformed(e);
-                }
-            });
-            clipBoardButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    clipBoard_actionPerformed(e);
-                }
-            });
-
-            //do layout ***********************************************************
-            getContentPane().setLayout( new BorderLayout() );
-
-            FileSystemTests.setLayout( new FlowLayout( FlowLayout.LEFT ) );
-            FileSystemTests.add( writeFileButton );
-            FileSystemTests.add( writePath );
-            FileSystemTests.add( readFileButton );
-            FileSystemTests.add( readPath );
-
-            NetworkTests.setLayout( new FlowLayout( FlowLayout.LEFT ) );
-            NetworkTests.add( connectSocketButton );
-            NetworkTests.add( url );
-            NetworkTests.add( port );
-
-            EnvironmentTests.setLayout( new FlowLayout( FlowLayout.LEFT ) );
-            EnvironmentTests.add( frameButton );
-            EnvironmentTests.add( readSystemPropButton );
-            EnvironmentTests.add( systemProp );
-            EnvironmentTests.add( printButton );
-            EnvironmentTests.add( clipBoardButton );
-
-            tabs.add( FileSystemTests, "File System" );
-            tabs.add( NetworkTests, "Network" );
-            tabs.add( EnvironmentTests, "Environment" );
-
-            this.getContentPane().add( tabs, BorderLayout.CENTER );
-            this.getContentPane().add( output, BorderLayout.SOUTH );
-        }
-        catch(Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void paint( Graphics g )
-    {
-        System.out.println( "graphics g = " + g );
-        System.out.println( "clip area = " + g.getClip() );
-        System.out.println( "bounds of the clip area = " + g.getClipBounds() );
-
-        super.paint( g );
-    }
-
-    //Initialize the applet
-    public void init() {}
-
-    void writeFileButton_actionPerformed(ActionEvent e) {
-        try{
-            PrintWriter writer = new PrintWriter(new FileOutputStream(writePath.getText()));
-            writer.println("Here is some text");
-            writer.close();
-            output.setText("Write was successfull");
-        } catch (Exception ex){output.setText(ex.getMessage());}
-    }
-
-    void readSystemPropButton_actionPerformed(ActionEvent e) {
-        try{
-            output.setText(System.getProperty(systemProp.getText()));
-        } catch (Exception ex){output.setText("Error getting prop: " + ex.getMessage());}
-    }
-
-    void readFileButton_actionPerformed(ActionEvent e) {
-        try{
-            BufferedReader reader = new BufferedReader(new FileReader(readPath.getText()));
-            output.setText("Read was successfull: " + reader.readLine());
-        } catch (Exception ex){output.setText(ex.getMessage());}
-    }
-
-    void connectSocketButton_actionPerformed(ActionEvent e) {
-        try{
-            Integer thePort = new Integer(port.getText());
-            Socket socket = new Socket(url.getText(), thePort.intValue());
-            socket.getOutputStream();
-            output.setText("Socket connection successfull");
-        } catch (Exception ex){output.setText("Socket unsuccessfull: " + ex.getMessage());}
-    }
-
-    void frameButton_actionPerformed(ActionEvent e) {
-        JFrame frame = new JFrame("Does this Frame have a warning sign");
-        frame.setSize(200,200);
-        frame.show();
-        if (frame.getWarningString() == null)
-            output.setText("No warning string in frame");
-        else
-            output.setText(frame.getWarningString());
-    }
-
-    void clipBoard_actionPerformed(ActionEvent e) {
-        try {
-            Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
-
-            Transferable trans = clip.getContents(null);
-            if (trans == null){
-                output.setText("Clipboard is empty");
-                return;
-            }
-            output.setText((String)trans.getTransferData(DataFlavor.stringFlavor));
-        }catch(Exception ex){ex.getMessage();}
-    }
-
-    void printButton_actionPerformed(ActionEvent e) {
-        try{
-            JFrame testFrame = new JFrame("test");
-            testFrame.getContentPane().add(this, BorderLayout.CENTER);
-            PrintJob printer = Toolkit.getDefaultToolkit().getPrintJob(testFrame, "Applet Print Test", null);
-
-            if (printer == null){
-                output.setText("PrintJob is null");
-                return;
-            }
-
-            Graphics g = printer.getGraphics();
-            g.drawString("This is the applet print test", 50, 50);
-            g.dispose();
-            printer.end();
-        }catch(Exception ex){ex.getMessage();}
-    }
-
-    //Main method
-    public static void main(String[] args) {
-        BadApplet applet = new BadApplet();
-
-        JFrame frame = new JFrame();
-        frame.setDefaultCloseOperation( WindowConstants.DISPOSE_ON_CLOSE );
-        frame.setTitle("Applet Frame");
-        frame.getContentPane().add(applet, BorderLayout.CENTER);
-        frame.setSize(400,320);
-        frame.setVisible(true);
-
-        applet.init();
-        applet.start();
-    }
-
-}
diff --git a/WebCore/khtml/java/tests/badapplets/applet.html b/WebCore/khtml/java/tests/badapplets/applet.html
deleted file mode 100644
index fe9e47e..0000000
--- a/WebCore/khtml/java/tests/badapplets/applet.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-    <title>SwingSet demo</title>
-  </head>
-
-  <body>
-      <h1>SwingSet demo</h1>
-      <applet code=BadApplet.class
-              archive="BadApplet.jar"
-      	      width=695 height=525>
-      </applet>
-  </body>
-</html>
diff --git a/WebCore/khtml/java/tests/good_sites b/WebCore/khtml/java/tests/good_sites
deleted file mode 100644
index 32b1524..0000000
--- a/WebCore/khtml/java/tests/good_sites
+++ /dev/null
@@ -1,30 +0,0 @@
-http Sites
----------------------------------------------------------
-www.soda.co.uk
-java.sun.com
-www.javaboutique.com
-www.teledyn.com/fun/SaubleBeach
-www.fxapplets.com
-www.quote.com/quotecom/livecharts/
-games.yahoo.com/games/klondike.html
-www.webtrac.co.za/cgi-bin/demo/demo.pl
-www.sodaplay.com/constructor/player.htm
-www.dseffects.com/applets.html
-www.controlzed.com
-javaboutique.internet.com/Durius/
-screening.nasdaq.com/screening/NASDAQSearch.asp
-www.chess.net/play/java
-www.sodaplay.com
-www.indegocomputer.de
-www.kmelektronik.de/root/index.html
-rdufour.mytradecenter.com/applets/Tetris/Tetris.html
-http://www.shiatsu-austria.at
-http://aktien.onvista.de/risk-return-map/
-
-https Sites
----------------------------------------------------------
-https://brokerage-m3.consors.de/ConSors/ 
-https://homebanking.dvg-ka.de/045/index.html
-https://spk-ihb.izb-hb.de/SPK_Deggendorf/index.html
-https://www3.genodirekt.de/homebank.nsf/(rzbks)/xxq1050x?OpenDocument
-https://banking.sonline.de/kreissparkasse-duesseldorf/
diff --git a/WebCore/khtml/java/tests/testkjavaappletserver.cpp b/WebCore/khtml/java/tests/testkjavaappletserver.cpp
deleted file mode 100644
index e1439a0..0000000
--- a/WebCore/khtml/java/tests/testkjavaappletserver.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <kapp.h>
-#include <kcmdlineargs.h>
-#include <kjavaappletserver.h>
-#include <kjavaapplet.h>
-#include <kjavaappletwidget.h>
-#include <kdebug.h>
-#include <qstring.h>
-#include <stdio.h>
-#include <unistd.h>
-
-
-static KCmdLineOptions options[] =
-{
-    { "+[kdelibs_path]", "path to kdelibs directory", 0 },
-    { 0, 0, 0 }
-};
-
-int main(int argc, char **argv)
-{
-    KCmdLineArgs::init( argc, argv, "testKJASSever", "test program", "0.0" );
-
-    KApplication app;
-
-    QString path_to_kdelibs = "/build/wynnw/kde-src";
-
-    KJavaAppletContext* context = new KJavaAppletContext();
-    KJavaAppletWidget *a = new KJavaAppletWidget( context );
-
-    a->show();
-
-    a->applet()->setBaseURL( "file:" + path_to_kdelibs + "/kdelibs/khtml/test/" );
-    a->applet()->setAppletName( "Lake" );
-    a->applet()->setAppletClass( "lake.class" );
-    a->applet()->setParameter( "image", "konqi.gif" );
-
-    a->showApplet();
-    a->applet()->start();
-
-    app.exec();
-}
diff --git a/WebCore/khtml/khtml.desktop b/WebCore/khtml/khtml.desktop
deleted file mode 100644
index 150d08e..0000000
--- a/WebCore/khtml/khtml.desktop
+++ /dev/null
@@ -1,56 +0,0 @@
-[Desktop Entry]
-Type=Service
-Comment=Embeddable HTML viewing component
-Comment[az]=Hopdurula Bilən HTML nümayiş vasitəsi
-Comment[bg]=Елемент за преглед на вградени HTML
-Comment[br]=Parzh HTML gweler enframmus
-Comment[bs]=Umetljiva HTML komponenta
-Comment[ca]=Component visualitzador d'HTML encastable
-Comment[cs]=Komponenta pro zobrazování HTML
-Comment[da]=Html visnings komponent der kan indlejres
-Comment[de]=HTML-Betrachtungskomponente, die sich einbetten lässt
-Comment[el]=Ενσωματώσιμο άρθρωμα προβολής HTML
-Comment[eo]=HTML-rigardo-komponento
-Comment[es]=Componente incrustable para visualizar HTML
-Comment[et]=Põimitav HTMLi näitamise  komponent
-Comment[eu]=HTML ikuspen osagai txertagarria
-Comment[fi]=Upotettava HTML-komponentti
-Comment[fr]=Afficheur HTML incorporé
-Comment[gl]=Compoñente embebible de visualización de HTML
-Comment[he]=HTML תגוצתל העבטה-רב ביכר
-Comment[hr]=Umetljiva HTML komponenta
-Comment[hu]=Beágyazható HTML-néző komponens
-Comment[is]=Ásetjanleg HTML-sjá
-Comment[it]=Componente importabile per la visualizzazione degli HTML
-Comment[ja]=埋め込み可能なHTMLビューコンポーネント
-Comment[ko]=다른 곳에 끼워져서 HTML을 보여주는 콤포넌트
-Comment[lt]=Įdedamas HTML peržiūros komponentas
-Comment[lv]=Iegultā HTML skatīšanas komponente
-Comment[mk]=Вградлива компонента за гледање HTML
-Comment[mt]=Komponent integrat għall-wiri tal-HTML
-Comment[nl]=een inbedbaar HTML-viewercomponent
-Comment[no]=Inkluderbart HTML-visningskomponent
-Comment[no_NY]=Inkluderbart komponent for HTML-vising
-Comment[oc]=Component visualizador d'HTML encastable
-Comment[pl]=Składnik do przeglądania plików HTML
-Comment[pt_BR]=Componente embutível de visualização HTML
-Comment[pt]=Componente embebível para visualizar HTML
-Comment[ru]=Элемент просмотра встраиваемых HTML
-Comment[sk]=Vložiteľný komponent HTML prehliadač
-Comment[sl]=Integriran pregled besedila HTML
-Comment[sr]=Ugradiva komponenta za pregled HTML-a
-Comment[sv]=Inbäddningsbar HTML-visande komponent
-Comment[ta]=¯ð¦À¡¾¢ì¸ÅøÄ HTML ¸¡ðº¢ì ÜÚ
-Comment[tr]=Gömülebilir HTML görüntüleme aracı
-Comment[uk]=Вбудований копмонент-переглядач HTML
-Comment[vi]=Component đềExem HTML có thềEembedd được 
-Comment[xh]=Inxenye yemboniselo elungisiweyo ye HTML
-Comment[zh_CN.GB2312]=嵌入的 HTML 查看部件
-MimeType=text/html;text/xml;
-Icon=konqueror
-Name=KHTML
-Name[da]=KHtml
-Name[fr]=kHTML
-ServiceTypes=KParts/ReadOnlyPart,Browser/View
-X-KDE-Library=libkhtml
-InitialPreference=10
diff --git a/WebCore/khtml/khtml.rc b/WebCore/khtml/khtml.rc
deleted file mode 100644
index f640aae..0000000
--- a/WebCore/khtml/khtml.rc
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="khtmlpart" version="2">
-<MenuBar>
- <Menu name="edit"><text>&amp;Edit</text>
-  <Action name="selectAll" />
-  <Separator />
-  <Action name="find" />
- </Menu>
-</MenuBar>
-</kpartgui>
diff --git a/WebCore/khtml/khtml_browser.rc b/WebCore/khtml/khtml_browser.rc
deleted file mode 100644
index c5667b2..0000000
--- a/WebCore/khtml/khtml_browser.rc
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="khtmlpart" version="8">
-<MenuBar>
- <Menu name="file"><text>&amp;File</text>
-  <Action name="saveBackground" />
-  <Action name="saveDocument" />
-  <Action name="saveFrame" />
-  <Separator />
-  <Action name="printFrame" group="print" />
- </Menu>
- <Menu name="edit"><text>&amp;Edit</text>
-  <Action name="selectAll" />
-  <Separator />
-  <Action name="find" />
- </Menu>
- <Menu name="view"><text>&amp;View</text>
-  <Action name="viewDocumentSource" />
-  <Action name="viewFrameSource" />
-  <Action name="security" />
-  <Action name="setEncoding" />
-<!--
-  <Separator />
-  <Action name="debugRenderTree" />
-  <Action name="debugDOMTree" />
--->
- </Menu>
-</MenuBar>
-<ToolBar name="mainToolBar"><text>Main Toolbar</text>
- <Action name="printFrame" />
- <Action name="find" /> 
- <Action name="incFontSizes" />
- <Action name="decFontSizes" />
- <ActionList name="loadImages" />
- <Separator />
- <Action name="security" />
-</ToolBar>
-</kpartgui>
diff --git a/WebCore/khtml/khtml_ext.cpp b/WebCore/khtml/khtml_ext.cpp
deleted file mode 100644
index a7ff1fe..0000000
--- a/WebCore/khtml/khtml_ext.cpp
+++ /dev/null
@@ -1,518 +0,0 @@
-
-#include "khtml_ext.h"
-#include "khtmlview.h"
-#include "khtml_pagecache.h"
-#include "rendering/render_form.h"
-#include "dom/html_form.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpopupmenu.h>
-#include <qlineedit.h>
-#include <qmetaobject.h>
-
-#include <kdebug.h>
-#include <klocale.h>
-#include <kfiledialog.h>
-#include <kio/job.h>
-#include <ktoolbarbutton.h>
-#include <ktoolbar.h>
-#include <ktempfile.h>
-#include <ksavefile.h>
-#include <kurldrag.h>
-#include <kstringhandler.h>
-
-#include <dom/dom_element.h>
-#include <misc/htmltags.h>
-
-KHTMLPartBrowserExtension::KHTMLPartBrowserExtension( KHTMLPart *parent, const char *name )
-: KParts::BrowserExtension( parent, name )
-{
-    m_part = parent;
-    setURLDropHandlingEnabled( true );
-
-    enableAction( "cut", false );
-    enableAction( "copy", false );
-    enableAction( "paste", false );
-
-    m_connectedToClipboard = false;
-}
-
-int KHTMLPartBrowserExtension::xOffset()
-{
-    return m_part->view()->contentsX();
-}
-
-int KHTMLPartBrowserExtension::yOffset()
-{
-  return m_part->view()->contentsY();
-}
-
-void KHTMLPartBrowserExtension::saveState( QDataStream &stream )
-{
-  kdDebug( 6050 ) << "saveState!" << endl;
-  m_part->saveState( stream );
-}
-
-void KHTMLPartBrowserExtension::restoreState( QDataStream &stream )
-{
-  kdDebug( 6050 ) << "restoreState!" << endl;
-  m_part->restoreState( stream );
-}
-
-void KHTMLPartBrowserExtension::editableWidgetFocused( QWidget *widget )
-{
-    m_editableFormWidget = widget;
-    updateEditActions();
-
-    if ( !m_connectedToClipboard && m_editableFormWidget )
-    {
-        connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
-                 this, SLOT( updateEditActions() ) );
-
-        if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-            connect( m_editableFormWidget, SIGNAL( textChanged( const QString & ) ),
-                     this, SLOT( updateEditActions() ) );
-        else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-            connect( m_editableFormWidget, SIGNAL( textChanged() ),
-                     this, SLOT( updateEditActions() ) );
-
-        m_connectedToClipboard = true;
-    }
-}
-
-void KHTMLPartBrowserExtension::editableWidgetBlurred( QWidget *widget )
-{
-    QWidget *oldWidget = m_editableFormWidget;
-
-    m_editableFormWidget = widget;
-    enableAction( "cut", false );
-    enableAction( "paste", false );
-    m_part->emitSelectionChanged();
-
-    if ( m_connectedToClipboard )
-    {
-        disconnect( QApplication::clipboard(), SIGNAL( dataChanged() ),
-                    this, SLOT( updateEditActions() ) );
-
-        if ( oldWidget )
-        {
-            if ( oldWidget->inherits( "QLineEdit" ) )
-                disconnect( oldWidget, SIGNAL( textChanged( const QString & ) ),
-                            this, SLOT( updateEditActions() ) );
-            else if ( oldWidget->inherits( "QMultiLineEdit" ) )
-                disconnect( oldWidget, SIGNAL( textChanged() ),
-                            this, SLOT( updateEditActions() ) );
-        }
-
-        m_connectedToClipboard = false;
-    }
-}
-
-void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *proxy )
-{
-    if ( m_extensionProxy )
-        disconnect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ),
-                    this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
-
-    m_extensionProxy = proxy;
-
-    if ( m_extensionProxy )
-    {
-        connect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ),
-                 this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
-
-        enableAction( "cut", m_extensionProxy->isActionEnabled( "cut" ) );
-        enableAction( "copy", m_extensionProxy->isActionEnabled( "copy" ) );
-        enableAction( "paste", m_extensionProxy->isActionEnabled( "paste" ) );
-    }
-    else
-    {
-        updateEditActions();
-        enableAction( "copy", false ); // ### re-check this
-    }
-}
-
-void KHTMLPartBrowserExtension::cut()
-{
-    if ( m_extensionProxy )
-    {
-        callExtensionProxyMethod( "cut()" );
-        return;
-    }
-
-    ASSERT( m_editableFormWidget );
-    if ( !m_editableFormWidget )
-        return; // shouldn't happen
-
-    if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-        static_cast<QLineEdit *>( &(*m_editableFormWidget) )->cut();
-    else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-        static_cast<QMultiLineEdit *>( &(*m_editableFormWidget) )->cut();
-}
-
-void KHTMLPartBrowserExtension::copy()
-{
-    if ( m_extensionProxy )
-    {
-        callExtensionProxyMethod( "copy()" );
-        return;
-    }
-
-    kdDebug( 6050 ) << "************! KHTMLPartBrowserExtension::copy()" << endl;
-    if ( !m_editableFormWidget )
-    {
-        // get selected text and paste to the clipboard
-        QString text = m_part->selectedText();
-        QClipboard *cb = QApplication::clipboard();
-        cb->setText(text);
-    }
-    else
-    {
-        if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-            static_cast<QLineEdit *>( &(*m_editableFormWidget) )->copy();
-        else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-            static_cast<QMultiLineEdit *>( &(*m_editableFormWidget) )->copy();
-    }
-}
-
-void KHTMLPartBrowserExtension::paste()
-{
-    if ( m_extensionProxy )
-    {
-        callExtensionProxyMethod( "paste()" );
-        return;
-    }
-
-    ASSERT( m_editableFormWidget );
-    if ( !m_editableFormWidget )
-        return; // shouldn't happen
-
-    if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-        static_cast<QLineEdit *>( &(*m_editableFormWidget) )->paste();
-    else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-        static_cast<QMultiLineEdit *>( &(*m_editableFormWidget) )->paste();
-}
-
-void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method )
-{
-    if ( !m_extensionProxy )
-        return;
-
-    QMetaData *metaData = m_extensionProxy->metaObject()->slot( method );
-    if ( !metaData )
-        return;
-
-    KParts::BrowserExtension *ext = static_cast<KParts::BrowserExtension *>( m_extensionProxy );
-    (ext->*(metaData->ptr))();
-}
-
-void KHTMLPartBrowserExtension::updateEditActions()
-{
-    if ( !m_editableFormWidget )
-    {
-        enableAction( "cut", false );
-        enableAction( "paste", false );
-        return;
-    }
-
-    // ### duplicated from KonqMainWindow::slotClipboardDataChanged
-    QMimeSource *data = QApplication::clipboard()->data();
-    enableAction( "paste", data->provides( "text/plain" ) );
-
-    bool hasSelection = false;
-
-    if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-        hasSelection = static_cast<QLineEdit *>( &(*m_editableFormWidget) )->hasMarkedText();
-    else if ( m_editableFormWidget->inherits( "khtml::TextAreaWidget" ) )
-        hasSelection = static_cast<khtml::TextAreaWidget *>( &(*m_editableFormWidget) )->hasMarkedText();
-
-    enableAction( "copy", hasSelection );
-    enableAction( "cut", hasSelection );
-}
-
-void KHTMLPartBrowserExtension::extensionProxyActionEnabled( const char *action, bool enable )
-{
-    // only forward enableAction calls for actions we actually do foward
-    if ( strcmp( action, "cut" ) == 0 ||
-         strcmp( action, "copy" ) == 0 ||
-         strcmp( action, "paste" ) == 0 )
-        enableAction( action, enable );
-}
-
-void KHTMLPartBrowserExtension::reparseConfiguration()
-{
-  m_part->reparseConfiguration();
-}
-
-void KHTMLPartBrowserExtension::print()
-{
-  m_part->view()->print();
-}
-
-class KHTMLPopupGUIClient::KHTMLPopupGUIClientPrivate
-{
-public:
-  KHTMLPart *m_khtml;
-  KURL m_url;
-  KURL m_imageURL;
-  KAction *m_paPrintFrame;
-  KAction *m_paSaveLinkAs;
-  KAction *m_paSaveImageAs;
-  KAction *m_paCopyLinkLocation;
-  KAction *m_paStopAnimations;
-  KAction *m_paCopyImageLocation;
-  KAction *m_paViewImage;
-  KAction *m_paReloadFrame;
-  KAction *m_paViewFrameSource;
-};
-
-
-KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc, const KURL &url )
-{
-  d = new KHTMLPopupGUIClientPrivate;
-  d->m_khtml = khtml;
-  d->m_url = url;
-
-  setInstance( khtml->instance() );
-
-  actionCollection()->insert( khtml->actionCollection()->action( "selectAll" ) );
-  actionCollection()->insert( khtml->actionCollection()->action( "viewDocumentSource" ) );
-
-  // frameset? -> add "Reload Frame" etc.
-  if ( khtml->parentPart() )
-  {
-    d->m_paReloadFrame = new KAction( i18n( "Reload Frame" ), 0, this, SLOT( slotReloadFrame() ),
-                                      actionCollection(), "reloadframe" );
-    d->m_paViewFrameSource = new KAction( i18n( "View Frame Source" ), 0, d->m_khtml, SLOT( slotViewDocumentSource() ),
-                                          actionCollection(), "viewFrameSource" );
-    // This one isn't in khtml_popupmenu.rc anymore, because Print isn't either,
-    // and because print frame is already in the toolbar and the menu.
-    // But leave this here, so that it's easy to readd it.
-    d->m_paPrintFrame = new KAction( i18n( "Print Frame..." ), "fileprint", 0, d->m_khtml->browserExtension(), SLOT( print() ), actionCollection(), "printFrame" );
-  }
-
-  actionCollection()->insert( khtml->actionCollection()->action( "setEncoding" ) );
-
-  if ( !url.isEmpty() )
-  {
-    d->m_paSaveLinkAs = new KAction( i18n( "&Save Link As..." ), 0, this, SLOT( slotSaveLinkAs() ),
-                                     actionCollection(), "savelinkas" );
-    d->m_paCopyLinkLocation = new KAction( i18n( "Copy Link Location" ), 0, this, SLOT( slotCopyLinkLocation() ),
-                                           actionCollection(), "copylinklocation" );
-  }
-
-  d->m_paStopAnimations = new KAction( i18n( "Stop Animations" ), 0, this, SLOT( slotStopAnimations() ),
-                                       actionCollection(), "stopanimations" );
-
-  DOM::Element e;
-  e = khtml->nodeUnderMouse();
-
-  if ( !e.isNull() && (e.elementId() == ID_IMG ||
-                       (e.elementId() == ID_INPUT && !static_cast<DOM::HTMLInputElement>(e).src().isEmpty())))
-  {
-    d->m_imageURL = KURL( d->m_khtml->url(), e.getAttribute( "src" ).string() );
-    d->m_paSaveImageAs = new KAction( i18n( "Save Image As..." ), 0, this, SLOT( slotSaveImageAs() ),
-                                      actionCollection(), "saveimageas" );
-    d->m_paCopyImageLocation = new KAction( i18n( "Copy Image Location" ), 0, this, SLOT( slotCopyImageLocation() ),
-                                            actionCollection(), "copyimagelocation" );
-    QString name = KStringHandler::csqueeze(d->m_imageURL.fileName()+d->m_imageURL.query(), 25);
-    d->m_paViewImage = new KAction( i18n( "View Image (%1)" ).arg(name), 0, this, SLOT( slotViewImage() ),
-                                            actionCollection(), "viewimage" );
-  }
-
-  setXML( doc );
-  setDOMDocument( QDomDocument(), true ); // ### HACK
-
-  QDomElement menu = domDocument().documentElement().namedItem( "Menu" ).toElement();
-
-  if ( actionCollection()->count() > 0 )
-    menu.insertBefore( domDocument().createElement( "separator" ), menu.firstChild() );
-}
-
-KHTMLPopupGUIClient::~KHTMLPopupGUIClient()
-{
-  delete d;
-}
-
-void KHTMLPopupGUIClient::slotSaveLinkAs()
-{
-  saveURL( d->m_khtml->widget(), i18n( "Save Link As" ), d->m_url );
-}
-
-void KHTMLPopupGUIClient::slotSaveImageAs()
-{
-  saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL );
-}
-
-void KHTMLPopupGUIClient::slotCopyLinkLocation()
-{
-  KURL::List lst;
-  lst.append( d->m_url );
-  QApplication::clipboard()->setData( KURLDrag::newDrag( lst ) );
-}
-
-void KHTMLPopupGUIClient::slotStopAnimations()
-{
-  d->m_khtml->stopAnimations();
-}
-
-void KHTMLPopupGUIClient::slotCopyImageLocation()
-{
-  KURL::List lst;
-  lst.append( d->m_imageURL );
-  QApplication::clipboard()->setData( KURLDrag::newDrag( lst ) );
-}
-
-void KHTMLPopupGUIClient::slotViewImage()
-{
-  d->m_khtml->browserExtension()->createNewWindow(d->m_imageURL.url());
-}
-
-void KHTMLPopupGUIClient::slotReloadFrame()
-{
-  KParts::URLArgs args( d->m_khtml->browserExtension()->urlArgs() );
-  args.reload = true;
-  // reload document
-  d->m_khtml->closeURL();
-  d->m_khtml->browserExtension()->setURLArgs( args );
-  d->m_khtml->openURL( d->m_khtml->url() );
-}
-
-void KHTMLPopupGUIClient::saveURL( QWidget *parent, const QString &caption, const KURL &url, const QString &filter, long cacheId, const QString & suggestedFilename )
-{
-  KFileDialog *dlg = new KFileDialog( QString::null, filter, parent, "filedia", true );
-
-  dlg->setKeepLocation( true );
-
-  dlg->setCaption( caption );
-
-  if (!suggestedFilename.isEmpty())
-    dlg->setSelection( suggestedFilename );
-  else if (!url.fileName().isEmpty())
-    dlg->setSelection( url.fileName() );
-  else
-    dlg->setSelection( QString::fromLatin1("index.html") );
-
-  if ( dlg->exec() )
-  {
-    KURL destURL( dlg->selectedURL() );
-    if ( !destURL.isMalformed() )
-    {
-      bool saved = false;
-      if (KHTMLPageCache::self()->isValid(cacheId))
-      {
-        if (destURL.isLocalFile())
-        {
-          KSaveFile destFile(destURL.path());
-          if (destFile.status() == 0)
-          {
-            KHTMLPageCache::self()->saveData(cacheId, destFile.dataStream());
-            saved = true;
-          }
-        }
-        else
-        {
-          // save to temp file, then move to final destination.
-          KTempFile destFile;
-          if (destFile.status() == 0)
-          {
-            KHTMLPageCache::self()->saveData(cacheId, destFile.dataStream());
-            destFile.close();
-            KURL url2 = KURL();
-            url2.setPath(destFile.name());
-            KIO::move(url2, destURL);
-            saved = true;
-          }
-        }
-      }
-      if(!saved)
-      {
-        /*KIO::Job *job = */ KIO::copy( url, destURL );
-        // TODO connect job result, to display errors
-      }
-    }
-  }
-
-  delete dlg;
-}
-
-KHTMLPartBrowserHostExtension::KHTMLPartBrowserHostExtension( KHTMLPart *part )
-: KParts::BrowserHostExtension( part )
-{
-  m_part = part;
-}
-
-KHTMLPartBrowserHostExtension::~KHTMLPartBrowserHostExtension()
-{
-}
-
-QStringList KHTMLPartBrowserHostExtension::frameNames() const
-{
-  return m_part->frameNames();
-}
-
-const QList<KParts::ReadOnlyPart> KHTMLPartBrowserHostExtension::frames() const
-{
-  return m_part->frames();
-}
-
-bool KHTMLPartBrowserHostExtension::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
-{
-  return m_part->openURLInFrame( url, urlArgs );
-}
-
-KHTMLFontSizeAction::KHTMLFontSizeAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name )
-    : KAction( text, icon, 0, receiver, slot, parent, name )
-{
-    m_direction = direction;
-    m_part = part;
-
-    m_popup = new QPopupMenu;
-    m_popup->insertItem( i18n( "Default font size" ) );
-
-    int m = m_direction ? 1 : -1;
-
-    for ( int i = 1; i < 5; ++i )
-    {
-        int num = i * m;
-        QString numStr = QString::number( num );
-        if ( num > 0 ) numStr.prepend( '+' );
-
-        m_popup->insertItem( i18n( "Font Size %1" ).arg( numStr ) );
-    }
-
-    connect( m_popup, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
-}
-
-KHTMLFontSizeAction::~KHTMLFontSizeAction()
-{
-    delete m_popup;
-}
-
-int KHTMLFontSizeAction::plug( QWidget *w, int index )
-{
-    int containerId = KAction::plug( w, index );
-    if ( containerId == -1 || !w->inherits( "KToolBar" ) )
-        return containerId;
-
-    KToolBarButton *button = static_cast<KToolBar *>( w )->getButton( menuId( containerId ) );
-    if ( !button )
-        return containerId;
-
-    button->setDelayedPopup( m_popup );
-    return containerId;
-}
-
-void KHTMLFontSizeAction::slotActivated( int id )
-{
-    int idx = m_popup->indexOf( id );
-
-    if ( idx == 0 )
-        m_part->setFontBaseInternal( 0, true );
-    else
-        m_part->setFontBaseInternal( idx * ( m_direction ? 1 : -1 ), false );
-}
-
-using namespace KParts;
-#include "khtml_ext.moc"
-
diff --git a/WebCore/khtml/khtml_factory.cpp b/WebCore/khtml/khtml_factory.cpp
deleted file mode 100644
index fa71b64..0000000
--- a/WebCore/khtml/khtml_factory.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "khtml_factory.h"
-#include "khtml_part.h"
-#include "khtml_settings.h"
-
-#include "css/cssstyleselector.h"
-#include "html/html_imageimpl.h"
-#include "rendering/render_style.h"
-#include "misc/loader.h"
-
-#include <kinstance.h>
-#include <kaboutdata.h>
-#include <klocale.h>
-#include <kparts/historyprovider.h>
-
-#include <assert.h>
-
-#include <kdebug.h>
-
-template class QList<KHTMLPart>;
-
-extern "C"
-{
-  void *init_libkhtml()
-  {
-      // We can't use a plain self() here, because that would
-      // return the global factory, which might already exist
-      // at the time init_libkhtml is called! As soon as someone
-      // does new KHTMLPart() in his application and loads up
-      // an html document into that part which either embeds
-      // embeds another KHTMLPart instance via <object> or
-      // as html frame, then we cannot return self(), as
-      // what we return here is what the KLibLoader deletes
-      // in the end, and we don't want the libloader to
-      // delete our global instance. Anyway, the new
-      // KHTMLFactory we create here is very cheap :)
-      // (Simon)
-      return new KHTMLFactory( true );
-  }
-};
-
-KHTMLFactory *KHTMLFactory::s_self = 0;
-unsigned long int KHTMLFactory::s_refcnt = 0;
-KInstance *KHTMLFactory::s_instance = 0;
-KAboutData *KHTMLFactory::s_about = 0;
-KHTMLSettings *KHTMLFactory::s_settings = 0;
-QList<KHTMLPart> *KHTMLFactory::s_parts = 0;
-
-KHTMLFactory::KHTMLFactory( bool clone )
-{
-    if ( clone )
-        ref();
-}
-
-KHTMLFactory::~KHTMLFactory()
-{
-    if ( s_self == this )
-    {
-        assert( !s_refcnt );
-
-        if ( s_instance )
-            delete s_instance;
-        if ( s_about )
-            delete s_about;
-        if ( s_settings )
-            delete s_settings;
-        if ( s_parts )
-        {
-            assert( s_parts->isEmpty() );
-            delete s_parts;
-        }
-
-        s_instance = 0;
-        s_about = 0;
-        s_settings = 0;
-        s_parts = 0;
-
-        kdDebug( 6000 ) << "KHTMLFactory::~KHTMLFactory" << endl;
-        // clean up static data
-        khtml::CSSStyleSelector::clear();
-        khtml::RenderStyle::cleanup();
-        khtml::Cache::clear();
-    }
-    else
-        deref();
-}
-
-KParts::Part *KHTMLFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList & )
-{
-  KHTMLPart::GUIProfile prof = KHTMLPart::DefaultGUI;
-  if ( strcmp( className, "Browser/View" ) == 0 )
-    prof = KHTMLPart::BrowserViewGUI;
-
-  return new KHTMLPart( parentWidget, widgetName, parent, name, prof );
-}
-
-void KHTMLFactory::ref()
-{
-    if ( !s_refcnt && !s_self )
-    {
-        // we can't use a staticdeleter here, because that would mean
-        // that the factory gets deleted from within a qPostRoutine, called
-        // from the QApplication destructor. That however is too late, because
-        // we want to destruct a KInstance object, which involves destructing
-        // a KConfig object, which might call KGlobal::dirs() (in sync()) which
-        // probably is not going to work ;-)
-        // well, perhaps I'm wrong here, but as I'm unsure I try to stay on the
-        // safe side ;-) -> let's use a simple reference counting scheme
-        // (Simon)
-        s_self = new KHTMLFactory;
-        khtml::Cache::init();
-    }
-
-    s_refcnt++;
-}
-
-void KHTMLFactory::deref()
-{
-    if ( !--s_refcnt && s_self )
-    {
-        delete s_self;
-        s_self = 0;
-    }
-}
-
-void KHTMLFactory::registerPart( KHTMLPart *part )
-{
-    if ( !s_parts )
-        s_parts = new QList<KHTMLPart>;
-
-    if ( !s_parts->containsRef( part ) )
-    {
-        s_parts->append( part );
-        ref();
-    }
-}
-
-void KHTMLFactory::deregisterPart( KHTMLPart *part )
-{
-    assert( s_parts );
-
-    if ( s_parts->removeRef( part ) )
-    {
-        if ( s_parts->isEmpty() )
-        {
-            delete s_parts;
-            s_parts = 0;
-        }
-        deref();
-    }
-}
-
-KInstance *KHTMLFactory::instance()
-{
-  assert( s_self );
-
-  if ( !s_instance )
-  {
-    s_about = new KAboutData( "khtml", I18N_NOOP( "KHTML" ), "3.0",
-                              I18N_NOOP( "Embeddable HTML component" ),
-                              KAboutData::License_LGPL );
-    s_about->addAuthor( "Lars Knoll", 0, "knoll at kde.org" );
-    s_about->addAuthor( "Antti Koivisto", 0, "koivisto at kde.org" );
-    s_about->addAuthor( "Waldo Bastian", 0, "bastian at kde.org" );
-    s_about->addAuthor( "Torben Weis", 0, "weis at kde.org" );
-    s_about->addAuthor( "Martin Jones", 0, "mjones at kde.org" );
-    s_about->addAuthor( "Simon Hausmann", 0, "hausmann at kde.org" );
-
-    s_instance = new KInstance( s_about );
-  }
-
-  return s_instance;
-}
-
-KHTMLSettings *KHTMLFactory::defaultHTMLSettings()
-{
-  assert( s_self );
-  if ( !s_settings )
-    s_settings = new KHTMLSettings();
-
-  return s_settings;
-}
-
-using namespace KParts;
-#include "khtml_factory.moc"
-
diff --git a/WebCore/khtml/khtml_find.cpp b/WebCore/khtml/khtml_find.cpp
deleted file mode 100644
index b40b43f..0000000
--- a/WebCore/khtml/khtml_find.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "khtml_find.h"
-#include "khtml_part.h"
-
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kstringhandler.h>
-
-KHTMLFind::KHTMLFind( KHTMLPart *part, QWidget *parent, const char *name )
-: KEdFind( parent, name, false )
-{
-//  connect( this, SIGNAL( done() ),
-//           this, SLOT( slotDone() ) );
-  connect( this, SIGNAL( search() ),
-	   this, SLOT( slotSearch() ) );
-  m_first = true;
-  m_part = part;
-  m_found = false;
-}
-
-KHTMLFind::~KHTMLFind()
-{
-}
-
-void KHTMLFind::slotDone()
-{
-  accept();
-}
-
-void KHTMLFind::slotSearch()
-{
-  if ( m_first )
-  {
-    m_part->findTextBegin();
-    m_first = false;
-  }
-
-  bool forward = !get_direction();
-
-  if ( m_part->findTextNext( getText(), forward, case_sensitive() ) )
-    m_found = true;
-  else if ( m_found )
-  {
-    if ( forward )
-    {
-      if ( KMessageBox::questionYesNo( this,
-           i18n("End of document reached.\n"\
-                "Continue from the beginning?"),
-	   i18n("Find") ) == KMessageBox::Yes )
-      {
-        m_first = true;
-	slotSearch();
-      }
-    }
-    else
-    {
-      if ( KMessageBox::questionYesNo( this,
-           i18n("Beginning of document reached.\n"\
-                "Continue from the end?"),
-	   i18n("Find") ) == KMessageBox::Yes )
-      {
-        m_first = true;
-	slotSearch();
-      }
-    }
-  }
-  else
-    KMessageBox::information( this, 
-    	i18n( "Search string '%1' not found." ).arg(KStringHandler::csqueeze(getText())),
-	i18n( "Find" ) );
-}
-
-void KHTMLFind::setNewSearch()
-{
-  m_first = true;
-  m_found = false;
-}
-
-#include "khtml_find.moc"
diff --git a/WebCore/khtml/khtml_find.h b/WebCore/khtml/khtml_find.h
deleted file mode 100644
index 7ea4d34..0000000
--- a/WebCore/khtml/khtml_find.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_find_h__
-#define __khtml_find_h__
-
-#include <keditcl.h>
-
-class KHTMLPart;
-
-class KHTMLFind : public KEdFind
-{
-  Q_OBJECT
-public:
-  KHTMLFind( KHTMLPart *part, QWidget *parent, const char *name );
-  virtual ~KHTMLFind();
-
-  KHTMLPart *part() const { return m_part; }
-  void setPart( KHTMLPart *part ) { m_part = part; setNewSearch(); }
-  void setNewSearch();
-
-private slots:
-  void slotDone();
-  void slotSearch();
-
-private:
-  bool m_first;
-  bool m_found;
-  KHTMLPart *m_part;
-};
-
-#endif
diff --git a/WebCore/khtml/khtml_pagecache.cpp b/WebCore/khtml/khtml_pagecache.cpp
deleted file mode 100644
index fd9caf6..0000000
--- a/WebCore/khtml/khtml_pagecache.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Waldo Bastian <bastian at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "khtml_pagecache.h"
-
-#include <kstaticdeleter.h>
-#include <ktempfile.h>
-#include <kstddirs.h>
-
-#include <qintdict.h>
-#include <qtimer.h>
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <assert.h>
-
-// We keep 12 pages in memory.
-#ifndef KHTML_PAGE_CACHE_SIZE
-#define KHTML_PAGE_CACHE_SIZE 12
-#endif
-
-template class QList<KHTMLPageCacheDelivery>;
-
-class KHTMLPageCacheEntry
-{
-  friend class KHTMLPageCache;
-public:
-  KHTMLPageCacheEntry(long id);
-
-  ~KHTMLPageCacheEntry();
-
-  void addData(const QByteArray &data);
-
-  void endData();
-
-  bool isValid()
-   { return m_valid; }
-
-  KHTMLPageCacheDelivery *fetchData(QObject *recvObj, const char *recvSlot);
-private:
-  long m_id;
-  bool m_valid;
-  QValueList<QByteArray> m_data;
-  KTempFile *m_file;
-};
-
-class KHTMLPageCachePrivate
-{
-public:
-  long newId;
-  QIntDict<KHTMLPageCacheEntry> dict;
-  QList<KHTMLPageCacheDelivery> delivery;
-  QList<KHTMLPageCacheEntry> expireQueue;
-  bool deliveryActive;
-};
-
-KHTMLPageCacheEntry::KHTMLPageCacheEntry(long id) : m_id(id), m_valid(false)
-{
-  QString path = locateLocal("data", "khtml/cache");
-  m_file = new KTempFile(path);
-  m_file->unlink();
-}
-
-KHTMLPageCacheEntry::~KHTMLPageCacheEntry()
-{
-  delete m_file;
-}
-
-
-void
-KHTMLPageCacheEntry::addData(const QByteArray &data)
-{
-  if (m_file->status() == 0)
-     m_file->dataStream()->writeRawBytes(data.data(), data.size());
-}
-
-void
-KHTMLPageCacheEntry::endData()
-{
-  m_valid = true;
-  if ( m_file->status() == 0) {
-    m_file->dataStream()->device()->flush();
-    m_file->dataStream()->device()->at(0);
-  }
-}
-
-
-KHTMLPageCacheDelivery *
-KHTMLPageCacheEntry::fetchData(QObject *recvObj, const char *recvSlot)
-{
-  // Duplicate fd so that entry can be safely deleted while delivering the data.
-  int fd = dup(m_file->handle());
-  lseek(fd, 0, SEEK_SET);
-  KHTMLPageCacheDelivery *delivery = new KHTMLPageCacheDelivery(fd);
-  recvObj->connect(delivery, SIGNAL(emitData(const QByteArray&)), recvSlot);
-  delivery->recvObj = recvObj;
-  return delivery;
-}
-
-static KStaticDeleter<KHTMLPageCache> pageCacheDeleter;
-
-KHTMLPageCache *KHTMLPageCache::_self = 0;
-
-KHTMLPageCache *
-KHTMLPageCache::self()
-{
-  if (!_self)
-     _self = pageCacheDeleter.setObject(new KHTMLPageCache);
-  return _self;
-}
-
-KHTMLPageCache::KHTMLPageCache()
-{
-  d = new KHTMLPageCachePrivate;
-  d->newId = 1;
-  d->deliveryActive = false;
-}
-
-KHTMLPageCache::~KHTMLPageCache()
-{
-  d->delivery.setAutoDelete(true);
-  d->dict.setAutoDelete(true);
-  delete d;
-}
-
-long
-KHTMLPageCache::createCacheEntry()
-{
-  KHTMLPageCacheEntry *entry = new KHTMLPageCacheEntry(d->newId);
-  d->dict.insert(d->newId, entry);
-  d->expireQueue.append(entry);
-  if (d->expireQueue.count() > KHTML_PAGE_CACHE_SIZE)
-  {
-     KHTMLPageCacheEntry *entry = d->expireQueue.take(0);
-     d->dict.remove(entry->m_id);
-     delete entry;
-  }
-  return (d->newId++);
-}
-
-void
-KHTMLPageCache::addData(long id, const QByteArray &data)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (entry)
-     entry->addData(data);
-}
-
-void
-KHTMLPageCache::endData(long id)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (entry)
-     entry->endData();
-}
-
-void
-KHTMLPageCache::cancelEntry(long id)
-{
-  KHTMLPageCacheEntry *entry = d->dict.take(id);
-  if (entry)
-  {
-     d->expireQueue.removeRef(entry);
-     delete entry;
-  }
-}
-
-bool
-KHTMLPageCache::isValid(long id)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (entry)
-     return entry->isValid();
-  return false;
-}
-
-void
-KHTMLPageCache::fetchData(long id, QObject *recvObj, const char *recvSlot)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (!entry) return;
-
-  // Make this entry the most recent entry.
-  d->expireQueue.removeRef(entry);
-  d->expireQueue.append(entry);
-
-  d->delivery.append( entry->fetchData(recvObj, recvSlot) );
-  if (!d->deliveryActive)
-  {
-     d->deliveryActive = true;
-     QTimer::singleShot(20, this, SLOT(sendData()));
-  }
-}
-
-void
-KHTMLPageCache::cancelFetch(QObject *recvObj)
-{
-  KHTMLPageCacheDelivery *next;
-  for(KHTMLPageCacheDelivery* delivery = d->delivery.first();
-      delivery;
-      delivery = next)
-  {
-      next = d->delivery.next();
-      if (delivery->recvObj == recvObj)
-      {
-         d->delivery.removeRef(delivery);
-         delete delivery;
-      }
-  }
-}
-
-void
-KHTMLPageCache::sendData()
-{
-  if (d->delivery.isEmpty())
-  {
-     d->deliveryActive = false;
-     return;
-  }
-  KHTMLPageCacheDelivery *delivery = d->delivery.take(0);
-  assert(delivery);
-
-  char buf[8192];
-  QByteArray byteArray;
-
-  int n = read(delivery->fd, buf, 8192);
-
-  if ((n < 0) && (errno == EINTR))
-  {
-     // try again later
-     d->delivery.append( delivery );
-  }
-  else if (n <= 0)
-  {
-     // done.
-     delivery->emitData(byteArray); // Empty array
-     delete delivery;
-  }
-  else
-  {
-     byteArray.setRawData(buf, n);
-     delivery->emitData(byteArray);
-     byteArray.resetRawData(buf, n);
-     d->delivery.append( delivery );
-  }
-  QTimer::singleShot(20, this, SLOT(sendData()));
-}
-
-void
-KHTMLPageCache::saveData(long id, QDataStream *str)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  assert(entry);
-
-  int fd = entry->m_file->handle();
-  if ( fd < 0 ) return;
-
-  lseek(fd, 0, SEEK_SET);
-
-  char buf[8192];
-
-  while(true)
-  {
-     int n = read(fd, buf, 8192);
-     if ((n < 0) && (errno == EINTR))
-     {
-        // try again
-        continue;
-     }
-     else if (n <= 0)
-     {
-        // done.
-        break;
-     }
-     else
-     {
-        str->writeRawBytes(buf, n);
-     }
-  }
-}
-
-KHTMLPageCacheDelivery::~KHTMLPageCacheDelivery()
-{
-  close(fd);
-}
-
-#include "khtml_pagecache.moc"
diff --git a/WebCore/khtml/khtml_pagecache.h b/WebCore/khtml/khtml_pagecache.h
deleted file mode 100644
index c296a2b..0000000
--- a/WebCore/khtml/khtml_pagecache.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000  Waldo Bastian <bastian at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_pagecache_h__
-#define __khtml_pagecache_h__
-
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qlist.h>
-
-class KHTMLPageCachePrivate;
-
-/**
- * Singleton Object that handles a binary cache on top of
- * the http cache management of kio.
- *
- * A limited number of HTML pages are stored in this cache. This
- * cache is used for the history and operations like "view source".
- * These operations always want to use the original document and 
- * don't want to fetch the data from the network again.
- *
- * It operates completely independent from the kio_http cache.
- */
-class KHTMLPageCache : public QObject
-{
-  Q_OBJECT
-public:
-  /**
-   * static "constructor".
-   * @return returns a pointer to the cache, if it exists.
-   * creates a new cache otherwise.
-   */
-  static KHTMLPageCache *self();
-  ~KHTMLPageCache();
-  
-  /**
-   * Create a new cache entry. 
-   *
-   * @return a cache entry ID is returned.
-   */
-  long createCacheEntry();
-
-  /**
-   * Add @p data to the cache entry with id @p id.
-   */
-  void addData(long id, const QByteArray &data);
-
-  /**
-   * Signal end of data for the cache entry with id @p id.
-   * After calling this the entry is marked valid 
-   */
-  void endData(long id);
-
-  /**
-   * Cancel the entry.
-   */
-  void cancelEntry(long id);
-
-  /**
-   * @return true when the cache entry with id @p is still valid.
-   * and can be accessed for reading.
-   */
-  bool isValid(long id);
-  
-  /**
-   * Fetch data for cache entry @p id and send it to slot @p recvSlot
-   * in the object @p recvObj
-   */
-  void fetchData(long id, QObject *recvObj, const char *recvSlot);
-
-  /**
-   * Cancel sending data to @p recvObj
-   */
-  void cancelFetch(QObject *recvObj);
-
-  /**
-   * Save the data of cache entry @p id to the datastream @p str
-   */
-  void saveData(long id, QDataStream *str);
-
-private slots:
-  void sendData();
-
-private:  
-  KHTMLPageCache();
-
-  static KHTMLPageCache *_self;
-
-  KHTMLPageCachePrivate *d;  
-};
-
-class KHTMLPageCacheDelivery : public QObject
-{
-   friend class KHTMLPageCache;
-Q_OBJECT
-public:
-   KHTMLPageCacheDelivery(int _fd)
-    : fd(_fd) { }
-   ~KHTMLPageCacheDelivery();
-
-signals:
-   void emitData(const QByteArray &data);
-
-public: 
-   QObject *recvObj;
-   int fd;      
-};
-
-
-#endif
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
deleted file mode 100644
index 75e795d..0000000
--- a/WebCore/khtml/khtml_part.cpp
+++ /dev/null
@@ -1,4301 +0,0 @@
-// -*- c-basic-offset: 2 -*-
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- *                     1999 Lars Knoll <knoll at kde.org>
- *                     1999 Antti Koivisto <koivisto at kde.org>
- *                     2000 Simon Hausmann <hausmann at kde.org>
- *                     2000 Stefan Schimanski <1Stein at gmx.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-//#define SPEED_DEBUG
-#include "khtml_part.h"
-
-#include "khtml_factory.h"
-#include "khtml_run.h"
-#include "khtml_events.h"
-#include "khtml_find.h"
-#include "khtml_ext.h"
-#include "khtml_pagecache.h"
-
-#include "dom/dom_string.h"
-#include "dom/dom_element.h"
-#include "html/html_documentimpl.h"
-#include "html/html_baseimpl.h"
-#include "html/html_miscimpl.h"
-#include "html/html_imageimpl.h"
-#include "html/htmltokenizer.h"
-#include "rendering/render_text.h"
-#include "rendering/render_image.h"
-#include "rendering/render_frames.h"
-#include "misc/htmlhashes.h"
-#include "misc/loader.h"
-#include "xml/dom_textimpl.h"
-#include "xml/dom2_eventsimpl.h"
-#include "css/cssstyleselector.h"
-#include "java/kjavaappletcontext.h"
-using namespace DOM;
-
-#include "khtmlview.h"
-#include "decoder.h"
-#include "ecma/kjs_proxy.h"
-#include "khtml_settings.h"
-
-#include <sys/types.h>
-#include <assert.h>
-#include <unistd.h>
-
-#include <kglobal.h>
-#include <kstddirs.h>
-#include <kio/job.h>
-#include <kparts/historyprovider.h>
-#include <kmimetype.h>
-#include <kdebug.h>
-#include <klocale.h>
-#include <kcharsets.h>
-#include <kmessagebox.h>
-#include <kaction.h>
-#include <kstdaction.h>
-#include <kfiledialog.h>
-#include <ktrader.h>
-#include <kparts/partmanager.h>
-#include <kxmlgui.h>
-#include <kcursor.h>
-#include <kdatastream.h>
-#include <ktempfile.h>
-#include <kglobalsettings.h>
-#include <kurldrag.h>
-
-#include <kssl.h>
-#include <ksslinfodlg.h>
-
-#include <qtextcodec.h>
-
-#include <qstring.h>
-#include <qfile.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qmetaobject.h>
-
-namespace khtml
-{
-  struct ChildFrame
-  {
-      enum Type { Frame, IFrame, Object };
-
-      ChildFrame() { m_bCompleted = false; m_frame = 0L; m_bPreloaded = false; m_type = Frame; m_bNotify = false; }
-
-      ~ChildFrame() {  delete (KHTMLRun*) m_run; }
-
-    RenderPart *m_frame;
-    QGuardedPtr<KParts::ReadOnlyPart> m_part;
-    QGuardedPtr<KParts::BrowserExtension> m_extension;
-    QString m_serviceName;
-    QString m_serviceType;
-    QStringList m_services;
-    bool m_bCompleted;
-    QString m_name;
-    KParts::URLArgs m_args;
-    QGuardedPtr<KHTMLRun> m_run;
-    bool m_bPreloaded;
-    KURL m_workingURL;
-    Type m_type;
-    QStringList m_params;
-    bool m_bNotify;
-  };
-
-};
-
-class FrameList : public QValueList<khtml::ChildFrame>
-{
-public:
-    Iterator find( const QString &name );
-};
-
-int kjs_lib_count = 0;
-
-typedef FrameList::ConstIterator ConstFrameIt;
-typedef FrameList::Iterator FrameIt;
-
-class KHTMLPartPrivate
-{
-public:
-  KHTMLPartPrivate(QObject* parent)
-  {
-    m_doc = 0L;
-    m_decoder = 0L;
-    m_jscript = 0L;
-    m_runningScripts = 0;
-    m_kjs_lib = 0;
-    m_job = 0L;
-    m_bComplete = true;
-    m_bLoadEventEmitted = true;
-    m_bParsing = false;
-    m_bReloading = false;
-    m_manager = 0L;
-    m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
-    m_bClearing = false;
-    m_bCleared = false;
-    m_fontBase = 0;
-    m_bDnd = true;
-    m_startOffset = m_endOffset = 0;
-    m_startBeforeEnd = true;
-    m_linkCursor = KCursor::handCursor();
-    m_loadedImages = 0;
-    m_totalImageCount = 0;
-    m_haveEncoding = false;
-    m_activeFrame = 0L;
-    m_findDialog = 0;
-    m_ssl_in_use = false;
-    m_javaContext = 0;
-    m_cacheId = 0;
-    m_frameNameId = 1;
-
-    m_bJScriptForce = false;
-    m_bJScriptOverride = false;
-    m_bJavaForce = false;
-    m_bJavaOverride = false;
-    m_bPluginsForce = false;
-    m_bPluginsOverride = false;
-    m_onlyLocalReferences = false;
-
-    m_metaRefreshEnabled = true;
-    m_bHTTPRefresh = false;
-
-    m_bFirstData = true;
-    m_submitForm = 0;
-    m_delayRedirect = 0;
-
-    // inherit security settings from parent
-    if(parent && parent->inherits("KHTMLPart"))
-    {
-        KHTMLPart* part = static_cast<KHTMLPart*>(parent);
-        if(part->d)
-        {
-            m_bJScriptForce = part->d->m_bJScriptForce;
-            m_bJScriptOverride = part->d->m_bJScriptOverride;
-            m_bJavaForce = part->d->m_bJavaForce;
-            m_bJavaOverride = part->d->m_bJavaOverride;
-            m_bPluginsForce = part->d->m_bPluginsForce;
-            m_bPluginsOverride = part->d->m_bPluginsOverride;
-            // Same for SSL settings
-            m_ssl_in_use = part->d->m_ssl_in_use;
-            m_onlyLocalReferences = part->d->m_onlyLocalReferences;
-        }
-    }
-
-    m_focusNodeNumber = 0;
-    m_focusNodeRestored = false;
-    m_opener = 0;
-    m_openedByJS = false;
-  }
-  ~KHTMLPartPrivate()
-  {
-    delete m_extension;
-    delete m_settings;
-    delete m_jscript;
-    if ( m_kjs_lib && !--kjs_lib_count )
-      delete m_kjs_lib;
-    delete m_javaContext;
-  }
-
-  FrameList m_frames;
-  QValueList<khtml::ChildFrame> m_objects;
-
-  QGuardedPtr<KHTMLView> m_view;
-  KHTMLPartBrowserExtension *m_extension;
-  KHTMLPartBrowserHostExtension *m_hostExtension;
-  DOM::DocumentImpl *m_doc;
-  khtml::Decoder *m_decoder;
-  QString m_encoding;
-  QFont::CharSet m_charset;
-  long m_cacheId;
-  QString scheduledScript;
-  DOM::Node scheduledScriptNode;
-
-  KJSProxy *m_jscript;
-  KLibrary *m_kjs_lib;
-  int m_runningScripts;
-  bool m_bJScriptEnabled :1;
-  bool m_bJavaEnabled :1;
-  bool m_bPluginsEnabled :1;
-  bool m_bJScriptForce :1;
-  bool m_bJScriptOverride :1;
-  bool m_bJavaForce :1;
-  bool m_bJavaOverride :1;
-  bool m_bPluginsForce :1;
-  bool m_metaRefreshEnabled :1;
-  bool m_bPluginsOverride :1;
-  int m_frameNameId;
-  KJavaAppletContext *m_javaContext;
-
-  KHTMLSettings *m_settings;
-
-  KIO::TransferJob * m_job;
-
-  QString m_kjsStatusBarText;
-  QString m_kjsDefaultStatusBarText;
-
-  // QStrings for SSL metadata
-  // Note: When adding new variables don't forget to update ::saveState()/::restoreState()!
-  bool m_ssl_in_use;
-  QString m_ssl_peer_cert_subject,
-          m_ssl_peer_cert_issuer,
-          m_ssl_peer_ip,
-          m_ssl_cipher,
-          m_ssl_cipher_desc,
-          m_ssl_cipher_version,
-          m_ssl_cipher_used_bits,
-          m_ssl_cipher_bits,
-          m_ssl_cert_state,
-          m_ssl_good_from,
-          m_ssl_good_until;
-
-  bool m_bComplete:1;
-  bool m_bLoadEventEmitted:1;
-  bool m_bParsing:1;
-  bool m_bReloading:1;
-  bool m_haveEncoding:1;
-  bool m_haveCharset:1;
-  bool m_bHTTPRefresh:1;
-  bool m_onlyLocalReferences :1;
-
-  KURL m_workingURL;
-  KURL m_baseURL;
-  QString m_baseTarget;
-
-  QTimer m_redirectionTimer;
-#ifdef SPEED_DEBUG
-  QTime m_parsetime;
-#endif
-  int m_delayRedirect;
-  QString m_redirectURL;
-
-  KAction *m_paViewDocument;
-  KAction *m_paViewFrame;
-  KAction *m_paSaveBackground;
-  KAction *m_paSaveDocument;
-  KAction *m_paSaveFrame;
-  KAction *m_paSecurity;
-  KSelectAction *m_paSetEncoding;
-  KHTMLFontSizeAction *m_paIncFontSizes;
-  KHTMLFontSizeAction *m_paDecFontSizes;
-  KAction *m_paLoadImages;
-  KAction *m_paFind;
-  KAction *m_paPrintFrame;
-  KAction *m_paSelectAll;
-  KAction *m_paDebugDOMTree;
-  KAction *m_paDebugRenderTree;
-
-  KParts::PartManager *m_manager;
-
-  QString m_popupMenuXML;
-
-  int m_fontBase;
-
-  int m_findPos;
-  DOM::NodeImpl *m_findNode;
-
-  QString m_strSelectedURL;
-  QString m_referrer;
-
-  struct SubmitForm
-  {
-    const char *submitAction;
-    QString submitUrl;
-    QByteArray submitFormData;
-    QString target;
-    QString submitContentType;
-    QString submitBoundary;
-  };
-
-  SubmitForm *m_submitForm;
-
-  bool m_bMousePressed;
-  DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
-
-  DOM::Node m_selectionStart;
-  long m_startOffset;
-  DOM::Node m_selectionEnd;
-  long m_endOffset;
-  QString m_overURL;
-  bool m_startBeforeEnd:1;
-  bool m_bDnd:1;
-  bool m_bFirstData:1;
-  bool m_bClearing:1;
-  bool m_bCleared:1;
-
-  bool m_focusNodeRestored:1;
-  int m_focusNodeNumber;
-
-  QPoint m_dragStartPos;
-#ifdef KHTML_NO_SELECTION
-  QPoint m_dragLastPos;
-#endif
-
-  QCursor m_linkCursor;
-  QTimer m_scrollTimer;
-
-  unsigned long m_loadedImages;
-  unsigned long m_totalImageCount;
-
-  KHTMLFind *m_findDialog;
-
-  struct findState
-  {
-    findState()
-    { caseSensitive = false; direction = false; }
-    QString text;
-    bool caseSensitive;
-    bool direction;
-  };
-
-  findState m_lastFindState;
-
-  //QGuardedPtr<KParts::Part> m_activeFrame;
-  KParts::Part * m_activeFrame;
-  QGuardedPtr<KHTMLPart> m_opener;
-  bool m_openedByJS;
-};
-
-namespace khtml {
-    class PartStyleSheetLoader : public CachedObjectClient
-    {
-    public:
-        PartStyleSheetLoader(KHTMLPart *part, DOM::DOMString url, DocLoader* dl)
-        {
-            m_part = part;
-            m_cachedSheet = dl->requestStyleSheet( url, part->baseURL().url(), QString::null );
-            if (m_cachedSheet)
-		m_cachedSheet->ref( this );
-        }
-        virtual ~PartStyleSheetLoader()
-        {
-            if ( m_cachedSheet ) m_cachedSheet->deref(this);
-        }
-        virtual void setStyleSheet(const DOM::DOMString&, const DOM::DOMString &sheet)
-        {
-          if ( m_part )
-            m_part->setUserStyleSheet( sheet.string() );
-
-            delete this;
-        }
-        QGuardedPtr<KHTMLPart> m_part;
-        khtml::CachedCSSStyleSheet *m_cachedSheet;
-    };
-};
-
-
-FrameList::Iterator FrameList::find( const QString &name )
-{
-    Iterator it = begin();
-    Iterator e = end();
-
-    for (; it!=e; ++it )
-        if ( (*it).m_name==name )
-            break;
-
-    return it;
-}
-
-
-static QString splitUrlTarget(const QString &url, QString *target=0)
-{
-   QString result = url;
-   if(url.left(7) == "target:")
-   {
-      KURL u(url);
-      result = u.ref();
-      if (target)
-         *target = u.host();
-   }
-   return result;
-}
-
-KHTMLPart::KHTMLPart( QWidget *parentWidget, const char *widgetname, QObject *parent, const char *name,
-                      GUIProfile prof )
-: KParts::ReadOnlyPart( parent, name )
-{
-    d = 0;
-    KHTMLFactory::registerPart( this );
-    setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI ); // doesn't work inside init() for derived classes
-    // Why?? :-} (Simon)
-    init( new KHTMLView( this, parentWidget, widgetname ), prof );
-}
-
-KHTMLPart::KHTMLPart( KHTMLView *view, QObject *parent, const char *name, GUIProfile prof )
-: KParts::ReadOnlyPart( parent, name )
-{
-    d = 0;
-    KHTMLFactory::registerPart( this );
-    setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI );
-    assert( view );
-    init( view, prof );
-}
-
-void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
-{
-  if ( prof == DefaultGUI )
-    setXMLFile( "khtml.rc" );
-  else if ( prof == BrowserViewGUI )
-    setXMLFile( "khtml_browser.rc" );
-
-  d = new KHTMLPartPrivate(parent());
-  kdDebug(6050) << "KHTMLPart::init this=" << this << " d=" << d << endl;
-
-  d->m_view = view;
-  setWidget( d->m_view );
-
-  d->m_extension = new KHTMLPartBrowserExtension( this );
-  d->m_hostExtension = new KHTMLPartBrowserHostExtension( this );
-
-  d->m_paLoadImages = 0;
-  d->m_bMousePressed = false;
-  d->m_paViewDocument = new KAction( i18n( "View Document Source" ), 0, this, SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" );
-  d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" );
-  d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" );
-  d->m_paSaveDocument = new KAction( i18n( "&Save As..." ), CTRL+Key_S, this, SLOT( slotSaveDocument() ), actionCollection(), "saveDocument" );
-  d->m_paSaveFrame = new KAction( i18n( "Save &Frame As..." ), 0, this, SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" );
-  d->m_paSecurity = new KAction( i18n( "Security..." ), "unlock", 0, this, SLOT( slotSecurity() ), actionCollection(), "security" );
-  d->m_paDebugRenderTree = new KAction( "print rendering tree to stdout", 0, this, SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" );
-  d->m_paDebugDOMTree = new KAction( "print DOM tree to stdout", 0, this, SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" );
-
-  QString foo1 = i18n("Show Images");
-  QString foo2 = i18n("Show Animated Images");
-  QString foo3 = i18n("Stop Animated Images");
-
-  d->m_paSetEncoding = new KSelectAction( i18n( "Set &Encoding" ), 0, this, SLOT( slotSetEncoding() ), actionCollection(), "setEncoding" );
-  QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
-  encodings.prepend( i18n( "Auto" ) );
-  d->m_paSetEncoding->setItems( encodings );
-  d->m_paSetEncoding->setCurrentItem(0);
-
-  d->m_paIncFontSizes = new KHTMLFontSizeAction( this, true, i18n( "Increase Font Sizes" ), "viewmag+", this, SLOT( slotIncFontSizes() ), actionCollection(), "incFontSizes" );
-  d->m_paDecFontSizes = new KHTMLFontSizeAction( this, false, i18n( "Decrease Font Sizes" ), "viewmag-", this, SLOT( slotDecFontSizes() ), actionCollection(), "decFontSizes" );
-  d->m_paDecFontSizes->setEnabled( false );
-
-  d->m_paFind = KStdAction::find( this, SLOT( slotFind() ), actionCollection(), "find" );
-
-  d->m_paPrintFrame = new KAction( i18n( "Print Frame" ), "frameprint", 0, this, SLOT( slotPrintFrame() ), actionCollection(), "printFrame" );
-
-  d->m_paSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), actionCollection(), "selectAll" );
-
-  // set the default java(script) flags according to the current host.
-  d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled();
-  d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled();
-  d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled();
-
-  connect( this, SIGNAL( completed() ),
-           this, SLOT( updateActions() ) );
-  connect( this, SIGNAL( completed( bool ) ),
-           this, SLOT( updateActions() ) );
-  connect( this, SIGNAL( started( KIO::Job * ) ),
-           this, SLOT( updateActions() ) );
-
-  d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "khtml/khtml_popupmenu.rc", KHTMLFactory::instance() ) );
-
-  connect( khtml::Cache::loader(), SIGNAL( requestDone( const DOM::DOMString &, khtml::CachedObject *) ),
-           this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject *) ) );
-  connect( khtml::Cache::loader(), SIGNAL( requestFailed( const DOM::DOMString &, khtml::CachedObject *) ),
-           this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject *) ) );
-
-  findTextBegin(); //reset find variables
-
-  connect( &d->m_redirectionTimer, SIGNAL( timeout() ),
-           this, SLOT( slotRedirect() ) );
-
-  d->m_view->viewport()->installEventFilter( this );
-}
-
-KHTMLPart::~KHTMLPart()
-{
-  if ( d->m_findDialog )
-      disconnect( d->m_findDialog, SIGNAL( destroyed() ),
-                  this, SLOT( slotFindDialogDestroyed() ) );
-
-  if ( d->m_manager )
-  {
-    d->m_manager->setActivePart( 0 );
-    // Shouldn't we delete d->m_manager here ? (David)
-    // No need to, I would say. We specify "this" as parent qobject
-    // in ::partManager() (Simon)
-  }
-
-  stopAutoScroll();
-  d->m_redirectionTimer.stop();
-
-  if ( d->m_job )
-    d->m_job->kill();
-
-  khtml::Cache::loader()->cancelRequests( m_url.url() );
-
-  disconnect( khtml::Cache::loader(), SIGNAL( requestDone( const DOM::DOMString &, khtml::CachedObject * ) ),
-              this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject * ) ) );
-  disconnect( khtml::Cache::loader(), SIGNAL( requestFailed( const DOM::DOMString &, khtml::CachedObject * ) ),
-              this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject * ) ) );
-
-  clear();
-
-  if ( d->m_view )
-  {
-    d->m_view->hide();
-    d->m_view->viewport()->hide();
-    d->m_view->m_part = 0;
-  }
-
-  delete d; d = 0;
-  KHTMLFactory::deregisterPart( this );
-}
-
-bool KHTMLPart::restoreURL( const KURL &url )
-{
-  // Save charset setting (it was already restored!)
-  QFont::CharSet charset = d->m_charset;
-
-  kdDebug( 6050 ) << "KHTMLPart::restoreURL " << url.url() << endl;
-
-  d->m_redirectionTimer.stop();
-
-  kdDebug( 6050 ) << "closing old URL" << endl;
-  closeURL();
-
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-  d->m_workingURL = url;
-
-  // set the java(script) flags according to the current host.
-  d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host());
-  d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host());
-  d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host());
-  d->m_haveCharset = true;
-  d->m_charset = charset;
-  d->m_settings->setCharset( d->m_charset );
-
-  m_url = url;
-
-  KHTMLPageCache::self()->fetchData( d->m_cacheId, this, SLOT(slotRestoreData(const QByteArray &)));
-
-  emit started( 0L );
-
-  return true;
-}
-
-
-bool KHTMLPart::openURL( const KURL &url )
-{
-  kdDebug( 6050 ) << "KHTMLPart::openURL " << url.url() << endl;
-
-  d->m_redirectionTimer.stop();
-#ifdef SPEED_DEBUG
-  d->m_parsetime.start();
-#endif
-
-  KParts::URLArgs args( d->m_extension->urlArgs() );
-
-  // in case we have a) no frameset, b) the url is identical with the currently
-  // displayed one (except for the htmlref!) , c) the url request is not a POST
-  // operation and d) the caller did not request to reload the page we try to
-  // be smart and instead of reloading the whole document we just jump to the
-  // request html anchor
-  if ( d->m_frames.count() == 0 && d->m_doc && d->m_bComplete &&
-       urlcmp( url.url(), m_url.url(), true, true ) && !args.doPost() && !args.reload )
-  {
-    kdDebug( 6050 ) << "KHTMLPart::openURL now m_url = " << url.url() << endl;
-    m_url = url;
-    emit started( 0L );
-
-    if ( !url.encodedHtmlRef().isEmpty() )
-      gotoAnchor( url.encodedHtmlRef() );
-    else
-      d->m_view->setContentsPos( 0, 0 );
-
-    d->m_bComplete = true;
-    d->m_bParsing = false;
-
-    emitLoadEvent();
-
-    kdDebug( 6050 ) << "completed..." << endl;
-    if ( !d->m_redirectURL.isEmpty() )
-    {
-       emit completed(true);
-    }
-    else emit completed();
-
-    return true;
-  }
-
-  kdDebug( 6050 ) << "closing old URL" << endl;
-  closeURL();
-
-  args.metaData().insert("main_frame_request", parentPart() == 0 ? "TRUE" : "FALSE" );
-  args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE" : "FALSE" );
-  args.metaData().insert("ssl_activate_warnings", "TRUE" );
-  d->m_bReloading = args.reload;
-
-  if ( args.doPost() && (url.protocol().startsWith("http")) )
-  {
-      d->m_job = KIO::http_post( url, args.postData, false );
-      d->m_job->addMetaData("content-type", args.contentType() );
-  }
-  else
-      d->m_job = KIO::get( url, args.reload, false );
-
-  d->m_job->addMetaData(args.metaData());
-
-  connect( d->m_job, SIGNAL( result( KIO::Job * ) ),
-           SLOT( slotFinished( KIO::Job * ) ) );
-  connect( d->m_job, SIGNAL( data( KIO::Job*, const QByteArray &)),
-           SLOT( slotData( KIO::Job*, const QByteArray &)));
-
-  connect( d->m_job, SIGNAL(redirection(KIO::Job*, const KURL&) ),
-           SLOT( slotRedirection(KIO::Job*,const KURL&) ) );
-
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-  d->m_workingURL = url;
-
-  // delete old status bar msg's from kjs (if it _was_ activated on last URL)
-  if( d->m_bJScriptEnabled )
-  {
-     d->m_kjsStatusBarText = QString::null;
-     d->m_kjsDefaultStatusBarText = QString::null;
-  }
-
-  // set the javascript flags according to the current url
-  d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host());
-  d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host());
-  d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host());
-  d->m_settings->resetCharset();
-  d->m_haveCharset = false;
-  d->m_charset = d->m_settings->charset();
-
-  // initializing m_url to the new url breaks relative links when opening such a link after this call and _before_ begin() is called (when the first
-  // data arrives) (Simon)
-  // That has been fixed by calling setBaseURL() in begin(). (Waldo)
-  m_url = url;
-  if(m_url.protocol().startsWith( "http" ) && !m_url.host().isEmpty() &&
-     m_url.path().isEmpty())
-    m_url.setPath("/");
-
-  kdDebug( 6050 ) << "KHTMLPart::openURL now (before started) m_url = " << m_url.url() << endl;
-
-  emit started( d->m_job );
-
-  return true;
-}
-
-bool KHTMLPart::closeURL()
-{
-  if ( d->m_job )
-  {
-    KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
-    d->m_job->kill();
-    d->m_job = 0;
-  }
-
-  d->m_bComplete = true; // to avoid emitting completed() in slotFinishedParsing() (David)
-  d->m_bLoadEventEmitted = true; // don't want that one either
-  d->m_bReloading = false;
-
-  KHTMLPageCache::self()->cancelFetch(this);
-  if ( d->m_bParsing )
-  {
-    kdDebug( 6050 ) << " was still parsing... calling end " << endl;
-    slotFinishedParsing();
-    d->m_bParsing = false;
-  }
-
-  if ( !d->m_workingURL.isEmpty() )
-  {
-    // Aborted before starting to render
-    kdDebug( 6050 ) << "Aborted before starting to render, reverting location bar to " << m_url.prettyURL() << endl;
-    emit d->m_extension->setLocationBarURL( m_url.prettyURL() );
-  }
-
-  d->m_workingURL = KURL();
-
-  khtml::Cache::loader()->cancelRequests( m_url.url() );
-
-  // Stop any started redirections as well!! (DA)
-  if ( d && d->m_redirectionTimer.isActive() )
-    d->m_redirectionTimer.stop();
-
-  // null node activated.
-  emit nodeActivated(Node());
-
-  return true;
-}
-
-DOM::HTMLDocument KHTMLPart::htmlDocument() const
-{
-  if (d->m_doc && d->m_doc->isHTMLDocument())
-    return static_cast<HTMLDocumentImpl*>(d->m_doc);
-  else
-    return static_cast<HTMLDocumentImpl*>(0);
-}
-
-DOM::Document KHTMLPart::document() const
-{
-    return d->m_doc;
-}
-
-
-KParts::BrowserExtension *KHTMLPart::browserExtension() const
-{
-  return d->m_extension;
-}
-
-KHTMLView *KHTMLPart::view() const
-{
-  return d->m_view;
-}
-
-void KHTMLPart::enableJScript( bool enable )
-{
-    setJScriptEnabled( enable );
-}
-
-void KHTMLPart::setJScriptEnabled( bool enable )
-{
-  d->m_bJScriptForce = enable;
-  d->m_bJScriptOverride = true;
-}
-
-bool KHTMLPart::jScriptEnabled() const
-{
-  if ( d->m_bJScriptOverride )
-      return d->m_bJScriptForce;
-  return d->m_bJScriptEnabled;
-}
-
-void KHTMLPart::enableMetaRefresh( bool enable )
-{
-  d->m_metaRefreshEnabled = enable;
-}
-
-bool KHTMLPart::metaRefreshEnabled() const
-{
-  return d->m_metaRefreshEnabled;
-}
-
-KJSProxy *KHTMLPart::jScript()
-{
-  if ( d->m_bJScriptOverride && !d->m_bJScriptForce || !d->m_bJScriptOverride && !d->m_bJScriptEnabled)
-      return 0;
-
-  if ( !d->m_jscript )
-  {
-    KLibrary *lib = KLibLoader::self()->library("kjs_html");
-    if ( !lib )
-      return 0;
-    // look for plain C init function
-    void *sym = lib->symbol("kjs_html_init");
-    if ( !sym ) {
-      delete lib;
-      return 0;
-    }
-    typedef KJSProxy* (*initFunction)(KHTMLPart *);
-    initFunction initSym = (initFunction) sym;
-    d->m_jscript = (*initSym)(this);
-    d->m_kjs_lib = lib;
-    kjs_lib_count++;
-  }
-
-  return d->m_jscript;
-}
-
-QVariant KHTMLPart::executeScript( const QString &script )
-{
-    return executeScript( DOM::Node(), script );
-}
-
-QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
-{
-  //kdDebug(6050) << "KHTMLPart::executeScript n=" << n.nodeName().string().latin1() << "(" << n.nodeType() << ") " << script << endl;
-  KJSProxy *proxy = jScript();
-
-  if (!proxy)
-    return QVariant();
-  d->m_runningScripts++;
-  QVariant ret = proxy->evaluate( script.unicode(), script.length(), n );
-  d->m_runningScripts--;
-  if ( d->m_submitForm )
-      submitFormAgain();
-  if ( d->m_doc )
-    d->m_doc->updateRendering();
-
-  //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
-  return ret;
-}
-
-bool KHTMLPart::scheduleScript(const DOM::Node &n, const QString& script)
-{
-    //kdDebug(6050) << "KHTMLPart::scheduleScript "<< script << endl;
-
-    d->scheduledScript = script;
-    d->scheduledScriptNode = n;
-
-    return true;
-}
-
-QVariant KHTMLPart::executeScheduledScript()
-{
-  if( d->scheduledScript.isEmpty() )
-    return QVariant();
-
-  //kdDebug(6050) << "executing delayed " << d->scheduledScript << endl;
-
-  QVariant ret = executeScript( d->scheduledScriptNode, d->scheduledScript );
-  d->scheduledScript = QString();
-  d->scheduledScriptNode = DOM::Node();
-
-  return ret;
-}
-
-
-void KHTMLPart::enableJava( bool enable )
-{
-  setJavaEnabled( enable );
-}
-
-void KHTMLPart::setJavaEnabled( bool enable )
-{
-  d->m_bJavaForce = enable;
-  d->m_bJavaOverride = true;
-}
-
-bool KHTMLPart::javaEnabled() const
-{
-  if( d->m_bJavaOverride )
-      return d->m_bJavaForce;
-  return d->m_bJavaEnabled;
-}
-
-KJavaAppletContext *KHTMLPart::javaContext()
-{
-  return d->m_javaContext;
-}
-
-KJavaAppletContext *KHTMLPart::createJavaContext()
-{
-  if ( !d->m_javaContext ) {
-      d->m_javaContext = new KJavaAppletContext();
-      connect( d->m_javaContext, SIGNAL(showStatus(const QString&)),
-               this, SIGNAL(setStatusBarText(const QString&)) );
-      connect( d->m_javaContext, SIGNAL(showDocument(const QString&, const QString&)),
-               this, SLOT(slotShowDocument(const QString&, const QString&)) );
-  }
-
-  return d->m_javaContext;
-}
-
-void KHTMLPart::enablePlugins( bool enable )
-{
-    setPluginsEnabled( enable );
-}
-
-void KHTMLPart::setPluginsEnabled( bool enable )
-{
-  d->m_bPluginsForce = enable;
-  d->m_bPluginsOverride = true;
-}
-
-bool KHTMLPart::pluginsEnabled() const
-{
-  if ( d->m_bPluginsOverride )
-      return d->m_bPluginsForce;
-  return d->m_bPluginsEnabled;
-}
-
-void KHTMLPart::slotShowDocument( const QString &url, const QString &target )
-{
-  // this is mostly copied from KHTMLPart::slotChildURLRequest. The better approach
-  // would be to put those functions into a single one.
-  khtml::ChildFrame *child = 0;
-  KParts::URLArgs args;
-  args.frameName = target;
-
-  QString frameName = args.frameName.lower();
-  if ( !frameName.isEmpty() )
-  {
-    if ( frameName == QString::fromLatin1( "_top" ) )
-    {
-      emit d->m_extension->openURLRequest( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_blank" ) )
-    {
-      emit d->m_extension->createNewWindow( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_parent" ) )
-    {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-
-      emit d->m_extension->openURLRequest( url, newArgs );
-      return;
-    }
-    else if ( frameName != QString::fromLatin1( "_self" ) )
-    {
-      khtml::ChildFrame *_frame = recursiveFrameRequest( url, args );
-
-      if ( !_frame )
-      {
-        emit d->m_extension->openURLRequest( url, args );
-        return;
-      }
-
-      child = _frame;
-    }
-  }
-
-  // TODO: handle child target correctly! currently the script are always executed fur the parent
-  if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
-      executeScript( url.right( url.length() - 11) );
-      return;
-  }
-
-  if ( child ) {
-      requestObject( child, KURL(url), args );
-  }  else if ( frameName==QString::fromLatin1("_self") ) // this is for embedded objects (via <object>) which want to replace the current document
-  {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-      emit d->m_extension->openURLRequest( KURL(url), newArgs );
-  }
-}
-
-void KHTMLPart::slotDebugDOMTree()
-{
-  if ( d->m_doc )
-    d->m_doc->printTree();
-}
-
-void KHTMLPart::slotDebugRenderTree()
-{
-  if ( d->m_doc )
-    d->m_doc->renderer()->printTree();
-}
-
-void KHTMLPart::autoloadImages( bool enable )
-{
-  setAutoloadImages( enable );
-}
-
-void KHTMLPart::setAutoloadImages( bool enable )
-{
-  if ( d->m_doc && d->m_doc->docLoader()->autoloadImages() == enable )
-    return;
-
-  if ( d->m_doc )
-    d->m_doc->docLoader()->setAutoloadImages( enable );
-
-  unplugActionList( "loadImages" );
-
-  if ( enable ) {
-    delete d->m_paLoadImages;
-    d->m_paLoadImages = 0;
-  }
-  else if ( !d->m_paLoadImages )
-    d->m_paLoadImages = new KAction( i18n( "Display Images on Page" ), "images_display", 0, this, SLOT( slotLoadImages() ), actionCollection(), "loadImages" );
-
-  if ( d->m_paLoadImages ) {
-    QList<KAction> lst;
-    lst.append( d->m_paLoadImages );
-    plugActionList( "loadImages", lst );
-  }
-}
-
-bool KHTMLPart::autoloadImages() const
-{
-  if ( d->m_doc )
-    return d->m_doc->docLoader()->autoloadImages();
-
-  return true;
-}
-
-void KHTMLPart::clear()
-{
-    kdDebug( 6090 ) << "KHTMLPart::clear() this = " << this << endl;
-  if ( d->m_bCleared )
-    return;
-  d->m_bCleared = true;
-
-  d->m_bClearing = true;
-
-  {
-    ConstFrameIt it = d->m_frames.begin();
-    ConstFrameIt end = d->m_frames.end();
-    for(; it != end; ++it )
-    {
-      // Stop HTMLRun jobs for frames
-      if ( (*it).m_run )
-        delete (*it).m_run;
-    }
-  }
-
-  {
-    QValueList<khtml::ChildFrame>::ConstIterator it = d->m_objects.begin();
-    QValueList<khtml::ChildFrame>::ConstIterator end = d->m_objects.end();
-    for(; it != end; ++it )
-    {
-      // Stop HTMLRun jobs for objects
-      if ( (*it).m_run )
-        delete (*it).m_run;
-    }
-  }
-
-
-  findTextBegin(); // resets d->m_findNode and d->m_findPos
-
-  d->m_mousePressNode = DOM::Node();
-
-
-  if ( d->m_doc )
-  {
-    kdDebug( 6090 ) << "KHTMLPart::clear(): dereferencing the document" << endl;
-    d->m_doc->detach();
-    kdDebug( 6090 ) << "KHTMLPart::clear(): dereferencing done.." << endl;
-  }
-
-  // Moving past doc so that onUnload works.
-  if ( d->m_jscript )
-    d->m_jscript->clear();
-
-  if ( d->m_view )
-    d->m_view->clear();
-
-  // do not dereference the document before the jscript and view are cleared, as some destructors
-  // might still try to access the document.
-  if ( d->m_doc )
-    d->m_doc->deref();
-  d->m_doc = 0;
-
-  delete d->m_decoder;
-
-  d->m_decoder = 0;
-
-  {
-    ConstFrameIt it = d->m_frames.begin();
-    ConstFrameIt end = d->m_frames.end();
-    for(; it != end; ++it )
-    {
-      if ( (*it).m_part )
-      {
-        partManager()->removePart( (*it).m_part );
-        delete (KParts::ReadOnlyPart *)(*it).m_part;
-      }
-    }
-  }
-
-  d->m_frames.clear();
-  d->m_objects.clear();
-
-  delete d->m_javaContext;
-  d->m_javaContext = 0;
-
-  d->m_baseURL = KURL();
-  d->m_baseTarget = QString::null;
-  d->m_delayRedirect = 0;
-  d->m_redirectURL = QString::null;
-  d->m_bHTTPRefresh = false;
-  d->m_bClearing = false;
-  d->m_frameNameId = 1;
-  d->m_bFirstData = true;
-
-  d->m_bMousePressed = false;
-
-  d->m_selectionStart = DOM::Node();
-  d->m_selectionEnd = DOM::Node();
-  d->m_startOffset = 0;
-  d->m_endOffset = 0;
-
-  d->m_totalImageCount = 0;
-  d->m_loadedImages = 0;
-
-  if ( !d->m_haveEncoding )
-    d->m_encoding = QString::null;
-}
-
-bool KHTMLPart::openFile()
-{
-  return true;
-}
-
-DOM::HTMLDocumentImpl *KHTMLPart::docImpl() const
-{
-    if ( d && d->m_doc && d->m_doc->isHTMLDocument() )
-        return static_cast<HTMLDocumentImpl*>(d->m_doc);
-    return 0;
-}
-
-DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
-{
-    if ( d )
-        return d->m_doc;
-    return 0;
-}
-
-/*bool KHTMLPart::isSSLInUse() const
-{
-  return d->m_ssl_in_use;
-}*/
-
-void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
-{
-  assert ( d->m_job == kio_job );
-
-    //kdDebug( 6050 ) << "slotData: " << data.size() << endl;
-  // The first data ?
-  if ( !d->m_workingURL.isEmpty() )
-  {
-      //kdDebug( 6050 ) << "begin!" << endl;
-    d->m_bParsing = true;
-
-    begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
-
-    d->m_doc->docLoader()->setReloading(d->m_bReloading);
-    d->m_workingURL = KURL();
-
-    d->m_cacheId = KHTMLPageCache::self()->createCacheEntry();
-
-    // When the first data arrives, the metadata has just been made available
-    d->m_ssl_in_use = (d->m_job->queryMetaData("ssl_in_use") == "TRUE");
-    kdDebug(6050) << "SSL in use? " << d->m_job->queryMetaData("ssl_in_use") << endl;
-    d->m_paSecurity->setIcon( d->m_ssl_in_use ? "lock" : "unlock" );
-    kdDebug(6050) << "setIcon " << ( d->m_ssl_in_use ? "lock" : "unlock" ) << " done." << endl;
-
-    // Shouldn't all of this be done only if ssl_in_use == true ? (DF)
-
-    d->m_ssl_peer_cert_subject = d->m_job->queryMetaData("ssl_peer_cert_subject");
-    d->m_ssl_peer_cert_issuer = d->m_job->queryMetaData("ssl_peer_cert_issuer");
-    d->m_ssl_peer_ip = d->m_job->queryMetaData("ssl_peer_ip");
-    d->m_ssl_cipher = d->m_job->queryMetaData("ssl_cipher");
-    d->m_ssl_cipher_desc = d->m_job->queryMetaData("ssl_cipher_desc");
-    d->m_ssl_cipher_version = d->m_job->queryMetaData("ssl_cipher_version");
-    d->m_ssl_cipher_used_bits = d->m_job->queryMetaData("ssl_cipher_used_bits");
-    d->m_ssl_cipher_bits = d->m_job->queryMetaData("ssl_cipher_bits");
-    d->m_ssl_good_from = d->m_job->queryMetaData("ssl_good_from");
-    d->m_ssl_good_until = d->m_job->queryMetaData("ssl_good_until");
-    d->m_ssl_cert_state = d->m_job->queryMetaData("ssl_cert_state");
-
-    // Check for charset meta-data
-    QString qData = d->m_job->queryMetaData("charset");
-    if ( !qData.isEmpty() && !d->m_haveEncoding ) // only use information if the user didn't override the settings
-    {
-       d->m_charset = KGlobal::charsets()->charsetForEncoding(qData);
-       d->m_settings->setCharset( d->m_charset );
-       d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding(qData, true) );
-       d->m_haveCharset = true;
-       d->m_encoding = qData;
-    }
-
-    // Support for http-refresh
-    qData = d->m_job->queryMetaData("http-refresh");
-    if( !qData.isEmpty() && d->m_metaRefreshEnabled )
-    {
-      kdDebug(6050) << "HTTP Refresh Request: " << qData << endl;
-      int delay;
-      int pos = qData.find( ';' );
-      if ( pos == -1 )
-        pos = qData.find( ',' );
-
-      if( pos == -1 )
-      {
-        delay = qData.stripWhiteSpace().toInt();
-          scheduleRedirection( qData.toInt(), m_url.url() );
-      }
-      else
-      {
-        int end_pos = qData.length();
-        delay = qData.left(pos).stripWhiteSpace().toInt();
-        while ( qData[++pos] == ' ' );
-        if ( qData.find( "url", pos, false ) == pos )
-        {
-          pos += 3;
-          while (qData[pos] == ' ' || qData[pos] == '=' )
-              pos++;
-          if ( qData[pos] == '"' )
-          {
-              pos++;
-              int index = end_pos-1;
-              while( index > pos )
-              {
-                if ( qData[index] == '"' )
-                    break;
-                index--;
-              }
-              if ( index > pos )
-                end_pos = index;
-          }
-        }
-        qData = KURL( d->m_baseURL, qData.mid(pos, end_pos) ).url();
-        scheduleRedirection( delay, qData );
-      }
-      d->m_bHTTPRefresh = true;
-    }
-  }
-
-  KHTMLPageCache::self()->addData(d->m_cacheId, data);
-  write( data.data(), data.size() );
-}
-
-void KHTMLPart::slotRestoreData(const QByteArray &data )
-{
-  // The first data ?
-  if ( !d->m_workingURL.isEmpty() )
-  {
-     long saveCacheId = d->m_cacheId;
-     begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
-     d->m_cacheId = saveCacheId;
-     d->m_workingURL = KURL();
-  }
-
-  //kdDebug( 6050 ) << "slotRestoreData: " << data.size() << endl;
-  write( data.data(), data.size() );
-
-  if (data.size() == 0)
-  {
-      //kdDebug( 6050 ) << "slotRestoreData: <<end of data>>" << endl;
-     // End of data.
-     if ( d->m_bParsing )
-     {
-        end(); //will emit completed()
-     }
-  }
-}
-
-void KHTMLPart::slotFinished( KIO::Job * job )
-{
-  if (job->error())
-  {
-    KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
-    job->showErrorDialog( /*d->m_view*/ ); // TODO show the error text in this part, instead.
-    d->m_job = 0L;
-    emit canceled( job->errorString() );
-    // TODO: what else ?
-    checkCompleted();
-    return;
-  }
-  //kdDebug( 6050 ) << "slotFinished" << endl;
-
-  KHTMLPageCache::self()->endData(d->m_cacheId);
-
-  if ( d->m_doc && d->m_doc->docLoader()->expireDate())
-      KIO::http_update_cache(m_url, false, d->m_doc->docLoader()->expireDate());
-
-  d->m_workingURL = KURL();
-  d->m_job = 0L;
-
-  if ( d->m_bParsing )
-    end(); //will emit completed()
-}
-
-void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
-{
-  clear();
-  d->m_bCleared = false;
-  d->m_cacheId = 0;
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-
-  // ### the setFontSizes in restore currently doesn't seem to work,
-  // so let's also reset the font base here, so that the font buttons start
-  // at 0 and not at the last used value (would make sense if the sizes
-  // would be restored properly though)
-  d->m_fontBase = 0;
-
-  if(url.isValid())
-      KHTMLFactory::vLinks()->insert( url.url() );
-
-  // ###
-  //stopParser();
-
-  KParts::URLArgs args( d->m_extension->urlArgs() );
-  args.xOffset = xOffset;
-  args.yOffset = yOffset;
-  d->m_extension->setURLArgs( args );
-
-  d->m_referrer = url.url();
-  m_url = url;
-
-  if ( !m_url.isEmpty() )
-  {
-    KURL::List lst = KURL::split( m_url );
-    KURL baseurl;
-    if ( !lst.isEmpty() )
-      baseurl = *lst.begin();
-    // Use this for relative links.
-    // We prefer m_baseURL over m_url because m_url changes when we are
-    // about to load a new page.
-    setBaseURL(baseurl);
-
-    KURL title( baseurl );
-    title.setRef( QString::null );
-    title.setQuery( QString::null );
-    emit setWindowCaption( title.url() );
-  }
-  else
-    emit setWindowCaption( i18n( "no title", "* Unknown *" ) );
-
-  // ### not sure if XHTML documents served as text/xml should use DocumentImpl or HTMLDocumentImpl
-  if (args.serviceType == "text/xml")
-    d->m_doc = new DocumentImpl( d->m_view );
-  else
-    d->m_doc = new HTMLDocumentImpl( d->m_view );
-
-
-
-  d->m_doc->ref();
-  d->m_doc->attach( d->m_view );
-  d->m_doc->setURL( m_url.url() );
-
-  setAutoloadImages( KHTMLFactory::defaultHTMLSettings()->autoLoadImages() );
-  QString userStyleSheet = KHTMLFactory::defaultHTMLSettings()->userStyleSheet();
-  if ( !userStyleSheet.isEmpty() )
-    setUserStyleSheet( KURL( userStyleSheet ) );
-
-  d->m_doc->setRestoreState(args.docState);
-  d->m_doc->open();
-  // clear widget
-  d->m_view->resizeContents( 0, 0 );
-  connect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
-
-  emit d->m_extension->enableAction( "print", true );
-
-  d->m_bParsing = true;
-}
-
-void KHTMLPart::write( const char *str, int len )
-{
-    if ( !d->m_decoder ) {
-        d->m_decoder = new khtml::Decoder();
-        if(d->m_encoding != QString::null)
-            d->m_decoder->setEncoding(d->m_encoding.latin1(), d->m_haveEncoding);
-        else
-            d->m_decoder->setEncoding(settings()->encoding().latin1(), d->m_haveEncoding);
-    }
-  if ( len == 0 )
-    return;
-
-  if ( len == -1 )
-    len = strlen( str );
-
-  QString decoded = d->m_decoder->decode( str, len );
-
-  if(decoded.isEmpty()) return;
-
-  if(d->m_bFirstData) {
-      // determine the parse mode
-      d->m_doc->determineParseMode( decoded );
-      d->m_bFirstData = false;
-
-  //kdDebug(6050) << "KHTMLPart::write haveEnc = " << d->m_haveEncoding << endl;
-      // ### this is still quite hacky, but should work a lot better than the old solution
-      if(d->m_decoder->visuallyOrdered()) d->m_doc->setVisuallyOrdered();
-      if (!d->m_haveCharset)
-      {
-         const QTextCodec *c = d->m_decoder->codec();
-         //kdDebug(6005) << "setting up charset to " << (int) KGlobal::charsets()->charsetForEncoding(c->name()) << endl;
-         d->m_charset = KGlobal::charsets()->charsetForEncoding(c->name());
-         d->m_settings->setCharset( d->m_charset );
-         d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding(c->name(), true ));
-         //kdDebug(6005) << "charset is " << (int)d->m_settings->charset() << endl;
-      }
-      d->m_doc->applyChanges(true, true);
-  }
-
-  Tokenizer* t = d->m_doc->tokenizer();
-  if(t)
-    t->write( decoded, true );
-}
-
-void KHTMLPart::write( const QString &str )
-{
-  if ( str.isNull() )
-    return;
-
-  if(d->m_bFirstData) {
-      // determine the parse mode
-      d->m_doc->setParseMode( DocumentImpl::Strict );
-      d->m_bFirstData = false;
-  }
-  Tokenizer* t = d->m_doc->tokenizer();
-  if(t)
-    t->write( str, true );
-}
-
-void KHTMLPart::end()
-{
-    // make sure nothing's left in there...
-    if(d->m_decoder)
-        write(d->m_decoder->flush());
-    d->m_doc->finishParsing();
-}
-
-void KHTMLPart::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
-{
-    if (!d->m_view) return;
-    d->m_view->paint(p, rc, yOff, more);
-}
-
-void KHTMLPart::stopAnimations()
-{
-  if ( d->m_doc )
-    d->m_doc->docLoader()->setShowAnimations(false);
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( !( *it ).m_part.isNull() && ( *it ).m_part->inherits( "KHTMLPart" ) ) {
-      KParts::ReadOnlyPart* p = ( *it ).m_part;
-      static_cast<KHTMLPart*>( p )->stopAnimations();
-    }
-}
-
-void KHTMLPart::slotFinishedParsing()
-{
-  d->m_bParsing = false;
-  d->m_doc->close();
-  checkEmitLoadEvent();
-  disconnect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
-
-  if (!d->m_view)
-    return; // We are probably being destructed.
-  // check if the scrollbars are really needed for the content
-  // if not, remove them, relayout, and repaint
-
-  d->m_view->restoreScrollBar();
-
-  if ( !m_url.encodedHtmlRef().isEmpty() )
-    gotoAnchor( m_url.encodedHtmlRef() );
-
-#if 0
-  HTMLCollectionImpl imgColl( d->m_doc, HTMLCollectionImpl::DOC_IMAGES );
-
-  d->m_totalImageCount = 0;
-  KURL::List imageURLs;
-  unsigned long i = 0;
-  unsigned long len = imgColl.length();
-  for (; i < len; i++ )
-  {
-    NodeImpl *node = imgColl.item( i );
-    if ( node->id() != ID_IMG )
-      continue;
-
-    QString imgURL = static_cast<DOM::ElementImpl *>( node )->getAttribute( ATTR_SRC ).string();
-    KURL url;
-
-    if ( KURL::isRelativeURL( imgURL ) )
-      url = completeURL( imgURL );
-    else
-      url = KURL( imgURL );
-
-    if ( !imageURLs.contains( url ) )
-    {
-      d->m_totalImageCount++;
-      imageURLs.append( url );
-    }
-  }
-#endif
-
-  checkCompleted();
-}
-
-void KHTMLPart::slotLoaderRequestDone( const DOM::DOMString &/*baseURL*/, khtml::CachedObject *obj )
-{
-
-  if ( obj && obj->type() == khtml::CachedObject::Image )
-  {
-    d->m_loadedImages++;
-
-    // in case we have more images than we originally found, then they are most likely loaded by some
-    // javascript code. as we can't find out the exact number anyway we skip displaying any further image
-    // loading info message :P
-    if ( d->m_loadedImages <= d->m_totalImageCount && autoloadImages())
-      emit d->m_extension->infoMessage( i18n( "%1 of 1 Image loaded", "%1 of %n Images loaded", d->m_totalImageCount ).arg( d->m_loadedImages ) );
-  }
-
-  checkCompleted();
-}
-
-void KHTMLPart::checkCompleted()
-{
-  //kdDebug( 6050 ) << "KHTMLPart::checkCompleted() parsing: " << d->m_bParsing << endl;
-  //kdDebug( 6050 ) << "                           complete: " << d->m_bComplete << endl;
-
-  // restore the cursor position
-  if (d->m_doc && !d->m_bParsing && !d->m_focusNodeRestored)
-  {
-      int focusNodeNumber;
-      if ((focusNodeNumber = d->m_focusNodeNumber))
-      {
-          DOM::ElementImpl *focusNode = 0;
-          while(focusNodeNumber--)
-          {
-              if ((focusNode = d->m_doc->findNextLink(focusNode, true))==0)
-                  break;
-          }
-          if (focusNode)
-          {
-              //QRect focusRect = focusNode->getRect();
-              //d->m_view->ensureVisible(focusRect.x(), focusRect.y());
-              d->m_doc->setFocusNode(focusNode);
-          }
-      }
-      d->m_focusNodeRestored = true;
-  }
-
-  int requests = 0;
-
-  // Any frame that hasn't completed yet ?
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( !(*it).m_bCompleted )
-      return;
-
-  // Are we still parsing - or have we done the completed stuff already ?
-  if ( d->m_bParsing || d->m_bComplete )
-    return;
-
-  // Still waiting for images/scripts from the loader ?
-  requests = khtml::Cache::loader()->numRequests( m_url.url() );
-  //kdDebug( 6060 ) << "number of loader requests: " << requests << endl;
-  if ( requests > 0 )
-    return;
-
-  // OK, completed.
-  // Now do what should be done when we are really completed.
-  d->m_bComplete = true;
-
-  checkEmitLoadEvent(); // if we didn't do it before
-
-  if (!parentPart())
-    emit setStatusBarText(i18n("Done."));
-
-  // check for a <link rel="SHORTCUT ICON" href="url to icon">,
-  // IE extension to set an icon for this page to use in
-  // bookmarks and the locationbar
-  if (!parentPart() && d->m_doc && d->m_doc->isHTMLDocument())
-  {
-      DOM::TagNodeListImpl links(d->m_doc, "LINK");
-      for (unsigned long i = 0; i < links.length(); ++i)
-          if (links.item(i)->isElementNode())
-          {
-              DOM::ElementImpl *link = static_cast<DOM::ElementImpl *>(links.item(i));
-              kdDebug(6005) << "Checking..." << endl;
-              if (link->getAttribute("REL").string().upper() == "SHORTCUT ICON")
-              {
-                  KURL iconURL(d->m_baseURL, link->getAttribute("HREF").string());
-                  if (!iconURL.isEmpty())
-                  {
-                      emit d->m_extension->setIconURL(iconURL);
-                      break;
-                  }
-              }
-          }
-  }
-
-  if ( m_url.encodedHtmlRef().isEmpty() && d->m_view->contentsY() == 0 ) // check that the view has not been moved by the user
-      d->m_view->setContentsPos( d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
-
-  if ( !d->m_redirectURL.isEmpty() )
-  {
-    d->m_redirectionTimer.start( 1000 * d->m_delayRedirect, true );
-    emit completed( true );
-  }
-  else
-    emit completed();
-
-  emit setStatusBarText( i18n("Loading complete") );
-#ifdef SPEED_DEBUG
-  kdDebug(6050) << "DONE: " <<d->m_parsetime.elapsed() << endl;
-#endif
-}
-
-void KHTMLPart::checkEmitLoadEvent()
-{
-  if ( d->m_bLoadEventEmitted || d->m_bParsing )
-    return;
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( (*it).m_run ) // still got a frame running -> too early
-      return;
-  emitLoadEvent();
-}
-
-void KHTMLPart::emitLoadEvent()
-{
-  d->m_bLoadEventEmitted = true;
-  kdDebug(6050) << "KHTMLPart::emitLoadEvent " << this << endl;
-
-  if ( d->m_doc && d->m_doc->isHTMLDocument() ) {
-    HTMLDocumentImpl* hdoc = static_cast<HTMLDocumentImpl*>( d->m_doc );
-
-    if ( hdoc->body() )
-        hdoc->body()->dispatchWindowEvent( EventImpl::LOAD_EVENT, false, false );
-  }
-}
-
-void KHTMLPart::emitUnloadEvent()
-{
-  if ( d->m_doc && d->m_doc->isHTMLDocument() ) {
-    HTMLDocumentImpl* hdoc = static_cast<HTMLDocumentImpl*>( d->m_doc );
-
-    if ( hdoc->body() && d->m_bLoadEventEmitted ) {
-      hdoc->body()->dispatchWindowEvent( EventImpl::UNLOAD_EVENT, false, false );
-      d->m_bLoadEventEmitted = false;
-    }
-  }
-}
-
-const KHTMLSettings *KHTMLPart::settings() const
-{
-  return d->m_settings;
-}
-
-void KHTMLPart::setBaseURL( const KURL &url )
-{
-  d->m_baseURL = url;
-  if ( d->m_baseURL.protocol().startsWith( "http" ) && !d->m_baseURL.host().isEmpty() &&
-       d->m_baseURL.path().isEmpty() )
-    d->m_baseURL.setPath( "/" );
-}
-
-KURL KHTMLPart::baseURL() const
-{
-    if ( d->m_baseURL.isEmpty() )
-        return m_url;
-  return d->m_baseURL;
-}
-
-void KHTMLPart::setBaseTarget( const QString &target )
-{
-  d->m_baseTarget = target;
-}
-
-QString KHTMLPart::baseTarget() const
-{
-  return d->m_baseTarget;
-}
-
-KURL KHTMLPart::completeURL( const QString &url, const QString &/*target*/ )
-{
-  return KURL( d->m_baseURL.isEmpty() ? m_url : d->m_baseURL, url );
-}
-
-void KHTMLPart::scheduleRedirection( int delay, const QString &url )
-{
-    if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
-    {
-       d->m_delayRedirect = delay;
-       d->m_redirectURL = url;
-       if ( d->m_bComplete ) {
-	   d->m_redirectionTimer.stop();
-	   d->m_redirectionTimer.start( 1000 * d->m_delayRedirect, true );
-       }
-    }
-}
-
-void KHTMLPart::slotRedirect()
-{
-  kdDebug( 6050 ) << "KHTMLPart::slotRedirect()" << endl;
-  QString u = d->m_redirectURL;
-  d->m_delayRedirect = 0;
-  d->m_redirectURL = QString::null;
-  QString target;
-  u = splitUrlTarget( u, &target );
-  KParts::URLArgs args;
-  args.reload = true;
-  args.setLockHistory( true );
-  urlSelected( u, 0, 0, target, args );
-}
-
-void KHTMLPart::slotRedirection(KIO::Job*, const KURL& url)
-{
-  // the slave told us that we got redirected
-  // kdDebug( 6050 ) << "redirection by KIO to " << url.url() << endl;
-  emit d->m_extension->setLocationBarURL( url.prettyURL() );
-  d->m_workingURL = url;
-}
-
-// ####
-bool KHTMLPart::setCharset( const QString &name, bool override )
-{
-  QFont f(settings()->stdFontName());
-  KGlobal::charsets()->setQFont(f, KGlobal::charsets()->charsetForEncoding(name) );
-
-  //kdDebug(6005) << "setting to charset " << (int)QFontInfo(f).charSet() <<" " << override << " should be " << name << endl;
-
-  d->m_settings->setDefaultCharset( f.charSet(), override );
-  return true;
-}
-
-bool KHTMLPart::setEncoding( const QString &name, bool override )
-{
-    d->m_encoding = name;
-    d->m_haveEncoding = override;
-
-//    setCharset( name, override );
-     d->m_charset = KGlobal::charsets()->charsetForEncoding(name);
-     d->m_settings->setCharset( d->m_charset );
-     // the script should not be unicode. We need to know the document is eg. arabic to be
-     // able to choose a unicode font that contains arabic glyphs.
-     d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding( name, true ) );
-
-    if( !m_url.isEmpty() ) {
-        // reload document
-        closeURL();
-        KURL url = m_url;
-        m_url = 0;
-        openURL(url);
-    }
-
-    return true;
-}
-
-QString KHTMLPart::encoding()
-{
-    if(d->m_haveEncoding && !d->m_encoding.isEmpty())
-        return d->m_encoding;
-
-    if(d->m_decoder && d->m_decoder->encoding())
-        return QString(d->m_decoder->encoding());
-
-    return(settings()->encoding());
-}
-
-void KHTMLPart::setUserStyleSheet(const KURL &url)
-{
-  if ( d->m_doc && d->m_doc->docLoader() )
-    (void) new khtml::PartStyleSheetLoader(this, url.url(), d->m_doc->docLoader());
-}
-
-void KHTMLPart::setUserStyleSheet(const QString &styleSheet)
-{
-  if ( d->m_doc )
-    d->m_doc->setUserStyleSheet( styleSheet );
-}
-
-bool KHTMLPart::gotoAnchor( const QString &name )
-{
-  if (!d->m_doc)
-      return false;
-  HTMLCollectionImpl *anchors =
-      new HTMLCollectionImpl( d->m_doc, HTMLCollectionImpl::DOC_ANCHORS);
-  anchors->ref();
-  NodeImpl *n = anchors->namedItem(name);
-  anchors->deref();
-
-  if(!n) {
-      kdDebug(6050) << "KHTMLPart::gotoAnchor no node found" << endl;
-      return false;
-  }
-
-  int x = 0, y = 0;
-  HTMLElementImpl *a = static_cast<HTMLElementImpl *>(n);
-  a->getUpperLeftCorner(x, y);
-  d->m_view->setContentsPos(x-50, y-50);
-
-  return true;
-}
-
-void KHTMLPart::setFontSizes( const QValueList<int> &newFontSizes )
-{
-  d->m_settings->setFontSizes( newFontSizes );
-}
-
-QValueList<int> KHTMLPart::fontSizes() const
-{
-  return d->m_settings->fontSizes();
-}
-
-void KHTMLPart::resetFontSizes()
-{
-  d->m_settings->resetFontSizes();
-}
-
-void KHTMLPart::setStandardFont( const QString &name )
-{
-    d->m_settings->setStdFontName(name);
-}
-
-void KHTMLPart::setFixedFont( const QString &name )
-{
-    d->m_settings->setFixedFontName(name);
-}
-
-void KHTMLPart::setURLCursor( const QCursor &c )
-{
-  d->m_linkCursor = c;
-}
-
-const QCursor &KHTMLPart::urlCursor() const
-{
-  return d->m_linkCursor;
-}
-
-bool KHTMLPart::onlyLocalReferences() const
-{
-  return d->m_onlyLocalReferences;
-}
-
-void KHTMLPart::setOnlyLocalReferences(bool enable)
-{
-  d->m_onlyLocalReferences = enable;
-}
-
-void KHTMLPart::findTextBegin()
-{
-  d->m_findPos = -1;
-  d->m_findNode = 0;
-}
-
-bool KHTMLPart::findTextNext( const QRegExp &exp, bool forward )
-{
-    if ( !d->m_doc )
-        return false;
-
-    if(!d->m_findNode) {
-        if (d->m_doc->isHTMLDocument())
-            d->m_findNode = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-        else
-            d->m_findNode = d->m_doc;
-    }
-
-    if ( !d->m_findNode ||
-         d->m_findNode->id() == ID_FRAMESET )
-      return false;
-
-    while(1)
-    {
-        if( (d->m_findNode->nodeType() == Node::TEXT_NODE || d->m_findNode->nodeType() == Node::CDATA_SECTION_NODE) && d->m_findNode->renderer() )
-        {
-            DOMStringImpl *t = (static_cast<TextImpl *>(d->m_findNode))->string();
-            QConstString s(t->s, t->l);
-            d->m_findPos = s.string().find(exp, d->m_findPos+1);
-            if(d->m_findPos != -1)
-            {
-                int x = 0, y = 0;
-        khtml::RenderText *text = static_cast<khtml::RenderText *>(d->m_findNode->renderer());
-                text->posOfChar(d->m_findPos, x, y);
-                d->m_view->setContentsPos(x-50, y-50);
-                return true;
-            }
-        }
-        d->m_findPos = -1;
-
-        NodeImpl *next;
-
-        if ( forward )
-        {
-          next = d->m_findNode->firstChild();
-
-          if(!next) next = d->m_findNode->nextSibling();
-          while(d->m_findNode && !next) {
-              d->m_findNode = d->m_findNode->parentNode();
-              if( d->m_findNode ) {
-                  next = d->m_findNode->nextSibling();
-              }
-          }
-        }
-        else
-        {
-          next = d->m_findNode->lastChild();
-
-          if (!next ) next = d->m_findNode->previousSibling();
-          while ( d->m_findNode && !next )
-          {
-            d->m_findNode = d->m_findNode->parentNode();
-            if( d->m_findNode )
-            {
-              next = d->m_findNode->previousSibling();
-            }
-          }
-        }
-
-        d->m_findNode = next;
-        if(!d->m_findNode) return false;
-    }
-}
-
-bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensitive )
-{
-    if ( !d->m_doc )
-        return false;
-
-    if(!d->m_findNode) {
-        if (d->m_doc->isHTMLDocument())
-            d->m_findNode = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-        else
-            d->m_findNode = d->m_doc;
-    }
-
-    if ( !d->m_findNode ||
-         d->m_findNode->id() == ID_FRAMESET )
-      return false;
-
-    while(1)
-    {
-        if( (d->m_findNode->nodeType() == Node::TEXT_NODE || d->m_findNode->nodeType() == Node::CDATA_SECTION_NODE) && d->m_findNode->renderer() )
-        {
-            DOMStringImpl *t = (static_cast<TextImpl *>(d->m_findNode))->string();
-            QConstString s(t->s, t->l);
-            d->m_findPos = s.string().find(str, d->m_findPos+1, caseSensitive);
-            if(d->m_findPos != -1)
-            {
-                int x = 0, y = 0;
-        static_cast<khtml::RenderText *>(d->m_findNode->renderer())
-            ->posOfChar(d->m_findPos, x, y);
-                d->m_view->setContentsPos(x-50, y-50);
-
-                d->m_selectionStart = d->m_findNode;
-                d->m_startOffset = d->m_findPos;
-                d->m_selectionEnd = d->m_findNode;
-                d->m_endOffset = d->m_findPos + str.length();
-                d->m_startBeforeEnd = true;
-
-                d->m_doc->setSelection( d->m_selectionStart.handle(), d->m_startOffset,
-                                        d->m_selectionEnd.handle(), d->m_endOffset );
-                emitSelectionChanged();
-                return true;
-            }
-        }
-        d->m_findPos = -1;
-
-        NodeImpl *next;
-
-        if ( forward )
-        {
-          next = d->m_findNode->firstChild();
-
-          if(!next) next = d->m_findNode->nextSibling();
-          while(d->m_findNode && !next) {
-              d->m_findNode = d->m_findNode->parentNode();
-              if( d->m_findNode ) {
-                  next = d->m_findNode->nextSibling();
-              }
-          }
-        }
-        else
-        {
-          next = d->m_findNode->lastChild();
-
-          if (!next ) next = d->m_findNode->previousSibling();
-          while ( d->m_findNode && !next )
-          {
-            d->m_findNode = d->m_findNode->parentNode();
-            if( d->m_findNode )
-            {
-              next = d->m_findNode->previousSibling();
-            }
-          }
-        }
-
-        d->m_findNode = next;
-        if(!d->m_findNode) return false;
-    }
-}
-
-QString KHTMLPart::selectedText() const
-{
-  QString text;
-  DOM::Node n = d->m_selectionStart;
-  while(!n.isNull()) {
-      if(n.nodeType() == DOM::Node::TEXT_NODE) {
-        QString str = static_cast<TextImpl *>(n.handle())->data().string();
-        if(n == d->m_selectionStart && n == d->m_selectionEnd)
-          text = str.mid(d->m_startOffset, d->m_endOffset - d->m_startOffset);
-        else if(n == d->m_selectionStart)
-          text = str.mid(d->m_startOffset);
-        else if(n == d->m_selectionEnd)
-          text += str.left(d->m_endOffset);
-        else
-          text += str;
-      }
-      else {
-        // This is our simple HTML -> ASCII transformation:
-        unsigned short id = n.elementId();
-        switch(id) {
-          case ID_TD:
-          case ID_TH:
-          case ID_BR:
-          case ID_HR:
-          case ID_OL:
-          case ID_UL:
-          case ID_LI:
-          case ID_DD:
-          case ID_DL:
-          case ID_DT:
-          case ID_PRE:
-          case ID_BLOCKQUOTE:
-            text += "\n";
-            break;
-          case ID_P:
-          case ID_TR:
-          case ID_H1:
-          case ID_H2:
-          case ID_H3:
-          case ID_H4:
-          case ID_H5:
-          case ID_H6:
-            text += "\n\n";
-            break;
-        }
-      }
-      if(n == d->m_selectionEnd) break;
-      DOM::Node next = n.firstChild();
-      if(next.isNull()) next = n.nextSibling();
-      while( next.isNull() && !n.parentNode().isNull() ) {
-        n = n.parentNode();
-        next = n.nextSibling();
-      }
-
-      n = next;
-    }
-    return text;
-}
-
-bool KHTMLPart::hasSelection() const
-{
-  return ( !d->m_selectionStart.isNull() &&
-           !d->m_selectionEnd.isNull() );
-}
-
-DOM::Range KHTMLPart::selection() const
-{
-    DOM::Range r = document().createRange();DOM::Range();
-    r.setStart( d->m_selectionStart, d->m_startOffset );
-    r.setEnd( d->m_selectionEnd, d->m_endOffset );
-    return r;
-}
-
-
-void KHTMLPart::setSelection( const DOM::Range &r )
-{
-    d->m_selectionStart = r.startContainer();
-    d->m_startOffset = r.startOffset();
-    d->m_selectionEnd = r.endContainer();
-    d->m_endOffset = r.endOffset();
-    d->m_doc->setSelection(d->m_selectionStart.handle(),d->m_startOffset,
-                           d->m_selectionEnd.handle(),d->m_endOffset);
-}
-
-// TODO merge with other overURL (BCI)
-void KHTMLPart::overURL( const QString &url, const QString &target, bool shiftPressed )
-{
-  if( d->m_kjsStatusBarText.isEmpty() || shiftPressed )
-  {
-    overURL( url, target );
-  }
-  else
-  {
-    emit onURL( url );
-    emit setStatusBarText( d->m_kjsStatusBarText );
-    d->m_kjsStatusBarText = QString::null;
-  }
-}
-
-void KHTMLPart::overURL( const QString &url, const QString &target )
-{
-  emit onURL( url );
-
-  if ( url.isEmpty() )
-  {
-    emit setStatusBarText(url);
-    return;
-  }
-
-  if (url.find( QString::fromLatin1( "javascript:" ),0, false ) != -1 )
-  {
-    emit setStatusBarText( url.mid( url.find( "javascript:", 0, false ) ) );
-    return;
-  }
-
-  KURL u = completeURL( url );
-  // special case for <a href="">
-  if ( url.isEmpty() )
-    u.setFileName( url );
-
-  QString com;
-
-  KMimeType::Ptr typ = KMimeType::findByURL( u );
-
-  if ( typ )
-    com = typ->comment( u, false );
-
-  if ( u.isMalformed() )
-  {
-    emit setStatusBarText(u.prettyURL());
-    return;
-  }
-
-  if ( u.isLocalFile() )
-  {
-    // TODO : use KIO::stat() and create a KFileItem out of its result,
-    // to use KFileItem::statusBarText()
-    QCString path = QFile::encodeName( u.path() );
-
-    struct stat buff;
-    bool ok = !stat( path.data(), &buff );
-
-    struct stat lbuff;
-    if (ok) ok = !lstat( path.data(), &lbuff );
-
-    QString text = u.url();
-    QString text2 = text;
-
-    if (ok && S_ISLNK( lbuff.st_mode ) )
-    {
-      QString tmp;
-      if ( com.isNull() )
-        tmp = i18n( "Symbolic Link");
-      else
-        tmp = i18n("%1 (Link)").arg(com);
-      char buff_two[1024];
-      text += " -> ";
-      int n = readlink ( path.data(), buff_two, 1022);
-      if (n == -1)
-      {
-        text2 += "  ";
-        text2 += tmp;
-        emit setStatusBarText(text2);
-        return;
-      }
-      buff_two[n] = 0;
-
-      text += buff_two;
-      text += "  ";
-      text += tmp;
-    }
-    else if ( ok && S_ISREG( buff.st_mode ) )
-    {
-      if (buff.st_size < 1024)
-        text = i18n("%2 (%1 bytes)").arg((long) buff.st_size).arg(text2); // always put the URL last, in case it contains '%'
-      else
-      {
-        float d = (float) buff.st_size/1024.0;
-        text = i18n("%1 (%2 K)").arg(text2).arg(KGlobal::locale()->formatNumber(d, 2)); // was %.2f
-      }
-      text += "  ";
-      text += com;
-    }
-    else if ( ok && S_ISDIR( buff.st_mode ) )
-    {
-      text += "  ";
-      text += com;
-    }
-    else
-    {
-      text += "  ";
-      text += com;
-    }
-    emit setStatusBarText(text);
-  }
-  else
-  {
-    QString extra;
-    if (target == QString::fromLatin1("_blank"))
-    {
-      extra = i18n(" (In new window)");
-    }
-    else if (!target.isEmpty() &&
-             (target != QString::fromLatin1("_top")) &&
-             (target != QString::fromLatin1("_self")) &&
-             (target != QString::fromLatin1("_parent")))
-    {
-      extra = i18n(" (In other frame)");
-    }
-
-    if (u.protocol() == QString::fromLatin1("mailto")) {
-      QString mailtoMsg/* = QString::fromLatin1("<img src=%1>").arg(locate("icon", QString::fromLatin1("locolor/16x16/actions/mail_send.png")))*/;
-      mailtoMsg += i18n("Email to: ") + KURL::decode_string(u.path());
-      QStringList queries = QStringList::split('&', u.query().mid(1));
-      for (QStringList::Iterator it = queries.begin(); it != queries.end(); ++it)
-        if ((*it).startsWith(QString::fromLatin1("subject=")))
-          mailtoMsg += i18n(" - Subject: ") + KURL::decode_string((*it).mid(8));
-        else if ((*it).startsWith(QString::fromLatin1("cc=")))
-          mailtoMsg += i18n(" - CC: ") + KURL::decode_string((*it).mid(3));
-        else if ((*it).startsWith(QString::fromLatin1("bcc=")))
-          mailtoMsg += i18n(" - BCC: ") + KURL::decode_string((*it).mid(4));
-      emit setStatusBarText(mailtoMsg);
-			return;
-    } else if (u.protocol() == QString::fromLatin1("http")) {
-        DOM::Node hrefNode = nodeUnderMouse().parentNode();
-        while (hrefNode.nodeName().string() != QString::fromLatin1("A") && !hrefNode.isNull())
-          hrefNode = hrefNode.parentNode();
-
-/*        // Is this check neccessary at all? (Frerich)
-        if (!hrefNode.isNull()) {
-          DOM::Node hreflangNode = hrefNode.attributes().getNamedItem("HREFLANG");
-          if (!hreflangNode.isNull()) {
-            QString countryCode = hreflangNode.nodeValue().string().lower();
-            // Map the language code to an appropriate country code.
-            if (countryCode == QString::fromLatin1("en"))
-              countryCode = QString::fromLatin1("gb");
-            QString flagImg = QString::fromLatin1("<img src=%1>").arg(
-                locate("locale", QString::fromLatin1("l10n/")
-                + countryCode
-                + QString::fromLatin1("/flag.png")));
-            emit setStatusBarText(flagImg + u.prettyURL() + extra);
-          }
-        }*/
-      }
-    emit setStatusBarText(u.prettyURL() + extra);
-  }
-}
-
-void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target )
-{
-    urlSelected( url, button, state, _target, KParts::URLArgs() );
-}
-
-void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target,
-                             KParts::URLArgs args )
-{
-  bool hasTarget = false;
-
-  QString target = _target;
-  if ( target.isEmpty() )
-    target = d->m_baseTarget;
-  if ( !target.isEmpty() )
-      hasTarget = true;
-
-  if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
-  {
-    executeScript( url.right( url.length() - 11) );
-    return;
-  }
-
-
-  KURL cURL = completeURL( url, target );
-  // special case for <a href="">
-  if ( url.isEmpty() )
-    cURL.setFileName( url );
-
-  if ( !cURL.isValid() )
-    // ### ERROR HANDLING
-    return;
-
-  //kdDebug( 6000 ) << "complete URL:" << cURL.url() << " target = " << target << endl;
-
-  if ( button == LeftButton && ( state & ShiftButton ) )
-  {
-    KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As..." ), cURL );
-    return;
-  }
-
-  if (!checkLinkSecurity(cURL,
-			 i18n( "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" ),
-			 i18n( "Follow" )))
-    return;
-
-  args.frameName = target;
-
-  // For http-refresh, force the io-slave to re-get the page
-  // as needed instead of loading from cache. NOTE: I would
-  // have done a "verify" instead, but I am not sure that servers
-  // will include the correct response (specfically "Refresh:") on
-  // a "HEAD" request which is what a "verify" setting results in.(DA)
-  if ( d->m_bHTTPRefresh )
-  {
-    d->m_bHTTPRefresh = false;
-        args.metaData()["cache"]="reload"; //"verify";
-  }
-
-  args.metaData().insert("main_frame_request",
-                         parentPart() == 0 ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_activate_warnings", "TRUE");
-
-  if ( hasTarget )
-  {
-    // unknown frame names should open in a new window.
-    khtml::ChildFrame *frame = recursiveFrameRequest( cURL, args, false );
-    if ( frame )
-    {
-      args.metaData()["referrer"] = d->m_referrer;
-      requestObject( frame, cURL, args );
-      return;
-    }
-  }
-
-  if ( !d->m_bComplete && !hasTarget )
-    closeURL();
-
-  if (!d->m_referrer.isEmpty())
-    args.metaData()["referrer"] = d->m_referrer;
-
-  if ( button == MidButton && (state & ShiftButton) )
-  {
-    KParts::WindowArgs winArgs;
-    winArgs.lowerWindow = true;
-    KParts::ReadOnlyPart *newPart = 0;
-    emit d->m_extension->createNewWindow( cURL, args, winArgs, newPart );
-    return;
-  }
-  emit d->m_extension->openURLRequest( cURL, args );
-}
-
-void KHTMLPart::slotViewDocumentSource()
-{
-  KURL url(m_url);
-  if (!(url.isLocalFile()) && KHTMLPageCache::self()->isValid(d->m_cacheId))
-  {
-     KTempFile sourceFile(QString::null, QString::fromLatin1(".html"));
-     if (sourceFile.status() == 0)
-     {
-        KHTMLPageCache::self()->saveData(d->m_cacheId, sourceFile.dataStream());
-        url = KURL();
-        url.setPath(sourceFile.name());
-     }
-  }
-
-  //  emit d->m_extension->openURLRequest( m_url, KParts::URLArgs( false, 0, 0, QString::fromLatin1( "text/plain" ) ) );
-  (void) KRun::runURL( url, QString::fromLatin1("text/plain") );
-}
-
-void KHTMLPart::slotViewFrameSource()
-{
-  KParts::ReadOnlyPart *frame = static_cast<KParts::ReadOnlyPart *>( partManager()->activePart() );
-  if ( !frame )
-    return;
-
-  KURL url = frame->url();
-  if (!(url.isLocalFile()) && frame->inherits("KHTMLPart"))
-  {
-       long cacheId = static_cast<KHTMLPart *>(frame)->d->m_cacheId;
-
-       if (KHTMLPageCache::self()->isValid(cacheId))
-       {
-           KTempFile sourceFile(QString::null, QString::fromLatin1(".html"));
-           if (sourceFile.status() == 0)
-           {
-               KHTMLPageCache::self()->saveData(cacheId, sourceFile.dataStream());
-               url = KURL();
-               url.setPath(sourceFile.name());
-           }
-     }
-  }
-
-  (void) KRun::runURL( url, QString::fromLatin1("text/plain") );
-}
-
-void KHTMLPart::slotSaveBackground()
-{
-  // ### what about XML documents? get from CSS?
-  if (!d->m_doc || !d->m_doc->isHTMLDocument())
-    return;
-
-  QString relURL = static_cast<HTMLDocumentImpl*>(d->m_doc)->body()->getAttribute( ATTR_BACKGROUND ).string();
-
-  KURL backgroundURL( m_url, relURL );
-
-  KHTMLPopupGUIClient::saveURL( d->m_view, i18n("Save background image as"), backgroundURL );
-}
-
-void KHTMLPart::slotSaveDocument()
-{
-  KURL srcURL( m_url );
-
-  if ( srcURL.fileName(false).isEmpty() )
-    srcURL.setFileName( "index.html" );
-
-  KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save as" ), srcURL, i18n("*.html *.htm|HTML files"), d->m_cacheId );
-}
-
-void KHTMLPart::slotSecurity()
-{
-//   kdDebug( 6050 ) << "Meta Data:" << endl
-//                   << d->m_ssl_peer_cert_subject
-//                   << endl
-//                   << d->m_ssl_peer_cert_issuer
-//                   << endl
-//                   << d->m_ssl_cipher
-//                   << endl
-//                   << d->m_ssl_cipher_desc
-//                   << endl
-//                   << d->m_ssl_cipher_version
-//                   << endl
-//                   << d->m_ssl_good_from
-//                   << endl
-//                   << d->m_ssl_good_until
-//                   << endl
-//                   << d->m_ssl_cert_state
-//                   << endl;
-
-  KSSLInfoDlg *kid = new KSSLInfoDlg(d->m_ssl_in_use, widget(), "kssl_info_dlg", true );
-  if (d->m_ssl_in_use) {
-    kid->setup(d->m_ssl_peer_cert_subject,
-               d->m_ssl_peer_cert_issuer,
-               d->m_ssl_peer_ip,
-               m_url.url(),
-               d->m_ssl_cipher,
-               d->m_ssl_cipher_desc,
-               d->m_ssl_cipher_version,
-               d->m_ssl_cipher_used_bits.toInt(),
-               d->m_ssl_cipher_bits.toInt(),
-               (KSSLCertificate::KSSLValidation) d->m_ssl_cert_state.toInt(),
-               d->m_ssl_good_from, d->m_ssl_good_until);
-  }
-  kid->exec();
-}
-
-void KHTMLPart::slotSaveFrame()
-{
-    if ( !d->m_activeFrame )
-        return; // should never be the case, but one never knows :-)
-
-    KURL srcURL( static_cast<KParts::ReadOnlyPart *>( d->m_activeFrame )->url() );
-
-    if ( srcURL.fileName(false).isEmpty() )
-        srcURL.setFileName( "index.html" );
-
-    KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save as" ), srcURL, i18n("*.html *.htm|HTML files") );
-}
-
-void KHTMLPart::slotSetEncoding()
-{
-    // first Item is always auto
-    if(d->m_paSetEncoding->currentItem() == 0)
-        setEncoding(QString::null, false);
-    else {
-        // strip of the language to get the raw encoding again.
-        QString enc = KGlobal::charsets()->encodingForName(d->m_paSetEncoding->currentText());
-        setEncoding(enc, true);
-    }
-}
-
-void KHTMLPart::updateActions()
-{
-  bool frames = false;
-
-  QValueList<khtml::ChildFrame>::ConstIterator it = d->m_frames.begin();
-  QValueList<khtml::ChildFrame>::ConstIterator end = d->m_frames.end();
-  for (; it != end; ++it )
-      if ( (*it).m_type == khtml::ChildFrame::Frame )
-      {
-          frames = true;
-          break;
-      }
-
-  d->m_paViewFrame->setEnabled( frames );
-  d->m_paSaveFrame->setEnabled( frames );
-
-  if ( frames )
-    d->m_paFind->setText( i18n( "&Find in Frame" ) );
-  else
-    d->m_paFind->setText( i18n( "&Find" ) );
-
-  KParts::Part *frame = 0;
-
-  if ( frames )
-    frame = partManager()->activePart();
-
-  bool enableFindAndSelectAll = true;
-
-  if ( frame )
-    enableFindAndSelectAll = frame->inherits( "KHTMLPart" );
-
-  d->m_paFind->setEnabled( enableFindAndSelectAll );
-  d->m_paSelectAll->setEnabled( enableFindAndSelectAll );
-
-  bool enablePrintFrame = false;
-
-  if ( frame )
-  {
-    QObject *ext = KParts::BrowserExtension::childObject( frame );
-    if ( ext )
-      enablePrintFrame = ext->metaObject()->slotNames().contains( "print()" );
-  }
-
-  d->m_paPrintFrame->setEnabled( enablePrintFrame );
-
-  QString bgURL;
-
-  // ### frames
-  if ( d->m_doc && d->m_doc->isHTMLDocument() && static_cast<HTMLDocumentImpl*>(d->m_doc)->body() && !d->m_bClearing )
-    bgURL = static_cast<HTMLDocumentImpl*>(d->m_doc)->body()->getAttribute( ATTR_BACKGROUND ).string();
-
-  d->m_paSaveBackground->setEnabled( !bgURL.isEmpty() );
-}
-
-bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
-                              const QStringList &params, bool isIFrame )
-{
-//  kdDebug( 6050 ) << "childRequest( ..., " << url << ", " << frameName << " )" << endl;
-  FrameIt it = d->m_frames.find( frameName );
-  if ( it == d->m_frames.end() )
-  {
-    khtml::ChildFrame child;
-//    kdDebug( 6050 ) << "inserting new frame into frame map " << frameName << endl;
-    child.m_name = frameName;
-    it = d->m_frames.append( child );
-  }
-
-  (*it).m_type = isIFrame ? khtml::ChildFrame::IFrame : khtml::ChildFrame::Frame;
-  (*it).m_frame = frame;
-  (*it).m_params = params;
-
-  if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 && !isIFrame )
-  {
-      // static cast is safe as of isIFrame being false.
-      // but: shouldn't we support this javascript hack for iframes aswell?
-      khtml::RenderFrame* rf = static_cast<khtml::RenderFrame*>(frame);
-      assert(rf);
-      QVariant res = executeScript( DOM::Node(rf->frameImpl()), url.right( url.length() - 11) );
-      if ( res.type() == QVariant::String ) {
-        KURL myurl;
-        myurl.setProtocol("javascript");
-        myurl.setPath(res.asString());
-        return processObjectRequest(&(*it), myurl, QString("text/html") );
-      }
-      return false;
-  }
-  return requestObject( &(*it), completeURL( url ) );
-}
-
-QString KHTMLPart::requestFrameName()
-{
-   return QString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
-}
-
-bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
-                               const QStringList &params )
-{
-  if (url.isEmpty())
-    return false;
-  khtml::ChildFrame child;
-  QValueList<khtml::ChildFrame>::Iterator it = d->m_objects.append( child );
-  (*it).m_frame = frame;
-  (*it).m_type = khtml::ChildFrame::Object;
-  (*it).m_params = params;
-
-  KParts::URLArgs args;
-  args.serviceType = serviceType;
-  return requestObject( &(*it), completeURL( url ), args );
-}
-
-bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &_args )
-{
-  if (!checkLinkSecurity(url))
-    return false;
-  if ( child->m_bPreloaded )
-  {
-    // kdDebug(6005) << "KHTMLPart::requestObject preload" << endl;
-    if ( child->m_frame && child->m_part )
-      child->m_frame->setWidget( child->m_part->widget() );
-
-    child->m_bPreloaded = false;
-    return true;
-  }
-
-  KParts::URLArgs args( _args );
-
-  if ( child->m_run )
-    delete (KHTMLRun *)child->m_run;
-
-  if ( child->m_part && !args.reload && urlcmp( child->m_part->url().url(), url.url(), true, true ) )
-    args.serviceType = child->m_serviceType;
-
-  child->m_args = args;
-  child->m_serviceName = QString::null;
-  if (!d->m_referrer.isEmpty() && !child->m_args.metaData().contains( "referrer" ))
-    child->m_args.metaData()["referrer"] = d->m_referrer;
-
-  child->m_args.metaData().insert("main_frame_request",
-                                  parentPart() == 0 ? "TRUE":"FALSE");
-  child->m_args.metaData().insert("ssl_was_in_use",
-                                  d->m_ssl_in_use ? "TRUE":"FALSE");
-  child->m_args.metaData().insert("ssl_activate_warnings", "TRUE");
-
-  // Support for <frame url="">
-  if (url.isEmpty() && args.serviceType.isEmpty())
-    args.serviceType = QString::fromLatin1( "text/html" );
-
-  if ( args.serviceType.isEmpty() ) {
-    child->m_run = new KHTMLRun( this, child, url, child->m_args,
-                                 child->m_type != khtml::ChildFrame::Frame );
-    return false;
-  } else {
-    return processObjectRequest( child, url, args.serviceType );
-  }
-}
-
-bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url, const QString &mimetype )
-{
-  //kdDebug( 6050 ) << "trying to create part for " << mimetype << endl;
-
-  // IMPORTANT: create a copy of the url here, because it is just a reference, which was likely to be given
-  // by an emitting frame part (emit openURLRequest( blahurl, ... ) . A few lines below we delete the part
-  // though -> the reference becomes invalid -> crash is likely
-  KURL url( _url );
-
-  // khtmlrun called us this way to indicate a loading error
-  if ( url.isEmpty() && mimetype.isEmpty() )
-  {
-      checkEmitLoadEvent();
-      child->m_bCompleted = true;
-      return true;
-  }
-
-  if (child->m_bNotify)
-  {
-      child->m_bNotify = false;
-      if ( !child->m_args.lockHistory() )
-          emit d->m_extension->openURLNotify();
-      // why change the locationbar URL here? Other browsers don't do it
-      // either for framesets and it's actually confusing IMHO, as it
-      // makes the user think he's visiting that new URL while he actually
-      // isn't. Not to mention that it breaks bookmark'ing framed sites (Simon)
-//      emit d->m_extension->setLocationBarURL( url.prettyURL() );
-  }
-
-  if ( !child->m_services.contains( mimetype ) )
-  {
-    KParts::ReadOnlyPart *part = createPart( d->m_view->viewport(), child->m_name.ascii(), this, child->m_name.ascii(), mimetype, child->m_serviceName, child->m_services, child->m_params );
-
-    if ( !part )
-    {
-        if ( child->m_frame )
-            child->m_frame->partLoadingErrorNotify();
-
-        checkEmitLoadEvent();
-        return false;
-    }
-
-    //CRITICAL STUFF
-    if ( child->m_part )
-    {
-      partManager()->removePart( (KParts::ReadOnlyPart *)child->m_part );
-      delete (KParts::ReadOnlyPart *)child->m_part;
-    }
-
-    child->m_serviceType = mimetype;
-    if ( child->m_frame )
-      child->m_frame->setWidget( part->widget() );
-
-    if ( child->m_type != khtml::ChildFrame::Object )
-      partManager()->addPart( part, false );
-//  else
-//      kdDebug(6005) << "AH! NO FRAME!!!!!" << endl;
-
-    child->m_part = part;
-    assert( child->m_part );
-
-    if ( child->m_type != khtml::ChildFrame::Object )
-    {
-      connect( part, SIGNAL( started( KIO::Job *) ),
-               this, SLOT( slotChildStarted( KIO::Job *) ) );
-      connect( part, SIGNAL( completed() ),
-               this, SLOT( slotChildCompleted() ) );
-      connect( part, SIGNAL( setStatusBarText( const QString & ) ),
-               this, SIGNAL( setStatusBarText( const QString & ) ) );
-    }
-
-    child->m_extension = KParts::BrowserExtension::childObject( part );
-
-    if ( child->m_extension )
-    {
-      connect( child->m_extension, SIGNAL( openURLNotify() ),
-               d->m_extension, SIGNAL( openURLNotify() ) );
-
-      connect( child->m_extension, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
-               this, SLOT( slotChildURLRequest( const KURL &, const KParts::URLArgs & ) ) );
-
-      connect( child->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
-               d->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ) );
-      connect( child->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
-               d->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & , const KParts::WindowArgs &, KParts::ReadOnlyPart *&) ) );
-
-      connect( child->m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ),
-               d->m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ) );
-      connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ),
-               d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ) );
-      connect( child->m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ),
-               d->m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ) );
-      connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
-               d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
-
-      connect( child->m_extension, SIGNAL( infoMessage( const QString & ) ),
-               d->m_extension, SIGNAL( infoMessage( const QString & ) ) );
-
-      child->m_extension->setBrowserInterface( d->m_extension->browserInterface() );
-    }
-  }
-
-  checkEmitLoadEvent();
-  // Some JS code in the load event may have destroyed the part
-  // In that case, abort
-  if ( !child->m_part )
-    return false;
-
-  if ( child->m_bPreloaded )
-  {
-    if ( child->m_frame && child->m_part )
-      child->m_frame->setWidget( child->m_part->widget() );
-
-    child->m_bPreloaded = false;
-    return true;
-  }
-
-  child->m_args.reload = d->m_bReloading;
-
-  // make sure the part has a way to find out about the mimetype.
-  // we actually set it in child->m_args in requestObject already,
-  // but it's useless if we had to use a KHTMLRun instance, as the
-  // point the run object is to find out exactly the mimetype.
-  child->m_args.serviceType = mimetype;
-
-  child->m_bCompleted = false;
-  if ( child->m_extension )
-    child->m_extension->setURLArgs( child->m_args );
-
-  if(url.protocol() == "javascript") {
-      if (!child->m_part->inherits("KHTMLPart"))
-          return false;
-
-      KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>(child->m_part));
-
-      p->begin();
-      p->m_url = url;
-      p->write(url.path());
-      p->end();
-      return true;
-  }
-  else if ( !url.isEmpty() )
-  {
-      //kdDebug( 6050 ) << "opening " << url.url() << " in frame " << child->m_part << endl;
-      return child->m_part->openURL( url );
-  }
-  else
-      return true;
-}
-
-KParts::ReadOnlyPart *KHTMLPart::createPart( QWidget *parentWidget, const char *widgetName,
-                                             QObject *parent, const char *name, const QString &mimetype,
-                                             QString &serviceName, QStringList &serviceTypes,
-                                             const QStringList &params )
-{
-  QString constr;
-  if ( !serviceName.isEmpty() )
-    constr.append( QString::fromLatin1( "Name == '%1'" ).arg( serviceName ) );
-
-  KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, QString::null );
-
-  if ( offers.isEmpty() )
-    return 0L;
-
-  KService::Ptr service = *offers.begin();
-
-  KLibFactory *factory = KLibLoader::self()->factory( service->library().latin1() );
-
-  if ( !factory )
-    return 0L;
-
-  KParts::ReadOnlyPart *res = 0L;
-
-  const char *className = "KParts::ReadOnlyPart";
-  if ( service->serviceTypes().contains( "Browser/View" ) )
-    className = "Browser/View";
-
-  if ( factory->inherits( "KParts::Factory" ) )
-    res = static_cast<KParts::ReadOnlyPart *>(static_cast<KParts::Factory *>( factory )->createPart( parentWidget, widgetName, parent, name, className, params ));
-  else
-  res = static_cast<KParts::ReadOnlyPart *>(factory->create( parentWidget, widgetName, className ));
-
-  if ( !res )
-    return res;
-
-  serviceTypes = service->serviceTypes();
-  serviceName = service->name();
-
-  return res;
-}
-
-KParts::PartManager *KHTMLPart::partManager()
-{
-  if ( !d->m_manager )
-  {
-    d->m_manager = new KParts::PartManager( d->m_view->topLevelWidget(), this, "khtml part manager" );
-    d->m_manager->setAllowNestedParts( true );
-    connect( d->m_manager, SIGNAL( activePartChanged( KParts::Part * ) ),
-             this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
-    connect( d->m_manager, SIGNAL( partRemoved( KParts::Part * ) ),
-             this, SLOT( slotPartRemoved( KParts::Part * ) ) );
-  }
-
-  return d->m_manager;
-}
-
-void KHTMLPart::submitFormAgain()
-{
-  if( !d->m_bParsing && d->m_submitForm)
-    KHTMLPart::submitForm( d->m_submitForm->submitAction, d->m_submitForm->submitUrl, d->m_submitForm->submitFormData, d->m_submitForm->target, d->m_submitForm->submitContentType, d->m_submitForm->submitBoundary );
-
-  delete d->m_submitForm;
-  d->m_submitForm = 0;
-  disconnect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
-}
-
-void KHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
-{
-  QString target = _target;
-  if ( target.isEmpty() )
-    target = d->m_baseTarget;
-
-  KURL u = completeURL( url, target );
-
-  if ( !u.isValid() )
-  {
-    // ### ERROR HANDLING!
-    return;
-  }
-
-  QString urlstring = u.url();
-
-  if ( urlstring.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
-      urlstring = KURL::decode_string(urlstring);
-      executeScript( urlstring.right( urlstring.length() - 11) );
-      return;
-  }
-
-  if (!checkLinkSecurity(u,
-			 i18n( "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" ),
-			 i18n( "Submit" )))
-    return;
-
-  KParts::URLArgs args;
-
-  if (!d->m_referrer.isEmpty())
-     args.metaData()["referrer"] = d->m_referrer;
-
-  args.metaData().insert("main_frame_request",
-                         parentPart() == 0 ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_activate_warnings", "TRUE");
-
-  if ( strcmp( action, "get" ) == 0 )
-  {
-    u.setQuery( QString::fromLatin1( formData.data(), formData.size() ) );
-
-    args.frameName = target;
-    args.setDoPost( false );
-  }
-  else
-  {
-    args.postData = formData;
-    args.frameName = target;
-    args.setDoPost( true );
-
-    // construct some user headers if necessary
-    if (contentType.isNull() || contentType == "application/x-www-form-urlencoded")
-      args.setContentType( "Content-Type: application/x-www-form-urlencoded" );
-    else // contentType must be "multipart/form-data"
-      args.setContentType( "Content-Type: " + contentType + "; boundary=" + boundary );
-  }
-
-  if ( d->m_bParsing || d->m_runningScripts > 0 ) {
-    if( d->m_submitForm ) {
-        return;
-    }
-    d->m_submitForm = new KHTMLPartPrivate::SubmitForm;
-    d->m_submitForm->submitAction = action;
-    d->m_submitForm->submitUrl = url;
-    d->m_submitForm->submitFormData = formData;
-    d->m_submitForm->target = _target;
-    d->m_submitForm->submitContentType = contentType;
-    d->m_submitForm->submitBoundary = boundary;
-    connect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
-  }
-  else
-    emit d->m_extension->openURLRequest( u, args );
-
-}
-
-void KHTMLPart::popupMenu( const QString &url )
-{
-  KURL completedURL( completeURL( url ) );
-  KURL popupURL;
-  if ( !url.isEmpty() )
-    popupURL = completedURL;
-
-  /*
-  mode_t mode = 0;
-  if ( !u.isLocalFile() )
-  {
-    QString cURL = u.url( 1 );
-    int i = cURL.length();
-    // A url ending with '/' is always a directory
-    if ( i >= 1 && cURL[ i - 1 ] == '/' )
-      mode = S_IFDIR;
-  }
-  */
-  mode_t mode = S_IFDIR; // treat all html documents as "DIR" in order to have the back/fwd/reload
-                         // buttons in the popupmenu
-
-  KXMLGUIClient *client = new KHTMLPopupGUIClient( this, d->m_popupMenuXML, popupURL );
-
-  emit d->m_extension->popupMenu( client, QCursor::pos(), completedURL,
-                                  QString::fromLatin1( "text/html" ), mode );
-
-  delete client;
-
-  emit popupMenu(url, QCursor::pos());
-}
-
-void KHTMLPart::slotChildStarted( KIO::Job *job )
-{
-  khtml::ChildFrame *child = frame( sender() );
-
-  assert( child );
-
-  child->m_bCompleted = false;
-
-  if ( d->m_bComplete )
-  {
-#if 0
-    // WABA: Looks like this belongs somewhere else
-    if ( !parentPart() ) // "toplevel" html document? if yes, then notify the hosting browser about the document (url) changes
-    {
-      emit d->m_extension->openURLNotify();
-    }
-#endif
-    d->m_bComplete = false;
-    emit started( job );
-  }
-}
-
-void KHTMLPart::slotChildCompleted()
-{
-  khtml::ChildFrame *child = frame( sender() );
-
-  assert( child );
-
-  child->m_bCompleted = true;
-  child->m_args = KParts::URLArgs();
-
-  checkCompleted();
-}
-
-void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &args )
-{
-  khtml::ChildFrame *child = frame( sender()->parent() );
-
-  QString frameName = args.frameName.lower();
-  if ( !frameName.isEmpty() )
-  {
-    if ( frameName == QString::fromLatin1( "_top" ) )
-    {
-      emit d->m_extension->openURLRequest( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_blank" ) )
-    {
-      emit d->m_extension->createNewWindow( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_parent" ) )
-    {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-
-      emit d->m_extension->openURLRequest( url, newArgs );
-      return;
-    }
-    else if ( frameName != QString::fromLatin1( "_self" ) )
-    {
-      khtml::ChildFrame *_frame = recursiveFrameRequest( url, args );
-
-      if ( !_frame )
-      {
-        emit d->m_extension->openURLRequest( url, args );
-        return;
-      }
-
-      child = _frame;
-    }
-  }
-
-  // TODO: handle child target correctly! currently the script are always executed fur the parent
-  QString urlStr = url.url();
-  if ( urlStr.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
-      executeScript( urlStr.right( urlStr.length() - 11) );
-      return;
-  }
-
-  if ( child ) {
-      // Inform someone that we are about to show something else.
-      child->m_bNotify = true;
-      requestObject( child, url, args );
-  }  else if ( frameName==QString::fromLatin1("_self") ) // this is for embedded objects (via <object>) which want to replace the current document
-  {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-      emit d->m_extension->openURLRequest( url, newArgs );
-  }
-}
-
-khtml::ChildFrame *KHTMLPart::frame( const QObject *obj )
-{
-    assert( obj->inherits( "KParts::ReadOnlyPart" ) );
-    const KParts::ReadOnlyPart *part = static_cast<const KParts::ReadOnlyPart *>( obj );
-
-    FrameIt it = d->m_frames.begin();
-    FrameIt end = d->m_frames.end();
-    for (; it != end; ++it )
-      if ( (KParts::ReadOnlyPart *)(*it).m_part == part )
-        return &(*it);
-
-    return 0L;
-}
-
-KHTMLPart *KHTMLPart::findFrame( const QString &f )
-{
-#if 0
-  kdDebug() << "KHTMLPart::findFrame '" << f << "'" << endl;
-  FrameIt it2 = d->m_frames.begin();
-  FrameIt end = d->m_frames.end();
-  for (; it2 != end; ++it2 )
-      kdDebug() << "  - having frame '" << (*it2).m_name << "'" << endl;
-#endif
-  // ### http://www.w3.org/TR/html4/appendix/notes.html#notes-frames
-  ConstFrameIt it = d->m_frames.find( f );
-  if ( it == d->m_frames.end() )
-  {
-    //kdDebug() << "KHTMLPart::findFrame frame " << f << " not found" << endl;
-    return 0L;
-  }
-  else {
-    KParts::ReadOnlyPart *p = (*it).m_part;
-    if ( p && p->inherits( "KHTMLPart" ))
-    {
-      //kdDebug() << "KHTMLPart::findFrame frame " << f << " is a KHTMLPart, ok" << endl;
-      return (KHTMLPart*)p;
-    }
-    else
-    {
-#if 0
-      if (p)
-        kdWarning() << "KHTMLPart::findFrame frame " << f << " found but isn't a KHTMLPart ! " << p->className() << endl;
-      else
-        kdWarning() << "KHTMLPart::findFrame frame " << f << " found but m_part=0L" << endl;
-#endif
-      return 0L;
-    }
-  }
-}
-
-bool KHTMLPart::frameExists( const QString &frameName )
-{
-  ConstFrameIt it = d->m_frames.find( frameName );
-  if ( it == d->m_frames.end() )
-    return false;
-
-  // WABA: We only return true if the child actually has a frame
-  // set. Otherwise we might find our preloaded-selve.
-  // This happens when we restore the frameset.
-  return ((*it).m_frame != 0);
-}
-
-KHTMLPart *KHTMLPart::parentPart()
-{
-  if ( !parent() || !parent()->inherits( "KHTMLPart" ) )
-    return 0L;
-
-  return (KHTMLPart *)parent();
-}
-
-khtml::ChildFrame *KHTMLPart::recursiveFrameRequest( const KURL &url, const KParts::URLArgs &args,
-                                                     bool callParent )
-{
-  FrameIt it = d->m_frames.find( args.frameName );
-
-  if ( it != d->m_frames.end() )
-    return &(*it);
-
-  it = d->m_frames.begin();
-  FrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( (*it).m_part && (*it).m_part->inherits( "KHTMLPart" ) )
-    {
-      KHTMLPart *childPart = (KHTMLPart *)(KParts::ReadOnlyPart *)(*it).m_part;
-
-      khtml::ChildFrame *res = childPart->recursiveFrameRequest( url, args, false );
-      if ( !res )
-        continue;
-
-      childPart->requestObject( res, url, args );
-      return 0L;
-    }
-
-  if ( parentPart() && callParent )
-  {
-    khtml::ChildFrame *res = parentPart()->recursiveFrameRequest( url, args );
-
-    if ( res )
-      parentPart()->requestObject( res, url, args );
-
-    return 0L;
-  }
-
-  return 0L;
-}
-
-void KHTMLPart::saveState( QDataStream &stream )
-{
-  kdDebug( 6050 ) << "KHTMLPart::saveState saving URL " << m_url.url() << endl;
-
-  stream << m_url << (Q_INT32)d->m_view->contentsX() << (Q_INT32)d->m_view->contentsY();
-
-  // save link cursor position
-  int focusNodeNumber;
-  if (!d->m_focusNodeRestored)
-  {
-      focusNodeNumber = d->m_focusNodeNumber;
-  }
-  else
-  {
-      focusNodeNumber = 0;
-      if (d->m_doc)
-      {
-          DOM::ElementImpl *focusNode = d->m_doc->focusNode();
-          while( focusNode )
-          {
-              focusNodeNumber++;
-              focusNode = d->m_doc->findNextLink(focusNode, false);
-          }
-      }
-  }
-  stream << focusNodeNumber;
-
-  // Save the doc's cache id.
-  stream << d->m_cacheId;
-
-  // Save the state of the document (Most notably the state of any forms)
-  QStringList docState;
-  if (d->m_doc)
-  {
-     docState = d->m_doc->state();
-  }
-  stream << (Q_UINT32) d->m_settings->charset() << d->m_encoding << docState;
-
-  // Save font data
-  stream << fontSizes() << d->m_fontBase;
-
-  // Save ssl data
-  stream << d->m_ssl_in_use
-         << d->m_ssl_peer_cert_subject
-         << d->m_ssl_peer_cert_issuer
-         << d->m_ssl_peer_ip
-         << d->m_ssl_cipher
-         << d->m_ssl_cipher_desc
-         << d->m_ssl_cipher_version
-         << d->m_ssl_cipher_used_bits
-         << d->m_ssl_cipher_bits
-         << d->m_ssl_cert_state
-         << d->m_ssl_good_from
-         << d->m_ssl_good_until;
-
-  // Save frame data
-  stream << (Q_UINT32)d->m_frames.count();
-
-  QStringList frameNameLst, frameServiceTypeLst, frameServiceNameLst;
-  KURL::List frameURLLst;
-  QValueList<QByteArray> frameStateBufferLst;
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-  {
-    frameNameLst << (*it).m_name;
-    frameServiceTypeLst << (*it).m_serviceType;
-    frameServiceNameLst << (*it).m_serviceName;
-    if ( (*it).m_part )
-      frameURLLst << (*it).m_part->url();
-    else
-      frameURLLst << KURL();
-
-    QByteArray state;
-    QDataStream frameStream( state, IO_WriteOnly );
-
-    if ( (*it).m_part && (*it).m_extension )
-      (*it).m_extension->saveState( frameStream );
-
-    frameStateBufferLst << state;
-  }
-
-  stream << frameNameLst << frameServiceTypeLst << frameServiceNameLst << frameURLLst << frameStateBufferLst;
-}
-
-void KHTMLPart::restoreState( QDataStream &stream )
-{
-  KURL u;
-  Q_INT32 xOffset;
-  Q_INT32 yOffset;
-  Q_UINT32 frameCount;
-  QStringList frameNames, frameServiceTypes, docState, frameServiceNames;
-  KURL::List frameURLs;
-  QValueList<QByteArray> frameStateBuffers;
-  QValueList<int> fSizes;
-  KURL::List visitedLinks;
-  Q_INT32 charset;
-  long old_cacheId = d->m_cacheId;
-  QString encoding;
-
-  stream >> u >> xOffset >> yOffset;
-
-  // restore link cursor position
-  // nth node is active. value is set in checkCompleted()
-  stream >> d->m_focusNodeNumber;
-  d->m_focusNodeRestored = false;
-  kdDebug(6050)<<"new focus Node number is:"<<d->m_focusNodeNumber<<endl;
-
-  stream >> d->m_cacheId;
-
-  stream >> charset >> encoding >> docState;
-  d->m_charset = (QFont::CharSet) charset;
-  d->m_encoding = encoding;
-  if ( d->m_settings ) d->m_settings->setCharset( d->m_charset );
-  kdDebug(6050)<<"restoring charset to:"<< charset << endl;
-
-
-  stream >> fSizes >> d->m_fontBase;
-  // ### odd: this doesn't appear to have any influence on the used font
-  // sizes :(
-  setFontSizes( fSizes );
-
-  // Restore ssl data
-  stream >> d->m_ssl_in_use
-         >> d->m_ssl_peer_cert_subject
-         >> d->m_ssl_peer_cert_issuer
-         >> d->m_ssl_peer_ip
-         >> d->m_ssl_cipher
-         >> d->m_ssl_cipher_desc
-         >> d->m_ssl_cipher_version
-         >> d->m_ssl_cipher_used_bits
-         >> d->m_ssl_cipher_bits
-         >> d->m_ssl_cert_state
-         >> d->m_ssl_good_from
-         >> d->m_ssl_good_until;
-
-  d->m_paSecurity->setIcon( d->m_ssl_in_use ? "lock" : "unlock" );
-
-  stream >> frameCount >> frameNames >> frameServiceTypes >> frameServiceNames
-         >> frameURLs >> frameStateBuffers;
-
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-
-//   kdDebug( 6050 ) << "restoreStakte() docState.count() = " << docState.count() << endl;
-//   kdDebug( 6050 ) << "m_url " << m_url.url() << " <-> " << u.url() << endl;
-//   kdDebug( 6050 ) << "m_frames.count() " << d->m_frames.count() << " <-> " << frameCount << endl;
-
-  if (d->m_cacheId == old_cacheId)
-  {
-    // Partial restore
-    d->m_redirectionTimer.stop();
-
-    FrameIt fIt = d->m_frames.begin();
-    FrameIt fEnd = d->m_frames.end();
-
-    for (; fIt != fEnd; ++fIt )
-        (*fIt).m_bCompleted = false;
-
-    fIt = d->m_frames.begin();
-
-    QStringList::ConstIterator fNameIt = frameNames.begin();
-    QStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
-    QStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
-    KURL::List::ConstIterator fURLIt = frameURLs.begin();
-    QValueList<QByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
-
-    for (; fIt != fEnd; ++fIt, ++fNameIt, ++fServiceTypeIt, ++fServiceNameIt, ++fURLIt, ++fBufferIt )
-    {
-      khtml::ChildFrame *child = &(*fIt);
-
-//      kdDebug( 6050 ) <<  *fNameIt  << " ---- " <<  *fServiceTypeIt << endl;
-
-      if ( child->m_name != *fNameIt || child->m_serviceType != *fServiceTypeIt )
-      {
-        child->m_bPreloaded = true;
-        child->m_name = *fNameIt;
-        child->m_serviceName = *fServiceNameIt;
-        processObjectRequest( child, *fURLIt, *fServiceTypeIt );
-      }
-
-      if ( child->m_part )
-      {
-        child->m_bCompleted = false;
-        if ( child->m_extension )
-        {
-          QDataStream frameStream( *fBufferIt, IO_ReadOnly );
-          child->m_extension->restoreState( frameStream );
-        }
-        else
-          child->m_part->openURL( *fURLIt );
-      }
-    }
-
-    KParts::URLArgs args( d->m_extension->urlArgs() );
-    args.xOffset = xOffset;
-    args.yOffset = yOffset;
-    args.docState = docState; // WABA: How are we going to restore this??
-    d->m_extension->setURLArgs( args );
-
-    d->m_view->setContentsPos( xOffset, yOffset );
-  }
-  else
-  {
-    // Full restore.
-    closeURL();
-    // We must force a clear because we want to be sure to delete all
-    // frames.
-    d->m_bCleared = false;
-    clear();
-    d->m_charset = (QFont::CharSet) charset;
-    d->m_encoding = encoding;
-    if ( d->m_settings ) d->m_settings->setCharset( (QFont::CharSet)charset );
-
-    QStringList::ConstIterator fNameIt = frameNames.begin();
-    QStringList::ConstIterator fNameEnd = frameNames.end();
-
-    QStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
-    QStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
-    KURL::List::ConstIterator fURLIt = frameURLs.begin();
-    QValueList<QByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
-
-    for (; fNameIt != fNameEnd; ++fNameIt, ++fServiceTypeIt, ++fServiceNameIt, ++fURLIt, ++fBufferIt )
-    {
-      khtml::ChildFrame newChild;
-      newChild.m_bPreloaded = true;
-      newChild.m_name = *fNameIt;
-      newChild.m_serviceName = *fServiceNameIt;
-
-//      kdDebug( 6050 ) << *fNameIt << " ---- " << *fServiceTypeIt << endl;
-
-      FrameIt childFrame = d->m_frames.append( newChild );
-
-      processObjectRequest( &(*childFrame), *fURLIt, *fServiceTypeIt );
-
-      (*childFrame).m_bPreloaded = true;
-
-      if ( (*childFrame).m_part )
-      {
-        if ( (*childFrame).m_extension )
-        {
-          QDataStream frameStream( *fBufferIt, IO_ReadOnly );
-          (*childFrame).m_extension->restoreState( frameStream );
-        }
-        else
-          (*childFrame).m_part->openURL( *fURLIt );
-      }
-    }
-
-    KParts::URLArgs args( d->m_extension->urlArgs() );
-    args.xOffset = xOffset;
-    args.yOffset = yOffset;
-    args.docState = docState;
-    d->m_extension->setURLArgs( args );
-//    kdDebug( 6050 ) << "in restoreState : calling openURL for " << u.url() << endl;
-    if (!KHTMLPageCache::self()->isValid(d->m_cacheId))
-       openURL( u );
-    else
-       restoreURL( u );
-  }
-
-}
-
-void KHTMLPart::show()
-{
-  if ( d->m_view )
-    d->m_view->show();
-}
-
-void KHTMLPart::hide()
-{
-  if ( d->m_view )
-    d->m_view->hide();
-}
-
-DOM::Node KHTMLPart::nodeUnderMouse() const
-{
-    return d->m_view->nodeUnderMouse();
-}
-
-void KHTMLPart::emitSelectionChanged()
-{
-  emit d->m_extension->enableAction( "copy", hasSelection() );
-  emit d->m_extension->selectionInfo( selectedText() );
-  emit selectionChanged();
-}
-
-void KHTMLPart::slotIncFontSizes()
-{
-  updateFontSize( ++d->m_fontBase );
-  if ( !d->m_paDecFontSizes->isEnabled() )
-    d->m_paDecFontSizes->setEnabled( true );
-}
-
-void KHTMLPart::slotDecFontSizes()
-{
-  if ( d->m_fontBase >= 1 )
-    updateFontSize( --d->m_fontBase );
-
-  if ( d->m_fontBase == 0 )
-    d->m_paDecFontSizes->setEnabled( false );
-}
-
-void KHTMLPart::setFontBaseInternal( int base, bool absolute )
-{
-    if ( absolute )
-      d->m_fontBase = base;
-    else
-      d->m_fontBase += base;
-
-    if ( d->m_fontBase < 0 )
-        d->m_fontBase = 0;
-
-   d->m_paDecFontSizes->setEnabled( d->m_fontBase > 0 );
-
-    updateFontSize( d->m_fontBase );
-}
-
-void KHTMLPart::setJSStatusBarText( const QString &text )
-{
-   d->m_kjsStatusBarText = text;
-   emit setStatusBarText( d->m_kjsStatusBarText );
-}
-
-void KHTMLPart::setJSDefaultStatusBarText( const QString &text )
-{
-   d->m_kjsDefaultStatusBarText = text;
-   emit setStatusBarText( d->m_kjsDefaultStatusBarText );
-}
-
-QString KHTMLPart::jsStatusBarText() const
-{
-    return d->m_kjsStatusBarText;
-}
-
-QString KHTMLPart::jsDefaultStatusBarText() const
-{
-   return d->m_kjsDefaultStatusBarText;
-}
-
-void KHTMLPart::updateFontSize( int add )
-{
-  resetFontSizes();
-  QValueList<int> sizes = fontSizes();
-
-  QValueList<int>::Iterator it = sizes.begin();
-  QValueList<int>::Iterator end = sizes.end();
-  for (; it != end; ++it )
-    (*it) += add;
-
-  setFontSizes( sizes );
-
-  QApplication::setOverrideCursor( waitCursor );
-  if(d->m_doc) d->m_doc->applyChanges();
-  QApplication::restoreOverrideCursor();
-}
-
-void KHTMLPart::slotLoadImages()
-{
-  if (d->m_doc )
-    d->m_doc->docLoader()->setAutoloadImages( !d->m_doc->docLoader()->autoloadImages() );
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( !( *it ).m_part.isNull() && ( *it ).m_part->inherits( "KHTMLPart" ) ) {
-      KParts::ReadOnlyPart* p = ( *it ).m_part;
-      static_cast<KHTMLPart*>( p )->slotLoadImages();
-    }
-}
-
-void KHTMLPart::reparseConfiguration()
-{
-  KHTMLSettings *settings = KHTMLFactory::defaultHTMLSettings();
-  settings->init();
-
-  // Keep original charset setting.
-  settings->setCharset(d->m_settings->charset());
-  settings->setScript(d->m_settings->script());
-
-  autoloadImages( settings->autoLoadImages() );
-
-  // PENDING(lars) Pass hostname to the following two methods.
-  d->m_bJScriptEnabled = settings->isJavaScriptEnabled();
-  d->m_bJavaEnabled = settings->isJavaEnabled();
-  d->m_bPluginsEnabled = settings->isPluginsEnabled();
-  delete d->m_settings;
-  d->m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
-
-  QApplication::setOverrideCursor( waitCursor );
-  if(d->m_doc) d->m_doc->applyChanges();
-  QApplication::restoreOverrideCursor();
-}
-
-QStringList KHTMLPart::frameNames() const
-{
-  QStringList res;
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    res += (*it).m_name;
-
-  return res;
-}
-
-const QList<KParts::ReadOnlyPart> KHTMLPart::frames() const
-{
-  QList<KParts::ReadOnlyPart> res;
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-     res.append( (*it).m_part );
-
-  return res;
-}
-
-bool KHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
-{
-  FrameIt it = d->m_frames.find( urlArgs.frameName );
-
-  if ( it == d->m_frames.end() )
-    return false;
-
-  // Inform someone that we are about to show something else.
-  if ( !urlArgs.lockHistory() )
-      emit d->m_extension->openURLNotify();
-
-  requestObject( &(*it), url, urlArgs );
-
-  return true;
-}
-
-void KHTMLPart::setDNDEnabled( bool b )
-{
-  d->m_bDnd = b;
-}
-
-bool KHTMLPart::dndEnabled() const
-{
-  return d->m_bDnd;
-}
-
-bool KHTMLPart::event( QEvent *event )
-{
-  if ( KParts::ReadOnlyPart::event( event ) )
-   return true;
-
-  if ( khtml::MousePressEvent::test( event ) )
-  {
-    khtmlMousePressEvent( static_cast<khtml::MousePressEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::MouseDoubleClickEvent::test( event ) )
-  {
-    khtmlMouseDoubleClickEvent( static_cast<khtml::MouseDoubleClickEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::MouseMoveEvent::test( event ) )
-  {
-    khtmlMouseMoveEvent( static_cast<khtml::MouseMoveEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::MouseReleaseEvent::test( event ) )
-  {
-    khtmlMouseReleaseEvent( static_cast<khtml::MouseReleaseEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::DrawContentsEvent::test( event ) )
-  {
-    khtmlDrawContentsEvent( static_cast<khtml::DrawContentsEvent *>( event ) );
-    return true;
-  }
-
-  return false;
-}
-
-void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
-{
-  DOM::DOMString url = event->url();
-  QMouseEvent *_mouse = event->qmouseEvent();
-  DOM::Node innerNode = event->innerNode();
-  d->m_mousePressNode = innerNode;
-
-   d->m_dragStartPos = _mouse->pos();
-
-  if ( event->url() != 0 )
-    d->m_strSelectedURL = event->url().string();
-  else
-    d->m_strSelectedURL = QString::null;
-
-  if ( _mouse->button() == LeftButton ||
-       _mouse->button() == MidButton )
-  {
-    d->m_bMousePressed = true;
-
-#ifndef KHTML_NO_SELECTION
-    if ( _mouse->button() == LeftButton )
-    {
-      if ( !innerNode.isNull() )
-      {
-          int offset;
-          DOM::Node node;
-          innerNode.handle()->findSelectionNode( event->x(), event->y(),
-                                            event->nodeAbsX(), event->nodeAbsY(),
-                                                 node, offset );
-
-        if ( node.isNull() || !node.handle() )
-        {
-            //kdDebug( 6000 ) << "Hmm, findSelectionNode returned no node" << endl;
-            d->m_selectionStart = innerNode;
-            d->m_startOffset = 0; //?
-        } else {
-            d->m_selectionStart = node;
-            d->m_startOffset = offset;
-        }
-        //kdDebug(6005) << "KHTMLPart::khtmlMousePressEvent selectionStart=" << d->m_selectionStart.handle()->renderer()
-        //              << " offset=" << d->m_startOffset << endl;
-        d->m_selectionEnd = d->m_selectionStart;
-        d->m_endOffset = d->m_startOffset;
-        d->m_doc->clearSelection();
-      }
-      else
-      {
-        d->m_selectionStart = DOM::Node();
-        d->m_selectionEnd = DOM::Node();
-      }
-      emitSelectionChanged();
-      startAutoScroll();
-    }
-#else
-    d->m_dragLastPos = _mouse->globalPos();
-#endif
-  }
-
-  if ( _mouse->button() == RightButton )
-  {
-    popupMenu( splitUrlTarget(d->m_strSelectedURL) );
-    d->m_strSelectedURL = QString::null;
-  }
-}
-
-void KHTMLPart::khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent * )
-{
-}
-
-void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
-{
-  QMouseEvent *_mouse = event->qmouseEvent();
-  DOM::DOMString url = event->url();
-  DOM::Node innerNode = event->innerNode();
-
-#ifndef QT_NO_DRAGANDDROP
-  if( d->m_bMousePressed && (!d->m_strSelectedURL.isEmpty() || (!innerNode.isNull() && innerNode.elementId() == ID_IMG) ) &&
-      ( d->m_dragStartPos - _mouse->pos() ).manhattanLength() > KGlobalSettings::dndEventDelay() &&
-      d->m_bDnd && d->m_mousePressNode == innerNode ) {
-
-      QPixmap p;
-      QDragObject *drag = 0;
-      if( !d->m_strSelectedURL.isEmpty() ) {
-          KURL u( completeURL( splitUrlTarget(d->m_strSelectedURL)) );
-          KURL::List uris;
-          uris.append(u);
-          drag = KURLDrag::newDrag( uris, d->m_view->viewport() );
-          p = KMimeType::pixmapForURL(u, 0, KIcon::SizeMedium);
-      } else {
-          HTMLImageElementImpl *i = static_cast<HTMLImageElementImpl *>(innerNode.handle());
-          if( i ) {
-            drag = new QImageDrag( i->currentImage() , d->m_view->viewport() );
-            p = KMimeType::mimeType("image/*")->pixmap(KIcon::Desktop);
-          }
-      }
-
-    if ( !p.isNull() )
-      drag->setPixmap(p);
-
-    stopAutoScroll();
-    if(drag)
-        drag->drag();
-
-    // when we finish our drag, we need to undo our mouse press
-    d->m_bMousePressed = false;
-    d->m_strSelectedURL = "";
-    return;
-  }
-#endif
-
-  QString target;
-  QString surl = splitUrlTarget(url.string(), &target);
-
-  // Not clicked -> mouse over stuff
-  if ( !d->m_bMousePressed )
-  {
-    // The mouse is over something
-    if ( url.length() )
-    {
-      bool shiftPressed = ( _mouse->state() & ShiftButton );
-
-      // Image map
-      if ( !innerNode.isNull() && innerNode.elementId() == ID_IMG )
-      {
-        HTMLImageElementImpl *i = static_cast<HTMLImageElementImpl *>(innerNode.handle());
-        if ( i && i->isServerMap() )
-        {
-          khtml::RenderImage *r = static_cast<khtml::RenderImage *>(i->renderer());
-          if(r)
-          {
-            int absx, absy, vx, vy;
-            r->absolutePosition(absx, absy);
-            view()->contentsToViewport( absx, absy, vx, vy );
-
-            int x(_mouse->x() - vx), y(_mouse->y() - vy);
-
-            d->m_overURL = surl + QString("?%1,%2").arg(x).arg(y);
-            overURL( d->m_overURL, target, shiftPressed );
-            return;
-          }
-        }
-      }
-
-      // normal link
-      QString target;
-      QString surl = splitUrlTarget(url.string(), &target);
-      if ( d->m_overURL.isEmpty() || d->m_overURL != surl )
-      {
-        d->m_overURL = surl;
-        overURL( d->m_overURL, target, shiftPressed );
-      }
-    }
-    else  // Not over a link...
-    {
-      if( !d->m_overURL.isEmpty() ) // and we were over a link  -> reset to "default statusbar text"
-      {
-        d->m_overURL = QString::null;
-        emit onURL( QString::null );
-        // Default statusbar text can be set from javascript. Otherwise it's empty.
-        emit setStatusBarText( d->m_kjsDefaultStatusBarText );
-      }
-    }
-  }
-  else {
-#ifndef KHTML_NO_SELECTION
-    // selection stuff
-    if( d->m_bMousePressed && !innerNode.isNull() && ( _mouse->state() == LeftButton )) {
-      int offset;
-      DOM::Node node;
-      //kdDebug(6000) << "KHTMLPart::khtmlMouseMoveEvent x=" << event->x() << " y=" << event->y()
-      //              << " nodeAbsX=" << event->nodeAbsX() << " nodeAbsY=" << event->nodeAbsY()
-      //              << endl;
-      innerNode.handle()->findSelectionNode( event->x(), event->y(),
-                                             event->nodeAbsX(), event->nodeAbsY(),
-                                             node, offset );
-      // When this stuff is finished, this should never happen.
-      // But currently....
-      if ( node.isNull() || !node.handle() )
-      {
-        //kdWarning( 6000 ) << "findSelectionNode returned no node" << endl;
-        d->m_selectionEnd = innerNode;
-        d->m_endOffset = 0; //?
-      }
-      else
-      {
-        d->m_selectionEnd = node;
-        d->m_endOffset = offset;
-      }
-      //kdDebug( 6000 ) << "setting end of selection to " << d->m_selectionEnd.handle()->renderer() << "/"
-      //                << d->m_endOffset << endl;
-
-      // we have to get to know if end is before start or not...
-      DOM::Node n = d->m_selectionStart;
-      d->m_startBeforeEnd = false;
-      while(!n.isNull()) {
-        if(n == d->m_selectionEnd) {
-          d->m_startBeforeEnd = true;
-          break;
-        }
-        DOM::Node next = n.firstChild();
-        if(next.isNull()) next = n.nextSibling();
-        while( next.isNull() && !n.parentNode().isNull() ) {
-          n = n.parentNode();
-          next = n.nextSibling();
-        }
-        n = next;
-        //d->m_view->viewport()->repaint(false);
-      }
-
-      if ( !d->m_selectionStart.isNull() && !d->m_selectionEnd.isNull() )
-      {
-        if (d->m_selectionEnd == d->m_selectionStart && d->m_endOffset < d->m_startOffset)
-          d->m_doc
-            ->setSelection(d->m_selectionStart.handle(),d->m_endOffset,
-                           d->m_selectionEnd.handle(),d->m_startOffset);
-        else if (d->m_startBeforeEnd)
-          d->m_doc
-            ->setSelection(d->m_selectionStart.handle(),d->m_startOffset,
-                           d->m_selectionEnd.handle(),d->m_endOffset);
-        else
-          d->m_doc
-            ->setSelection(d->m_selectionEnd.handle(),d->m_endOffset,
-                           d->m_selectionStart.handle(),d->m_startOffset);
-      }
-#else
-      if ( d->m_doc && d->m_view ) {
-        QPoint diff( _mouse->globalPos() - d->m_dragLastPos );
-
-        if ( abs( diff.x() ) > 64 || abs( diff.y() ) > 64 ) {
-          d->m_view->scrollBy( -diff.x(), -diff.y() );
-          d->m_dragLastPos = _mouse->globalPos();
-        }
-#endif
-    }
-  }
-
-}
-
-void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
-{
-  QMouseEvent *_mouse = event->qmouseEvent();
-  DOM::Node innerNode = event->innerNode();
-  d->m_mousePressNode = DOM::Node();
-
-  if ( d->m_bMousePressed )
-    stopAutoScroll();
-
-  // Used to prevent mouseMoveEvent from initiating a drag before
-  // the mouse is pressed again.
-  d->m_bMousePressed = false;
-
-#ifndef QT_NO_CLIPBOARD
-  if ((_mouse->button() == MidButton) && (event->url() == 0))
-  {
-    QClipboard *cb = QApplication::clipboard();
-    QCString plain("plain");
-    QString url = cb->text(plain);
-    KURL u(url);
-    if (u.isValid())
-    {
-      QString savedReferrer = d->m_referrer;
-      d->m_referrer = QString::null; // Disable referrer.
-      urlSelected(url, 0,0, "_top");
-      d->m_referrer = savedReferrer; // Restore original referrer.
-    }
-  }
-#endif
-
-#ifndef KHTML_NO_SELECTION
-  // delete selection in case start and end position are at the same point
-  if(d->m_selectionStart == d->m_selectionEnd && d->m_startOffset == d->m_endOffset) {
-    d->m_selectionStart = 0;
-    d->m_selectionEnd = 0;
-    d->m_startOffset = 0;
-    d->m_endOffset = 0;
-    emitSelectionChanged();
-  } else {
-    // we have to get to know if end is before start or not...
-    DOM::Node n = d->m_selectionStart;
-    d->m_startBeforeEnd = false;
-    if( d->m_selectionStart == d->m_selectionEnd ) {
-      if( d->m_startOffset < d->m_endOffset )
-        d->m_startBeforeEnd = true;
-    } else {
-      while(!n.isNull()) {
-        if(n == d->m_selectionEnd) {
-          d->m_startBeforeEnd = true;
-          break;
-        }
-        DOM::Node next = n.firstChild();
-        if(next.isNull()) next = n.nextSibling();
-        while( next.isNull() && !n.parentNode().isNull() ) {
-          n = n.parentNode();
-          next = n.nextSibling();
-        }
-        n = next;
-      }
-    }
-    if(!d->m_startBeforeEnd)
-    {
-      DOM::Node tmpNode = d->m_selectionStart;
-      int tmpOffset = d->m_startOffset;
-      d->m_selectionStart = d->m_selectionEnd;
-      d->m_startOffset = d->m_endOffset;
-      d->m_selectionEnd = tmpNode;
-      d->m_endOffset = tmpOffset;
-      d->m_startBeforeEnd = true;
-    }
-    // get selected text and paste to the clipboard
-#ifndef QT_NO_CLIPBOARD
-    QString text = selectedText();
-    text.replace(QRegExp(QChar(0xa0)), " ");
-    QClipboard *cb = QApplication::clipboard();
-    cb->setText(text);
-#endif
-    //kdDebug( 6000 ) << "selectedText = " << text << endl;
-    emitSelectionChanged();
-  }
-#endif
-
-}
-
-void KHTMLPart::khtmlDrawContentsEvent( khtml::DrawContentsEvent * )
-{
-}
-
-bool KHTMLPart::eventFilter( QObject* o, QEvent* ev )
-{
-    // ### BCI remove for 3.0 (no longer needed)
-    return KParts::ReadOnlyPart::eventFilter( o, ev );
-}
-
-void KHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event )
-{
-  if ( event->activated() )
-  {
-    emitSelectionChanged();
-    emit d->m_extension->enableAction( "print", d->m_doc != 0 );
-
-    if ( !d->m_settings->autoLoadImages() && d->m_paLoadImages )
-    {
-        QList<KAction> lst;
-        lst.append( d->m_paLoadImages );
-        plugActionList( "loadImages", lst );
-    }
-  }
-}
-
-void KHTMLPart::slotFind()
-{
-  KHTMLPart *part = 0;
-
-  if ( d->m_frames.count() > 0 )
-    part = static_cast<KHTMLPart *>( partManager()->activePart() );
-
-  if(!part)
-      part = this;
-
-  if (!part->inherits("KHTMLPart") )
-  {
-      kdError(6000) << "slotFind: part is a " << part->className() << ", can't do a search into it" << endl;
-      return;
-  }
-
-  // use the part's (possibly frame) widget as parent widget, so that it gets
-  // properly destroyed when the (possible) frame dies
-  if ( !d->m_findDialog ) {
-      d->m_findDialog = new KHTMLFind( part, part->widget(), "khtmlfind" );
-      connect( d->m_findDialog, SIGNAL( done() ),
-               this, SLOT( slotFindDone() ) );
-      connect( d->m_findDialog, SIGNAL( destroyed() ),
-               this, SLOT( slotFindDialogDestroyed() ) );
-  }
-
-  d->m_findDialog->setPart( part );
-  d->m_findDialog->setText( part->d->m_lastFindState.text );
-  d->m_findDialog->setCaseSensitive( part->d->m_lastFindState.caseSensitive );
-  d->m_findDialog->setDirection( part->d->m_lastFindState.direction );
-
-  d->m_findDialog->show();
-
-  d->m_paFind->setEnabled( false );
-}
-
-void KHTMLPart::slotFindDone()
-{
-    assert( d->m_findDialog );
-
-    KHTMLPart *part = d->m_findDialog->part();
-
-    // this code actually belongs into some saveState() method in
-    // KHTMLFind, but as we're saving into the private data section of
-    // the part we have to do it here (no way to access it from the outside
-    // as it is defined only in khtml_part.cpp) (Simon)
-    part->d->m_lastFindState.text = d->m_findDialog->getText();
-    part->d->m_lastFindState.caseSensitive = d->m_findDialog->case_sensitive();
-    part->d->m_lastFindState.direction = d->m_findDialog->get_direction();
-
-    d->m_paFind->setEnabled( true );
-}
-
-void KHTMLPart::slotFindDialogDestroyed()
-{
-    assert( sender() == d->m_findDialog );
-
-    d->m_findDialog = 0;
-    d->m_paFind->setEnabled( true );
-}
-
-void KHTMLPart::slotPrintFrame()
-{
-  if ( d->m_frames.count() == 0 )
-    return;
-
-  KParts::Part *frame = partManager()->activePart();
-
-  KParts::BrowserExtension *ext = KParts::BrowserExtension::childObject( frame );
-
-  if ( !ext )
-    return;
-
-  QMetaData *mdata = ext->metaObject()->slot( "print()" );
-  if ( mdata )
-    (ext->*(mdata->ptr))();
-}
-
-void KHTMLPart::slotSelectAll()
-{
-  KHTMLPart *part = this;
-
-  if ( d->m_frames.count() > 0 && partManager()->activePart() )
-    part = static_cast<KHTMLPart *>( partManager()->activePart() );
-
-  assert( part );
-
-  part->selectAll();
-}
-
-void KHTMLPart::startAutoScroll()
-{
-   connect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
-   d->m_scrollTimer.start(100, false);
-}
-
-void KHTMLPart::stopAutoScroll()
-{
-   disconnect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
-   if (d->m_scrollTimer.isActive())
-       d->m_scrollTimer.stop();
-}
-
-
-void KHTMLPart::slotAutoScroll()
-{
-    if (d->m_view)
-      d->m_view->doAutoScroll();
-    else
-      stopAutoScroll(); // Safety
-}
-
-void KHTMLPart::selectAll()
-{
-  NodeImpl *first;
-  if (d->m_doc->isHTMLDocument())
-    first = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-  else
-    first = d->m_doc;
-  NodeImpl *next;
-
-  // Look for first text/cdata node that has a renderer
-  while ( first && !((first->nodeType() == Node::TEXT_NODE || first->nodeType() == Node::CDATA_SECTION_NODE) && first->renderer()) )
-  {
-    next = first->firstChild();
-    if ( !next ) next = first->nextSibling();
-    while( first && !next )
-    {
-      first = first->parentNode();
-      if ( first )
-        next = first->nextSibling();
-    }
-    first = next;
-  }
-
-  NodeImpl *last;
-  if (d->m_doc->isHTMLDocument())
-    last = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-  else
-    last = d->m_doc;
-  // Look for last text/cdata node that has a renderer
-  while ( last && !((last->nodeType() == Node::TEXT_NODE || last->nodeType() == Node::CDATA_SECTION_NODE) && last->renderer()) )
-  {
-    next = last->lastChild();
-    if ( !next ) next = last->previousSibling();
-    while ( last && !next )
-    {
-      last = last->parentNode();
-      if ( last )
-        next = last->previousSibling();
-    }
-    last = next;
-  }
-
-  if ( !first || !last )
-    return;
-  ASSERT(first->renderer());
-  ASSERT(last->renderer());
-
-  d->m_selectionStart = first;
-  d->m_startOffset = 0;
-  d->m_selectionEnd = last;
-  d->m_endOffset = static_cast<TextImpl *>( last )->string()->l;
-  d->m_startBeforeEnd = true;
-
-  d->m_doc->setSelection( d->m_selectionStart.handle(), d->m_startOffset,
-                          d->m_selectionEnd.handle(), d->m_endOffset );
-
-  emitSelectionChanged();
-}
-
-bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const QString &message, const QString &button)
-{
-  // Security check on the link.
-  // KURL u( url ); Wrong!! Relative URL could be mis-interpreted!!! (DA)
-  QString linkProto = linkURL.protocol().lower();
-  QString proto = m_url.protocol().lower();
-
-  if ( !linkProto.isEmpty() && !proto.isEmpty() &&
-       ( linkProto == "cgi" || linkProto == "file" ) &&
-       proto != "file" && proto != "cgi" && proto != "man")
-  {
-    Tokenizer *tokenizer = d->m_doc->tokenizer();
-    if (tokenizer)
-      tokenizer->setOnHold(true);
-
-    int response = KMessageBox::Cancel;
-    if (!message.isEmpty())
-    {
-	    response = KMessageBox::warningContinueCancel( 0,
-							   message.arg(linkURL.url()),
-							   i18n( "Security Warning" ),
-							   button);
-    }
-    else
-    {
-	    KMessageBox::error( 0,
-				i18n( "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.").arg(linkURL.url()),
-				i18n( "Security Alert" ));
-    }
-
-    if (tokenizer)
-      tokenizer->setOnHold(false);
-    return (response==KMessageBox::Continue);
-  }
-  return true;
-}
-
-void KHTMLPart::slotPartRemoved( KParts::Part *part )
-{
-//    kdDebug(6050) << "KHTMLPart::slotPartRemoved " << part << endl;
-    if ( part == d->m_activeFrame )
-        d->m_activeFrame = 0L;
-}
-
-void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
-{
-//    kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged part=" << part << endl;
-    if ( part == this )
-    {
-        kdError(6050) << "strange error! we activated ourselves" << endl;
-        assert( false );
-        return;
-    }
-//    kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl;
-    if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "QFrame" ) )
-    {
-        QFrame *frame = static_cast<QFrame *>( d->m_activeFrame->widget() );
-        if (frame->frameStyle() != QFrame::NoFrame)
-        {
-           frame->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken);
-           frame->repaint();
-        }
-    }
-
-    d->m_activeFrame = part;
-
-    if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "QFrame" ) )
-    {
-        QFrame *frame = static_cast<QFrame *>( d->m_activeFrame->widget() );
-        if (frame->frameStyle() != QFrame::NoFrame)
-        {
-           frame->setFrameStyle( QFrame::StyledPanel | QFrame::Plain);
-           frame->repaint();
-        }
-        kdDebug(6050) << "new active frame " << d->m_activeFrame << endl;
-    }
-
-    updateActions();
-
-    // (note: childObject returns 0 if the argument is 0)
-    d->m_extension->setExtensionProxy( KParts::BrowserExtension::childObject( d->m_activeFrame ) );
-}
-
-void KHTMLPart::setActiveNode(const DOM::Node &node)
-{
-    if (!d->m_doc)
-        return;
-    // at the moment, only element nodes can receive focus.
-    DOM::ElementImpl *e = static_cast<DOM::ElementImpl *>(node.handle());
-    if (node.isNull() || e->isElementNode())
-        d->m_doc->setFocusNode(e);
-    if (!d->m_view || !e || e->ownerDocument()!=d->m_doc)
-        return;
-    QRect rect  = e->getRect();
-    kdDebug(6050)<<"rect.x="<<rect.x()<<" rect.y="<<rect.y()<<" rect.width="<<rect.width()<<" rect.height="<<rect.height()<<endl;
-    d->m_view->ensureVisible(rect.right(), rect.bottom());
-    d->m_view->ensureVisible(rect.left(), rect.top());
-}
-
-DOM::Node KHTMLPart::activeNode() const
-{
-    return DOM::Node(d->m_doc?d->m_doc->focusNode():0);
-}
-
-DOM::EventListener *KHTMLPart::createHTMLEventListener( QString code )
-{
-  KJSProxy *proxy = jScript();
-
-  if (!proxy)
-    return 0;
-
-  return proxy->createHTMLEventHandler( code );
-}
-
-KHTMLPart *KHTMLPart::opener()
-{
-    return d->m_opener;
-}
-
-void KHTMLPart::setOpener(KHTMLPart *_opener)
-{
-    d->m_opener = _opener;
-}
-
-bool KHTMLPart::openedByJS()
-{
-    return d->m_openedByJS;
-}
-
-void KHTMLPart::setOpenedByJS(bool _openedByJS)
-{
-    d->m_openedByJS = _openedByJS;
-}
-
-using namespace KParts;
-#include "khtml_part.moc"
-
diff --git a/WebCore/khtml/khtml_popupmenu.rc b/WebCore/khtml/khtml_popupmenu.rc
deleted file mode 100644
index 4caa819..0000000
--- a/WebCore/khtml/khtml_popupmenu.rc
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"><kpartgui name="khtmlpart_popupmenu" version="7">
-<Menu name="popupmenu">
- <Action name="reloadframe" group="reload" />
- <Action name="printFrame" group="print" />
- <Separator weakSeparator="1" />
- <Action name="savelinkas" />
- <Action name="saveimageas" />
- <Separator weakSeparator="1" />
- <Action name="selectAll" />
- <Separator weakSeparator="1" />
- <Action name="copylinklocation" />
- <Action name="stopanimations" />
- <Action name="copyimagelocation" />
- <Action name="viewimage" />
- <Separator weakSeparator="1" />
- <Action name="viewDocumentSource" />
- <Action name="viewFrameSource" />
- <Action name="setEncoding" />
-</Menu>
-</kpartgui>
diff --git a/WebCore/khtml/khtml_run.cpp b/WebCore/khtml/khtml_run.cpp
deleted file mode 100644
index 7db4ae9..0000000
--- a/WebCore/khtml/khtml_run.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- *                     1999 Lars Knoll <knoll at kde.org>
- *                     1999 Antti Koivisto <koivisto at kde.org>
- *                     2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#include "khtml_run.h"
-#include "khtml_part.h"
-#include <kio/job.h>
-#include <kdebug.h>
-#include <kuserprofile.h>
-#include <kmessagebox.h>
-#include <kstringhandler.h>
-#include <klocale.h>
-#include <khtml_ext.h>
-
-KHTMLRun::KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url,
-                    const KParts::URLArgs &args, bool hideErrorDialog )
-: KRun( url, 0, false, false /* No GUI */ ) , m_part( part ),
-  m_args( args ), m_child( child ), m_hideErrorDialog( hideErrorDialog )
-{
-}
-
-void KHTMLRun::foundMimeType( const QString &_type )
-{
-    QString mimeType = _type; // this ref comes from the job, we lose it when using KIO again
-    if ( !m_part->processObjectRequest( m_child, m_strURL, mimeType ) )
-    {
-       if ( !m_bFinished && // couldn't embed
-            mimeType != "inode/directory" && // dirs can't be saved
-            !m_strURL.isLocalFile() ) // ... and remote URL
-       {
-           KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, true);
-           if ( askSave( m_strURL, offer, mimeType, m_suggestedFilename ) ) // ... -> ask whether to save
-           { // true: saving done or canceled
-               m_bFinished = true;
-               m_bFault = true; // make Konqueror think there was an error, in order to stop the spinning wheel
-           }
-       }
-
-       // Check if running is allowed
-       if ( !m_bFinished &&  //     If not embedddable ...
-            !allowExecution( mimeType, m_strURL ) ) // ...and the user said no (for executables etc.)
-       {
-           m_bFinished = true;
-           //m_bFault = true; // might not be necessary in khtml
-       }
-
-       if ( m_bFinished )
-       {
-           m_timer.start( 0, true );
-           return;
-       }
-
-       kdDebug(6050) << "KHTMLRun::foundMimeType " << _type << " couldn't open" << endl;
-       KRun::foundMimeType( mimeType );
-       return;
-    }
-    m_bFinished = true;
-    m_timer.start( 0, true );
-}
-
-bool KHTMLRun::allowExecution( const QString &serviceType, const KURL &url )
-{
-    if ( !isExecutable( serviceType ) )
-      return true;
-
-    return ( KMessageBox::warningYesNo( 0, i18n( "Do you really want to execute '%1' ? " ).arg( url.prettyURL() ) ) == KMessageBox::Yes );
-}
-
-bool KHTMLRun::isExecutable( const QString &serviceType )
-{
-    return ( serviceType == "application/x-desktop" ||
-             serviceType == "application/x-executable" ||
-             serviceType == "application/x-shellscript" );
-}
-
-bool KHTMLRun::askSave( const KURL & url, KService::Ptr offer, const QString & mimeType, const QString & suggestedFilename )
-{
-    QString surl = KStringHandler::csqueeze( url.prettyURL() );
-    // Inspired from kmail
-    QString question = offer ? i18n("Open '%1' using '%2'?").
-                               arg( surl ).arg(offer->name())
-                       : i18n("Open '%1' ?").arg( surl );
-    int choice = KMessageBox::warningYesNoCancel(
-        0L, question, QString::null,
-        i18n("Save to disk"), i18n("Open"),
-        QString::fromLatin1("askSave")+mimeType); // dontAskAgainName
-    if ( choice == KMessageBox::Yes ) // Save
-        KHTMLPopupGUIClient::saveURL( m_part->widget(), i18n( "Save As..." ), url, QString::null, 0, suggestedFilename );
-
-    return choice != KMessageBox::No; // saved or canceled -> don't open
-}
-
-void KHTMLRun::scanFile()
-{
-  if (m_strURL.protocol().left(4) != "http") // http and https
-  {
-     KRun::scanFile();
-     return;
-  }
-
-  // No check for well-known extensions, since we don't trust HTTP
-
-  KIO::TransferJob *job;
-  if ( m_args.doPost() )
-  {
-      job = KIO::http_post( m_strURL, m_args.postData, false );
-      job->addMetaData("content-type", m_args.contentType());
-  }
-  else
-      job = KIO::get(m_strURL, false, false);
-
-  job->addMetaData(m_args.metaData());
-
-  //job->setWindow((KMainWindow *)m_pMainWindow);
-  connect( job, SIGNAL( result( KIO::Job *)),
-           this, SLOT( slotKHTMLScanFinished(KIO::Job *)));
-  connect( job, SIGNAL( mimetype( KIO::Job *, const QString &)),
-           this, SLOT( slotKHTMLMimetype(KIO::Job *, const QString &)));
-  m_job = job;
-}
-
-void KHTMLRun::slotKHTMLScanFinished(KIO::Job *job)
-{
-  if ( m_hideErrorDialog && job->error() )
-      handleError();
-  else
-      KRun::slotScanFinished(job);
-}
-
-void KHTMLRun::slotKHTMLMimetype(KIO::Job *, const QString &type)
-{
-  KIO::TransferJob *job = (KIO::TransferJob *) m_job;
-  // Update our URL in case of a redirection
-  m_strURL = job->url();
-
-  m_suggestedFilename = job->queryMetaData("content-disposition");
-
-  // Make copy to avoid dead reference
-  QString _type = type;
-  job->putOnHold();
-  m_job = 0;
-
-  foundMimeType( _type );
-}
-
-void KHTMLRun::slotStatResult( KIO::Job *job )
-{
-    if ( m_hideErrorDialog && job->error() )
-        handleError();
-    else
-        KRun::slotStatResult( job );
-}
-
-void KHTMLRun::handleError()
-{
-    // pass an empty url and mimetype to indicate a loading error
-    m_part->processObjectRequest( m_child, KURL(), QString::null );
-    m_job = 0;
-    m_bFault = true;
-    m_bFinished = true;
-
-    m_timer.start( 0, true );
-}
-
-#include "khtml_run.moc"
diff --git a/WebCore/khtml/khtml_run.h b/WebCore/khtml/khtml_run.h
deleted file mode 100644
index 10d3620..0000000
--- a/WebCore/khtml/khtml_run.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- *                     1999 Lars Knoll <knoll at kde.org>
- *                     1999 Antti Koivisto <koivisto at kde.org>
- *                     2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_run_h__
-#define __khtml_run_h__
-
-#include <krun.h>
-#include <kurl.h>
-#include <kservice.h>
-#include <kparts/browserextension.h>
-
-class KHTMLPart;
-
-namespace khtml
-{
-  struct ChildFrame;
-};
-
-class KHTMLRun : public KRun
-{
-  Q_OBJECT
-public:
-  KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url, 
-            const KParts::URLArgs &args, bool hideErrorDialog );
-
-  virtual void foundMimeType( const QString &mimetype );
-
-  KHTMLPart *part() const { return m_part; }
-  KParts::URLArgs urlArgs() const { return m_args; }
-
-protected:
-  virtual void scanFile();
-
-  bool allowExecution( const QString &serviceType, const KURL &url );
-  bool isExecutable( const QString &serviceType );
-  bool askSave( const KURL & url, KService::Ptr offer, const QString & mimeType, const QString & suggestedFilename );
-
-protected slots:
-  void slotKHTMLScanFinished(KIO::Job *job);
-  void slotKHTMLMimetype(KIO::Job *job, const QString &type);
-  void slotStatResult( KIO::Job *job );
-
-private:
-  void handleError();
-
-  KHTMLPart *m_part;
-  KParts::URLArgs m_args;
-  khtml::ChildFrame *m_child;
-  QString m_suggestedFilename;
-  bool m_hideErrorDialog;
-};
-
-#endif
diff --git a/WebCore/khtml/khtmldefaults.h b/WebCore/khtml/khtmldefaults.h
deleted file mode 100644
index cff8f48..0000000
--- a/WebCore/khtml/khtmldefaults.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
-   Copyright (C) 1999 David Faure <faure at kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-// browser window color defaults -- Bernd
-#define HTML_DEFAULT_LNK_COLOR Qt::blue
-#define HTML_DEFAULT_TXT_COLOR Qt::black
-#define HTML_DEFAULT_VLNK_COLOR Qt::magenta
-
-// KEEP IN SYNC WITH konqdefaults.h in kdebase/libkonq!
-// lets be modern .. -- Bernd
-#define HTML_DEFAULT_VIEW_FONT "helvetica"
-#define HTML_DEFAULT_VIEW_FIXED_FONT "courier"
-// generic CSS fonts. Since usual X distributions don't have a good set of fonts, this
-// is quite conservative...
-#define HTML_DEFAULT_VIEW_SERIF_FONT "times"
-#define HTML_DEFAULT_VIEW_SANSSERIF_FONT "helvetica"
-#define HTML_DEFAULT_VIEW_CURSIVE_FONT "helvetica"
-#define HTML_DEFAULT_VIEW_FANTASY_FONT "helvetica"
-#define HTML_DEFAULT_MIN_FONT_SIZE 7 // everything smaller is usually unreadable.
diff --git a/WebCore/khtml/khtmlimage.cpp b/WebCore/khtml/khtmlimage.cpp
deleted file mode 100644
index 06b20fa..0000000
--- a/WebCore/khtml/khtmlimage.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-#include "khtmlimage.h"
-#include "khtml_part.h"
-#include "khtmlview.h"
-#include "khtml_ext.h"
-#include "xml/dom_docimpl.h"
-#include "html/html_documentimpl.h"
-#include "html/html_elementimpl.h"
-#include "rendering/render_image.h"
-#include "misc/loader.h"
-
-#include <qvbox.h>
-#include <qtimer.h>
-
-#include <kparts/factory.h>
-#include <kio/job.h>
-#include <kglobal.h>
-#include <kinstance.h>
-#include <kaction.h>
-#include <kmimetype.h>
-#include <klocale.h>
-
-extern "C"
-{
-    void *init_libkhtmlimage()
-    {
-        return new KHTMLImageFactory();
-    }
-};
-
-KInstance *KHTMLImageFactory::s_instance = 0;
-
-KHTMLImageFactory::KHTMLImageFactory()
-{
-    s_instance = new KInstance( "khtmlimage" );
-}
-
-KHTMLImageFactory::~KHTMLImageFactory()
-{
-    delete s_instance;
-}
-
-KParts::Part *KHTMLImageFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
-                                                   QObject *parent, const char *name,
-                                                   const char *, const QStringList & )
-{
-    return new KHTMLImage( parentWidget, widgetName, parent, name );
-}
-
-KHTMLImage::KHTMLImage( QWidget *parentWidget, const char *widgetName,
-                        QObject *parent, const char *name )
-    : KParts::ReadOnlyPart( parent, name )
-{
-    setInstance( KHTMLImageFactory::instance() );
-
-    QVBox *box = new QVBox( parentWidget, widgetName );
-
-    m_khtml = new KHTMLPart( box, widgetName, this, "htmlimagepart" );
-    m_khtml->autoloadImages( true );
-
-    setWidget( box );
-
-    setXMLFile( m_khtml->xmlFile() );
-
-    m_ext = new KHTMLImageBrowserExtension( this, "be" );
-
-    connect( m_khtml->browserExtension(), SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
-             this, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
-
-    connect( m_khtml->browserExtension(), SIGNAL( enableAction( const char *, bool ) ),
-             m_ext, SIGNAL( enableAction( const char *, bool ) ) );
-
-    m_ext->setURLDropHandlingEnabled( true );
-}
-
-KHTMLImage::~KHTMLImage()
-{
-    // important: delete the html part before the part or qobject destructor runs.
-    // we now delete the htmlpart which deletes the part's widget which makes
-    // _OUR_ m_widget 0 which in turn avoids our part destructor to delete the
-    // widget ;-)
-    // ### additional note: it _can_ be that the part has been deleted before:
-    // when we're in a html frameset and the view dies first, then it will also
-    // kill the htmlpart
-    if ( m_khtml )
-        delete static_cast<KHTMLPart *>( m_khtml );
-}
-
-bool KHTMLImage::openURL( const KURL &url )
-{
-    static const QString &html = KGlobal::staticQString( "<html><body><img src=\"%1\"></body></html>" );
-
-    m_url = url;
-
-    emit started( 0 );
-
-    KParts::URLArgs args = m_ext->urlArgs();
-    m_mimeType = args.serviceType;
-
-    m_khtml->begin( m_url, args.xOffset, args.yOffset );
-    m_khtml->setAutoloadImages( true );
-
-    DOM::DocumentImpl *impl = dynamic_cast<DOM::DocumentImpl *>( m_khtml->document().handle() ); // ### hack ;-)
-    if ( impl && m_ext->urlArgs().reload )
-        impl->docLoader()->setReloading(true);
-
-    m_khtml->write( html.arg( m_url.url() ) );
-    m_khtml->end();
-
-    KIO::Job *job = khtml::Cache::loader()->jobForRequest( m_url.url() );
-
-    emit setWindowCaption( url.prettyURL() );
-
-    if ( job )
-    {
-        emit started( job );
-
-        connect( job, SIGNAL( result( KIO::Job * ) ),
-                 this, SLOT( slotImageJobFinished( KIO::Job * ) ) );
-    }
-    else
-    {
-        emit started( 0 );
-        emit completed();
-    }
-
-    return true;
-}
-
-bool KHTMLImage::closeURL()
-{
-    return true;
-}
-
-void KHTMLImage::guiActivateEvent( KParts::GUIActivateEvent *e )
-{
-    if ( e->activated() )
-        emit setWindowCaption( m_url.prettyURL() );
-}
-
-void KHTMLImage::slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u,
-                                const QString &, mode_t mode )
-{
-    KAction *encodingAction = cl->actionCollection()->action( "setEncoding" );
-    if ( encodingAction )
-        cl->actionCollection()->take( encodingAction );
-    emit m_ext->popupMenu( cl, pos, u, m_mimeType, mode );
-}
-
-void KHTMLImage::slotImageJobFinished( KIO::Job *job )
-{
-    if ( job->error() )
-    {
-        job->showErrorDialog();
-        emit canceled( job->errorString() );
-    }
-    else
-    {
-        if ( m_khtml->view()->contentsY() == 0 )
-        {
-            KParts::URLArgs args = m_ext->urlArgs();
-            m_khtml->view()->setContentsPos( args.xOffset, args.yOffset );
-        }
-
-        emit completed();
-
-        QTimer::singleShot( 0, this, SLOT( updateWindowCaption() ) );
-    }
-}
-
-void KHTMLImage::updateWindowCaption()
-{
-    if ( !m_khtml )
-        return;
-
-    DOM::HTMLDocumentImpl *impl = dynamic_cast<DOM::HTMLDocumentImpl *>( m_khtml->document().handle() );
-    if ( !impl )
-        return;
-
-    DOM::HTMLElementImpl *body = impl->body();
-    if ( !body )
-        return;
-
-    DOM::NodeImpl *image = body->firstChild();
-    if ( !image )
-        return;
-
-    khtml::RenderImage *renderImage = dynamic_cast<khtml::RenderImage *>( image->renderer() );
-    if ( !renderImage )
-        return;
-
-    QPixmap pix = renderImage->pixmap();
-
-    QString caption;
-
-    KMimeType::Ptr mimeType;
-    if ( !m_mimeType.isEmpty() )
-        mimeType = KMimeType::mimeType( m_mimeType );
-
-    if ( mimeType )
-        caption = i18n( "%1 - %2x%3 Pixels" ).arg( mimeType->comment() )
-                  .arg( pix.width() ).arg( pix.height() );
-    else
-        caption = i18n( "Image - %2x%3 Pixels" ).arg( pix.width() ).arg( pix.height() );
-
-    emit setWindowCaption( caption );
-}
-
-KHTMLImageBrowserExtension::KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name )
-    : KParts::BrowserExtension( parent, name )
-{
-    m_imgPart = parent;
-}
-
-int KHTMLImageBrowserExtension::xOffset()
-{
-    return m_imgPart->doc()->view()->contentsX();
-}
-
-int KHTMLImageBrowserExtension::yOffset()
-{
-    return m_imgPart->doc()->view()->contentsY();
-}
-
-void KHTMLImageBrowserExtension::print()
-{
-    static_cast<KHTMLPartBrowserExtension *>( m_imgPart->doc()->browserExtension() )->print();
-}
-
-void KHTMLImageBrowserExtension::reparseConfiguration()
-{
-    static_cast<KHTMLPartBrowserExtension *>( m_imgPart->doc()->browserExtension() )->reparseConfiguration();
-    m_imgPart->doc()->autoloadImages( true );
-}
-
-using namespace KParts;
-
-#include "khtmlimage.moc"
diff --git a/WebCore/khtml/khtmlimage.desktop b/WebCore/khtml/khtmlimage.desktop
deleted file mode 100644
index aba499a..0000000
--- a/WebCore/khtml/khtmlimage.desktop
+++ /dev/null
@@ -1,86 +0,0 @@
-[Desktop Entry]
-Type=Service
-Comment=Embeddable Image Viewing Component
-Comment[az]=Hopdurula Bilən Rəsm Nümayiş Vasitəsi
-Comment[bg]=Вграден елемент на преглед за картини
-Comment[cs]=Komponenta pro zobrazování obrázků
-Comment[da]=Indbygget komponent til fremvisning af billeder.
-Comment[de]=Einbettungsfähige Bildbetrachter-Komponente
-Comment[el]=Ενσωματώσιμο άρθρωμα Προβολής Εικόνων
-Comment[eo]=Enkonstruebla bildrigardilo
-Comment[es]=Componente incrustable para visualizar imágenes
-Comment[et]=Põimitav pildifailide näitamise komponent
-Comment[fi]=Upotettava kuviennäyttökomponentti
-Comment[fr]=Composant afficheur d'images incorporé
-Comment[gl]=Compoñente de visualización de imaxes embebible
-Comment[he]=תונומת תגצהל העבטה-רב ביכר
-Comment[hu]=Beágyazható képnéző komponens
-Comment[is]=khtmlimage:  Ásetjanleg mynd-sjá
-Comment[it]=Componente importabile per la visualizzazione delle immagini
-Comment[ja]=埋め込み可能なイメージビューコンポーネント
-Comment[ko]=다른 곳에 끼워져서 그림을 보여주는 콤포넌트
-Comment[lt]=Įdedamas piešinių peržiūros komponentas
-Comment[lv]=Iegultā Attēlu Skatīšanas Komponente
-Comment[mk]=Вградлива компонента за гледање слики
-Comment[mt]=Komponent integrat għall wiri tal-istampi
-Comment[nl]=een inbedbaar afbeeldingenviewercomponent
-Comment[no]=Inkluderbart bildevisningskomponent
-Comment[no_NY]=Inkluderbart komponent for biletevising
-Comment[pl]=Składnik do przeglądania obrazów
-Comment[pt_BR]=Componente embutível de visualização de imagens
-Comment[pt]=Componente embebível para visualizar imagens
-Comment[ru]=Элемент просмотра встраиваемых изображений
-Comment[sk]=Vložiteľný komponent prehliadač obrázkov
-Comment[sl]=Integrirana komponenta za pregled slik
-Comment[sr]=Ugradiva komponenta za pregled slika
-Comment[sv]=Inbäddningsbar bildvisande komponent
-Comment[ta]=¯ð¦À¡¾¢ó¾ ¯ì¸¡ðÊì ÜÚ
-Comment[tr]=Gömülebilir Resim Görüntüleme Aracı
-Comment[uk]=Вбудований копмонент-переглядач образів
-Comment[vi]=Component đềExem ảnh có thềEembedd được 
-Comment[xh]=Inxenye yemboniselo yomfanekiso olungisiweyo
-Comment[zh_CN.GB2312]=可嵌入的图像查看部件
-MimeType=image/gif;image/x-xpm;image/x-xbm;image/jpeg;image/bmp;image/png;image/x-ico;
-Name=Embeddable Image Viewer
-Name[az]=Daxili Rəsm Nümayişçisi
-Name[bg]=Вграден преглед на картини
-Name[cs]=Zabudovaný prohlížeč obrázků
-Name[da]=Indbygget billedfremviser.
-Name[de]=Eingebetteter Bildbetrachter
-Name[el]=Ενσωματώσιμη Προβολή Εικόνας
-Name[eo]=Enkonstruita bildrigardilo
-Name[es]=Visor de imágenes incrustable
-Name[et]=Põimitav pildifailide näitaja
-Name[fi]=Upotettava kuvannäyttäjä
-Name[fr]=Afficheur d'images incorporé
-Name[gl]=Visualizador de Imaxes Embebible
-Name[he]=העבטה-רב תונומת גיצמ
-Name[hu]=Beágyazható képnézegető
-Name[is]=Ásetjanleg myndsjá
-Name[it]=Visualizzatore integrabile di immagini
-Name[ja]=埋め込みイメージビューア
-Name[ko]=다른 곳에 끼워지는 그림 보기
-Name[lt]=Įdedamas piešinių žiūriklis
-Name[lv]=Iegultais Attēlu Skatītājs
-Name[mk]=Вгнездлив гледач на слики
-Name[mt]=Werrej integrat tal-istampi
-Name[nl]=Ingebedde Afbeeldingenviewer
-Name[no]=Innlimbart bildeviser
-Name[no_NY]=Innebygd biletevisar
-Name[pl]=Wbudowana przeglądarka obrazów
-Name[pt_BR]=Visualizador embutido de imagens
-Name[pt]=Visualizador de Imagens Embebido
-Name[ru]=Просмотрщик встроенных изображений
-Name[sk]=Vložiteľný prehliadač obrázkov
-Name[sl]=Vgrajen pregledovalnik slik
-Name[sr]=Ugrađeni prikazivač slika
-Name[sv]=Inbäddningsbar bildvisare
-Name[ta]=¯ð¦À¡¾¢ó¾ ¯Õì ¸¡ðÊ
-Name[tr]=Gömülü Resim Görüntüleyici
-Name[uk]=Вмонтований переглядач образів
-Name[vi]=Trình xem ảnh có thềEembedd được 
-Name[xh]=Umboniseli womfanekiso olungisiweyo
-Name[zh_CN.GB2312]=可嵌入的图像查看器
-ServiceTypes=KParts/ReadOnlyPart
-InitialPreference=4
-X-KDE-Library=libkhtmlimage
diff --git a/WebCore/khtml/khtmlimage.h b/WebCore/khtml/khtmlimage.h
deleted file mode 100644
index 29bfac8..0000000
--- a/WebCore/khtml/khtmlimage.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-#ifndef __khtmlimage_h__
-#define __khtmlimage_h__
-
-#include <kparts/part.h>
-#include <kparts/factory.h>
-#include <kparts/browserextension.h>
-
-class KHTMLPart;
-class KInstance;
-
-class KHTMLImageFactory : public KParts::Factory
-{
-    Q_OBJECT
-public:
-    KHTMLImageFactory();
-    virtual ~KHTMLImageFactory();
-
-    virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
-                                            QObject *parent, const char *name,
-                                            const char *className, const QStringList &args );
-
-    static KInstance *instance() { return s_instance; }
-
-private:
-    static KInstance *s_instance;
-};
-
-class KHTMLImage : public KParts::ReadOnlyPart
-{
-    Q_OBJECT
-public:
-    KHTMLImage( QWidget *parentWidget, const char *widgetName,
-                QObject *parent, const char *name );
-    virtual ~KHTMLImage();
-
-    virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO
-
-    virtual bool openURL( const KURL &url );
-
-    virtual bool closeURL();
-
-    KHTMLPart *doc() const { return m_khtml; }
-
-protected:
-    virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
-
-private slots:
-    void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u, const QString &mime, mode_t mode );
-    void slotImageJobFinished( KIO::Job *job );
-
-    void updateWindowCaption();
-
-private:
-    QGuardedPtr<KHTMLPart> m_khtml;
-    KParts::BrowserExtension *m_ext;
-    QString m_mimeType;
-};
-
-class KHTMLImageBrowserExtension : public KParts::BrowserExtension
-{
-    Q_OBJECT
-public:
-    KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name = 0 );
-
-    virtual int xOffset();
-    virtual int yOffset();
-
-protected slots:
-    void print();
-    void reparseConfiguration();
-
-private:
-    KHTMLImage *m_imgPart;
-};
-
-#endif
diff --git a/WebCore/khtml/pics/hi16-action-images_display.png b/WebCore/khtml/pics/hi16-action-images_display.png
deleted file mode 100644
index 32cf56e..0000000
Binary files a/WebCore/khtml/pics/hi16-action-images_display.png and /dev/null differ
diff --git a/WebCore/khtml/pics/hi22-action-images_display.png b/WebCore/khtml/pics/hi22-action-images_display.png
deleted file mode 100644
index 5df2c52..0000000
Binary files a/WebCore/khtml/pics/hi22-action-images_display.png and /dev/null differ
diff --git a/WebCore/khtml/pics/hi32-action-images_display.png b/WebCore/khtml/pics/hi32-action-images_display.png
deleted file mode 100644
index 4f0b2bd..0000000
Binary files a/WebCore/khtml/pics/hi32-action-images_display.png and /dev/null differ
diff --git a/WebCore/khtml/test/README b/WebCore/khtml/test/README
deleted file mode 100644
index 2ffc4a9..0000000
--- a/WebCore/khtml/test/README
+++ /dev/null
@@ -1,6 +0,0 @@
-The contents of this directory will be moved to the toplevel directory khtmltests
-
-PLEASE DO NOT POST TEST CASES HERE ANY MORE
-
-
-See  khtmltests/README
diff --git a/WebCore/khtml/test/URL1.html b/WebCore/khtml/test/URL1.html
deleted file mode 100644
index cb54704..0000000
--- a/WebCore/khtml/test/URL1.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html> <head> <title>URL Test 1</title> </head>
-
-
-<body>
-<BASE href="http://localhost/test/URL.html">
-<H1>URL Test 1</H1>
-This page is the first regression test out of a set for URL handling
-within HTML.<BR>
-Testing &lt;BASE href="http://localhost/test/URL.html"&gt;<BR>
-The following link should point to "http://localhost/test/URL2.html": 
-<a href="URL2.html">link</a><BR>
-<BR>
-The following link should point to "http://localhost/test/URL2.html?somedata"
-<a href="URL2.html?somedata">link</a><BR>
-<BR>
-The following link should point to "http://localhost/test/~username"
-<a href="~username">link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org" if you click on it
-you should indeed get there.
-<a href="
-http://www.kde.org">link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org" if you click on it
-you should indeed get there.
-<a href="http://www.kde.org
- ">link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org" if you click on it
-you should indeed get there.
-<a href='http://www.kde.org'>link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org/"quote"/".
-<a href='http://www.kde.org/"quote"/'>link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org/'quote'/".
-<a href="http://www.kde.org/'quote'/">link</a><BR>
-<BR>
-The following link should point to "http://cwisdb.cc.kuleuven.ac.be/oo-bin/9899/liststudj.pl?bla&amp;lang=N&amp;cyclus=tweede".
-<a href="http://cwisdb.cc.kuleuven.ac.be/oo-bin/9899/liststudj.pl?bla&lang=N&cyclus=tweede">link</a><BR>
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/URL2.html b/WebCore/khtml/test/URL2.html
deleted file mode 100644
index 2689522..0000000
--- a/WebCore/khtml/test/URL2.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html> <head> <title>URL Test 2</title> </head>
-
-
-<body>
-<H1>URL Test 2</H1>
-This page is the second regression test out of a set for URL handling
-within HTML.<BR>
-Testing relative and absolute links<BR>
-The following link should bring you to the page "URL Test 1"  : 
-<a href="URL1.html">link</a><BR>
-<BR>
-The following link should bring you to "http://localhost/URL1.html" :
-<a href="http://localhost/URL1.html">link</a><BR>
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/align.html b/WebCore/khtml/test/align.html
deleted file mode 100644
index ab663bf..0000000
--- a/WebCore/khtml/test/align.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Left Aligned Image</TITLE>
-</HEAD>
-<BODY>
-<IMG SRC="nav_bar.gif" height=100 width=200 ALIGN=left border=1>
-The image on this page should be left aligned. Especially the list which
-follows this text should be laid out correctly. Bla bla bla
-This is just some text which you can safely ignore. This is just some 
-text which you can safely ignore. This is just some text which you can 
-safely ignore. This is just some text which you can safely ignore. 
-<br>
-<ul>
-<li> an item
-<li> This is a very long line which really should be placed on the right 
-place despite it's very long length.
-<li> another item. 
-</ul>
-This is some text placed after the list
-</body>
-</html>
diff --git a/WebCore/khtml/test/align1.html b/WebCore/khtml/test/align1.html
deleted file mode 100644
index f288b52..0000000
--- a/WebCore/khtml/test/align1.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Left Aligned Image</TITLE>
-</HEAD>
-<BODY>
-<IMG SRC="nav_bar.gif" height=100 width=200 ALIGN=right border=1>
-The image on this page should be left aligned. Especially the list which
-follows this text should be laid out correctly. Bla bla bla
-This is just some text which you can safely ignore. This is just some 
-text which you can safely ignore. This is just some text which you can 
-safely ignore. This is just some text which you can safely ignore. 
-<br>
-<ul>
-<li> an item
-<li> This is a very long line which really should be placed on the right 
-place despite it's very long length.
-<li> another item. 
-</ul>
-This is some text placed after the list
-</body>
-</html>
diff --git a/WebCore/khtml/test/align2.html b/WebCore/khtml/test/align2.html
deleted file mode 100644
index 56f3feb..0000000
--- a/WebCore/khtml/test/align2.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Align Test 2</TITLE>
-</HEAD>
-<BODY>
-<H1>Align Test 2</H1>
-This page contains regression tests for vertical alignment of images.
-Each test consist of a table with a colored background. 
-Within the table an empty image is shown with a border of 1 pixel around it. 
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1>
-<FONT size=7>This image has no alignment</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=top>
-<FONT size=7>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=middle>
-<FONT size=7>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=bottom>
-<FONT size=7>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1>
-<FONT size=7>This image has no alignment</FONT>
-<IMG SRC="unknown.gif" height=50 width=50 border=1>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=top>
-<FONT size=7>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=middle>
-<FONT size=7>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=bottom>
-<FONT size=7>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1>
-<FONT>This image has no alignment</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=top>
-<FONT>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=middle>
-<FONT>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=bottom>
-<FONT>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1>
-<FONT>This image has no alignment</FONT>
-<IMG SRC="unknown.gif" height=50 width=50 border=1>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=top>
-<FONT>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=middle>
-<FONT>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=bottom>
-<FONT>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-</body>
-</html>
diff --git a/WebCore/khtml/test/anchor1.html b/WebCore/khtml/test/anchor1.html
deleted file mode 100644
index 4dfb261..0000000
--- a/WebCore/khtml/test/anchor1.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html> <head> <title>Anchor Test 1</title> </head>
-
-
-<body>
-<H1>Anchor Test 1</H1>
-This page is a regression test for anchor's.
-<P>
-<A href="#anchor1">This</a> link should jump to anchor1.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-<P>
-Note that the page may not scroll, if there are no scrollbars!
-</td>
-<td><img src="nav_bar.gif" height=200></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor1>anchor1</a>.
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/anchor2.html b/WebCore/khtml/test/anchor2.html
deleted file mode 100644
index 4f54e83..0000000
--- a/WebCore/khtml/test/anchor2.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<html> <head> <title>Anchor Test 1</title> </head>
-
-
-<body>
-<H1>Anchor Test 1</H1>
-This page is a regression test for anchor's.
-<P>
-This is <a name=anchor1>anchor1</a>.
-<P>
-<A href="#anchor2">This</a> link should jump to anchor2.
-<P>
-<A href="#anchor3">This</a> link should jump to anchor3.
-<P>
-<A href="#anchor4">This</a> link should jump to anchor4.
-<P>
-<A href="#anchor5">This</a> link should jump to anchor5.
-<P>
-<A href="#anchor6">This</a> link should jump to anchor6.
-<P>
-<A href="#anchor7">This</a> link should jump to anchor7.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=100></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor2>anchor2</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=4000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor3>anchor3</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=8000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor4>anchor4</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=17000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor5>anchor5</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=33000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor6>anchor6</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-This <b id="anchor7">bold</b> tag has the id anchor7.
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/badpages.html b/WebCore/khtml/test/badpages.html
deleted file mode 100644
index bdbb154..0000000
--- a/WebCore/khtml/test/badpages.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<html> <head> <title>Bad Pages</title> </head>
-
-
-<body>
-<H1>Bad Pages</H1>
-This page contains links to pages which have been reported to look
-'bad' in the past.
-
-<HR><B>
-<a href="http://www.nytimes.com/library/world/asia/102898china-rights.html">
-http://www.nytimes.com/library/world/asia/102898china-rights.html
-</a></b>
-<P>
-Report: This page doesn't show anything<BR>
-WABA: The error "Access denied" isn't shown to the user<BR>
-malte: No "Access denied", but a misplaced &lt;SELECT&gt;
-
-<HR><B>
-<a href="http://www.apa.at">
-http://www.apa.at
-</a></b>
-<P>
-Report: Loads forever, and bottom two frames never show anything<br>
-malte: reloads once triggered by JS, does not when entered as http://www.apa.at/<br>
-Some frames may not be loaded, when the frameset is loaded from file:/, all is well
-
-<HR><B>
-<a href="http://www.exploits.org/~rkroll/ups.html">
-http://www.exploits.org/~rkroll/ups.html
-</a></b>
-<P>
-Report: If I print it to A4 paper, AOK.
-I try to print it to letter (paper size),
-and kfm crashes.
-I can print other URL's or directory listings
-without mishap.
-
-<HR><B>
-<a href="http://www.blizzard.com">
-http://www.blizzard.com
-</a></b>
-<P>
-Report: just displays big black page<br>
-malte: some links still missing
-
-
-<HR><B>
-<a href="http://www.hotbot.com">
-http://www.hotbot.com
-</a></b>
-<P>
-Report: Lots of errors on this page. Also some odd repainting when resizing<br>
-malte: Label for language combo misplaced<br>
-<a href="table10.html">Testcase</a>
-
-<HR><B>
-<a href="http://www.download.com">
-http://www.download.com
-</a></b>
-<P>
-Report: follow the "Wordperfect for linux" download link and you'll
-come to a badly formatted page.<br>
-malte: Can't reproduce, but text overlaps images on entry page<br>
-<a href="table11.html">Testcase</a>
-
-<HR><B>
-<a href="http://www.ihug.co.nz">
-http://www.ihug.co.nz
-</a></b>
-<P>
-Report: The title banner "ihug something" is not right.
-The rh text should scroll in from the rhs.
-Animated advertisments on this page are not right.
-If it looks like it might have worked the first time
-then reload the page and it'll be wrong.<br>
-malte: what text should scroll? the banners are indeed screwed (wrong colours)
-
-<HR><B>
-<a href="http://www.irt.de/IRT/indexaktuelles.htm">
-http://www.irt.de/IRT/indexaktuelles.htm
-</a></b>
-<P>
-Report: #5648, main frame (including vertical scrollbar) exceeds window size<br>
-<a href="frameset2.html">Testcase</a>
-
-<HR><B>
-<a href="http://www.happypenguin.org">
-http://www.happypenguin.org
-</a></b>
-<P>
-Report: #6937 Middle column way too small, left column too wide instead<br>
-malte: The layout is completely screwed. The top of the page is at the bottom, tables are
-badly messed up
-
-<HR><B>
-<a href="http://www.tweakers.net/pricewatch.dsp">
-http://www.tweakers.net/pricewatch.dsp
-</a></b>
-<P>
-Report: #7597, navbar and logo missing on top, page is too high
-
-<HR><B>
-<a href="http://www.linux.nu">
-http://www.linux.nu
-</a></b>
-<P>
-Report: #8599 massively broken table layout.
-
-<HR><B>
-<a href="http://www.thief-thecircle.com">
-http://www.thief-thecircle.com
-</a></b>
-<P>
-Report: #8792 misaligned images
-
-<HR><B>
-<a href="http://www.reichel.at/page10.html">
-http://www.reichel.at/page10.html
-</a></b>
-<P>
-Report: Page very long 4155<br>
-
-<HR>
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/buggy.html b/WebCore/khtml/test/buggy.html
deleted file mode 100644
index ad548a9..0000000
--- a/WebCore/khtml/test/buggy.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-  <head>
-    <title>pages that are still a bit buggy in khtml</title>
-  </head>
-
-  <body>
-<p>
-<a href="http://www.infoworld.com">www.infoworld.com</a><br>
-Frames are less than perfect
-<p>
-<a href="http://www.crme.de">crme.de</a>
-Frames don't resize correctly
-<p>
-page very long
-4155 <a href="http://www.reichel.at/page10.html"> http://www.reichel.at/page10.html</a>
- <p> 
-</body>
-</html>
diff --git a/WebCore/khtml/test/button.html b/WebCore/khtml/test/button.html
deleted file mode 100644
index b9c3ae1..0000000
--- a/WebCore/khtml/test/button.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<body bgcolor=white>
-text before
-<button name=button type=submit value="this should get replaced by the contents">
-some text
-<table width=200 border=1>
-<tr><td bgcolor=red>1<td bgcolor=blue>2</tr>
-<tr><td bgcolor=blue>3<td bgcolor=red>4</tr>
-</table>
-more text
-</button>
-text after text after text after text after text after text after text after text after text after text after text after text after text after text after text after text after 
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/khtml/test/color.html b/WebCore/khtml/test/color.html
deleted file mode 100644
index ff56172..0000000
--- a/WebCore/khtml/test/color.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Color Test 1</TITLE>
-</HEAD>
-<BODY>
-<H1>Color Test 1</H1>
-This page contains regression tests for the parsing of colors.
-Each test consist of a table with a colored background. 
-Within the table the name of the color is written in black text.
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="#0000ff">
-Blue (#0000ff)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="0000ff">
-Blue (0000ff)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="blue">
-Blue (blue)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="BLUE">
-Blue (BLUE)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="#ffff00">
-Yellow (#ffff00)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="ffff00">
-Yellow (ffff00)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="yellow">
-Yellow (yellow)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="teal">
-Teal (teal)
-</td></tr>
-</TABLE>
-<HR>
-</body>
-</html>
diff --git a/WebCore/khtml/test/fixed-background.html b/WebCore/khtml/test/fixed-background.html
deleted file mode 100644
index 087c9ef..0000000
--- a/WebCore/khtml/test/fixed-background.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html> <head> <title>Listing Test 1</title> 
-<style>
-html { background-attachment: fixed;
-    background-image: url(konqi.gif);
-}
-body { color: red; }
-</style>
-</head>
-<body>
-<H1>Listing Test 1</H1>
-This is a regression test to see if the parser handles the &lt;listing&gt;
-tag correctly.<BR>
-<H2>Simple listing</H2>
-Now follows a short listing, after the listing the text
-"End of listing" should be visible.
-<listing>
-//----------------------------------------------------------------------------
-//
-// KDE HTML Widget -- Debug functions
-// $Id$
-
-#include <stdio.h>
-#include <stdarg.h>
-#include "khtml.h"
-
-#ifdef MARTINSDEBUG
-void debugM( const char *msg, ...)
-{
-    va_list ap;
-    va_start( ap, msg );                // use variable arg list
-    vfprintf( stdout, msg, ap );
-    va_end( ap );
-#else
-void debugM(const char *, ... )
-{
-#endif
-}
-</listing>
-End of listing.
-<H2>Listing with entities</H2>
-Now follows a short listing, the listing shoul read
-"a = b&amp;amp;"<BR>
-<listing>
-a = b&amp;
-</listing>
-
-</BODY>
-</HTML>
diff --git a/WebCore/khtml/test/image.gif b/WebCore/khtml/test/image.gif
deleted file mode 100644
index ba019ef..0000000
Binary files a/WebCore/khtml/test/image.gif and /dev/null differ
diff --git a/WebCore/khtml/test/image_map.html b/WebCore/khtml/test/image_map.html
deleted file mode 100644
index 21e0023..0000000
--- a/WebCore/khtml/test/image_map.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html> <head> <title>Image Map Test 1</title> </head>
-
-
-<body>
-<H1>Image Map Test 1</H1>
-
-The following image is a clickable map:
-<P>
-<IMG ISMAP SRC="nav_bar.gif" ALT="" BORDER=0 USEMAP="#topbar" HEIGHT=18 WIDTH=361>
-<P>
-Moving the mouse cursor over the image should show different destinations
-<P>
-
-<!-- ===============  TOP IMAGE MAP =========== -->
-<MAP name="topbar">
-<AREA shape="rect" coords="90,0,120,18" href="http://www.kde.org/faq/kdefaq.html">
-<AREA shape="rect" coords="130,0,205,18" href="ftp://ftp.kde.org/pub/kde/">
-<AREA shape="rect" coords="215,0,295,18" href="http://www.kde.org/absolute_url.html">
-<AREA shape="rect" coords="305,0,355,18" href="relative_url_index.html">
-<AREA shape="default" nohref>
-</MAP>
-
-</BODY>
-</HTML>
diff --git a/WebCore/khtml/test/index.html b/WebCore/khtml/test/index.html
deleted file mode 100644
index ad0c77c..0000000
--- a/WebCore/khtml/test/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<html> <head> <title>KHTML Test pages</title> </head>
-
-<body>
-<H1>KHTML Test pages</H1>
-<P>This Page contains links to the regression test pages in this directory</P>
-
-<ul>
-  <li>General Parsing
-    <ul>
-      <li><a href="parser1.html">parser1.html</a> - Spaces, LFs, broken tags</li>
-      <li><a href="parser2.html">parser2.html</a> - Entities</li>
-      <li><a href="parser3.html">parser3.html</a> - Entities inside PRE</li>
-      <li><a href="parser4.html">parser4.html</a> - Entities in different contexts</li>
-      <li><a href="parser_ext1.html">parser_ext1.html</a> - Unencoded &lt; and &gt;</li>
-      <li><a href="comments.html">comments.html</a> - Comment Parsing</li>
-      <li><a href="nbsp.html">npsb.html</a> - Non-breaking white space</li>
-    </ul>
-  </li>
-  <li>Some Tags
-    <ul>
-      <li><a href="title.html">title.html</a> - Titled page</li>
-      <li><a href="notitle.html">notitle.html</a> - Untitled page</li>
-      <li><a href="tag_br.html">tag_br.html</a> - Linebreaks with BR</li>
-      <li><a href="tag_hr.html">tag_hr.html</a> - Rules with HR</li>
-      <li><a href="tag_ol.html">tag_ol.html</a> - Ordered lists with OL</li>
-      <li><a href="tag_ul.html">tag_ul.html</a> - Unordered lists with UL</li>
-      <li><a href="listing.html">listing.html</a> - The LISTING tag</li>
-    </ul>
-  </li>
-  <li>Text Attributes and Layouting
-    <ul>
-      <li><a href="color.html">color.html</a> - Colour handling</li>
-      <li><a href="align.html">align.html</a> - Horizontal alignment (left)</li>
-      <li><a href="align1.html">align.html</a> - Horizontal alignment (right)</li>
-      <li><a href="align2.html">align2.html</a> - Vertical alignment</li>
-      <li><a href="layout.html">layout.html</a> - Layouting</li>
-    </ul>
-  </li>
-  <li>Backgrounds
-    <ul>
-      <li><a href="1pixel.html">1pixel.html</a> - Transparent background image and background colour</li>
-      <li><a href="2pixel.html">2pixel.html</a> - Transparent background image and background colour</li>
-      <li><a href="4pixel.html">4pixel.html</a> - Partially transparent background image</li>
-      <li><a href="fixed-background.html">fixed-background.html</a> - Non-scrolling background</li>
-    </ul>
-  </li>
-  <li>Anchors and Hyperlinks
-    <ul>
-      <li><a href="anchor1.html">anchor1.html</a> - Single anchor</li>
-      <li><a href="anchor2.html">anchor2.html</a> - Multiple anchors</li>
-      <li><a href="URL1.html">URL1.html</a> - BASE and links</li>
-      <li><a href="URL2.html">URL2.html</a> - Absolute and relative URLS</li>
-    </ul>
-  </li>
-  <li>Tables and Lists
-    <ul>
-      <li><a href="lists.html">lists.html</a> - Lists and simple tables</li>
-      <li><a href="table1.html">table1.html</a> - Cell widths #1</li>
-      <li><a href="table2.html">table2.html</a> - Large table performance</li>
-      <li><a href="table3.html">table3.html</a> - Simple tables</li>
-      <li><a href="table4.html">table4.html</a> - Cell widths #2</li>
-      <li><a href="table5.html">table5.html</a> - Cell widths #3</li>
-      <li><a href="table6.html">table6.html</a> - Cell widths #4</li>
-      <li><a href="table7.html">table7.html</a> - colspan and rowspan</li>
-      <li><a href="table8.html">table8.html</a> - Vertical alignment</li>
-      <li><a href="table9.html">table9.html</a> - COL and COLGROUP</li>
-    </ul>
-  </li>
-  <li>Forms
-    <ul>
-      <li><a href="forms.html">forms.html</a> - Forms</li>
-      <li><a href="textarea.html">textarea.html</a> - TEXTAREA</li>
-      <li><a href="button.html">button.html</a> - BUTTON</li>
-    </ul>
-  </li>
-  <li>Frames
-    <ul>
-      <li><a href="frameset.html">frameset.html</a> - Simple FRAMESET</li>
-      <li><a href="iframe.html">iframe.html</a> - IFRAME</li>
-      <li><a href="recursive_frames.html">recursive_frames.html</a> - Recursive FRAMESET</li>
-    </ul>
-  </li>
-  <li>Images, Objects, Plugins, Applets
-    <ul>
-      <li><a href="image_map.html">image_map.html</a> - Imagemap</li>
-      <li><a href="object.html">object.html</a> - OBJECT</li>
-      <li><a href="embed2.html">embed2.html</a> - Different attributes to EMBED</li>
-      <li><a href="embed3.html">embed3.html</a> - OBJECT and EMBED</li>
-      <li><a href="embed4.html">embed4.html</a> - EMBEDs galore</li>
-      <li><a href="embed5.html">embed5.html</a> - Open EMBED</li>
-      <li><a href="embed6.html">embed6.html</a> - Real Player</li>
-      <li><a href="embed7.html">embed7.html</a> - Parameters to MIME-Type</li>
-      <li><a href="embed8.html">embed8.html</a> - Java VM</li>
-      <li><a href="java.html">java.html</a> - Java applet</li>
-    </ul>
-  </li>
-  <li>I18N Support
-    <ul>
-      <li><a href="unicode.html">unicode.html</a> - Unicode characters</li>
-      <li><a href="bidi.html">bidi.html</a> - BiDi</li>
-      <li><a href="bidi2.html">bidi2.html</a> - More bidi</li>
-    </ul>
-  </li>
-  <li>Scripting
-    <ul>
-      <li><a href="javascript.html">javascript.html</a> - JavaScript</li>
-      <li><a href="dom.html">dom.html</a> - General DOM</li>
-      <li><a href="dom_html.html">dom_html.html</a> - HTML DOM</li>
-    </ul>
-  </li>
-  <li><a href="testpages.html">Links to other test suits</a></li>
-  <li><a href="badpages.html">Pages KHTML doesn't like</a></li>
-</ul>
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/java.html b/WebCore/khtml/test/java.html
deleted file mode 100644
index dfe8d69..0000000
--- a/WebCore/khtml/test/java.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>
-<body>
-<table>
-<tr>
-<td width=240>
-<APPLET CODE=lake.class ID=Lake WIDTH=240 HEIGHT=630>
-    <PARAM NAME=image VALUE="konqi.gif">
-</APPLET>
-<td width=240>
-This is a small page to test html's java support. On the left you should see a picture of
-Konqi, which is mirrored on a water surface below.
-</table>
-This text should be directly beow the applet...
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/khtml/test/javascript.html b/WebCore/khtml/test/javascript.html
deleted file mode 100644
index 5d1fb56..0000000
--- a/WebCore/khtml/test/javascript.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-  <head>
-    <title>JavaScript Test</title>
-  </head>
-  <body bgcolor=green>
-    <h1>JavaScript Test</h1>
-
-<script>
-var swapped = false;
-function swapPic() {
-  if (!swapped) {
-    window.document.Bild.src='konqi.gif';
-    swapped = true;
-  } else {
-    document.images['Bild'].src='image.gif';
-    swapped = false;
-  }
-}
-var colorSwapped = false;
-function swapCol() {
-  if (!colorSwapped) {
-    document.body.bgColor='red';
-    colorSwapped = true;
-  } else {
-    document.body.bgColor='green';
-    colorSwapped = false;
-  }
-}
-
-</script>
-
-<p>
-<script>document.write('Title: ' + document.title);</script>
-<p>
-<script>document.write('URL: ' + document.URL);</script>
-<p>
-<script>document.write('sin(1) = ' + Math.sin(1));</script>
-<p>
-<a href="" onmouseover="window.status='CLICK HERE !';" onmouseout="window.status='';" onClick="window.alert('Greetings !\n\nYour JavaScript interpreter');">Click here.</a>
-
-<p>
-<img src="image.gif" id="Bild" onmouseover="swapPic();" onmouseout="swapPic();">
-
-<p onmouseover="swapCol();" onmouseout="swapCol();">Change background color</p>
-  </body>
-</html>
diff --git a/WebCore/khtml/test/jsplugins.html b/WebCore/khtml/test/jsplugins.html
deleted file mode 100644
index 7af7a25..0000000
--- a/WebCore/khtml/test/jsplugins.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>About Plug-ins</TITLE>
-</HEAD>
-<BODY>
-<SCRIPT language="javascript">
-
-
-<!-- JavaScript to enumerate and display all installed plug-ins -->
-
-<!-- First, refresh plugins in case anything has been changed recently in prefs:                        -->
-<!-- (The "false" argument tells refresh not to reload or activate any plugins that would       -->
-<!-- be active otherwise.  In contrast, one would use "true" in the case of ASD instead of      -->
-<!-- restarting)                                                                                                                                                        -->
-navigator.plugins.refresh(false);
-
-
-numPlugins = navigator.plugins.length;
-
-if (numPlugins > 0)
-        document.writeln("<b><font size=+3>Installed plug-ins</font></b><br>");
-else
-        document.writeln("<b><font size=+2>No plug-ins are installed.</font></b><br>");
-
-document.writeln("For more information on Netscape plug-ins, <A HREF=http://home.netscape.com/plugins/>click here</A>.<p><hr>");
-
-for (i = 0; i < numPlugins; i++)
-{
-        plugin = navigator.plugins[i];
-        
-        document.write("<center><font size=+1><b>");
-        document.write(plugin.name);
-        document.writeln("</b></font></center><br>");
-        
-        document.writeln("<dl><dd>File name:");
-        document.write(plugin.filename);
-        document.write("<dd><br>");
-        document.write(plugin.description);
-        document.writeln("</dl><p>");
-
-        document.writeln("<table width=100% border=2 cellpadding=5>");
-        document.writeln("<tr><th width=20%><font size=-1>Mime Type</font></th>");
-        document.writeln("<th width=50%><font size=-1>Description</font></th>");
-        document.writeln("<th width=20%><font size=-1>Suffixes</font></th>");
-        document.writeln("<th><font size=-1>Enabled</th></tr>");
-        numTypes = plugin.length;
-        for (j = 0; j < numTypes; j++)
-        {
-                mimetype = plugin[j];
-                
-                if (mimetype)
-                {
-                        enabled = "No";
-                        enabledPlugin = mimetype.enabledPlugin;
-                        if (enabledPlugin && (enabledPlugin.name == plugin.name))
-                                enabled = "Yes";
-
-                        document.writeln("<tr align=center>");
-                        document.writeln("<td>" + mimetype.type + "</td>");
-                        document.writeln("<td>" + mimetype.description + "</td>");
-                        document.writeln("<td>" + mimetype.suffixes + "</td>");
-                        document.writeln("<td>" + enabled + "</td>");
-                        document.writeln("</tr>");
-                }
-        }
-        
-        document.write("</table><p><hr><p>");
-}
-
-
-</SCRIPT>
-</BODY>
-</HTML>
\ No newline at end of file
diff --git a/WebCore/khtml/test/konqi.gif b/WebCore/khtml/test/konqi.gif
deleted file mode 100644
index b80293a..0000000
Binary files a/WebCore/khtml/test/konqi.gif and /dev/null differ
diff --git a/WebCore/khtml/test/lake.class b/WebCore/khtml/test/lake.class
deleted file mode 100644
index 3196702..0000000
Binary files a/WebCore/khtml/test/lake.class and /dev/null differ
diff --git a/WebCore/khtml/test/listing.html b/WebCore/khtml/test/listing.html
deleted file mode 100644
index 4f0eefa..0000000
--- a/WebCore/khtml/test/listing.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html> <head> <title>Listing Test 1</title> </head>
-
-<body>
-<H1>Listing Test 1</H1>
-This is a regression test to see if the parser handles the &lt;listing&gt; 
-tag correctly.<BR>
-<H2>Simple listing</H2>
-Now follows a short listing, after the listing the text 
-"End of listing" should be visible.
-<listing>
-//----------------------------------------------------------------------------
-//
-// KDE HTML Widget -- Debug functions
-// $Id$
-
-#include <stdio.h>  
-#include <stdarg.h>      
-#include "khtml.h"
-
-#ifdef MARTINSDEBUG
-void debugM( const char *msg, ...)
-{
-    va_list ap;
-    va_start( ap, msg );                // use variable arg list
-    vfprintf( stdout, msg, ap );
-    va_end( ap );
-#else
-void debugM(const char *, ... )
-{
-#endif
-}       
-</listing>
-End of listing.
-<H2>Listing with entities</H2>
-Now follows a short listing, the listing shoul read 
-"a = b&amp;amp;"<BR>
-<listing>
-a = b&amp;
-</listing>
-
-</BODY>
-</HTML>
diff --git a/WebCore/khtml/test/lists.html b/WebCore/khtml/test/lists.html
deleted file mode 100644
index 8f78165..0000000
--- a/WebCore/khtml/test/lists.html
+++ /dev/null
@@ -1,221 +0,0 @@
-<html>
-<body>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-
-<hr>
-In a fixed width table:
-<table width=100 border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-
-<hr>
-In a variable width table:
-<table border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-
-<hr>
-Now the same thing in a right to left context:
-
-<div dir=rtl>
-<hr>
-<ul dir=rtl>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-
-<hr>
-In a fixed width table:
-<table width=100 border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-
-<hr>
-In a variable width table:
-<table border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-</div>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/khtml/test/nav_bar.gif b/WebCore/khtml/test/nav_bar.gif
deleted file mode 100644
index 174348d..0000000
Binary files a/WebCore/khtml/test/nav_bar.gif and /dev/null differ
diff --git a/WebCore/khtml/test/nbsp.html b/WebCore/khtml/test/nbsp.html
deleted file mode 100644
index 7a8bde9..0000000
--- a/WebCore/khtml/test/nbsp.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html> <head> <title>NBSP Test</title> </head>
-
-
-<body>
-<H1>NBSP Test</H1>
-This page is a regression test to test non-breaking spaces.<BR>
-The following text contains normal and non-breaking spaces.<BR>
-After each 'a' a non-breaking space occurs. After each 'b' a
-breaking space occurs:
-<HR>
-<FONT face="lucida">
-ccccccca&nbsp;cccca&nbsp;ccccccb ccb cb ccb ccca&nbsp;ca&nbsp;a&nbsp;cb
-c4d&nbsp;&nbsp;&nbsp;&nbsp;cccc2d&nbsp;&nbsp;ccccb ccb ccc
-</FONT>
-<HR>
-
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/notitle.html b/WebCore/khtml/test/notitle.html
deleted file mode 100644
index cfabc29..0000000
--- a/WebCore/khtml/test/notitle.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html> <head> </head>
-
-
-<body>
-<H1>Title Test 2</H1>
-This page is the second regression test out of a set for Title handling
-within HTML.<BR>
-The title of this window should NOT be 
-<blockquote><PRE>Title Test 1</PRE></blockquote>
-
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/object.html b/WebCore/khtml/test/object.html
deleted file mode 100644
index 91da9f5..0000000
--- a/WebCore/khtml/test/object.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<html><head></head><body>
-<object type="inode/directory" data="file:/home/" width="300" height="100">
-</body>
-</html>
diff --git a/WebCore/khtml/test/pseudo.html b/WebCore/khtml/test/pseudo.html
deleted file mode 100644
index caba3bf..0000000
--- a/WebCore/khtml/test/pseudo.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-<html>
-<head>
-<style>
-span { background-color: blue; }
-span:hover { background-color: red; }
-div { border: 2px solid blue; }
-div:first-letter { background-color: green; float: left; font-size: 3em; margin: 3px 3px 3px 3px}
-div:first-line { background-color: red; font-size: 1em; }
-
-</style>
-</head>
-<body>
-<h1>:first-letter and :first-line</h1>
-<div>
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-</div>
-<h1>:hover</h1>
-<p>
- jee jee <span>jee</span> jee jee jee
-</p>
-</body>
-</html>
diff --git a/WebCore/khtml/test/renders.html b/WebCore/khtml/test/renders.html
deleted file mode 100644
index d50aa96..0000000
--- a/WebCore/khtml/test/renders.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html>
-  <head>
-    <title>pages khtml renders correctly</title>
-  </head>
-  <body>
-<p>
-    <a href="http://slashdot.org">Slashdot</a><br>
-      The left column is sensitive to changes/bugs in the table layouting code.
-<p>
-<a href="http://spiegel.de">Spiegel</a><br>
-      Page layout is done with floats.
-<p>
-<a href="http://www.linux.com">linux.com</a><br>
-nothing special about this one...
-<p>
-<a href="http://www.w3.org/Style/CSS/Test/current/sec5526c-test.htm">The acid test</a>
-complicated CSS layout using floats
-<p>
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/">David Baron's DOM test suite</a><br>
-Tests that work perfectly so far:
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/DocumentFragment">DocumentFragment</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Document">Document</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Comment">Comment</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Node">Node</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Text">Text</a>
-
-<p>
-<a href="http://www.jeremie.com/Dev/DOM/index.jer">more jscript tests</a>
-
-<p>
-<a href="http://www.people.fas.harvard.edu/~dbaron/css/test/">David Barons CSS test suite</a>
-<p>
-Some pages with tests from mozilla.org:
-<ul>
-<li><a href="http://komodo.mozilla.org/buster/">tests lots of pages</a>
-<li><a href="http://www.mozilla.org/quality/browser_sc.html">collection of links to test pages</a>
-</ul>
-
-  </body>
-</html>
diff --git a/WebCore/khtml/test/supsub.html b/WebCore/khtml/test/supsub.html
deleted file mode 100644
index c764267..0000000
--- a/WebCore/khtml/test/supsub.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<html> <head> <title>SUP &amp; SUB Test</title> </head>
-
-
-<body>
-<H1>SUP &amp; SUB Test</H1>
-<P>
-This page is a regression test to test the &lt;sup&gt; and &lt;sub&gt; tags.<BR>
-<HR>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-<HR>
-<FONT size=+1>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=+2>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=+3>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=-1>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=-2>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=-3>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/testpages.html b/WebCore/khtml/test/testpages.html
deleted file mode 100644
index 7c4192d..0000000
--- a/WebCore/khtml/test/testpages.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html>
-<title>
-Links to some test pages
-</title>
-<body>
-A site with lots of test pages for style sheets:
-<a href="http://style.verso.com/boxacidtest/">http://style.verso.com/boxacidtest/</a>
-<p>
-Some more CSS: <a href="http://haughey.com/csshorrors/">http://haughey.com/csshorrors/</a>
-<p>
-The w3c CSS test suite:<a href="http://www.w3.org/Style/CSS/Test/">
-http://www.w3.org/Style/CSS/Test/</a>
-<p>
-Some CSS2 tests: <a href="http://www.editions-eyrolles.com/livres/glazman/Tests/index.asp?ID=217554">
-http://www.editions-eyrolles.com/livres/glazman/Tests/index.asp?ID=217554</a><p>
-DOM test suite: <a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/">http://www.people.fas.harvard.edu/~dbaron/dom/test/</a><p>
-More evil CSS tests on <a href="http://www.bath.ac.uk/~py8ieh/cgi/listsuites.pl?suite=ETS&mode=list&sort=">bath.ac.uk</a>
-</body>
-</html>
-
diff --git a/WebCore/khtml/test/textarea.html b/WebCore/khtml/test/textarea.html
deleted file mode 100644
index ea997f0..0000000
--- a/WebCore/khtml/test/textarea.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html> <head> <title>Textarea Test</title> </head>
-
-
-<body>
-<H1>Textarea Test</H1>
-This page is a regression test for the &lt;textarea&gt; tag.<BR>
-The word "Start" should be above the textarea.<BR>
-The word "End" should be underneath the textarea.<BR>
-The text inside the textarea should match with its description.
-<form action="cgi-bin/test.cgi" method=post> 
-<H2>Textarea 1: Emtpy</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50></textarea>
-<P>End
-<P>
-<H2>Textarea 2: Single words</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>Single words</textarea>
-<P>End
-<P>
-<H2>Textarea 3: Lines of text</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>
-This is some text which is inserted into
-the textarea. This area contains 3 lines
-of text.
-</textarea>
-<P>End
-<P>
-<H2>Textarea 4: Text with tags inside</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>
-This is 3 lines of text.
-This lines contains a <B> tag.
-This line does not.
-</textarea>
-<P>End (Note that this text should NOT be bold)
-<P>
-<H2>Textarea 5: Text with entities</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>
-This is 3 lines of text.
-The correct way to write &lt;TAGS&gt; is by using &amp;entities.
-This is the third line.
-</textarea>
-<P>End
-<P>
-<input type=submit name=mode value="Submit">
-</form>
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/test/title.html b/WebCore/khtml/test/title.html
deleted file mode 100644
index 604b571..0000000
--- a/WebCore/khtml/test/title.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html> <head> <title>Title Test 1</title> </head>
-
-
-<body>
-<H1>Title Test 1</H1>
-This page is the first regression test out of a set for Title handling
-within HTML.<BR>
-The title of this window should be 
-<blockquote><PRE>Title Test 1</PRE></blockquote>
-<P>
-Click <a href="notitle.html">here</a> to continue.
-
-</body>
-
-</html>
diff --git a/WebCore/khtml/testcss.cpp b/WebCore/khtml/testcss.cpp
deleted file mode 100644
index 89c745c..0000000
--- a/WebCore/khtml/testcss.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// programm to test the CSS implementation
-
-#include <kapp.h>
-#include <kdebug.h>
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include "css/css_stylesheetimpl.h"
-#include "dom/dom_string.h"
-#include "css/cssstyleselector.h"
-#include "html/html_documentimpl.h"
-#include "html/html_elementimpl.h"
-#include "html/html_blockimpl.h"
-using namespace DOM;
-using namespace khtml;
-
-int main(int argc, char *argv[])
-{
-    KApplication a(argc, argv, "testcss");
-
-    char buf[40000];
-    int fd;
-
-    if(argc == 2)
-	fd = open(argv[1], O_RDONLY);
-    else
-	fd = open("/home/kde/test.css", O_RDONLY);
-	
-    if (fd < 0)
-    {
-        kdDebug( 6000 ) << "Couldn't open file" << endl;
-        return 0;
-    }
-
-    int len = read(fd, buf, 40000);
-
-    DOM::DOMString str(buf);
-
-    close(fd);
-
-    DOM::CSSStyleSheetImpl *sheet = new DOM::CSSStyleSheetImpl((DOM::CSSStyleSheetImpl *)0);
-    sheet->parseString( str );
-#if 0
-    kdDebug( 6000 ) << "==============> finished parsing <==================" << endl;
-
-    CSSStyleSelector *selector = new CSSStyleSelector(sheet);
-
-    kdDebug( 6000 ) << "==============> finished creation of Selector <==================" << endl;
-
-    HTMLDocumentImpl *doc;
-    HTMLElementImpl *e = new HTMLParagraphElementImpl(doc);
-    e->setAttribute(DOMString("id"), DOMString("myid"));
-    e->setAttribute(DOMString("class"), DOMString("c myclass anotherclass"));
-
-    selector->styleForElement(e);
-#endif
-    return 0;
-}
diff --git a/WebCore/khtml/testkhtml.cpp b/WebCore/khtml/testkhtml.cpp
deleted file mode 100644
index 4149a34..0000000
--- a/WebCore/khtml/testkhtml.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// programm to test the new khtml implementation
-
-#include <stdlib.h>
-#include "decoder.h"
-#include "kapp.h"
-#include <qfile.h>
-#include "html_document.h"
-#include "htmltokenizer.h"
-// to be able to delete a static protected member pointer in kbrowser...
-// just for memory debugging
-#define protected public
-#include "khtmlview.h"
-#include "khtml_part.h"
-#undef protected
-#include <qpushbutton.h>
-#include "testkhtml.h"
-#include "testkhtml.moc"
-#include "misc/loader.h"
-#include <qcursor.h>
-#include <qcolor.h>
-#include <dom_string.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qpushbutton.h>
-#include <qscrollview.h>
-#include <qwidget.h>
-#include <qvaluelist.h>
-#include "dom/dom2_range.h"
-#include "dom/html_document.h"
-#include "dom/dom_exception.h"
-#include <stdio.h>
-#include <khtml_factory.h>
-#include <css/cssstyleselector.h>
-#include <html/html_imageimpl.h>
-#include <rendering/render_style.h>
-#include <kmainwindow.h>
-#include <kcmdlineargs.h>
-#include <kaction.h>
-#include "domtreeview.h"
-
-static KCmdLineOptions options[] = { { "+file", "url to open", 0 } , {0, 0, 0} };
-
-int main(int argc, char *argv[])
-{
-
-    KCmdLineArgs::init(argc, argv, "Testkhtml", "a basic web browser using the KHTML library", "1.0");
-    KCmdLineArgs::addCmdLineOptions(options);
-
-    KApplication a;
-    KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
-    if ( args->count() == 0 ) {
-	KCmdLineArgs::usage();
-	::exit( 1 );
-    }
-
-    KHTMLFactory *fac = new KHTMLFactory();
-
-    KMainWindow *toplevel = new KMainWindow();
-    KHTMLPart *doc = new KHTMLPart( toplevel, 0,
-				    toplevel, 0, KHTMLPart::BrowserViewGUI );
-
-    Dummy *dummy = new Dummy( doc );
-    QObject::connect( doc->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
-		      dummy, SLOT( slotOpenURL( const KURL&, const KParts::URLArgs & ) ) );
-
-    doc->openURL( args->url(0) );
-    DOMTreeView * dtv = new DOMTreeView(0, doc, "DomTreeView");
-    dtv->show();
-    dtv->setGeometry(0, 0, 360, 800);
-
-    toplevel->setCentralWidget( doc->widget() );
-    toplevel->resize( 640, 800);
-    
-    QDomDocument d = doc->domDocument();
-    QDomElement viewMenu = d.documentElement().firstChild().childNodes().item( 2 ).toElement();
-    QDomElement e = d.createElement( "action" );
-    e.setAttribute( "name", "debugRenderTree" );
-    viewMenu.appendChild( e );
-    e = d.createElement( "action" );
-    e.setAttribute( "name", "debugDOMTree" );
-    viewMenu.appendChild( e );
-    QDomElement toolBar = d.documentElement().firstChild().nextSibling().toElement();
-    e = d.createElement( "action" );
-    e.setAttribute( "name", "reload" );
-    toolBar.insertBefore( e, toolBar.firstChild() );
-
-    (void)new KAction( "Reload", "reload", Qt::Key_F5, dummy, SLOT( reload() ), doc->actionCollection(), "reload" );
-
-    toplevel->guiFactory()->addClient( doc );
-
-    doc->enableJScript(true);
-    doc->enableJava(true);
-    doc->setURLCursor(QCursor(PointingHandCursor));
-    a.setTopWidget(doc->widget());
-    QWidget::connect(doc, SIGNAL(setWindowCaption(const QString &)),
-		     doc->widget(), SLOT(setCaption(const QString &)));
-    doc->widget()->show();
-    toplevel->show();
-    ((QScrollView *)doc->widget())->viewport()->show();
-
-
-    int ret = a.exec();
-
-    //delete dtv;
-
-    khtml::Cache::clear();
-    khtml::CSSStyleSelector::clear();
-    khtml::RenderStyle::cleanup();
-
-    delete fac;
-    return ret;
-}
-
diff --git a/WebCore/khtml/testkhtml.h b/WebCore/khtml/testkhtml.h
deleted file mode 100644
index 07615ab..0000000
--- a/WebCore/khtml/testkhtml.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef TESTKHTML_H
-#define TESTKHTML_H
-
-/**
- * @internal
- */
-class Dummy : public QObject
-{
-  Q_OBJECT
-public:
-  Dummy( KHTMLPart *part ) : QObject( part ) { m_part = part; };
-
-private slots:
-  void slotOpenURL( const KURL &url, const KParts::URLArgs &args )
-  {
-    m_part->browserExtension()->setURLArgs( args );
-    m_part->openURL( url );
-  }
-  void reload()
-  {
-      KParts::URLArgs args; args.reload = true;
-      m_part->browserExtension()->setURLArgs( args );
-      m_part->openURL( m_part->url() );
-  }
-
-private:
-  KHTMLPart *m_part;
-};
-
-#endif
diff --git a/WebCore/khtml/testrender.cpp b/WebCore/khtml/testrender.cpp
deleted file mode 100644
index d8667c8..0000000
--- a/WebCore/khtml/testrender.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Peter Kelly <pmk at post.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-// See testrender.h for a description of this program
-
-// #include <iostream.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#define private public // bad bad bad....
-#include <khtml_part.h>
-#undef private
-#include <khtmlview.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <klocale.h>
-#include <kdebug.h>
-
-#include "testrender.h"
-#include "testrender.moc"
-
-#include "xml/dom_docimpl.h"
-#include "html/html_documentimpl.h"
-#include "rendering/render_object.h"
-
-#define PAINT_BUFFER_HEIGHT 150
-
-TestRender::TestRender(QString _sourceDir, QString _destDir, QString _logFilename, QWidget *parent, const char *name) : QWidget(parent, name)
-{
-  // setup gui
-  sourceDir = _sourceDir;
-  destDir = _destDir;
-  logFilename = _logFilename;
-  resize(800,600);
-  (new QVBoxLayout(this))->setAutoAdd(true);
-
-  QWidget *infoWidget = new QWidget(this);
-  QHBoxLayout *hLayout = new QHBoxLayout(infoWidget);
-  info = new QLabel("KHTML test",infoWidget);
-  hLayout->addWidget(info,50);
-  progress = new QProgressBar(infoWidget);
-  hLayout->addWidget(progress,50);
-  fileno = 0;
-
-  part = new KHTMLPart(this);
-  connect(part,SIGNAL(completed()),this,SLOT(slotPartCompleted()));
-
-  // get list of filenames
-  QDir d(sourceDir);
-  sourceDir = d.absPath();
-  d.setFilter( QDir::Files  );
-  d.setSorting( QDir::Name );
-
-  const QFileInfoList *fileInfoList = d.entryInfoList();
-  QFileInfoListIterator it(*fileInfoList);
-
-  for (; it.current(); ++it) {
-    if (!strcasecmp(it.current()->fileName().right(5).latin1(),".html"))
-        filenames.append(it.current()->fileName().latin1());
-  }
-
-  progress->setTotalSteps(filenames.count());
-}
-
-TestRender::~TestRender()
-{
-  delete part;
-}
-
-void TestRender::processFiles()
-{
-  fileno = -1;
-
-  logFile = new QFile(logFilename);
-  if (!logFile->open(IO_WriteOnly)) {
-    delete logFile;
-    close();
-    return;
-  }
-
-  logStream = new QTextStream(logFile);
-  *logStream << "----------- TestRender begin " << sourceDir << " -------------" << endl;
-
-  nextPage();
-}
-
-void TestRender::slotPartCompleted()
-{
-  *logStream << "Finished rendering "+QString(filenames.at(fileno)) << endl;
-  renderToImage();
-  nextPage();
-}
-
-void TestRender::nextPage()
-{
-  fileno++;
-  progress->setProgress(fileno);
-  if (fileno < int(filenames.count())) {
-    info->setText("Rendering "+QString(filenames.at(fileno)));
-    *logStream << "Rendering "+QString(filenames.at(fileno)) << endl;
-    part->openURL(sourceDir+"/"+filenames.at(fileno));
-  }
-  else {
-    *logStream << "----------- Completed successfully -------------" << endl;
-    info->setText("Finished");
-    logFile->close();
-    delete logStream;
-    delete logFile;
-//    close();
-  }
-}
-
-void TestRender::renderToImage()
-{
-  int py=0;
-  int ew = part->view()->viewport()->width();
-  int eh = part->view()->viewport()->height();
-  QPixmap paintBuffer(800,600);
-
-  while (py < eh)
-  {
-    QPainter* tp = new QPainter;
-    tp->begin( &paintBuffer );
-
-    int ph = eh-py<PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT;
-
-    tp->fillRect(0, py, ew, ph, palette().normal().brush(QColorGroup::Background));
-    part->docImpl()->renderer()->print(tp, 0, py, ew, ph, 0, 0);
-    tp->end();
-    delete tp;
-    py += PAINT_BUFFER_HEIGHT;
-  }
-
-  if (!paintBuffer.save(destDir+"/"+filenames.at(fileno)+".png","PNG"))
-    *logStream << "Error writing to file "+destDir+"/"+filenames.at(fileno)+".png" << endl;
-
-}
-
-static KCmdLineOptions options[] =
-{
-  { "+[SourceDir]", I18N_NOOP("dir containing test files"), 0 },
-  { "+[DestDir]", I18N_NOOP("dir to save rendered images in"), 0 },
-  { "+[DestDir]", I18N_NOOP("log filename"), 0 },
-  { 0, 0, 0 }
-  // INSERT YOUR COMMANDLINE OPTIONS HERE
-};
-
-int main(int argc, char *argv[])
-{
-
-  KAboutData aboutData( "testrender", I18N_NOOP("TestRender"),
-    0, "Program to test rendering", KAboutData::License_LGPL,"");
-  KCmdLineArgs::init( argc, argv, &aboutData );
-  KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
-
-  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-  if (args->count() < 3) {
-    kdError() << "testrender <sourcedir> <imagesdir> <logfile>\n";
-    return 0;
-  }
-
-  QString sourceDir = args->arg(0);
-  QString destDir = args->arg(1);
-  QString logFilename = args->arg(2);
-  if (!QDir(sourceDir).exists()) {
-    kdError() << "source dir \"" << sourceDir.latin1() << "\" does not exist\n";
-    return 0;
-  }
-
-  if (!QDir(destDir).exists()) {
-    kdError() << "dest dir \"" << destDir.latin1() << "\" does not exist\n";
-    return 0;
-  }
-
-
-  KApplication a;
-  TestRender *testrender = new TestRender(sourceDir,destDir,logFilename);
-  a.setMainWidget(testrender);
-  testrender->show();
-//  testrender->showMaximized();
-  testrender->processFiles();
-
-  return a.exec();
-}
diff --git a/WebCore/khtml/testrender.h b/WebCore/khtml/testrender.h
deleted file mode 100644
index 59a29ff..0000000
--- a/WebCore/khtml/testrender.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Peter Kelly <pmk at post.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-/*
-  This program can be used to render a series of pages into png files. It is
-  useful for comparing the results of rendering before/after making changes
-  to khtml.
-
-  USAGE: testrender <sourcedir> <imagesdir> <logfile>
-
-  where <sourcedir> contains some html files. Images will be output to <imagesdir>
-  Then you can use diff -qr to compare two images directories and see what
-  has changed.
-
-  This program seems to have problems occasionally with grabbing pages before they
-  are ready.... will fix sometime
-*/
-
-
-#ifndef TESTRENDER_H
-#define TESTRENDER_H
-
-#include <qwidget.h>
-#include <qdir.h>
-#include <kapp.h>
-#include <kurl.h>
-#include <khtmlview.h>
-
-class QLabel;
-class QProgressBar;
-class QFile;
-class QTextStream;
-class KHTMLPart;
-class MyKHTMLView;
-
-/**
- * @internal
- */
-class TestRender : public QWidget
-{
-  Q_OBJECT
-public:
-  /** construtor */
-  TestRender(QString _sourceDir, QString _destDir, QString _logFilename, QWidget* parent=0, const char *name=0);
-  /** destructor */
-  ~TestRender();
-
-  void processFiles();
-protected:
-  QLabel *info;
-  QProgressBar *progress;
-  KHTMLPart *part;
-  MyKHTMLView *view;
-
-  QString sourceDir;
-  QString destDir;
-  QString logFilename;
-  QStrList filenames;
-  int fileno;
-  QFile *logFile;
-  QTextStream *logStream;
-
-  void nextPage();
-  void renderToImage();
-
-protected slots:
-  void slotPartCompleted();
-};
-
-
-
-#endif
diff --git a/WebCore/src/kdelibs/AUTHORS b/WebCore/src/kdelibs/AUTHORS
deleted file mode 100644
index 8bbe4e4..0000000
--- a/WebCore/src/kdelibs/AUTHORS
+++ /dev/null
@@ -1,7 +0,0 @@
-Look in the appropiate subdirectories or files to get more information
-about the authors.
-
-The package is maintained by Kalle Dalheimer <kalle at kde.org>, however
-numerous people, too many to count, have contributed to kdelibs as a
-whole.  If you have a specific question, dig up the appropiate mailing
-list address, and ask away.
diff --git a/WebCore/src/kdelibs/README b/WebCore/src/kdelibs/README
deleted file mode 100644
index a36877e..0000000
--- a/WebCore/src/kdelibs/README
+++ /dev/null
@@ -1,221 +0,0 @@
-In this file:
-
-* About kdelibs
-* Licensing
-* Common Mistakes
-* Upgrading
-* Compile Problems
-* More Info
-
-
-About kdelibs
--------------
-This is version 2.2 of the KDE libraries.
-
-This package includes libraries that are central to the development and 
-execution of a KDE program, as well as internationalization files for these 
-libraries, misc HTML documentation, theme modules, and regression tests. 
-Here is a list:
-
-* kdecore
-    This is the core collection of KDE stuff. Non GUI classes reside here.
-
-* kdeui
-    The main collection of misc. user interface classes (widgets).
-
-* kimgio
-    An all purpose extension to the qimgio class that supports some obscure
-    image formats.
-
-* kfile
-    This library contains the KFileDialog in all its glory.
-
-* kspell
-    KSpell and related classes are a frontend to ispell for use within a
-    GUI app.
-
-* kab
-    The address book library.
-
-* khtml
-    The next generation HTML rendering widget designed for Konqueror
-    (kfm's successor). This supports HTML 4, CSS, and a variety of other web
-    related standards.
-
-* kio
-    Classes that fetch and decode URLs are contained here. This library also
-    contains "ksycoca", the system configure cache containing services,
-    applications, servicetypes and mimetypes.
-
-* kjs
-    KDE's implementation of ECMAScript (aka JavaScript).
-
-* kparts
-    KDE component model.
-
-* kstyles
-    The theme engine lies within. It handles nearly anything relating to
-    customizing the appearance of widgets.
-
-* dcop
-    The desktop communication program allows even shell scripts to communicate
-    with KDE applications. It's also the base for KParts.
-
-* kssl
-    An SSL intergration for KDE. It currently uses OpenSSL.
-
-* arts
-    ARTS (analog realtime synthesizer) is a environment of small modules
-    that one can plug together to process multimedia data.
-
-* kdesu
-    Library for password entering and handling
-
-* kinit
-    Process launcher, used for fast KDE startup
-
-* ksgmltools
-    Docbook and SGML tools needed to generate documentation for KDE.
-
-* libkmid
-    MIDI file handling and midi mapper (manages output of midi files to
-    various devices).
-
-* interfaces
-    kparts interface for text editors
-
-* libtldl
-    System independed dlopen() handler.
-
-* mimetypes
-    Database of mime types.
-
-* pics
-    Database of icons.
-
-* libkscreensaver
-    Library for making KDE screensavers.
-
-Licensing
----------
-The libraries themselves have been covered (since Saturday, June 21st, 1997)
-by the GNU Library General Public License (LGPL). Any other programs (such as
-the examples) are covered by the GNU General Public License (GPL). All the
-gory details for the LGPL reside in COPYING.LIB, and for the GPL reside in 
-COPYING.
-
-Various parts are also covered under a BSD style license, detailed in
-COPYING.BSD. Currently, code covered under such license is copyrighted by
-Theo de Raadt.
-
-When in doubt, check the individual file, they should all have license
-headings and other identifying marks.
-
-
-Common Mistakes
----------------
-If configure claims Qt cannot be found, have a look at http://www.troll.no
-to get a copy of Qt, version 2.2.3 or newer. If you have peeked there
-already, grab the CVS module qt-copy from anoncvs.kde.org, or a snapshot
-thereof.
-
-
-Debugging
----------
-You can use --enable-debug with the configure script, if you want to have
-debug code in your KDE libs. If you have the space and can stand code that's
-somewhat slower, this is worth it. The extra information really
-helps debugging and thus bugfixing.
-
-On the other hand, --disable-debug removes all debug messages, leading
-to a faster and cleaner desktop.
-
-See also the file DEBUG.
-
-
-Upgrading
----------
-If you have an kdebase older than 2.0 installed, just copy all your .k*rc
-files from $HOME to $HOME/.kde/share/config. In the other case, default
-values are used for most apps.
-
-
-Compile Problems
-----------------
-Often, KDE compile failures are not KDE's faults but the one of the
-compiler or the distribution used. For that reason, please have a look at
-http://www.kde.org/compilationfaq.html for know issues in certain OS
-environments before reporting bugs or going mad :). 
-
-gcc 3.0 is not yet able to compile all of KDE without errors, mostly due
-to bugs in this version of the compiler. Some older version of gcc 2.96
-also have problems compiling KDE due to compiler bugs. Even though 
-compilation may not report errors with these compiler, the usage of these
-compilers may cause crashes when using the resulting executables.
-
-If you are running a FreeBSD system, you will need to make sure that LIBS
-is set to "-Wl,-export-dynamic". The easiest way to do this is to prefix
-configure with it, i.e.: LIBS="-Wl,-export-dynamic" ./configure. Thanks to
-Will Andrews <will at FreeBSD.org> and Arun Sharma <adsharma at sharmas.dhs.org>
-for identifying what needed to be done, and how to do it, and such.
-
-If you get odd error such as:
-
-as: Error: /var/tmp/ccK1Cfxa.s, line 2827: Truncating token:
-__t4pair2Zt18__rb_tree_iterator3Zt4pair2ZCt12basic_string3ZcZt18string_char_trai
-ts1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_traits1
-ZcZt24__default_alloc_template2b0i0ZRt4pair2ZCt12basic_string3ZcZt18string_char_
-traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char_tra
-its1ZcZt24__default_alloc_template2b0i0ZPt4pair2ZCt12basic_string3ZcZt18string_c
-har_traits1ZcZt24__default_alloc_template2b0i0Zt12basic_string3ZcZt18string_char
-_traits1ZcZt24__default_alloc_template2b0i0ZbRCt18__rb_tree_iterator3Zt4pair2ZCt
-12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Zt12b
-asic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZRt4pair
-2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0Z
-t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b0i0ZPt4
-pair2ZCt12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_template2b
-0i0Zt12basic_string3ZcZt18strin!
-g_char_traits1ZcZt24__default_al
-
-and you're using egcs, try re-compiling all your C++ libs with -fsquangle,
-and then recompiling whatever you were working on with -fsquangle. It
-should help, and more information about this is available on the egcs FAQ
-available at http://egcs.cygnus.com
-
-
-How to report
--------------
-Reporting bugs is an art. Why?  Because bug reports can help and hinder.
-
-They hinder if the developers are just buried in an avanche of bug reports.
-They spend hours figuring out which bug reports are valid and which non,
-which bug reports are due to bugs or due to installation problems.
-
-They can be a tremendous help to notify developers on problems in areas that
-they normally don't have access (e.g. KDE on AIX) to.
-
-So, here are some tips on bug reporting:
-
-* make sure your bug is due to KDE ... and not due to a packaging problem of
-  your Linux distrubutor. For example, most "I can not install the XYZ.rpm"
-  problem are due to packaging issues. Refer with such questions to your
-  Linux Distributor and his appropriate mailing list or bug reporting tool.
-
-* The chance is high that your bug has already been dealt with ... so look
-  if there is a newer version of kdelibs available. Reporting bugs for
-  older, deprecated versions usually don't get that much attention :-)
-
-* Also the chance is high that another one experienced your problem. The
-  bug report wizard at http://bugs.kde.org will help you to find out if your
-  problem has already been reported.
-
-* The best bug report for a project based on voluntary work is of course one
-  that comes with a patch that solves the problem. :-)
-
-
-More info
----------
-http://www.kde.org is a good starting point for info on KDE. If you are a
-developer, you may also point your browser to http://developer.kde.org.
-There is a plethora of mailing lists available, you can gain an overview
-quickly by looking at http://lists.kde.org.
diff --git a/WebCore/src/kdelibs/khtml/CHANGES b/WebCore/src/kdelibs/khtml/CHANGES
deleted file mode 100644
index 6843163..0000000
--- a/WebCore/src/kdelibs/khtml/CHANGES
+++ /dev/null
@@ -1,5 +0,0 @@
-KHTML CHANGES
-=============
-
-* new start with DOM (Lars 10.8.99)
-
diff --git a/WebCore/src/kdelibs/khtml/DESIGN.html b/WebCore/src/kdelibs/khtml/DESIGN.html
deleted file mode 100644
index ad26e37..0000000
--- a/WebCore/src/kdelibs/khtml/DESIGN.html
+++ /dev/null
@@ -1,345 +0,0 @@
-<html>
-<head>
-<title>Internal design of khtml</title>
-<style>
-dt { font-weight: bold; }
-</style>
-<body bgcolor=white>
-<h1>Internal design of khtml</h1>
-
-<p>
-This document tries to give a short overview about the internal design of the khtml
-library. I've written this, because the lib has gotten quite big, and it is hard at first to find your
-way in the source code. This doesn't mean that you'll understand khtml after reading this
-document, but it'll hopefully make it easier for you to read the source code.
-</p>
-<p>
-The library is build up out of several different parts. Basically, when you use the lib, you
-create an instance of a KHTMLPart, and feed data to it. That's more or less all you need to 
-know if you want to use khtml for another application. If you want to start hacking khtml,
-here's a sketch of the objects that will get constructed, when eg. running testkhtml with
-a url argument.
-</p>
-<p>
-In the following I'll assume that you're familiar with all the buzzwords used in current web 
-techology. In case you aren't here's a more or less complete list of references:
-</p>
-<blockquote>
-<p>
-<b>Document Object model (DOM):</b><br>
-<a href="http://www.w3.org/DOM/">DOM Level1 and 2</a><br>
-We support DOM Level2 except for the events model at the moment.
-</p>
-<p>
-<b>HTML:</b><br>
-<a href="http://www.w3.org/TR/html4/">HTML4 specs</a><br>
-<a href="http://www.w3.org/TR/xhtml1/">xhtml specs</a><br>
-We support almost all of HTML4 and xhtml.
-</p>
-<p>
-<b>Cascading style sheets (CSS):</b><br>
-<a href="http://www.w3.org/TR/REC-CSS2/">CSS2 specs</a><br>
-We support almost all of CSS1, and most parts of CSS2.
-</p>
-<p>
-<b>Javascript:</b><br>
-insert some links here...<br>
-<a href="http://msdn.microsoft.com/workshop/author/dhtml/reference/objects.asp">Microsoft javascript bindings</a><br>
-<a href="http://docs.iplanet.com/docs/manuals/js/client/jsref/contents.htm">Netscape javascript reference</a><br>
-Netscapes javascript bindings are outdated. We shouldn't follow them. Let's focus on getting the bindings
-compatible to IE.
-</p>
-</blockquote>
-
-<p>
-<a href="khtml_part.h">KHTMLPart</a> creates one instance of a
-<a href="khtmlview.h">KHTMLView</a> (derived from QScrollView),
-the widget showing the whole thing.  At the same time a DOM tree
-is built up from the HTML or XML found in the specified file.
-<p>
-Let me describe this with an example.
-<p>
-khtml makes use of the document object model (DOM) for storing the document
-in a tree like structure. Imagine a some html like
-<pre>
-&lt;html&gt;
-    &lt;head&gt;
-        &lt;style&gt;
-            h1: { color: red; }
-        &lt;/style&gt;
-    &lt;/head&gt;
-    &lt;body&gt;
-        &lt;H1&gt;
-            some red text
-        &lt;/h1&gt;
-        more text
-        &lt;p&gt;
-            a paragraph with an
-            &lt;img src="foo.png"&gt;
-            embedded image.
-        &lt;/p&gt;
-    &lt;/body&gt;
-&lt;/html&gt;
-</pre>
-In the following I'll show how this input will be processed step by step to generate the visible output
-you will finally see on your screen. I'm describing the things as if they happen one after the other,
-to make the priniciple more clear. In reality, to get visible output on the screen as soon as possible,
-all these things (from tokenization to the build up and layouting of the rendering tree) happen
-more or less in parallel.
-
-<h2>Tokenizer and parser</h2>
-<p>
-The first thing that happens when you start parsing a new document is that a
-DocumentImpl* (for XML documents) or an HTMLDocumentImpl* object will get
-created by the Part (in khtml_part.cpp::begin()). A Tokenizer*
-object is created as soon as DocumentImpl::open() is called by the part, also
-in begin() (can be either an XMLTokenizer or an HTMLTokenizer).
-<p>
-The XMLTokenizer uses the QXML classes in Qt to parse the document, and it's SAX interface 
-to parse the stuff into khtmls DOM.
-<p>
-For HTML, the tokenizer is located in khtmltokenizer.cpp. The tokenizer uses the contents
-of a HTML-file as input and breaks this contents up in a linked list of
-tokens. The tokenizer recognizes HTML-entities and HTML-tags. Text between
-begin- and end-tags is handled distinctly for several tags. The distinctions
-are in the way how spaces, linefeeds, HTLM-entities and other tags are
-handled.
-<p>
-The tokenizer is completly state-driven on a character by character base.
-All text passed over to the tokenizer is directly tokenized. A complete
-HTML-file can be passed to the tokenizer as a whole, character by character
-(not very efficient) or in blocks of any (variable) size.
-<p>
-The HTMLTokenizer creates an HTMLParser which
-interprets the stream of tokens provided by the tokenizer
-and constructs the tree of Nodes representing the document according
-to the Document Object Model.
-<p>
-One big difference between HTML and XML at the moment is, that the HTML parser and Tokenizer
-can parse incrementally as the data arrives, while the XML Tokenizer (due to a limitation of
-Qts XML parser) can at the moment only parse the document, once it has been loaded completely.
-
-<h2>The DOM in khtml</h2>
-<p>
-Parsing the document given above gives the following DOM tree:
-
-<pre>
-HTMLDocumentElement
-  |--> HTMLHeadElement
-  |       \--> HTMLStyleElement
-  |              \--> CSSStyleSheet
-  \--> HTMLBodyElement
-         |--> HTMLHeadingElement
-         |      \--> Text
-         |--> Text
-         \--> HTMLParagraphElement
-                |--> Text
-                |--> HTMLImageElement
-                \--> Text
-</pre>
-<p>
-Actually, the classes mentioned above are the interfaces for accessing the 
-DOM. The actual data is stored in *Impl classes, providing the implementation
-for all of the above mentioned elements. So internally we have a tree 
-looking like:
-<pre>
-HTMLDocumentElementImpl*
-  |--> HTMLHeadElementImpl*
-  |       \--> HTMLStyleElementImpl*
-  |              \--> CSSStyleSheetImpl*
-  \--> HTMLBodyElementImpl*
-         |--> HTMLHeadingElementImpl*
-         |      \--> TextImpl*
-         |--> TextImpl*
-         \--> HTMLParagraphElementImpl*
-                |--> TextImpl*
-                |--> HTMLImageElementImpl*
-                \--> TextImpl*
-</pre>
-<p>
-We use a refcounting scheme to assure, that all the objects get deleted, in 
-case the root element get deleted (as long as there's no interface class 
-holding a pointer to the Implementation).
-<p>
-The interface classes (the ones without the Impl) are defined in the <code>dom/</code>
-subdirectory, and are not used by khtml itself at all. The only place they are used are in the
-javascript bindings, which uses them to access the DOM tree. The big advantage of having this 
-separation between interface classes and imlementation classes, is that we can have several 
-interface objects pointing to the same implementation. This implements the requirement of
-explicit sharing of the DOM specs.
-<p>
-Another advantage is, that (as the implementation classes are not exported) it gives us a lot
-more freedom to make changes in the implementation without breaking binary compatibility.
-<p>
-You will find almost a one to one correspondence between the interface classes and the implementation
-classes. In the implementation classes we have added a few more intermediate classes, that can
-not be seen from the outside for various reasons (make implementation of shared features easier
-or to reduce memory consumption).
-<p>
-In C++, you can access the whole DOM tree from outside KHTML by using the interface classes. 
-For a description see the <a href="http://developer.kde.org/kde2arch/khtml/index.html">introduction to khtml</a> on<a href="http://developer.kde.org/">developer.kde.org</a>.
-
-One thing that has been omitted in the discussion above is the style sheet defined inside the 
-<code>&lt;style&gt;</code> element (as an example of a style sheet) and the image element 
-(as an example of an external resource that needs to be loaded). This will be done in the following
-two sections.
-
-<h2>CSS</h2> The contents of the <code>&lt;style&gt;</code> element (in this
-case the <code>h1 { color: red; }</code> rule) will get passed to the
-<a href="html/html_headimpl.h">HTMLStyleElementImpl object</a>.  This object creates an
-<a href="css/cssstylesheetimpl.h">CSSStyleSheetImpl object</a> and passes the
-data to it. The <a href="css/cssparser.h">CSS parser</a> will take
-the data, and parse it into a DOM structure for CSS (similar to the one for
-HTML, see also the DOM level 2 specs). This will be later on used to define the
-look of the HTML elements in the DOM tree.
-<p>
-Actually "later on" is relative, as we will see later, that this happens partly in parallel to 
-the build up of the DOM tree.
-
-<h2>Loading external objects</h2>
-<p>
-Some HTML elements (as <code>&lt;img&gt;, &lt;link&gt;, &lt;object&gt;, etc.</code>) contain
-references to extrenal objects, that have to be loaded. This is done by the
-Loader and related classes (misc/loader.*). Objects that might need to load external objects
-inherit from <a href="misc/loader_client.h">CachedObjectClient</a>, and can ask
-the <a href="misc/loader.h">loader</a> (that also acts as a memory cache) to
-download the object they need for them from the web.
-<p>
-Once the <a href="misc/loader.h">loader</a> has the requested object ready, it will notify the
-<a href="misc/loader_client.h">CachedObjectClient</a> of this, and the client can
-then process the received data.
-
-<h2>Making it visible</h2>
-
-Now once we have the DOM tree, and the associated style sheets and external objects, how
-do we get the stuff actually displayed on the screen?
-<p>
-For this we have a rendering engine, that is completely based on CSS. The first
-thing that is done is to collect all style sheets that apply to the document
-and create a nice list of style rules that need to be applied to the
-elements. This is done in the <a href="css/cssstyleselector.h">CSSStyleSelector</a> class.
-It takes the <a href="css/html4.css">default HTML style sheet</a> (defined in css/html4.css),
-an optional user defined style sheet, and all style sheets from the document,
-and combines them to a nice list of parsed style rules (optimised for fast
-lookup). The exact rules of how these style sheets should get applied to HTML
-or XML documents can be found in the CSS2 specs.
-<p>
-Once we have this list, we can get a <a
-href="rendering/render_style.h">RenderStyle object</a>
-for every DOM element from the <a
-href="css/cssstyleselector.h">CSSStyleSelector</a> by calling
-"styleForElement(DOM::ElementImpl *".
-The style object describes in a compact form all the
-<a href="css/css_properties.in">CSS properties</a>
-that should get applied to the Node.
-<p>
-After that, a rendering tree gets built up. Using the style object, the
-<a href="xml/dom_nodeimpl.h">DOM Node</a> creates an appropriate render object
-(all these are defined in the rendering subdirectory) and adds it to the
-rendering tree.  This will give another tree like structure, that resembles in
-it's general structure the DOM tree, but might have some significant
-differences too. First of all, so called
- <a href="http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous-block-level">anonymous boxes</a> - (see
- <a href="http://www.w3.org/TR/REC-CSS2/">CSS specs</a>) that
-have no DOM counterpart might get inserted into the rendering tree to satify
-DOM requirements. Second, the display propery of the style affects which type
-of rendering object is chosen to represent the current DOM object.
-
-<p>
-In the above example we would get the following rendering tree:
-<pre>
-RenderRoot*
-  \--> RenderBody*
-         |--> RenderFlow* (&lt;H1&gt;)
-         |      \--> RenderText* ("some red text")
-         |--> RenderFlow* (anonymous box)
-         |      \--> RenderText* ("more text")
-         \--> RenderFlow* (&lt;P&gt;)
-                |--> RenderText* ("a paragraph with an")
-                |--> RenderImage*
-                \--> RenderText* ("embedded image.")
-</pre>
-
-<p>
-A call to of <a href="rendering/render_root.cpp">layout()</a> on the
-<a href="rendering/render_root.h">RenderRoot </a> (the root of the rendering tree)
-object causes the rendering tree to layout itself into the available space
-(width) given by the the KHTMLView. After that, the drawContents() method of
-KHTMLView can call RenderRoot->print() with appropriate parameters to actually
-paint the document. This is not 100% correct, when parsing incrementally, but
-is exactly what happens when you resize the document.
-
-
-As you can see, the conversion to the rendering tree removed the head part of
-the HTML code, and inserted an anonymous render object around the string "more
-text". For an explanation why this is done, see the CSS specs.
-<p>
-
-<h2>Directory structure</h2>
-
-A short explanation of the subdirectories in khtml.
-<dl>
-<dt><a href="css/">css:</a>
-<dd>Contains all the stuff relevant to the CSS part of DOM Level2 (implementation classes only), 
-the <a href="css/cssparser.h">CSS parser</a>, and the stuff to create
-RenderStyle object out of Nodes and the CSS style sheets.
-<dt><a href="dom/">dom: </a>
-<dd>Contains the external DOM API (the DOM interface classes) for all of the DOM
-<dt><a href="ecma/">ecma:</a>
-<dd>The javascript bindings to the DOM and khtml.
-<dt><a href="html/">html:</a>
-<dd>The html subpart of the DOM (implementation only), the HTML tokenizer and parser and a class
-that defines the DTD to use for HTML (used mainly in the parser).
-<dt><a href="java/">java:</a>
-<dd>Java related stuff.
-<dt><a href="misc/>misc:</a>
-<dd>Some misc stuff needed in khtml. Contains the image loader, some misc definitions and the
-decoder class that converts the incoming stream to unicode.
-<dt><a href="rendering">rendering:</a>
-<dd>Everything thats related to bringing a DOM tree with CSS declarations to the screen. Contains
-the definition of the objects used in the rendering tree, the layouting code, and the RenderStyle objects.
-<dt><a href="xml/">xml:</a>
-<dd>The XML part of the DOM implementation, the xml tokenizer.
-</dl>
-
-<h2>Final words...</h2>
-<p>
-All the above is to give you a quick introduction into the way khtml brings an HTML/XML file to the screen.
-It is by no way complete or even 100% correct. I left out many problems, I will perhaps add either on request
-or when I find some time to do so. Let me name some of the missing things:
-<ul>
-<li>The decoder to convert the incoming stream to Unicode
-<li>interaction with konqueror/applications
-<li>javascript
-<li>dynamic reflow and how to use the DOM to manipulate khtmls visual ouput
-<li>mouse/event handling
-<li>real interactions when parsing incrementally
-<li>java
-</ul>
-
-Still I hope that this short introduction will make it easier for you to get a first hold of khtml and the way it works.
-<p>
-Now before I finish let me add a small <b>warning</b> and <b>advice</b> to all of you who plan hacking khtml themselves:
-<p>
-khtml is by now a quite big library and it takes some time to understand how it works. Don't let yourself get frustrated
-if you don't immediatly understand how it works. On the other hand, it is by now one of the libraries that
-get used a lot, that probably has the biggest number of remaining bugs (even though it's sometimes hard to
-know if some behaviour is really a bug).
-<blockquote>
-Some parts of it's code are however <b>extremely touchy</b> (especially the layouting algorithms), 
-and making changes there (that might fix a bug on on web page) might introduce severe bugs.
-All the people developing khtml have already spend huge amounts of time searching for such bugs,
-that only showed up on some web pages, and thus were found only a week after the change that
-introduced the bug was made. This can be very frustrating for us, und we'd appreciate if people
-that are not completely familiar with khtml post changes touching these critical regions to kfm-devel
-for review before applying them.
-</blockquote>
-
-<div style="margin-top: 2em; font-size: large;">
-And now have fun hacking khtml.
-<div style="margin-left: 10em; margin-bottom: 1em;">Lars</div>
-</div>
-<hr>
-<center>$Id$</center>
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/README.HTMLWidget b/WebCore/src/kdelibs/khtml/README.HTMLWidget
deleted file mode 100644
index 571d4a9..0000000
--- a/WebCore/src/kdelibs/khtml/README.HTMLWidget
+++ /dev/null
@@ -1,66 +0,0 @@
-KDE HTML Widget
-===============
-
-Developers
-----------
-
-The first version was written by
-
-Torben Weis <weis at stud.uni-frankfurt.de>
-
-It was extended by
-
-Josip A. Gracin <grac at fly.cc.fer.hr>,
-Martin Jones <mjones at kde.org>,
-Waldo Bastian <bastian at kde.org>
-Lars Knoll <knoll at kde.org>
-Antti Koivisto <koivisto at iki.fi>
-Dirk Mueller <mueller at kde.org>
-Peter Kelly <pmk at post.com>
-
-It is currently primarily maintained and developed by
-Lars Knoll, Dirk Mueller and Antti Koivisto.
-
-
-Revision History
-----------------
-
-This library is called libkhtml.
-This library used to be called libkhtmlw. With the release of KDE 1.1 a 
-source incompatible version called libkhtml has been created. 
-libkhtmlw will not be maintained any more, all application writers are 
-urgently requested to make use of the new libkhtml library.
-
-
-Starting Point
---------------
-
-You can add the widget to your program by doing something like:
-
-#include <khtml.h>
-
-   .
-   .
-   .
-
-    KHTMLWidget *view = new KHTMLWidget( parent, "Name" );
-	view->show();
-
-	view->begin( "file:/tmp/test.html" );
-	view->parse();
-	view->write( "<HTML><TITLE>...." );
-	view->write( "..." );
-	    .
-		.
-		.
-	view->write( "</HTML>" );
-	view->end();
-
-
-After doing this, control must be returned to the event loop as the HTML
-is parsed in the background using a Qt timer.
-
-For more information see the full documentation in JavaDoc format included
-in the header files.
-
-
diff --git a/WebCore/src/kdelibs/khtml/README.tags b/WebCore/src/kdelibs/khtml/README.tags
deleted file mode 100644
index 093cc3f..0000000
--- a/WebCore/src/kdelibs/khtml/README.tags
+++ /dev/null
@@ -1,24 +0,0 @@
-All tags known by KHTML are listed in khtmltags.in.
-The maketags script generates a header file from this list.
-It also makes a gperf input file. gperf is than used to create
-the khtmltags.c file which contains a (almost) perfect hash 
-function for recognizing HTML-tags.
-
-The HTML-tokenizer converts during parsing all tags to numeric
-tag-IDs. These IDs can then be used to select functions fast and
-to look up relevant CSS data.
-
-khtmlparser.cpp contains a jump-table which indexes from tag-ID
-to the relevant tag-open and tag-close functions. A 0-entry means
-that no function should be called for this tag. 
-
-ADDING NEW TAGS
-===============
-
-If you want to add a new tag, you can do so in the file "khtmltags.in".
-Please keep this file sorted. You then have to run ./maketags to 
-generate a new khtmltags.h and a new hash-function so that the new tag
-will be recognized. Then you should manually update the jumptable in
-"khtmlparer.cpp". If you do not want to implement the tag you can add
-an entry for the tag at the right position and fill it with two zeros.
-
diff --git a/WebCore/src/kdelibs/khtml/SECURITY b/WebCore/src/kdelibs/khtml/SECURITY
deleted file mode 100644
index e3c289b..0000000
--- a/WebCore/src/kdelibs/khtml/SECURITY
+++ /dev/null
@@ -1,57 +0,0 @@
-This document contains internet security issues.  Discussion of security 
-issues should be directed to kfm-devel at kde.org. 
-
-Note to KDE-developers: When adding entries to this document, provide name, 
-date and additional URLs.
-
-
-Malicious Redirects
-===================
-Entry By: Waldo Bastian <bastian at kde.org>
-Created: May 9th, 2000 
-See also: http://lwn.net/2000/features/Redirect.phtml
-          http://www.zope.org/Members/jim/ZopeSecurity/ClientSideTrojan
-
-I advice the following:
-
-* We should never allow a redirect from a HTTP to any other protocol, including 
-  HTTPS. (OK. The current implementation does not allow redirects to other 
-  protocols)
-
-* We should provide a HTTP referer header iff the referer is on the same host
-as the requested object. (We currently don't support referer headers)
-
-* Either a) Don't allow POST or GET actions from javascript.
-  or b) _Always_ ask the user for confirmation when javascript requests a 
-        POST or GET action.
-  Additional note: Simple requests for e.g. images are also GET actions, 
-  disabling them would break a lot of javascript scripts.
-
-
-SSL certificates
-================
-Entry By: Waldo Bastian <bastian at kde.org>
-Created: May 13th, 2000
-See also: http://www.cert.org/advisories/CA-2000-05.html
-
-We never check SSL certificates. This makes https just as insecure as http.
-
-
-ECMAScript
-==========
-Entry By: Peter Kelly <pmk at post.com>
-Created: May 26th, 2000
-See also: http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm
-          (chapter 14)
-
-Before KDE 2.0 is released we *MUST* make sure there are checks in place for
-what DOM properties are accessable/writable for the ECMAScript binding. Otherwise
-malicious page authors may be able to access/set cookies from other sites, create
-auto-submitting forms that upload files, and a whole host of other attacks. The
-URL above has information about what properties netscape gives protection to.
-
-We will need to make sure we do this at the right level, as if it is done too
-close to the ECMAScript binding, there could be loopholes such as using
-getAttributeNode(), etc to fool it into letting a script change the wrong properties.
-
-
diff --git a/WebCore/src/kdelibs/khtml/TODO b/WebCore/src/kdelibs/khtml/TODO
deleted file mode 100644
index 8cf22e9..0000000
--- a/WebCore/src/kdelibs/khtml/TODO
+++ /dev/null
@@ -1,60 +0,0 @@
-Here's what's still missing (without order):
-
-Rendering:
-	* text-align: Justify missing
-	* allow font elements in a block level context.
-
-StyleSheets:
-	* @ rules in sheets
-	* lots of properties
-	* delete the old cssproperties in a style attribute in case
-	  the style attribute changes.
-	* border shorthand properties. Unspecified properties get their default
-	  values. border-width: medium; border-color: undefined (== text color)
-
-DOM:
-	* some functions in the Impl classes
-	* fix the set/retrieve functions, which use boolean values
-	  -->> mostly done, still need to fix parseAttribute() calls	
-	* DOM level 2
-	* DOM stylesheets, changes need to trigger the appropriate changes
-	  in the rendering tree
-	* Implementation of NamedAttrMapImpl and Attributes in DOMElementImpl
-	  is ugly. MOve aatributes to the elementImpl and make the namedNodeMap
-	  point to an element. Think of creating AttrImpl's directly in
-	  khtmltoken.cpp
-
-XML:
-	* lots of stuff in the Impl classes
-	* parsing
-	* entities
-	* style sheet processing instructions
-	* proper mimetype detection
-
-misc:
-	* <font size=+3> works as size=+1
-
-Java:
-	* support for the object element
-	    --> mostly done
-	* Java <--> HTMLWidget communication
-	* turn kjava into a kpart
-
-Attributes:
-	* check for unimplemented attributes
-
-Memory usage:
-	* use bitfields for lots of things (especially in the
-	  DOM/CSS/rendering stuff)
-	* try to make better use of shared objects, especially in the
-	  RenderStyle
-	* check for leaks
-	* there's a mem leak with the style objects of anonymous
-	  boxes (and ListMarkers).
-
-Other:
-        * there's a bug on correctly retrieving <textarea> text.
-          see test/forms.html and compare it with the way all other
-          browsers handle that code
-        * paste should be enabled (and implemented) if there's pasteable clipboard
-          content and a form element has the focus
diff --git a/WebCore/src/kdelibs/khtml/design.h b/WebCore/src/kdelibs/khtml/design.h
deleted file mode 100644
index 49cd5bc..0000000
--- a/WebCore/src/kdelibs/khtml/design.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* This file is part of the KDE project
-
-   Copyright (C) 1997 Martin Jones (mjones at kde.org)
-              (C) 1998 Waldo Bastian (bastian at kde.org)
-              (C) 1998, 1999 Torben Weis (weis at kde.org)
-              (C) 1999 Lars Knoll (knoll at kde.org)
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-
-/**
- * @libdoc KDE HTML widget
- *
- * This library provides a full-featured HTML parser and widget. It is
- * used for rendering in all KDE applications which allow HTML viewing,
- * including the Konqueror browser/file manager and the KDE Help
- * system.
- *
- * This library provides (will provide)
- * full HTML4 support, support for embedding Java applets, and will at some
- * point provide support for cascading style sheets
- * (CSS) and JavaScript.
- *
- * If you want to add to your application a widget that only needs simple text
- * browsing, you can also use the @ref KTextBrowser widget in kdeui.
- *
- * @ref KHTMLPart :
- *   The main part/widget for using khtml.
- *
- * @ref DOM :
- *   The dom implementation used in khtml.
- *
- */
-
-/**
- *
- * The Document Object Model (DOM) is divided into two parts, the
- * @ref COREDOM core
- * DOM, specifying some core functionality, and the @ref HTMLDOM HTML DOM,
- * which deals with the extensions needed for HTML.
- *
- *
- */
-namespace DOM
-{
-};
diff --git a/WebCore/src/kdelibs/khtml/domtreeview.cpp b/WebCore/src/kdelibs/khtml/domtreeview.cpp
deleted file mode 100644
index 48843a4..0000000
--- a/WebCore/src/kdelibs/khtml/domtreeview.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/***************************************************************************
-                               domtreeview.cpp
-                             -------------------
-
-    copyright            : (C) 2001 - The Kafka Team
-    email                : kde-kafka at master.kde.org
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#include "khtml_part.h"
-#include "domtreeview.moc"
-
-DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
-{
-    setCaption(name);
-    setRootIsDecorated(true);
-    addColumn("Name");
-    addColumn("Value");
-    setSorting(-1);
-    part = currentpart;
-    connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
-    connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
-    m_nodedict.setAutoDelete(true);
-}
-
-DOMTreeView::~DOMTreeView()
-{
-    disconnect(part);
-}
-
-void DOMTreeView::showTree(const DOM::Node &pNode)
-{
-    if(pNode.isNull() || document != pNode.ownerDocument())
-    {
-	clear();
-	m_itemdict.clear();
-	m_nodedict.clear();
-	if(pNode.isNull())
-	    return;
-	else if(pNode.ownerDocument().isNull())
-	    recursive(0, pNode);
-	else
-	    recursive(0, pNode.ownerDocument());
-    }
-    setCurrentItem(m_itemdict[pNode.handle()]);
-    ensureItemVisible(m_itemdict[pNode.handle()]);
-}
-
-void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
-{
-    QListViewItem *cur_item;
-    if(pNode.ownerDocument() != document)
-    {
-	cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), node.nodeValue().string());
-	document = pNode.ownerDocument();
-    }
-    else
-	cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), node.nodeValue().string());
-
-    if(node.handle())
-    {
-	m_itemdict.insert(node.handle(), cur_item);
-	m_nodedict.insert(cur_item, new DOM::Node(node));
-    }
-
-    DOM::Node cur_child = node.lastChild();
-    while(!cur_child.isNull())
-    {
-	recursive(node, cur_child);
-	cur_child = cur_child.previousSibling();
-    }
-}
-
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
-{
-    DOM::Node *handle = m_nodedict[cur_item];
-    if(handle)
-	emit part->setActiveNode(*handle);
-}
diff --git a/WebCore/src/kdelibs/khtml/domtreeview.h b/WebCore/src/kdelibs/khtml/domtreeview.h
deleted file mode 100644
index 47f79e8..0000000
--- a/WebCore/src/kdelibs/khtml/domtreeview.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************
-                               domtreeview.cpp
-                             -------------------
-
-    copyright            : (C) 2001 - The Kafka Team
-    email                : kde-kafka at master.kde.org
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-
-#ifndef DOMTREEVIEW_H
-#define DOMTREEVIEW_H
-
-#include <klistview.h>
-#include <kdebug.h>
-#include <qlistview.h>
-#include <qptrdict.h>
-#include <dom/dom_core.h>
-
-class DOMTreeView : public KListView
-{
-    Q_OBJECT
-    public: 
-	DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
-	~DOMTreeView();
-
-	void recursive(const DOM::Node &pNode, const DOM::Node &node);
-
-    signals:
-	void sigNodeClicked(const DOM::Node &);
-	
-    public slots:
-	void showTree(const DOM::Node &pNode);
-
-    protected slots:
-	void slotItemClicked(QListViewItem *);
-
-    private:
-	QPtrDict<QListViewItem> m_itemdict;
-	QPtrDict<DOM::Node> m_nodedict;
-	DOM::Node document;
-
-	KHTMLPart *part;
-
-};
-
-#endif
diff --git a/WebCore/src/kdelibs/khtml/ecma/AUTHORS b/WebCore/src/kdelibs/khtml/ecma/AUTHORS
deleted file mode 100644
index 2a12933..0000000
--- a/WebCore/src/kdelibs/khtml/ecma/AUTHORS
+++ /dev/null
@@ -1,4 +0,0 @@
-Harri Porten		<porten at kde.org>
-Peter Kelly             <pmk at post.com>
-Dirk Mueller            <mueller at kde.org>
-Daniel Molkentin        <molkentin at kde.org>
diff --git a/WebCore/src/kdelibs/khtml/ecma/README b/WebCore/src/kdelibs/khtml/ecma/README
deleted file mode 100644
index c808197..0000000
--- a/WebCore/src/kdelibs/khtml/ecma/README
+++ /dev/null
@@ -1,29 +0,0 @@
-This module contains the ECMAScript a.k.a. JavaScript language bindings for
-the KHTML Part. A series of functions and properties will be added in
-kjs_html_init() to the pre-existing set of the KJS library. The module will
-be loaded into KHTML's address space on demand.
-
-To test the non-HTML DOM functions you may compile a little interactive
-interpreter called 'testecma' with 'make check' (see testecma.cpp for
-further details).
-
-Harri Porten <porten at kde.org>
-
-========================================================================
-Appendix A: Currently supported properties
-
-Non-DOM properties:
-
-window.status, alert(), confirm(), open()
-navigator.appCodeName, appName, appVersion, userAgent, vendor, product
-Image.src
-
-DOM Bindings:
-
-all DOM level 1 core & HTML
-
-========================================================================
-Appendix B: Web sites with useful tests
-
-http://oucsace.cs.ohiou.edu/~ywang/JavaScript
-http://www.xs4all.nl/~ppk/js/index.html?version5.html
diff --git a/WebCore/src/kdelibs/khtml/ecma/THANKS b/WebCore/src/kdelibs/khtml/ecma/THANKS
deleted file mode 100644
index b21dce7..0000000
--- a/WebCore/src/kdelibs/khtml/ecma/THANKS
+++ /dev/null
@@ -1,9 +0,0 @@
-Vadim Plessky <lucy-ples at mtu-net.ru> for dissecting an endless number
-of bug reports and therefore taking quite some load of our shoulders.
-
-Ferdinand Gassauer <f.gassauer at aon.at> for numerous useful bug reports
-and keeping track of them later.
-
-David Faure <faure at kde.org> for taking some time off from Konqueror
-and making a lotto site working fixing bugs along the way.
-
diff --git a/WebCore/src/kdelibs/khtml/ecma/TODO b/WebCore/src/kdelibs/khtml/ecma/TODO
deleted file mode 100644
index ba6638c..0000000
--- a/WebCore/src/kdelibs/khtml/ecma/TODO
+++ /dev/null
@@ -1,13 +0,0 @@
-Has to be done
-==============
-- frame[] correct search and sorting order (DONE ?)
-- optional error message output
-- set this.form in event handlers of form elements (DONE ?)
-- change KParts::WindowArgs && friends 
-  that we can detect if a locationbar is on/or not
-
-Could be done
-=============
-- Make the graphical debugger useable
-- Improve internal structures to give a really useful
-  output on errors (i.e. improve backtrance capabilities)
diff --git a/WebCore/src/kdelibs/khtml/ecma/jsk.html b/WebCore/src/kdelibs/khtml/ecma/jsk.html
deleted file mode 100644
index fb5b123..0000000
--- a/WebCore/src/kdelibs/khtml/ecma/jsk.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<html>
-<!--
-Javascript Konsole (c) 2001 Till Krech <till at snafu.de>
-Dieser Code unterliegt den Bedingungen der Gnu Public License Version 2.
--->
-<head>
-<title>Javascript Konsole</title>
-<style type="text/css">
-code {
-        color:#444488;
-}
-em {
-        font-weight: bold;
-}
-</style>
-<script language="JavaScript">
-
-function do_eval() {
-        var fo = document.forms.fo;
-	fo.restyp.value = "";
-	fo.field.value = "";
-	var fo = document.fo;
-	var expr = fo.zeile.value;
-	var result = eval(expr);
-	fo.restyp.value = typeof(result);
-        var tuedel = "";
-        if (typeof(result) == "string") {
-                tuedel = '"';
-        }
-	fo.field.value = tuedel + result + tuedel;
-}
-
-function do_properties() {
-        var fo = document.forms.fo;
-	fo.restyp.value = "";
-	fo.field.value = "";
-	var fo = document.fo;
-	var expr = fo.zeile.value;
-	var result = eval(expr);
-        var i;
-	fo.restyp.value = typeof(result);
-        if (typeof(result) != "undefined") {
-           for (i in result) {
-                var tuedel = "";
-                var propval = result[i];
-                if (typeof(propval) == "string") {
-                        tuedel = '"';
-                }
-                fo.field.value +=
-                        i
-                        + " [" + typeof(propval) + "] = "
-                        + tuedel + propval + tuedel + "\n";
-           }
-
-        }
-}
-
-
-</script>
-</head>
-<body bgcolor="#dddddd">
-<h1>JavaScript Konsole</h1>
-<form name="fo">
-<table bgcolor="#cccccc" cellspacing="1" cellpadding="8">
- <tr bgcolor="#ffeeee"><th  height="40" align="right">Expression</th><td><input name="zeile" type="text" size="60"></td></tr>
- <tr bgcolor="#eeeeee"><th align="right">Result Type</th><td><input name="restyp" readonly type="text" size="60"></td></tr>
- <tr bgcolor="#eeeeee"><th align="right">Result(s)</th><td><textarea readonly name="field" rows="10" cols="60"></textarea></td></tr>
-<tr bgcolor="#ffeeee"><td>&nbsp;</td><td>
- <input type="button" value="list properties" onclick="do_properties()">
- <input type="button" value="evaluate" onclick="do_eval()">
- <input type="reset" value="clear fields"
-</td></tr>
-</table>
-</form>
-<h2>Explanation</h2>
-<h3>Operation</h3>
-<blockquote>
-When <em>evaluate</em> is pressed, the given expression is evaluated and the result is displayed in the result(s) field.
-In case of <em>list properties</em> beeing pressed, the result of the expression is taken as an object
-and the objects properties are displayed with their type and value in the the result(s) field.
-</blockquote>
-<h3>Expression</h3>
-<blockquote>
-Expression must be a valid javascript expression, e.g.<br><code>window</code>
-<br>or<br><code>document.body.innerHTML</code><br>or<br>
-<code>"Today: " + (new Date()).toString()</code><br>
-or<br>
-<code>"Cablecar".match(/ab.*c/)</code>
-<br>It is also possible to assign a value,
-e.g.<br><code>document.getElementsByTagName('H1').item(0).innerText="Hello World"</code><br>
-You may execute these examples by pasting them into the expression field.
-</blockquote>
-<h3>Result Type</h3>
-<blockquote>
-The type of the result of the given expression.
-</blockquote>
-<h3>Result(s)</h3>
-<blockquote>
-The result of the expression is implicitly converted to a primitive type by the javascript interpreter,
-if <em>evaluate</em> was pressed. When <em>list properties</em> was pressed, a <code>for (var i in obj)</code> loop
-is executed to list the properties. These object properties are in turn evaluated and their types and values
-are displayed.
-</blockquote>
-<p>
-<a href="mailto:till at snafu.de?subject=JavaScript%20Konsole">Till Krech</a>
-</p>
-<p>
-<br>
-</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/src/kdelibs/khtml/ecma/testecma.cpp b/WebCore/src/kdelibs/khtml/ecma/testecma.cpp
deleted file mode 100644
index dd3be39..0000000
--- a/WebCore/src/kdelibs/khtml/ecma/testecma.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  This file is part of the KDE libraries
- *  Copyright (C) 2000 Harri Porten (porten at kde.org)
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/**
- * An interactive interpreter to test the ECMA Script language bindings
- * for the DOM of KHTML.
- * The 'document' property is preset to an instance of Document and serves
- * as an entrypoint.
- *
- * Example session:
- *
- *   KJS> text = document.createTextNode('foo');
- *   KJS> document.appendChild(text);
- *   KJS> debug(document.firstChild.nodeValue);
- *   ---> foo
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <kjs/kjs.h>
-#include <dom_doc.h>
-#include "kjs_dom.h"
-
-#include <dom_string.h>
-
-using namespace KJS;
-
-int main(int, char **)
-{
-  KJScript kjs;
-  kjs.enableDebug();
-  DOM::Document doc;
-
- DOMDocument *dd = new DOMDocument(&doc);
- Global::current().put("document", KJSO(dd));
-
-  printf("Entering interactive mode.\n"
-	 "You may access the DOM via the 'document' property.\n"
-	 "Use debug() to print to the console. Press C-d or C-c to exit.\n\n");
-
-  char buffer[1000];
-  FILE *in = fdopen(0, "r");
-
-  while (1) {
-    printf("KJS> ");
-    if (!fgets(buffer, 999, in))
-      break;
-    kjs.evaluate(buffer);
-  }
-  printf("\n");
-}
diff --git a/WebCore/src/kdelibs/khtml/html/dtd.dtd b/WebCore/src/kdelibs/khtml/html/dtd.dtd
deleted file mode 100644
index d6a5ac8..0000000
--- a/WebCore/src/kdelibs/khtml/html/dtd.dtd
+++ /dev/null
@@ -1,1072 +0,0 @@
-<!--
-    This is the HTML 4.0 Transitional DTD, which includes
-    presentation attributes and elements that W3C expects to phase out
-    as support for style sheets matures. Authors should use the Strict
-    DTD when possible, but may use the Transitional DTD when support
-    for presentation attribute and elements is required.
-
-    HTML 4.0 includes mechanisms for style sheets, scripting,
-    embedding objects, improved support for right to left and mixed
-    direction text, and enhancements to forms for improved
-    accessibility for people with disabilities.
-
-          Draft: $Date$
-
-          Authors:
-              Dave Raggett <dsr at w3.org>
-              Arnaud Le Hors <lehors at w3.org>
-              Ian Jacobs <ij at w3.org>
-
-    Further information about HTML 4.0 is available at:
-
-        http://www.w3.org/TR/REC-html40
--->
-<!ENTITY % HTML.Version "-//W3C//DTD HTML 4.0 Transitional//EN"
-  -- Typical usage:
-
-    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
-            "http://www.w3.org/TR/REC-html40/loose.dtd">
-    <html>
-    <head>
-    ...
-    </head>
-    <body>
-    ...
-    </body>
-    </html>
-
-    The URI used as a system identifier with the public identifier allows
-    the user agent to download the DTD and entity sets as needed.
-
-    The FPI for the Strict HTML 4.0 DTD is:
-
-        "-//W3C//DTD HTML 4.0//EN"
-
-    and its URI is:
-
-        http://www.w3.org/TR/REC-html40/strict.dtd
-
-    Authors should use the Strict DTD unless they need the
-    presentation control for user agents that don't (adequately)
-    support style sheets.
-
-    If you are writing a document that includes frames, use 
-    the following FPI:
-
-        "-//W3C//DTD HTML 4.0 Frameset//EN"
-
-    with the URI:
-
-        http://www.w3.org/TR/REC-html40/frameset.dtd
-
-    The following URIs are supported in relation to HTML 4.0
-
-    "http://www.w3.org/TR/REC-html40/strict.dtd" (Strict DTD)
-    "http://www.w3.org/TR/REC-html40/loose.dtd" (Loose DTD)
-    "http://www.w3.org/TR/REC-html40/frameset.dtd" (Frameset DTD)
-    "http://www.w3.org/TR/REC-html40/HTMLlat1.ent" (Latin-1 entities)
-    "http://www.w3.org/TR/REC-html40/HTMLsymbol.ent" (Symbol entities)
-    "http://www.w3.org/TR/REC-html40/HTMLspecial.ent" (Special entities)
-
-    These URIs point to the latest version of each file. To reference
-    this specific revision use the following URIs:
-
-    "http://www.w3.org/TR/1998/REC-html40-19980424/strict.dtd"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLlat1.ent"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLsymbol.ent"
-    "http://www.w3.org/TR/1998/REC-html40-19980424/HTMLspecial.ent"
-
--->
-
-<!--================== Imported Names ====================================-->
-
-<!ENTITY % ContentType "CDATA"
-    -- media type, as per [RFC2045]
-    -->
-
-<!ENTITY % ContentTypes "CDATA"
-    -- comma-separated list of media types, as per [RFC2045]
-    -->
-
-<!ENTITY % Charset "CDATA"
-    -- a character encoding, as per [RFC2045]
-    -->
-
-<!ENTITY % Charsets "CDATA"
-    -- a space separated list of character encodings, as per [RFC2045]
-    -->
-
-<!ENTITY % LanguageCode "NAME"
-    -- a language code, as per [RFC1766]
-    -->
-
-<!ENTITY % Character "CDATA"
-    -- a single character from [ISO10646] 
-    -->
-
-<!ENTITY % LinkTypes "CDATA"
-    -- space-separated list of link types
-    -->
-
-<!ENTITY % MediaDesc "CDATA"
-    -- single or comma-separated list of media descriptors
-    -->
-
-<!ENTITY % URI "CDATA"
-    -- a Uniform Resource Identifier,
-       see [URI]
-    -->
-
-<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
-
-
-<!ENTITY % Script "CDATA" -- script expression -->
-
-<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
-
-<!ENTITY % FrameTarget "CDATA" -- render in this frame -->
-
-
-<!ENTITY % Text "CDATA">
-
-
-<!-- Parameter Entities -->
-
-<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
-
-<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
-
-<!ENTITY % list "UL | OL |  DIR | MENU">
-
-<!ENTITY % preformatted "PRE">
-
-<!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
-
-<!-- There are also 16 widely known color names with their sRGB values:
-
-    Black  = #000000    Green  = #008000
-    Silver = #C0C0C0    Lime   = #00FF00
-    Gray   = #808080    Olive  = #808000
-    White  = #FFFFFF    Yellow = #FFFF00
-    Maroon = #800000    Navy   = #000080
-    Red    = #FF0000    Blue   = #0000FF
-    Purple = #800080    Teal   = #008080
-    Fuchsia= #FF00FF    Aqua   = #00FFFF
- -->
-
-<!ENTITY % bodycolors "
-  bgcolor     %Color;        #IMPLIED  -- document background color --
-  text        %Color;        #IMPLIED  -- document text color --
-  link        %Color;        #IMPLIED  -- color of links --
-  vlink       %Color;        #IMPLIED  -- color of visited links --
-  alink       %Color;        #IMPLIED  -- color of selected links --
-  ">
-
-<!--=================== Generic Attributes ===============================-->
-
-<!ENTITY % coreattrs
- "id          ID             #IMPLIED  -- document-wide unique id --
-  class       CDATA          #IMPLIED  -- space separated list of classes --
-  style       %StyleSheet;   #IMPLIED  -- associated style info --
-  title       %Text;         #IMPLIED  -- advisory title/amplification --"
-  >
-
-<!ENTITY % i18n
- "lang        %LanguageCode; #IMPLIED  -- language code --
-  dir         (ltr|rtl)      #IMPLIED  -- direction for weak/neutral text --"
-  >
-
-<!ENTITY % events
- "onclick     %Script;       #IMPLIED  -- a pointer button was clicked --
-  ondblclick  %Script;       #IMPLIED  -- a pointer button was double clicked--
-  onmousedown %Script;       #IMPLIED  -- a pointer button was pressed down --
-  onmouseup   %Script;       #IMPLIED  -- a pointer button was released --
-  onmouseover %Script;       #IMPLIED  -- a pointer was moved onto --
-  onmousemove %Script;       #IMPLIED  -- a pointer was moved within --
-  onmouseout  %Script;       #IMPLIED  -- a pointer was moved away --
-  onkeypress  %Script;       #IMPLIED  -- a key was pressed and released --
-  onkeydown   %Script;       #IMPLIED  -- a key was pressed down --
-  onkeyup     %Script;       #IMPLIED  -- a key was released --"
-  >
-
-<!-- Reserved Feature Switch -->
-<!ENTITY % HTML.Reserved "IGNORE">
-
-<!-- The following attributes are reserved for possible future use -->
-<![ %HTML.Reserved; [
-<!ENTITY % reserved
- "datasrc     %URI;          #IMPLIED  -- a single or tabular Data Source --
-  datafld     CDATA          #IMPLIED  -- the property or column name --
-  dataformatas (plaintext|html) plaintext -- text or html --"
-  >
-]]>
-
-<!ENTITY % reserved "">
-
-<!ENTITY % attrs "%coreattrs; %i18n; %events;">
-
-<!ENTITY % align "align (left|center|right|justify)  #IMPLIED"
-                   -- default is left for ltr paragraphs, right for rtl --
-  >
-
-<!--=================== Text Markup ======================================-->
-
-<!ENTITY % fontstyle
- "TT | I | B | U | S | STRIKE | BIG | SMALL">
-
-<!ENTITY % phrase "EM | STRONG | DFN | CODE |
-                   SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
-
-<!ENTITY % special
-   "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
-    MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">
-
-<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
-
-<!-- %inline; covers inline or "text-level" elements -->
-<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
-
-<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
-<!ATTLIST (%fontstyle;|%phrase;)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT (SUB|SUP) - - (%inline;)*    -- subscript, superscript -->
-<!ATTLIST (SUB|SUP)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT SPAN - - (%inline;)*         -- generic language/style container -->
-<!ATTLIST SPAN
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %reserved;			       -- reserved for possible future use --
-  >
-
-<!ELEMENT BDO - - (%inline;)*          -- I18N BiDi over-ride -->
-<!ATTLIST BDO
-  %coreattrs;                          -- id, class, style, title --
-  lang        %LanguageCode; #IMPLIED  -- language code --
-  dir         (ltr|rtl)      #REQUIRED -- directionality --
-  >
-
-<!ELEMENT BASEFONT - O EMPTY           -- base font size -->
-<!ATTLIST BASEFONT
-  id          ID             #IMPLIED  -- document-wide unique id --
-  size        CDATA          #REQUIRED -- base font size for FONT elements --
-  color       %Color;        #IMPLIED  -- text color --
-  face        CDATA          #IMPLIED  -- comma separated list of font names --
-  >
-
-<!ELEMENT FONT - - (%inline;)*         -- local change to font -->
-<!ATTLIST FONT
-  %coreattrs;                          -- id, class, style, title --
-  %i18n;		               -- lang, dir --
-  size        CDATA          #IMPLIED  -- [+|-]nn e.g. size="+1", size="4" --
-  color       %Color;        #IMPLIED  -- text color --
-  face        CDATA          #IMPLIED  -- comma separated list of font names --
-  >
-
-<!ELEMENT BR - O EMPTY                 -- forced line break -->
-<!ATTLIST BR
-  %coreattrs;                          -- id, class, style, title --
-  clear       (left|all|right|none) none -- control of text flow --
-  >
-
-<!--================== HTML content models ===============================-->
-
-<!--
-    HTML has two basic content models:
-
-        %inline;     character level elements and text strings
-        %block;      block-like elements e.g. paragraphs and lists
--->
-
-<!ENTITY % block
-     "P | %heading; | %list; | %preformatted; | DL | DIV | CENTER |
-      NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
-      TABLE | FIELDSET | ADDRESS">
-
-<!ENTITY % flow "%block; | %inline;">
-
-<!--=================== Document Body ====================================-->
-
-<!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body -->
-<!ATTLIST BODY
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  onload          %Script;   #IMPLIED  -- the document has been loaded --
-  onunload        %Script;   #IMPLIED  -- the document has been removed --
-  background      %URI;      #IMPLIED  -- texture tile for document
-                                          background --
-  %bodycolors;                         -- bgcolor, text, link, vlink, alink --
-  >
-
-<!ELEMENT ADDRESS - - ((%inline;)|P)*  -- information on author -->
-<!ATTLIST ADDRESS
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT DIV - - (%flow;)*            -- generic language/style container -->
-<!ATTLIST DIV
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %align;                              -- align, text alignment --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT CENTER - - (%flow;)*         -- shorthand for DIV align=center -->
-<!ATTLIST CENTER
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!--================== The Anchor Element ================================-->
-
-<!ENTITY % Shape "(rect|circle|poly|default)">
-<!ENTITY % Coords "CDATA" -- comma separated list of lengths -->
-
-<!ELEMENT A - - (%inline;)* -(A)       -- anchor -->
-<!ATTLIST A
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
-  type        %ContentType;  #IMPLIED  -- advisory content type --
-  name        CDATA          #IMPLIED  -- named link end --
-  href        %URI;          #IMPLIED  -- URI for linked resource --
-  hreflang    %LanguageCode; #IMPLIED  -- language code --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  rel         %LinkTypes;    #IMPLIED  -- forward link types --
-  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  shape       %Shape;        rect      -- for use with client-side image maps --
-  coords      %Coords;       #IMPLIED  -- for use with client-side image maps --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  >
-
-<!--================== Client-side image maps ============================-->
-
-<!-- These can be placed in the same document or grouped in a
-     separate document although this isn't yet widely supported -->
-
-<!ELEMENT MAP - - ((%block;)+ | AREA+) -- client-side image map -->
-<!ATTLIST MAP
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #REQUIRED -- for reference by usemap --
-  >
-
-<!ELEMENT AREA - O EMPTY               -- client-side image map area -->
-<!ATTLIST AREA
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  shape       %Shape;        rect      -- controls interpretation of coords --
-  coords      %Coords;       #IMPLIED  -- comma separated list of lengths --
-  href        %URI;          #IMPLIED  -- URI for linked resource --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  nohref      (nohref)       #IMPLIED  -- this region has no action --
-  alt         %Text;         #REQUIRED -- short description --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  >
-
-<!--================== The LINK Element ==================================-->
-
-<!--
-  Relationship values can be used in principle:
-
-   a) for document specific toolbars/menus when used
-      with the LINK element in document head e.g.
-        start, contents, previous, next, index, end, help
-   b) to link to a separate style sheet (rel=stylesheet)
-   c) to make a link to a script (rel=script)
-   d) by stylesheets to control how collections of
-      html nodes are rendered into printed documents
-   e) to make a link to a printable version of this document
-      e.g. a postscript or pdf version (rel=alternate media=print)
--->
-
-<!ELEMENT LINK - O EMPTY               -- a media-independent link -->
-<!ATTLIST LINK
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
-  href        %URI;          #IMPLIED  -- URI for linked resource --
-  hreflang    %LanguageCode; #IMPLIED  -- language code --
-  type        %ContentType;  #IMPLIED  -- advisory content type --
-  rel         %LinkTypes;    #IMPLIED  -- forward link types --
-  rev         %LinkTypes;    #IMPLIED  -- reverse link types --
-  media       %MediaDesc;    #IMPLIED  -- for rendering on these media --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  >
-
-<!--=================== Images ===========================================-->
-
-<!-- Length defined in strict DTD for cellpadding/cellspacing -->
-<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
-<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
-
-<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
-
-<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
-
-<!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? -->
-
-<!-- To avoid problems with text-only UAs as well as 
-   to make image content understandable and navigable 
-   to users of non-visual UAs, you need to provide
-   a description with ALT, and avoid server-side image maps -->
-<!ELEMENT IMG - O EMPTY                -- Embedded image -->
-<!ATTLIST IMG
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  src         %URI;          #REQUIRED -- URI of image to embed --
-  alt         %Text;         #REQUIRED -- short description --
-  longdesc    %URI;          #IMPLIED  -- link to long description
-                                          (complements alt) --
-  height      %Length;       #IMPLIED  -- override height --
-  width       %Length;       #IMPLIED  -- override width --
-  usemap      %URI;          #IMPLIED  -- use client-side image map --
-  ismap       (ismap)        #IMPLIED  -- use server-side image map --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  border      %Length;       #IMPLIED  -- link border width --
-  hspace      %Pixels;       #IMPLIED  -- horizontal gutter --
-  vspace      %Pixels;       #IMPLIED  -- vertical gutter --
-  >
-
-<!-- USEMAP points to a MAP element which may be in this document
-  or an external document, although the latter is not widely supported -->
-
-<!--==================== OBJECT ======================================-->
-<!--
-  OBJECT is used to embed objects as part of HTML pages 
-  PARAM elements should precede other content. SGML mixed content
-  model technicality precludes specifying this formally ...
--->
-
-<!ELEMENT OBJECT - - (PARAM | %flow;)*
- -- generic embedded object -->
-<!ATTLIST OBJECT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  declare     (declare)      #IMPLIED  -- declare but don't instantiate flag --
-  classid     %URI;          #IMPLIED  -- identifies an implementation --
-  codebase    %URI;          #IMPLIED  -- base URI for classid, data, archive--
-  data        %URI;          #IMPLIED  -- reference to object's data --
-  type        %ContentType;  #IMPLIED  -- content type for data --
-  codetype    %ContentType;  #IMPLIED  -- content type for code --
-  archive     %URI;          #IMPLIED  -- space separated archive list --
-  standby     %Text;         #IMPLIED  -- message to show while loading --
-  height      %Length;       #IMPLIED  -- override height --
-  width       %Length;       #IMPLIED  -- override width --
-  usemap      %URI;          #IMPLIED  -- use client-side image map --
-  name        CDATA          #IMPLIED  -- submit as part of form --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  border      %Length;       #IMPLIED  -- link border width --
-  hspace      %Pixels;       #IMPLIED  -- horizontal gutter --
-  vspace      %Pixels;       #IMPLIED  -- vertical gutter --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT PARAM - O EMPTY              -- named property value -->
-<!ATTLIST PARAM
-  id          ID             #IMPLIED  -- document-wide unique id --
-  name        CDATA          #REQUIRED -- property name --
-  value       CDATA          #IMPLIED  -- property value --
-  valuetype   (DATA|REF|OBJECT) DATA   -- How to interpret value --
-  type        %ContentType;  #IMPLIED  -- content type for value
-                                          when valuetype=ref --
-  >
-
-<!--=================== Java APPLET ==================================-->
-<!--
-  One of code or object attributes must be present.
-  Place PARAM elements before other content.
--->
-<!ELEMENT APPLET - - (PARAM | %flow;)* -- Java applet -->
-<!ATTLIST APPLET
-  %coreattrs;                          -- id, class, style, title --
-  codebase    %URI;          #IMPLIED  -- optional base URI for applet --
-  archive     CDATA          #IMPLIED  -- comma separated archive list --
-  code        CDATA          #IMPLIED  -- applet class file --
-  object      CDATA          #IMPLIED  -- serialized applet file --
-  alt         %Text;         #IMPLIED  -- short description --
-  name        CDATA          #IMPLIED  -- allows applets to find each other --
-  width       %Length;       #REQUIRED -- initial width --
-  height      %Length;       #REQUIRED -- initial height --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  hspace      %Pixels;       #IMPLIED  -- horizontal gutter --
-  vspace      %Pixels;       #IMPLIED  -- vertical gutter --
-  >
-
-<!--=================== Horizontal Rule ==================================-->
-
-<!ELEMENT HR - O EMPTY -- horizontal rule -->
-<!ATTLIST HR
-  %coreattrs;                          -- id, class, style, title --
-  %events;
-  align       (left|center|right) #IMPLIED
-  noshade     (noshade)      #IMPLIED
-  size        %Pixels;       #IMPLIED
-  width       %Length;       #IMPLIED
-  >
-
-<!--=================== Paragraphs =======================================-->
-
-<!ELEMENT P - O (%inline;)*            -- paragraph -->
-<!ATTLIST P
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %align;                              -- align, text alignment --
-  >
-
-<!--=================== Headings =========================================-->
-
-<!--
-  There are six levels of headings from H1 (the most important)
-  to H6 (the least important).
--->
-
-<!ELEMENT (%heading;)  - - (%inline;)* -- heading -->
-<!ATTLIST (%heading;)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %align;                              -- align, text alignment --
-  >
-
-<!--=================== Preformatted Text ================================-->
-
-<!-- excludes markup for images and changes in font size -->
-<!ENTITY % pre.exclusion "IMG|OBJECT|APPLET|BIG|SMALL|SUB|SUP|FONT|BASEFONT">
-
-<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
-<!ATTLIST PRE
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  width       NUMBER         #IMPLIED
-  >
-
-<!--===================== Inline Quotes ==================================-->
-
-<!ELEMENT Q - - (%inline;)*            -- short inline quotation -->
-<!ATTLIST Q
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  cite        %URI;          #IMPLIED  -- URI for source document or msg --
-  >
-
-<!--=================== Block-like Quotes ================================-->
-
-<!ELEMENT BLOCKQUOTE - - (%flow;)*     -- long quotation -->
-<!ATTLIST BLOCKQUOTE
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  cite        %URI;          #IMPLIED  -- URI for source document or msg --
-  >
-
-<!--=================== Inserted/Deleted Text ============================-->
-
-
-<!-- INS/DEL are handled by inclusion on BODY -->
-<!ELEMENT (INS|DEL) - - (%flow;)*      -- inserted text, deleted text -->
-<!ATTLIST (INS|DEL)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  cite        %URI;          #IMPLIED  -- info on reason for change --
-  datetime    %Datetime;     #IMPLIED  -- date and time of change --
-  >
-
-<!--=================== Lists ============================================-->
-
-<!-- definition lists - DT for term, DD for its definition -->
-
-<!ELEMENT DL - - (DT|DD)+              -- definition list -->
-<!ATTLIST DL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  compact     (compact)      #IMPLIED  -- reduced interitem spacing --
-  >
-
-<!ELEMENT DT - O (%inline;)*           -- definition term -->
-<!ELEMENT DD - O (%flow;)*             -- definition description -->
-<!ATTLIST (DT|DD)
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!-- Ordered lists (OL) Numbering style
-
-    1   arablic numbers     1, 2, 3, ...
-    a   lower alpha         a, b, c, ...
-    A   upper alpha         A, B, C, ...
-    i   lower roman         i, ii, iii, ...
-    I   upper roman         I, II, III, ...
-
-    The style is applied to the sequence number which by default
-    is reset to 1 for the first list item in an ordered list.
-
-    This can't be expressed directly in SGML due to case folding.
--->
-
-<!ENTITY % OLStyle "CDATA"      -- constrained to: "(1|a|A|i|I)" -->
-
-<!ELEMENT OL - - (LI)+                 -- ordered list -->
-<!ATTLIST OL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %OLStyle;      #IMPLIED  -- numbering style --
-  compact     (compact)      #IMPLIED  -- reduced interitem spacing --
-  start       NUMBER         #IMPLIED  -- starting sequence number --
-  >
-
-<!-- Unordered Lists (UL) bullet styles -->
-<!ENTITY % ULStyle "(disc|square|circle)">
-
-<!ELEMENT UL - - (LI)+                 -- unordered list -->
-<!ATTLIST UL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %ULStyle;      #IMPLIED  -- bullet style --
-  compact     (compact)      #IMPLIED  -- reduced interitem spacing --
-  >
-
-<!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu list -->
-<!ATTLIST DIR
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  compact     (compact)      #IMPLIED
-  >
-<!ATTLIST MENU
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  compact     (compact)      #IMPLIED
-  >
-
-<!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle;|%OLStyle;)" -->
-
-<!ELEMENT LI - O (%flow;)*             -- list item -->
-<!ATTLIST LI
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %LIStyle;      #IMPLIED  -- list item style --
-  value       NUMBER         #IMPLIED  -- reset sequence number --
-  >
-
-<!--================ Forms ===============================================-->
-<!ELEMENT FORM - - (%flow;)* -(FORM)   -- interactive form -->
-<!ATTLIST FORM
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  action      %URI;          #REQUIRED -- server-side form handler --
-  method      (GET|POST)     GET       -- HTTP method used to submit the form--
-  enctype     %ContentType;  "application/x-www-form-urlencoded"
-  onsubmit    %Script;       #IMPLIED  -- the form was submitted --
-  onreset     %Script;       #IMPLIED  -- the form was reset --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  accept-charset %Charsets;  #IMPLIED  -- list of supported charsets --
-  >
-
-<!-- Each label must not contain more than ONE field -->
-<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
-<!ATTLIST LABEL
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  for         IDREF          #IMPLIED  -- matches field ID value --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  >
-
-<!ENTITY % InputType
-  "(TEXT | PASSWORD | CHECKBOX |
-    RADIO | SUBMIT | RESET |
-    FILE | HIDDEN | IMAGE | BUTTON)"
-   >
-
-<!-- attribute name required for all but submit & reset -->
-<!ELEMENT INPUT - O EMPTY              -- form control -->
-<!ATTLIST INPUT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  type        %InputType;    TEXT      -- what kind of widget is needed --
-  name        CDATA          #IMPLIED  -- submit as part of form --
-  value       CDATA          #IMPLIED  -- required for radio and checkboxes --
-  checked     (checked)      #IMPLIED  -- for radio buttons and check boxes --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  readonly    (readonly)     #IMPLIED  -- for text and passwd --
-  size        CDATA          #IMPLIED  -- specific to each type of field --
-  maxlength   NUMBER         #IMPLIED  -- max chars for text fields --
-  src         %URI;          #IMPLIED  -- for fields with images --
-  alt         CDATA          #IMPLIED  -- short description --
-  usemap      %URI;          #IMPLIED  -- use client-side image map --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  onselect    %Script;       #IMPLIED  -- some text was selected --
-  onchange    %Script;       #IMPLIED  -- the element value was changed --
-  accept      %ContentTypes; #IMPLIED  -- list of MIME types for file upload --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
-<!ATTLIST SELECT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #IMPLIED  -- field name --
-  size        NUMBER         #IMPLIED  -- rows visible --
-  multiple    (multiple)     #IMPLIED  -- default is single selection --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  onchange    %Script;       #IMPLIED  -- the element value was changed --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
-<!ATTLIST OPTGROUP
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  label       %Text;         #REQUIRED -- for use in hierarchical menus --
-  >
-
-<!ELEMENT OPTION - O (#PCDATA)         -- selectable choice -->
-<!ATTLIST OPTION
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  selected    (selected)     #IMPLIED
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  label       %Text;         #IMPLIED  -- for use in hierarchical menus --
-  value       CDATA          #IMPLIED  -- defaults to element content --
-  >
-
-<!ELEMENT TEXTAREA - - (#PCDATA)       -- multi-line text field -->
-<!ATTLIST TEXTAREA
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #IMPLIED
-  rows        NUMBER         #REQUIRED
-  cols        NUMBER         #REQUIRED
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  readonly    (readonly)     #IMPLIED
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  onselect    %Script;       #IMPLIED  -- some text was selected --
-  onchange    %Script;       #IMPLIED  -- the element value was changed --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!--
-  #PCDATA is to solve the mixed content problem,
-  per specification only whitespace is allowed there!
- -->
-<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
-<!ATTLIST FIELDSET
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!ELEMENT LEGEND - - (%inline;)*       -- fieldset legend -->
-<!ENTITY % LAlign "(top|bottom|left|right)">
-
-<!ATTLIST LEGEND
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  align       %LAlign;       #IMPLIED  -- relative to fieldset --
-  >
-
-<!ELEMENT BUTTON - -
-     (%flow;)* -(A|%formctrl;|FORM|ISINDEX|FIELDSET|IFRAME)
-     -- push button -->
-<!ATTLIST BUTTON
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  name        CDATA          #IMPLIED
-  value       CDATA          #IMPLIED  -- sent to server when submitted --
-  type        (button|submit|reset) submit -- for use as form button --
-  disabled    (disabled)     #IMPLIED  -- unavailable in this context --
-  tabindex    NUMBER         #IMPLIED  -- position in tabbing order --
-  accesskey   %Character;    #IMPLIED  -- accessibility key character --
-  onfocus     %Script;       #IMPLIED  -- the element got the focus --
-  onblur      %Script;       #IMPLIED  -- the element lost the focus --
-  %reserved;                           -- reserved for possible future use --
-  >
-
-<!--======================= Tables =======================================-->
-
-<!-- IETF HTML table standard, see [RFC1942] -->
-
-<!--
- The BORDER attribute sets the thickness of the frame around the
- table. The default units are screen pixels.
-
- The FRAME attribute specifies which parts of the frame around
- the table should be rendered. The values are not the same as
- CALS to avoid a name clash with the VALIGN attribute.
-
- The value "border" is included for backwards compatibility with
- <TABLE BORDER> which yields frame=border and border=implied
- For <TABLE BORDER=1> you get border=1 and frame=implied. In this
- case, it is appropriate to treat this as frame=border for backwards
- compatibility with deployed browsers.
--->
-<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
-
-<!--
- The RULES attribute defines which rules to draw between cells:
-
- If RULES is absent then assume:
-     "none" if BORDER is absent or BORDER=0 otherwise "all"
--->
-
-<!ENTITY % TRules "(none | groups | rows | cols | all)">
-  
-<!-- horizontal placement of table relative to document -->
-<!ENTITY % TAlign "(left|center|right)">
-
-<!-- horizontal alignment attributes for cell contents -->
-<!ENTITY % cellhalign
-  "align      (left|center|right|justify|char) #IMPLIED
-   char       %Character;    #IMPLIED  -- alignment char, e.g. char=':' --
-   charoff    %Length;       #IMPLIED  -- offset for alignment char --"
-  >
-
-<!-- vertical alignment attributes for cell contents -->
-<!ENTITY % cellvalign
-  "valign     (top|middle|bottom|baseline) #IMPLIED"
-  >
-
-<!ELEMENT TABLE - -
-     (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
-<!ELEMENT CAPTION  - - (%inline;)*     -- table caption -->
-<!ELEMENT THEAD    - O (TR)+           -- table header -->
-<!ELEMENT TFOOT    - O (TR)+           -- table footer -->
-<!ELEMENT TBODY    O O (TR)+           -- table body -->
-<!ELEMENT COLGROUP - O (col)*          -- table column group -->
-<!ELEMENT COL      - O EMPTY           -- table column -->
-<!ELEMENT TR       - O (TH|TD)+        -- table row -->
-<!ELEMENT (TH|TD)  - O (%flow;)*       -- table header cell, table data cell-->
-
-<!ATTLIST TABLE                        -- table element --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  summary     %Text;         #IMPLIED  -- purpose/structure for speech output--
-  width       %Length;       #IMPLIED  -- table width --
-  border      %Pixels;       #IMPLIED  -- controls frame width around table --
-  frame       %TFrame;       #IMPLIED  -- which parts of frame to render --
-  rules       %TRules;       #IMPLIED  -- rulings between rows and cols --
-  cellspacing %Length;       #IMPLIED  -- spacing between cells --
-  cellpadding %Length;       #IMPLIED  -- spacing within cells --
-  align       %TAlign;       #IMPLIED  -- table position relative to window --
-  bgcolor     %Color;        #IMPLIED  -- background color for cells --
-  %reserved;                           -- reserved for possible future use --
-  datapagesize CDATA         #IMPLIED  -- reserved for possible future use --
-  >
-
-<!ENTITY % CAlign "(top|bottom|left|right)">
-
-<!ATTLIST CAPTION
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  align       %CAlign;       #IMPLIED  -- relative to table --
-  >
-
-<!--
-COLGROUP groups a set of COL elements. It allows you to group
-several semantically related columns together.
--->
-<!ATTLIST COLGROUP
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  span        NUMBER         1         -- default number of columns in group --
-  width       %MultiLength;  #IMPLIED  -- default width for enclosed COLs --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  >
-
-<!--
- COL elements define the alignment properties for cells in
- one or more columns.
-
- The WIDTH attribute specifies the width of the columns, e.g.
-
-     width=64        width in screen pixels
-     width=0.5*      relative width of 0.5
-
- The SPAN attribute causes the attributes of one
- COL element to apply to more than one column.
--->
-<!ATTLIST COL                          -- column groups and properties --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  span        NUMBER         1         -- COL attributes affect N columns --
-  width       %MultiLength;  #IMPLIED  -- column width specification --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  >
-
-<!--
-    Use THEAD to duplicate headers when breaking table
-    across page boundaries, or for static headers when
-    TBODY sections are rendered in scrolling panel.
-
-    Use TFOOT to duplicate footers when breaking table
-    across page boundaries, or for static footers when
-    TBODY sections are rendered in scrolling panel.
-
-    Use multiple TBODY sections when rules are needed
-    between groups of table rows.
--->
-<!ATTLIST (THEAD|TBODY|TFOOT)          -- table section --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  >
-
-<!ATTLIST TR                           -- table row --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  bgcolor     %Color;        #IMPLIED  -- background color for row --
-  >
-
-
-<!-- Scope is simpler than axes attribute for common tables -->
-<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
-
-<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
-<!ATTLIST (TH|TD)                      -- header or data cell --
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  abbr        %Text;         #IMPLIED  -- abbreviation for header cell --
-  axis        CDATA          #IMPLIED  -- names groups of related headers--
-  headers     IDREFS         #IMPLIED  -- list of id's for header cells --
-  scope       %Scope;        #IMPLIED  -- scope covered by header cells --
-  rowspan     NUMBER         1         -- number of rows spanned by cell --
-  colspan     NUMBER         1         -- number of cols spanned by cell --
-  %cellhalign;                         -- horizontal alignment in cells --
-  %cellvalign;                         -- vertical alignment in cells --
-  nowrap      (nowrap)       #IMPLIED  -- suppress word wrap --
-  bgcolor     %Color;        #IMPLIED  -- cell background color --
-  width       %Pixels;       #IMPLIED  -- width for cell --
-  height      %Pixels;       #IMPLIED  -- height for cell --
-  >
-
-<!--================== Document Frames ===================================-->
-
-<!--
-  The content model for HTML documents depends on whether the HEAD is
-  followed by a FRAMESET or BODY element. The widespread omission of
-  the BODY start tag makes it impractical to define the content model
-  without the use of a marked section.
--->
-
-<!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision-->
-<!ATTLIST FRAMESET
-  %coreattrs;                          -- id, class, style, title --
-  rows        %MultiLengths; #IMPLIED  -- list of lengths,
-                                          default: 100% (1 row) --
-  cols        %MultiLengths; #IMPLIED  -- list of lengths,
-                                          default: 100% (1 col) --
-  onload      %Script;       #IMPLIED  -- all the frames have been loaded  -- 
-  onunload    %Script;       #IMPLIED  -- all the frames have been removed -- 
-  >
-
-<!-- reserved frame names start with "_" otherwise starts with letter -->
-<!ELEMENT FRAME - O EMPTY              -- subwindow -->
-<!ATTLIST FRAME
-  %coreattrs;                          -- id, class, style, title --
-  longdesc    %URI;          #IMPLIED  -- link to long description
-                                          (complements title) --
-  name        CDATA          #IMPLIED  -- name of frame for targetting --
-  src         %URI;          #IMPLIED  -- source of frame content --
-  frameborder (1|0)          1         -- request frame borders? --
-  marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
-  marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
-  noresize    (noresize)     #IMPLIED  -- allow users to resize frames? --
-  scrolling   (yes|no|auto)  auto      -- scrollbar or none --
-  >
-
-<!ELEMENT IFRAME - - (%flow;)*         -- inline subwindow -->
-<!ATTLIST IFRAME
-  %coreattrs;                          -- id, class, style, title --
-  longdesc    %URI;          #IMPLIED  -- link to long description
-                                          (complements title) --
-  name        CDATA          #IMPLIED  -- name of frame for targetting --
-  src         %URI;          #IMPLIED  -- source of frame content --
-  frameborder (1|0)          1         -- request frame borders? --
-  marginwidth %Pixels;       #IMPLIED  -- margin widths in pixels --
-  marginheight %Pixels;      #IMPLIED  -- margin height in pixels --
-  scrolling   (yes|no|auto)  auto      -- scrollbar or none --
-  align       %IAlign;       #IMPLIED  -- vertical or horizontal alignment --
-  height      %Length;       #IMPLIED  -- frame height --
-  width       %Length;       #IMPLIED  -- frame width --
-  >
-
-<![ %HTML.Frameset; [
-<!ENTITY % noframes.content "(BODY) -(NOFRAMES)">
-]]>
-
-<!ENTITY % noframes.content "(%flow;)*">
-
-<!ELEMENT NOFRAMES - - %noframes.content;
- -- alternate content container for non frame-based rendering -->
-<!ATTLIST NOFRAMES
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!--================ Document Head =======================================-->
-<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
-<!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
-
-<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
-<!ATTLIST HEAD
-  %i18n;                               -- lang, dir --
-  profile     %URI;          #IMPLIED  -- named dictionary of meta info --
-  >
-
-<!-- The TITLE element is not considered part of the flow of text.
-       It should be displayed, for example as the page header or
-       window title. Exactly one title is required per document.
-    -->
-<!-- Lars: small correction here... -->
-<!--ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -- -->
-<!ELEMENT TITLE - - (#PCDATA)  -- document title -->
-<!ATTLIST TITLE %i18n>
-
-<!ELEMENT ISINDEX - O EMPTY            -- single line prompt -->
-<!ATTLIST ISINDEX
-  %coreattrs;                          -- id, class, style, title --
-  %i18n;                               -- lang, dir --
-  prompt      %Text;         #IMPLIED  -- prompt message -->
-
-<!ELEMENT BASE - O EMPTY               -- document base URI -->
-<!ATTLIST BASE
-  href        %URI;          #IMPLIED  -- URI that acts as base URI --
-  target      %FrameTarget;  #IMPLIED  -- render in this frame --
-  >
-
-<!ELEMENT META - O EMPTY               -- generic metainformation -->
-<!ATTLIST META
-  %i18n;                               -- lang, dir, for use with content --
-  http-equiv  NAME           #IMPLIED  -- HTTP response header name  --
-  name        NAME           #IMPLIED  -- metainformation name --
-  content     CDATA          #REQUIRED -- associated information --
-  scheme      CDATA          #IMPLIED  -- select form of content --
-  >
-
-<!ELEMENT STYLE - - %StyleSheet        -- style info -->
-<!ATTLIST STYLE
-  %i18n;                               -- lang, dir, for use with title --
-  type        %ContentType;  #REQUIRED -- content type of style language --
-  media       %MediaDesc;    #IMPLIED  -- designed for use with these media --
-  title       %Text;         #IMPLIED  -- advisory title --
-  >
-
-<!ELEMENT SCRIPT - - %Script;          -- script statements -->
-<!ATTLIST SCRIPT
-  charset     %Charset;      #IMPLIED  -- char encoding of linked resource --
-  type        %ContentType;  #REQUIRED -- content type of script language --
-  language    CDATA          #IMPLIED  -- predefined script language name --
-  src         %URI;          #IMPLIED  -- URI for an external script --
-  defer       (defer)        #IMPLIED  -- UA may defer execution of script --
-  event       CDATA          #IMPLIED  -- reserved for possible future use --
-  for         %URI;          #IMPLIED  -- reserved for possible future use --
-  >
-
-<!ELEMENT NOSCRIPT - - (%flow;)*
-  -- alternate content container for non script-based rendering -->
-<!ATTLIST NOSCRIPT
-  %attrs;                              -- %coreattrs, %i18n, %events --
-  >
-
-<!--================ Document Structure ==================================-->
-<!ENTITY % version "version CDATA %HTML.Version;">
-
-<!--[ %HTML.Frameset; [
-<!ENTITY % html.content "HEAD, FRAMESET">
-]]-->
-
-<!-- Lars: slight correction here: include FRAMESET -->
-<!ENTITY % html.content "HEAD, (BODY|(FRAMESET&NOFRAMES?))">
-
-<!ELEMENT HTML O O (%html.content;)    -- document root element -->
-<!ATTLIST HTML
-  %i18n;                               -- lang, dir --
-  %version;
-  >
diff --git a/WebCore/src/kdelibs/khtml/java/KJAS_GRAMMAR.txt b/WebCore/src/kdelibs/khtml/java/KJAS_GRAMMAR.txt
deleted file mode 100644
index 5632f8d..0000000
--- a/WebCore/src/kdelibs/khtml/java/KJAS_GRAMMAR.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-This is documentation for the updated KJAS protocol.
-
-KJAS Grammar
-===============================================================================
-
-## Commands From KAppletWidget(C++) to KJAS(Java Process)
-<KJAS Command>   -> <CMD Length><CMD>
-<CMD Length>     -> <StringNum>
-<CMD>            -> <createContext>  |
-                    <destroyContext> |
-                    <createApplet>   |
-                    <destroyApplet>  |
-                    <startApplet>    |
-                    <stopApplet>     |
-                    <initApplet>     |
-                    <showURLInFrame> |
-                    <showDocument>   |
-                    <showStatus>     |
-                    <resizeApplet>   |
-                    <getURLData>     |
-                    <URLData>        |
-                    <shutDownServer>
-
-<createContext>  -> <1 byte equal to 1 when cast as int><SEP><ContextID><END>
-<destroyContext> -> <1 byte equal to 2 when cast as int><SEP><ContextID><END>
-
-<createApplet>   -> <1 byte equal to 3 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><SEP><AppletName><SEP><ClassName><SEP>
-                    <BaseURL><SEP><CodeBase><SEP><Archives>
-                    <SEP><Width><SEP><Height><SEP><WindowTitle><SEP><ParamList>
-<destroyApplet>  -> <1 byte equal to 4 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-<startApplet>    -> <1 byte equal to 5 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-<stopApplet>     -> <1 byte equal to 6 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-<initApplet>     -> <1 byte equal to 7 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><END>
-
-
-## Commands from KJAS(Java Process) to KAppletWidget(C++)
-<showDocument>   -> <1 byte equal to 8 when cast as int><SEP><ContextID>
-                    <SEP><URL><END>
-<showURLInFrame> -> <1 byte equal to 9 when cast as int><SEP><ContextID>
-                    <SEP><URL><SEP><targetFrame><END>
-<showStatus>     -> <1 byte equal to 10 when cast as int><SEP><ContextID>
-                    <SEP><string><END>
-<resizeApplet>   -> <1 byte equal to 11 when cast as int><SEP><ContextID>
-                    <SEP><AppletID><SEP><Width><SEP><Height><END>
-<getURLData>     -> <1 byte equal to 12 when cast as int><SEP><ClassLoaderID>
-                    <SEP><URL><END>
-<URLData>        -> <1 byte equal to 13 when cast as int><SEP><ClassLoaderID>
-                    <SEP><URL><SEP><DATA><END>
-
-<shutDownServer> -> <1 byte equal to 14 when cast as int><END>
-
-## basic data types
-<CMD Length>     -> <StringNum>
-<ContextID>      -> string
-<AppletID>       -> string
-<AppletName>     -> string
-<ParamList>      -> <StringNum><SEP><ParamPairList>
-<ParamPairList>  -> StringNum of ParamPair
-<ParamPair>      -> <ParamName><SEP><ParamValue><SEP>
-<ClassName>      -> string
-<BaseURL>        -> <URL>
-<CodeBase>       -> <URL>
-<Archives>       -> string (list of jarfile names)
-<Width>          -> string representation of integer
-<Height>         -> string representation of integer
-<Title>          -> string
-<ParamName>      -> string
-<ParamValue>     -> string
-<Host>           -> string (must be a valid URL)
-<URL>            -> string (must be a valid URL)
-<targetFrame>    -> string
-<WindowTitle>    -> string
-<END>            -> <SEP>
-<SEP>            -> Null character- 1 byte = 0
-<StringNum>      -> padded string representation of integer, 8 characters long
-<ClassLoaderID>  -> string
-<DATA>           -> byte array
diff --git a/WebCore/src/kdelibs/khtml/java/README b/WebCore/src/kdelibs/khtml/java/README
deleted file mode 100644
index 5d64e74..0000000
--- a/WebCore/src/kdelibs/khtml/java/README
+++ /dev/null
@@ -1,20 +0,0 @@
-Wynn Wilkes- November 14, 2000
-I've just completed a large update that fixes a large number of bugs.  The
-update also adds applet security.  The security update requires a Java 2
-jvm.  
-
-This is libkdejava, the KDE Java support library.
-
-Directory map:
-
-$CWD			CPP sources for KDE binding to KJAS and some
-			additional utility classes.
-kjava-classes.zip	An *uncompressed* ZIP file containing the .class files
-			for the KJAS server. The files must be uncompressed to
-			support some crappy JVMs.
-org/kde/kjas/server	Java sources for KJAS server process
-
-You can find more information at http://developer.kde.org/language-bindings/java/
-
-Richard Moore.
-rich at kde.org
diff --git a/WebCore/src/kdelibs/khtml/java/TODO b/WebCore/src/kdelibs/khtml/java/TODO
deleted file mode 100644
index 2b9289e..0000000
--- a/WebCore/src/kdelibs/khtml/java/TODO
+++ /dev/null
@@ -1,22 +0,0 @@
-Wynn Wilkes (November 14, 2000)
-As of now, KJAS requires a Java 2 platform for classloading
-and the default security manager.  If anyone wants to implement
-a Java 1.1 security manager, please feel free and we can integrate
-both versions.
-
-- Get the keyboard focus issues fixed
-- Fix khtml_part to have one applet context per Document
-- add a context cache someplace so we can reload contexts-
-  this will keep us from having to restart the jvm over
-  and over- this is the biggest performance problem I think
-- fix khtml_part so it will start and stop applets??
-- Implement class loading via html proxies if one is set
-
-
-- Use of QGuardedPointer
-- LiveScript support
-- Custom applet types
-- Better support for Java 2
-  - Use a factory to create the classloader and security managers
-  - Use URLClassLoader- this is done
-- Support for KIO URLs
diff --git a/WebCore/src/kdelibs/khtml/java/build.xml b/WebCore/src/kdelibs/khtml/java/build.xml
deleted file mode 100644
index 5208e50..0000000
--- a/WebCore/src/kdelibs/khtml/java/build.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="KJAS" basedir="." default="all">
-
-  <target name="init">
-    <mkdir dir="classes" />
-  </target>
-
-  <target name="compile" depends="init">
-    <javac srcdir="org" destdir="classes" deprecation="true" />
-  </target>
-
-  <target name="jar" depends="init,compile">
-    <jar jarfile="kjava.jar" compress="false" basedir="classes" />
-  </target>
-
-  <target name="all" depends="jar" description="Build everything.">
-    <echo message="Application built." />
-  </target>
-
-  <target name="clean" depends="init" description="Clean all build products.">
-    <delete file="kjava.jar" />
-    <delete dir="classes" />
-  </target>
-
-  <target name="test-init" depends="">
-    <mkdir dir="tests/classes" />
-  </target>
-
-  <target name="test" depends="test-init" description="Build the test applets">
-    <javac srcdir="tests" destdir="tests/classes" debug="true" deprecation="true" />
-  </target>
-
-  <target name="test-clean" depends="">
-    <delete dir="tests/classes" />
-  </target>
-
-</project>
diff --git a/WebCore/src/kdelibs/khtml/java/javaembed.cpp b/WebCore/src/kdelibs/khtml/java/javaembed.cpp
deleted file mode 100644
index 8112414..0000000
--- a/WebCore/src/kdelibs/khtml/java/javaembed.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/****************************************************************************
-    Implementation of QXEmbed class
-
-   Copyright (C) 1999-2000 Troll Tech AS
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-    Boston, MA 02111-1307, USA.
-*****************************************************************************/
-
-#include "javaembed.h"
-
-#include <kdebug.h>
-#include <klocale.h>
-
-#include <qapplication.h>
-#include <qevent.h>
-
-class KJavaEmbedPrivate
-{
-friend class KJavaEmbed;
-};
-
-QString getQtEventName( QEvent* e )
-{
-    QString s;
-
-    switch( e->type() )
-    {
-        case QEvent::None:
-            s = "None";
-            break;
-        case QEvent::Timer:
-            s = "Timer";
-            break;
-        case QEvent::MouseButtonPress:
-            s = "MouseButtonPress";
-            break;
-        case QEvent::MouseButtonRelease:
-            s = "MouseButtonRelease";
-            break;
-        case QEvent::MouseButtonDblClick:
-            s = "MouseButtonClick";
-            break;
-        case QEvent::MouseMove:
-            s = "MouseMove";
-            break;
-        case QEvent::KeyPress:
-            s = "KeyPress";
-            break;
-        case QEvent::KeyRelease:
-            s = "KeyRelease";
-            break;
-        case QEvent::FocusIn:
-            s = "FocusIn";
-            break;
-        case QEvent::FocusOut:
-            s = "FocusOut";
-            break;
-        case QEvent::Enter:
-            s = "Enter";
-            break;
-        case QEvent::Leave:
-            s = "Leave";
-            break;
-        case QEvent::Paint:
-            s = "Paint";
-            break;
-        case QEvent::Move:
-            s = "Move";
-            break;
-        case QEvent::Resize:
-            s = "Resize";
-            break;
-        case QEvent::Create:
-            s = "Create";
-            break;
-        case QEvent::Destroy:
-            s = "Destroy";
-            break;
-        case QEvent::Show:
-            s = "Show";
-            break;
-        case QEvent::Hide:
-            s = "Hide";
-            break;
-        case QEvent::Close:
-            s = "Close";
-            break;
-        case QEvent::Quit:
-            s = "Quit";
-            break;
-        case QEvent::Reparent:
-            s = "Reparent";
-            break;
-        case QEvent::ShowMinimized:
-            s = "ShowMinimized";
-            break;
-        case QEvent::ShowNormal:
-            s = "ShowNormal";
-            break;
-        case QEvent::WindowActivate:
-            s = "WindowActivate";
-            break;
-        case QEvent::WindowDeactivate:
-            s = "WindowDeactivate";
-            break;
-        case QEvent::ShowToParent:
-            s = "ShowToParent";
-            break;
-        case QEvent::HideToParent:
-            s = "HideToParent";
-            break;
-        case QEvent::ShowMaximized:
-            s = "ShowMaximized";
-            break;
-        case QEvent::Accel:
-            s = "Accel";
-            break;
-        case QEvent::Wheel:
-            s = "Wheel";
-            break;
-        case QEvent::AccelAvailable:
-            s = "AccelAvailable";
-            break;
-        case QEvent::CaptionChange:
-            s = "CaptionChange";
-            break;
-        case QEvent::IconChange:
-            s = "IconChange";
-            break;
-        case QEvent::ParentFontChange:
-            s = "ParentFontChange";
-            break;
-        case QEvent::ApplicationFontChange:
-            s = "ApplicationFontChange";
-            break;
-        case QEvent::ParentPaletteChange:
-            s = "ParentPaletteChange";
-            break;
-        case QEvent::ApplicationPaletteChange:
-            s = "ApplicationPaletteChange";
-            break;
-        case QEvent::Clipboard:
-            s = "Clipboard";
-            break;
-        case QEvent::Speech:
-            s = "Speech";
-            break;
-        case QEvent::SockAct:
-            s = "SockAct";
-            break;
-        case QEvent::AccelOverride:
-            s = "AccelOverride";
-            break;
-        case QEvent::DragEnter:
-            s = "DragEnter";
-            break;
-        case QEvent::DragMove:
-            s = "DragMove";
-            break;
-        case QEvent::DragLeave:
-            s = "DragLeave";
-            break;
-        case QEvent::Drop:
-            s = "Drop";
-            break;
-        case QEvent::DragResponse:
-            s = "DragResponse";
-            break;
-        case QEvent::ChildInserted:
-            s = "ChildInserted";
-            break;
-        case QEvent::ChildRemoved:
-            s = "ChildRemoved";
-            break;
-        case QEvent::LayoutHint:
-            s = "LayoutHint";
-            break;
-        case QEvent::ShowWindowRequest:
-            s = "ShowWindowRequest";
-            break;
-        case QEvent::ActivateControl:
-            s = "ActivateControl";
-            break;
-        case QEvent::DeactivateControl:
-            s = "DeactivateControl";
-            break;
-        case QEvent::User:
-            s = "User Event";
-            break;
-
-        default:
-            s = "Undefined Event, value = " + QString::number( e->type() );
-            break;
-    }
-
-    return s;
-}
-
-/*!\reimp
- */
-bool KJavaEmbed::eventFilter( QObject* o, QEvent* e)
-{
-    QEvent::Type t = e->type();
-
-    if( t != QEvent::MouseMove && t != QEvent::Timer && t <= QEvent::User )
-    {
-        kdDebug(6100) << "KJavaEmbed::eventFilter, event = " << getQtEventName( e ) << endl;
-
-        if( o == this )
-            kdDebug(6100) << "event is for me:)" << endl;
-
-        switch ( e->type() )
-        {
-            case QEvent::FocusIn:
-                break;
-
-            case QEvent::FocusOut:
-                break;
-
-            case QEvent::Leave:
-                /* check to see if we are entering the applet somehow... */
-                break;
-
-            case QEvent::Enter:
-                break;
-
-            case QEvent::WindowActivate:
-    	        break;
-
-            case QEvent::WindowDeactivate:
-    	        break;
-
-            default:
-                break;
-        }
-
-    }
-
-    return FALSE;
-}
-
-
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-QString getX11EventName( XEvent* e )
-{
-    QString s;
-
-    switch( e->type )
-    {
-        case KeyPress:
-            s = "KeyPress";
-            break;
-        case KeyRelease:
-            s = "KeyRelease";
-            break;
-        case ButtonPress:
-            s = "ButtonPress";
-            break;
-        case ButtonRelease:
-            s = "ButtonRelease";
-            break;
-        case MotionNotify:
-            s = "MotionNotify";
-            break;
-        case EnterNotify:
-            s = "EnterNotify";
-            break;
-        case LeaveNotify:
-            s = "LeaveNotify";
-            break;
-        case FocusIn:
-            s = "FocusIn";
-            break;
-        case FocusOut:
-            s = "FocusOut";
-            break;
-        case KeymapNotify:
-            s = "KeymapNotify";
-            break;
-        case Expose:
-            s = "Expose";
-            break;
-        case GraphicsExpose:
-            s = "GraphicsExpose";
-            break;
-        case NoExpose:
-            s = "NoExpose";
-            break;
-        case VisibilityNotify:
-            s = "VisibilityNotify";
-            break;
-        case CreateNotify:
-            s = "CreateNotify";
-            break;
-        case DestroyNotify:
-            s = "DestroyNotify";
-            break;
-        case UnmapNotify:
-            s = "UnmapNotify";
-            break;
-        case MapNotify:
-            s = "MapNotify";
-            break;
-        case MapRequest:
-            s = "MapRequest";
-            break;
-        case ReparentNotify:
-            s = "ReparentNotify";
-            break;
-        case ConfigureNotify:
-            s = "ConfigureNotify";
-            break;
-        case ConfigureRequest:
-            s = "ConfigureRequest";
-            break;
-        case GravityNotify:
-            s = "GravityNotify";
-            break;
-        case ResizeRequest:
-            s = "ResizeRequest";
-            break;
-        case CirculateNotify:
-            s = "CirculateNofify";
-            break;
-        case CirculateRequest:
-            s = "CirculateRequest";
-            break;
-        case PropertyNotify:
-            s = "PropertyNotify";
-            break;
-        case SelectionClear:
-            s = "SelectionClear";
-            break;
-        case SelectionRequest:
-            s = "SelectionRequest";
-            break;
-        case SelectionNotify:
-            s = "SelectionNotify";
-            break;
-        case ColormapNotify:
-            s = "ColormapNotify";
-            break;
-        case ClientMessage:
-            s = "ClientMessage";
-            break;
-        case MappingNotify:
-            s = "MappingNotify";
-            break;
-        case LASTEvent:
-            s = "LASTEvent";
-            break;
-
-        default:
-            s = "Undefined";
-            break;
-    }
-
-    return s;
-}
-
-/*!
-  Constructs a xembed widget.
-
-  The \e parent, \e name and \e f arguments are passed to the QFrame
-  constructor.
- */
-KJavaEmbed::KJavaEmbed( QWidget *parent, const char *name, WFlags f )
-  : QWidget( parent, name, f )
-{
-    d = new KJavaEmbedPrivate;
-
-    setFocusPolicy( StrongFocus );
-    setKeyCompression( FALSE );
-    setAcceptDrops( TRUE );
-
-    window = 0;
-}
-
-/*!
-  Destructor. Cleans up the focus if necessary.
- */
-KJavaEmbed::~KJavaEmbed()
-{
-    if ( window != 0 )
-    {
-        XUnmapWindow( qt_xdisplay(), window );
-        QApplication::flushX();
-    }
-
-    delete d;
-}
-
-/*!\reimp
- */
-void KJavaEmbed::resizeEvent( QResizeEvent* e )
-{
-//    kdDebug(6100) << "KJavaEmbed::resizeEvent" << endl;
-    QWidget::resizeEvent( e );
-
-    if ( window != 0 )
-        XResizeWindow( qt_xdisplay(), window, e->size().width(), e->size().height() );
-}
-
-bool  KJavaEmbed::event( QEvent* e)
-{
-//    kdDebug(6100) << "KJavaEmbed::event, event type = " << getQtEventName( e ) << endl;
-    switch( e->type() )
-    {
-        case QEvent::ShowWindowRequest:
-            XMapRaised( qt_xdisplay(), window );
-            break;
-
-        default:
-            break;
-    }
-
-    return QWidget::event( e );
-}
-
-/*!\reimp
- */
-void KJavaEmbed::focusInEvent( QFocusEvent* )
-{
-//    kdDebug(6100) << "KJavaEmbed::focusInEvent" << endl;
-
-    if ( !window )
-        return;
-
-    XEvent ev;
-    memset( &ev, 0, sizeof( ev ) );
-    ev.xfocus.type = FocusIn;
-    ev.xfocus.window = window;
-
-    XSendEvent( qt_xdisplay(), window, true, NoEventMask, &ev );
-}
-
-/*!\reimp
- */
-void KJavaEmbed::focusOutEvent( QFocusEvent* )
-{
-//    kdDebug(6100) << "KJavaEmbed::focusOutEvent" << endl;
-
-    if ( !window )
-        return;
-
-    XEvent ev;
-    memset( &ev, 0, sizeof( ev ) );
-    ev.xfocus.type = FocusOut;
-    ev.xfocus.window = window;
-    XSendEvent( qt_xdisplay(), window, true, NoEventMask, &ev );
-}
-
-
-/*!
-  Embeds the window with the identifier \a w into this xembed widget.
-
-  This function is useful if the server knows about the client window
-  that should be embedded.  Often it is vice versa: the client knows
-  about its target embedder. In that case, it is not necessary to call
-  embed(). Instead, the client will call the static function
-  embedClientIntoWindow().
-
-  \sa embeddedWinId()
- */
-void KJavaEmbed::embed( WId w )
-{
-//    kdDebug(6100) << "KJavaEmbed::embed" << endl;
-
-    if ( w == 0 )
-        return;
-
-    window = w;
-
-    //first withdraw the window
-    XWithdrawWindow( qt_xdisplay(), window, qt_xscreen() );
-    QApplication::flushX();
-
-    //now reparent the window to be swallowed by the KJavaEmbed widget
-    XReparentWindow( qt_xdisplay(), window, winId(), 0, 0 );
-    QApplication::syncX();
-
-    //now resize it
-    XResizeWindow( qt_xdisplay(), window, width(), height() );
-    XMapRaised( qt_xdisplay(), window );
-
-    setFocus();
-}
-
-/*!\reimp
- */
-bool KJavaEmbed::focusNextPrevChild( bool next )
-{
-    if ( window )
-        return FALSE;
-    else
-        return QWidget::focusNextPrevChild( next );
-}
-
-/*!\reimp
- */
-bool KJavaEmbed::x11Event( XEvent* e)
-{
-//    kdDebug(6100) << "KJavaEmbed::x11Event, event = " << getX11EventName( e )
-//        << ", window = " << e->xany.window << endl;
-
-    switch ( e->type )
-    {
-        case DestroyNotify:
-            if ( e->xdestroywindow.window == window )
-            {
-                window = 0;
-            }
-            break;
-
-        default:
-	        break;
-    }
-
-    return false;
-}
-
-/*!
-  Specifies that this widget can use additional space, and that it can
-  survive on less than sizeHint().
-*/
-
-QSizePolicy KJavaEmbed::sizePolicy() const
-{
-    return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
-}
-
-/*!
-  Returns a size sufficient for the embedded window
-*/
-QSize KJavaEmbed::sizeHint() const
-{
-    return minimumSizeHint();
-}
-
-/*!
-  Returns the minimum size specified by the embedded window.
-*/
-QSize KJavaEmbed::minimumSizeHint() const
-{
-    if ( window )
-    {
-        kdDebug(6100) << "KJavaEmbed::minimumSizeHint, getting hints from window" << endl;
-
-        XSizeHints size;
-        long msize;
-        if( XGetWMNormalHints( qt_xdisplay(), window, &size, &msize ) &&
-            ( size.flags & PMinSize) )
-        {
-            kdDebug(6100) << "XGetWMNormalHints succeeded, width = " << size.min_width
-                          << ", height = " << size.min_height << endl;
-
-            return QSize( size.min_width, size.min_height );
-        }
-    }
-
-    return QSize( 0, 0 );
-}
-
-// for KDE
-#include "javaembed.moc"
diff --git a/WebCore/src/kdelibs/khtml/java/kjava.jar b/WebCore/src/kdelibs/khtml/java/kjava.jar
deleted file mode 100644
index af97041..0000000
Binary files a/WebCore/src/kdelibs/khtml/java/kjava.jar and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/java/kjava.policy.in b/WebCore/src/kdelibs/khtml/java/kjava.policy.in
deleted file mode 100644
index 536930b..0000000
--- a/WebCore/src/kdelibs/khtml/java/kjava.policy.in
+++ /dev/null
@@ -1,4 +0,0 @@
-grant codeBase "file:@prefix@/share/apps/kjava/-"
-{
-    permission java.security.AllPermission;
-};
\ No newline at end of file
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java
deleted file mode 100644
index 0a3bef6..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletClassLoader.java
+++ /dev/null
@@ -1,421 +0,0 @@
-package org.kde.kjas.server;
-
-import java.net.*;
-import java.io.*;
-import java.util.*;
-import java.util.zip.*;
-import java.util.jar.*;
-import java.security.*;
-
-
-/**
- * ClassLoader used to download and instantiate Applets.
- * <P>
- * NOTE: The class loader extends Java 1.2 specific class.
- */
-public class KJASAppletClassLoader
-    extends SecureClassLoader
-{
-    private static Hashtable loaders = new Hashtable();
-    public static KJASAppletClassLoader getLoader( String docBase, String codeBase )
-    {
-        URL docBaseURL;
-        KJASAppletClassLoader loader = null;
-        try
-        {
-            docBaseURL = new URL( docBase );
-        
-            URL key = getCodeBaseURL( docBaseURL, codeBase );
-            Main.debug( "CL: getLoader: key = " + key );
-
-            loader = (KJASAppletClassLoader) loaders.get( key.toString() );
-            if( loader == null )
-            {
-                loader = new KJASAppletClassLoader( docBaseURL, key );
-                loaders.put( key.toString(), loader );
-            }
-            else
-            {
-                Main.debug( "CL: reusing classloader" );
-                loader.setActive();
-            }
-        } catch( MalformedURLException e ) { Main.kjas_err( "bad DocBase URL", e ); }
-        return loader;
-    }
-
-    public static URL getCodeBaseURL( URL docBaseURL, String codeBase )
-    {
-        URL codeBaseURL = null;
-        try
-        {
-            //first determine what the real codeBase is: 3 cases
-            //#1. codeBase is absolute URL- use that
-            //#2. codeBase is relative to docBase, create url from those
-            //#3. last resort, use docBase as the codeBase
-            if(codeBase != null)
-            {
-                //we need to do this since codeBase should be a directory
-                if( !codeBase.endsWith("/") )
-                    codeBase = codeBase + "/";
-
-                try
-                {
-                    codeBaseURL = new URL( codeBase );
-                } catch( MalformedURLException mue )
-                {
-                    try
-                    {
-                        codeBaseURL = new URL( docBaseURL, codeBase );
-                    } catch( MalformedURLException mue2 ) {}
-                }
-            }
-
-            if(codeBaseURL == null)
-            {
-                //fall back to docBase but fix it up...
-                String file = docBaseURL.getFile();
-                if( file == null || (file.length() == 0)  )
-                    codeBaseURL = docBaseURL;
-                else if( file.endsWith( "/" ) )
-                    codeBaseURL = docBaseURL;
-                else
-                {
-                    //delete up to the ending '/'
-                    String urlString = docBaseURL.toString();
-                    int dot_index = urlString.lastIndexOf( '/' );
-                    String newfile = urlString.substring( 0, dot_index+1 );
-                    codeBaseURL = new URL( newfile );
-                }
-            }
-        }catch( Exception e ) { Main.kjas_err( "CL: exception ", e ); }
-        return codeBaseURL;    
-    }
-
-    public static KJASAppletClassLoader getLoader( String key )
-    {
-        if( loaders.containsKey( key ) )
-            return (KJASAppletClassLoader) loaders.get( key );
-        
-        return null;
-    }
-
-    /*********************************************************************************
-     ****************** KJASAppletClassLoader Implementation *************************
-     **********************************************************************************/
-    private URL docBaseURL;
-    private URL codeBaseURL;
-    private Vector archives;
-    private Hashtable rawdata;
-    private Hashtable certificates;
-    private boolean archives_loaded;
-    private int archive_count;
-    private String dbgID;
-    private boolean active;
-    
-    public KJASAppletClassLoader( URL _docBaseURL, URL _codeBaseURL )
-    {
-        docBaseURL   = _docBaseURL;
-        codeBaseURL  = _codeBaseURL;
-        archives     = new Vector();
-        rawdata      = new Hashtable();
-        certificates = new Hashtable();
-        
-        archives_loaded = false;
-        archive_count   = 0;
-        active          = true;
-        
-        dbgID = "CL(" + codeBaseURL.toString() + "): ";
-    }
-
-    public void setActive()
-    {
-        active = true;
-    }
-
-    public void setInactive()
-    {
-        active = false;
-    }
-
-    public void paramsDone()
-    {
-        //if we have archives, send download requests
-        if( archives.size() > 0 )
-        {
-            if( !archives_loaded )
-            {
-                for( int i = 0; i < archives.size(); ++i )
-                {
-                    String tmp = (String)archives.elementAt( i );
-                    Main.protocol.sendGetURLDataCmd( codeBaseURL.toString(), tmp );
-                }
-            }
-        }
-        else archives_loaded = true;
-    }
-
-    public void addArchiveName( String jarname )
-    {
-        if( !archives.contains( jarname ) )
-        {
-            archives.add( jarname );
-            archives_loaded = false;
-        }
-    }
-    
-    public void addResource( String url, byte[] data )
-    {
-        Main.debug( dbgID + "addResource for url: " + url + ", size of data = " + data.length );
-        String res = url.substring( codeBaseURL.toString().length() ).replace( '/', '.' );
-
-        if( archives.size() > 0 && !res.endsWith( ".class" ) )
-        {   //if we have archives, it's an archive( i think )
-        try
-            {
-                JarInputStream jar = new JarInputStream( new ByteArrayInputStream( data ) );
-                JarEntry entry;
-                while( (entry = jar.getNextJarEntry()) != null )
-                {
-                    //skip directories...
-                    if( entry.isDirectory() )
-                        continue;
-
-                    String entryName = entry.getName().replace('/','.');
-                    int    entrySize = (int) entry.getSize();
-                    Main.debug( dbgID + "reading ZipEntry, name = " + entryName + ", size = " + entrySize );
-
-                    int numread = 0;
-                    int total = 0;
-                    byte[] entryData = new byte[0];
-                    while( numread > -1 )
-        {
-                        byte[] curr = new byte[1024];
-                        numread = jar.read( curr, 0, 1024 );
-                        if( numread == -1 )
-                            break;
-
-                        byte[] old = entryData;
-                        entryData = new byte[ old.length + numread];
-                       // Main.debug( "old.length = " + old.length );
-                        if( old.length > 0 )
-                            System.arraycopy( old, 0, entryData, 0, old.length );
-                        System.arraycopy( curr, 0, entryData, old.length, numread );
-
-                        total += numread;
-                    }
-
-                    byte[] old = entryData;
-                    entryData = new byte[ total ];
-                    System.arraycopy( old, 0, entryData, 0, total );
-                    rawdata.put( entryName, entryData );
-
-                    java.security.cert.Certificate[] c = entry.getCertificates();
-                    if( c == null )
-                    {
-                        c = new java.security.cert.Certificate[0];
-                        Main.debug( "making a dummy certificate array" );
-                    } else Main.debug( "got some real certificates with archive" );
-                    certificates.put( entryName, c );
-        }
-            }
-            catch( IOException e )
-        {
-                Main.kjas_err( "Problem reading resource", e );
-        }
-            finally
-            {
-                if( (++archive_count) == archives.size() )
-                {
-                    Main.debug( dbgID + "all archives loaded" );
-                    archives_loaded = true;
-    }
-            }
-        }
-        else
-    {
-            String resName = url.substring( codeBaseURL.toString().length() ).replace( '/', '.' );
-            Main.debug( dbgID + "resource isn't a jar, putting it straight in with name = " + resName );
-            rawdata.put( resName, data );
-    }
-    }
-
-    public URL getDocBase()
-    {
-        return docBaseURL;
-    }
-
-    public URL getCodeBase()
-    {
-        return codeBaseURL;
-    }
-
-    /***************************************************************************
-     **** Class Loading Methods
-     **************************************************************************/
-    public Class findClass( String name )
-    {
-        Class rval;
-        
-        try
-        {
-            //check for a system class
-            rval = findSystemClass( name );
-            if( rval != null )
-                return rval;
-        } catch (ClassNotFoundException e )
-        {
-            //check the loaded classes 
-            rval = findLoadedClass( name );
-            if( rval != null )
-                return rval;
-
-            //check in the archives
-            String fixed_name = name + ".class";
-            while( !archives_loaded && active )
-            {
-                Main.debug( dbgID + "archives not loaded yet, sleeping" );
-                try { Thread.sleep( 200 ); }
-                catch( InterruptedException te ) {}
-            }
-            if( rawdata.containsKey( fixed_name ) )
-            {
-                Main.debug( dbgID + "class is in our rawdata table" );
-                byte[] data = (byte[]) rawdata.get( fixed_name );
-                if( data.length > 0 )
-                {
-                    java.security.cert.Certificate[] c = 
-                        (java.security.cert.Certificate[])certificates.get( fixed_name );
-                    CodeSource cs = new CodeSource( codeBaseURL, c );
-                    rval = defineClass( name, data, 0, data.length, cs );
-                    return rval;
-                } else return null;
-            }
-
-            //check from the webserver...
-            Main.debug( dbgID + "now checking the webserver" );
-            String new_name = name.replace( '.', '/' );
-            new_name += ".class";
-            Main.protocol.sendGetURLDataCmd( codeBaseURL.toString(), new_name );
-
-            //now wait until we get an answer
-            while( !rawdata.containsKey( fixed_name ) && active )
-            {
-                Main.debug( dbgID + "waiting for the webserver to answer for class: " + new_name );
-                try { Thread.sleep( 200 ); } 
-                catch( InterruptedException ie ) {}
-            }
-            if( rawdata.containsKey( fixed_name ) )
-            {
-                byte[] data = (byte[]) rawdata.get( fixed_name );
-                if( data.length > 0 )
-            {
-                    Main.debug( "we got the data" );
-                    CodeSource cs = new CodeSource( codeBaseURL, new java.security.cert.Certificate[0] );
-                    rval = defineClass( name, data, 0, data.length, cs );
-                    return rval;
-                } else return null;
-            }
-        }
-        
-        Main.debug( "CL: findClass returning null" );
-            return null;
-    }
-    
-    public Class loadClass( String name )
-    {
-        Main.debug( dbgID + "loadClass, class name = " + name );
-        //We need to be able to handle foo.class, so strip off the suffix
-        String fixed_name = name;
-        Class rval = null;
-        if( name.endsWith( ".class" ) )
-        {
-            fixed_name = name.substring( 0, name.lastIndexOf( ".class" ) );
-        }
-
-        rval = findClass( fixed_name );
-        return rval;
-    }
-
-    public InputStream getResourceAsStream( String name )
-    {
-        Main.debug( dbgID + "getResourceAsStream, name = " + name );
-        
-        String res = name.replace( '/', '.' );
-        if( rawdata.containsKey( res ) )
-        {
-            byte[] data = (byte[]) rawdata.get( res );
-            if( data.length > 0 )
-            {
-                return new ByteArrayInputStream( data );
-            } else return null;
-        }
-        
-        return super.getResourceAsStream( name );
-    }
-    
-    public URL getResource( String name )
-    {
-        Main.debug( dbgID + "getResource, name = " + name );
-        return super.getResource( name );
-    }
-    
-    /***************************************************************************
-     * Security Manager stuff
-     **************************************************************************/
-    protected PermissionCollection getPermissions( CodeSource cs )
-    {
-        //get the permissions from the SecureClassLoader
-        final PermissionCollection perms = super.getPermissions( cs );
-        final URL url = cs.getLocation();
-
-        //first add permission to connect back to originating host
-        perms.add(new SocketPermission(url.getHost(), "connect,accept"));
-
-        //add ability to read from it's own directory...
-        if ( url.getProtocol().equals("file") )
-        {
-            String path = url.getFile().replace('/', File.separatorChar);
-
-            if (!path.endsWith(File.separator))
-            {
-                int endIndex = path.lastIndexOf(File.separatorChar);
-                if (endIndex != -1)
-                {
-                    path = path.substring(0, endIndex+1) + "-";
-                    perms.add(new FilePermission(path, "read"));
-                }
-            }
-
-            AccessController.doPrivileged(
-                new PrivilegedAction()
-                {
-                    public Object run()
-                    {
-                        try
-                        {
-                            if (InetAddress.getLocalHost().equals(InetAddress.getByName(url.getHost())))
-                            {
-                                perms.add(new SocketPermission("localhost", "connect,accept"));
-                            }
-                        } catch (UnknownHostException uhe)
-                        {}
-                        return null;
-                    }
-                }
-            );
-        }
-
-        return perms;
-    }
-
-    private void dump2File( String filename, byte[] data )
-    {
-        Main.debug( "dump2File: " + filename );
-        try
-        {
-            FileOutputStream output = new FileOutputStream( filename );
-            output.write( data );
-            output.close();
-        }catch( IOException e ){}
-    }
-}
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletContext.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletContext.java
deleted file mode 100644
index 89e42ea..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletContext.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package org.kde.kjas.server;
-
-import java.applet.*;
-import java.util.*;
-import java.net.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-
-/**
- * The context in which applets live.
- */
-public class KJASAppletContext implements AppletContext
-{
-    private Hashtable stubs;
-    private Hashtable images;
-
-    private String myID;
-    private KJASAppletClassLoader loader;
-    private boolean active;
-    /**
-     * Create a KJASAppletContext
-     */
-    public KJASAppletContext( String _contextID )
-    {
-        stubs  = new Hashtable();
-        images = new Hashtable();
-        myID   = _contextID;
-        active = true;
-    }
-
-    public String getID()
-    {
-        return myID;
-    }
-
-    public void createApplet( String appletID, String name,
-                              String className, String docBase,
-                              String codeBase, String archives,
-                              String width, String height,
-                              String windowName, Hashtable params )
-    {
-        //do kludges to support mess with parameter table and
-        //the applet variables
-        String key = new String( "archive" ).toUpperCase();
-        if( archives == null )
-        {
-            if( params.containsKey( key ) )
-                archives = (String)params.get( key );
-        }
-        else
-        {
-            if( !params.containsKey( key ) )
-                params.put( key, archives );
-        }
-
-        key = new String( "codebase" ).toUpperCase();
-        if( codeBase == null )
-        {
-            if( params.containsKey( key ) )
-                codeBase = (String) params.get( key );
-        }
-
-        key = new String( "width" ).toUpperCase();
-        if( !params.containsKey( key ) )
-            params.put( key, width );
-        key = new String( "height" ).toUpperCase();
-        if( !params.containsKey( key ) )
-            params.put( key, height );
-
-        try
-        {
-            KJASAppletClassLoader loader =
-                KJASAppletClassLoader.getLoader( docBase, codeBase );
-            if( archives != null )
-            {
-                StringTokenizer parser = new StringTokenizer( archives, ",", false );
-                while( parser.hasMoreTokens() )
-                {
-                    String jar = parser.nextToken().trim();
-                    loader.addArchiveName( jar );
-                }
-            }
-            loader.paramsDone();
-
-            KJASAppletStub stub = new KJASAppletStub
-            (
-                this, appletID, loader.getCodeBase(),
-                loader.getDocBase(), name, className,
-                new Dimension( Integer.parseInt(width), Integer.parseInt(height) ),
-                params, windowName, loader
-            );
-            stubs.put( appletID, stub );
-
-            stub.createApplet();
-        }
-        catch ( Exception e )
-        {
-            Main.kjas_err( "Something bad happened in createApplet: " + e, e );
-        }
-    }
-
-    public void initApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-        if( stub == null )
-        {
-            Main.debug( "could not init and show applet: " + appletID );
-        }
-        else
-        {
-            stub.initApplet();
-        }
-    }
-
-    public void destroyApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-
-        if( stub == null )
-        {
-            Main.debug( "could not destroy applet: " + appletID );
-        }
-        else
-        {
-            Main.debug( "stopping applet: " + appletID );
-            stub.die();
-
-            stubs.remove( appletID );
-        }
-    }
-
-    public void startApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-        if( stub == null )
-        {
-            Main.debug( "could not start applet: " + appletID );
-        }
-        else
-        {
-            stub.startApplet();
-        }
-    }
-
-    public void stopApplet( String appletID )
-    {
-        KJASAppletStub stub = (KJASAppletStub) stubs.get( appletID );
-        if( stub == null )
-        {
-            Main.debug( "could not stop applet: " + appletID );
-        }
-        else
-        {
-            stub.stopApplet();
-        }
-    }
-
-    public void destroy()
-    {
-        Enumeration e = stubs.elements();
-        while ( e.hasMoreElements() )
-        {
-            KJASAppletStub stub = (KJASAppletStub) e.nextElement();
-            stub.die();
-        }
-
-        stubs.clear();
-        active = false;
-    }
-
-    /***************************************************************************
-    **** AppletContext interface
-    ***************************************************************************/
-    public Applet getApplet( String appletName )
-    {
-        if( active )
-        {
-            Enumeration e = stubs.elements();
-            while( e.hasMoreElements() )
-            {
-                KJASAppletStub stub = (KJASAppletStub) e.nextElement();
-
-                if( stub.getAppletName().equals( appletName ) )
-                    return stub.getApplet();
-            }
-        }
-
-        return null;
-    }
-
-    public Enumeration getApplets()
-    {
-        if( active )
-        {
-            Vector v = new Vector();
-            Enumeration e = stubs.elements();
-            while( e.hasMoreElements() )
-            {
-                KJASAppletStub stub = (KJASAppletStub) e.nextElement();
-                v.add( stub );
-            }
-
-            return v.elements();
-        }
-
-        return null;
-    }
-
-    public AudioClip getAudioClip( URL url )
-    {
-        Main.debug( "getAudioClip, url = " + url );
-
-        return new KJASSoundPlayer( url );
-    }
-
-    public void addImage( String url, byte[] data )
-    {
-        Main.debug( "addImage for url = " + url );
-        images.put( url, data );
-    }
-    
-    public Image getImage( URL url )
-    {
-        if( active && url != null )
-        {
-            //check with the Web Server        
-            String str_url = url.toString();
-            Main.debug( "getImage, url = " + str_url );
-            Main.protocol.sendGetURLDataCmd( myID, str_url );
-
-            while( !images.containsKey( str_url ) && active )
-        {
-                try { Thread.sleep( 200 ); }
-                catch( InterruptedException e ){}
-            }
-            if( images.containsKey( str_url ) )
-            {
-                byte[] data = (byte[]) images.get( str_url );
-                if( data.length > 0 )
-                {
-            Toolkit kit = Toolkit.getDefaultToolkit();
-                    return kit.createImage( data );
-                } else return null;
-            }
-        }
-
-        return null;
-    }
-
-    public void showDocument( URL url )
-    {
-        Main.debug( "showDocument, url = " + url );
-
-        if( active && (url != null) )
-        {
-            Main.protocol.sendShowDocumentCmd( myID, url.toString()  );
-        }
-    }
-
-    public void showDocument( URL url, String targetFrame )
-    {
-        Main.debug( "showDocument, url = " + url + " targetFrame = " + targetFrame );
-
-        if( active && (url != null) && (targetFrame != null) )
-        {
-                Main.protocol.sendShowDocumentCmd( myID, url.toString(), targetFrame );
-        }
-    }
-
-    public void showStatus( String message )
-    {
-        if( active && (message != null) )
-        {
-            Main.protocol.sendShowStatusCmd( myID, message );
-        }
-    }
-
-}
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletStub.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletStub.java
deleted file mode 100644
index 4cf007a..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASAppletStub.java
+++ /dev/null
@@ -1,266 +0,0 @@
-package org.kde.kjas.server;
-
-import java.applet.*;
-import java.util.*;
-import java.net.*;
-import java.awt.*;
-
-
-/**
- * The stub used by Applets to communicate with their environment.
- *
- */
-public class KJASAppletStub extends Frame
-    implements AppletStub
-{
-    KJASAppletContext context;    // The containing context.
-    Hashtable         params;     // Maps parameter names to values
-    URL               codeBase;   // The URL directory where files are
-    URL               docBase;    // The document that referenced the applet
-    boolean           active;     // Is the applet active?
-    String            appletName; // The name of this applet instance
-    String            appletID;   // The id of this applet- for use in callbacks
-    Dimension         appletSize;
-    String            windowName;
-    String            className;
-    Class             appletClass;
-
-    KJASAppletClassLoader loader;
-    KJASAppletPanel       panel;
-    Applet                app;
-    Thread                runThread;
-    KJASAppletStub        me;
-
-    /**
-     * Create an AppletStub for the specified applet. The stub will be in
-     * the specified context and will automatically attach itself to the
-     * passed applet.
-     */
-    public KJASAppletStub( KJASAppletContext _context, String _appletID,
-                           URL _codeBase, URL _docBase,
-                           String _appletName, String _className,
-                           Dimension _appletSize, Hashtable _params,
-                           String _windowName, KJASAppletClassLoader _loader )
-    {
-        super( _windowName );
-
-        context    = _context;
-        appletID   = _appletID;
-        codeBase   = _codeBase;
-        docBase    = _docBase;
-        appletName = _appletName;
-        className  = _className.replace( '/', '.' );
-        appletSize = _appletSize;
-        params     = _params;
-        windowName = _windowName;
-        loader     = _loader;
-
-        appletClass = null;
-        me = this;
-    }
-
-    /*************************************************************************
-     *********************** Runnable Interface ******************************
-     *************************************************************************/
-    public void createApplet()
-    {
-        runThread = new Thread
-        (
-            new Runnable()
-            {
-                public void run()
-                {
-                    active = true;
-            	    try
-                    {
-                        panel = new KJASAppletPanel( appletSize );
-                        add( "Center", panel );
-                        pack();
-                	
-                        synchronized( loader )
-                        {
-                	    appletClass = loader.loadClass( className );
-                        }
-                		
-                        if( appletClass != null )
-                        {
-                            Main.debug( "loaded class, creating applet" );
-                            //this order is very important and took a long time
-                            //to figure out- don't modify it unless there are
-                            //real bug fixes
-                            app = (Applet) appletClass.newInstance();
-                            app.setStub( me );
-                            app.resize( appletSize );
-                            app.setVisible( false );
-                            panel.add( "Center", app );
-                            panel.validate();
-
-                            initApplet();
-
-                            panel.validate();
-                            app.resize( appletSize );
-                            app.start();  //We're already in a thread, so don't create a new one
-                            panel.validate();
-                            app.setVisible( true );
-                        }
-                        else
-                        {
-                            panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) );
-                        }
-            	    }catch( InstantiationException e )
-                    {
-                        Main.kjas_err( "Could not instantiate applet", e );
-                        panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) );
-                    }
-                    catch( IllegalAccessException e )
-                    {
-                        Main.kjas_err( "Could not instantiate applet", e );
-                        panel.add( "Center", new Label( "Applet Failed", Label.CENTER ) );
-                    }
-                    finally
-                    {
-                        show();
-                    }
-                }
-            }
-        );
-        runThread.start();
-    }
-
-    public void startApplet()
-    {
-        if( app != null )
-            app.start();
-    }
-
-    public void stopApplet()
-    {
-        if( app != null )
-            app.stop();
-    }
-
-    public void initApplet()
-    {
-        if( app != null )
-            app.init();
-    }
-
-    public void die()
-    {
-        if( app != null )
-            app.stop();
-
-         if( runThread.isAlive() )
-            Main.debug( "runThread is active when stub is dying" );
-
-        loader.setInactive();
-        active = false;
-        dispose();
-    }
-
-    public Applet getApplet()
-    {
-        return app;
-    }
-
-    public Dimension getAppletSize()
-    {
-        return appletSize;
-    }
-
-
-    /*************************************************************************
-     ********************** AppletStub Interface *****************************
-     *************************************************************************/
-    public void appletResize( int width, int height )
-    {
-        if( active )
-        {
-            if ( (width >= 0) && (height >= 0))
-            {
-                Main.debug( "Applet #" + appletID + ": appletResize to : (" + width + ", " + height + ")" );
-                Main.protocol.sendResizeAppletCmd( context.getID(), appletID, width, height );
-                appletSize = new Dimension( width, height );
-
-                app.resize( appletSize );
-                panel.setAppletSize( appletSize );
-                pack();
-            }
-        }
-    }
-
-    public AppletContext getAppletContext()
-    {
-        if( active )
-            return context;
-
-        return null;
-    }
-
-    public URL getCodeBase()
-    {
-        if( active )
-            return codeBase;
-
-        return null;
-    }
-
-    public URL getDocumentBase()
-    {
-        if( active )
-            return docBase;
-
-        return null;
-    }
-
-    public String getAppletName()
-    {
-        if( active )
-            return appletName;
-
-        return null;
-    }
-
-    public String getParameter( String name )
-    {
-        if( active )
-            return (String) params.get( name.toUpperCase() );
-
-        return null;
-    }
-
-    public boolean isActive()
-    {
-        return active;
-    }
-
-    /*************************************************************************
-     ************************* Layout methods ********************************
-     *************************************************************************/
-    class KJASAppletPanel extends Panel
-    {
-        private Dimension size;
-
-        public KJASAppletPanel( Dimension _size )
-        {
-            super( new BorderLayout() );
-            size = _size;
-        }
-
-        public void setAppletSize( Dimension _size )
-        {
-            size = _size;
-        }
-
-        public Dimension getPreferredSize()
-        {
-            return size;
-        }
-
-        public Dimension getMinimumSize()
-        {
-            return size;
-        }
-    }
-
-}
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASConsole.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASConsole.java
deleted file mode 100644
index 3b04187..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASConsole.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package org.kde.kjas.server;
-
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-
-public class KJASConsole
-    extends Frame
-{
-    private TextArea txt;
-
-    public KJASConsole()
-    {
-        super("Konqueror Java Console");
-
-        txt = new TextArea();
-        txt.setEditable(false);
-
-        Panel main = new Panel(new BorderLayout());
-        Panel btns = new Panel(new BorderLayout());
-
-        Button clear = new Button("Clear");
-        Button close = new Button("Close");
-        
-        btns.add(clear, "West");
-        btns.add(close, "East");
-
-        main.add(txt, "Center");
-        main.add(btns, "South");
-        
-        add( main );
-
-        clear.addActionListener
-        (
-            new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    txt.setText("");
-                }
-            }
-        );
-
-        close.addActionListener
-        (
-            new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    setVisible(false);
-                }
-            }
-        );
-
-        addWindowListener
-        (
-            new WindowAdapter() {
-                public void windowClosing(WindowEvent e) {
-                    setVisible(false);
-                }
-            }
-        );
-
-        setSize(300, 300);
-
-        PrintStream st = new PrintStream( new KJASConsoleStream(txt) );
-        System.setOut(st);
-        System.setErr(st);
-        
-        System.out.println( "Java VM version: " +
-                            System.getProperty("java.version") );
-        System.out.println( "Java VM vendor:  " +
-                            System.getProperty("java.vendor") );
-    }
-}
-
-class KJASConsoleStream
-    extends OutputStream
-{
-    private TextArea txt;
-    private FileOutputStream dbg_log;
-
-    public KJASConsoleStream( TextArea _txt )
-    {
-        txt = _txt;
-
-        try
-        {
-            if( Main.log )
-            {
-                dbg_log = new FileOutputStream( "/tmp/kjas.log" );
-            }
-        }
-        catch( FileNotFoundException e ) {}
-    }
-
-    public void close() {}
-    public void flush() {}
-    public void write(byte[] b) {}
-    public void write(int a) {}
-
-    // Should be enough for the console
-    public void write( byte[] bytes, int offset, int length )
-    {
-        try  // Just in case
-        {
-            String msg = new String( bytes, offset, length );
-            synchronized( txt )
-            {
-                //get the caret position, and then get the new position
-                int old_pos = txt.getCaretPosition();
-                txt.append(msg);
-                txt.setCaretPosition( old_pos + length );
-
-                if( Main.log && dbg_log != null )
-                {
-                    dbg_log.write( msg.getBytes() );
-                }
-            }
-        }
-        catch(Throwable t) {}
-    }
-}
-
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java
deleted file mode 100644
index 3ec19d6..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASProtocolHandler.java
+++ /dev/null
@@ -1,473 +0,0 @@
-package org.kde.kjas.server;
-
-import java.io.*;
-import java.util.*;
-import java.awt.*;
-import java.net.*;
-
-/**
- * Encapsulates the KJAS protocol and manages the contexts
- *
- */
-public class KJASProtocolHandler
-{
-    // Command codes- always need to be synced up with
-    // what's in kjavaappletserver.cpp
-    private static final int CreateContextCode   = 1;
-    private static final int DestroyContextCode  = 2;
-    private static final int CreateAppletCode    = 3;
-    private static final int DestroyAppletCode   = 4;
-    private static final int StartAppletCode     = 5;
-    private static final int StopAppletCode      = 6;
-    private static final int InitAppletCode      = 7;
-    private static final int ShowDocumentCode    = 8;
-    private static final int ShowURLInFrameCode  = 9;
-    private static final int ShowStatusCode      = 10;
-    private static final int ResizeAppletCode    = 11;
-    private static final int GetURLDataCode      = 12;
-    private static final int URLDataCode         = 13;
-    private static final int ShutdownServerCode  = 14;
-
-    //Holds contexts in contextID-context pairs
-    private Hashtable contexts;
-
-    private PushbackInputStream commands;    //Stream for reading in commands
-    private PrintStream         signals;     //Stream for writing out callbacks
-
-    //used for parsing each command as it comes in
-    private int cmd_index;
-    private final char sep = (char) 0;
-
-    public KJASProtocolHandler( InputStream  _commands,
-                                OutputStream _signals )
-    {
-        commands = new PushbackInputStream( _commands );
-        signals  = new PrintStream( _signals );
-        contexts = new Hashtable();
-    }
-
-    public void commandLoop()
-    {
-        try
-        {
-            while( true )
-            {
-                try
-                {
-                    int cmd_length = readPaddedLength( 8 );
-                    Main.debug( "PH: cmd_length = " + cmd_length );
-
-                    //We need to have this while loop since we're not guaranteed to get
-                    //all the bytes we want back, especially with large jars
-                    byte[] cmd_data = new byte[cmd_length];
-                    int total_read = 0;
-                    while( total_read < cmd_length )
-                    {
-                        int numread = commands.read( cmd_data, total_read, cmd_length-total_read );
-                        Main.debug( "PH: read in " + numread + " bytes for command" );
-                        total_read += numread;
-                    }
-
-                    //parse the rest of the command and execute it
-                    processCommand( cmd_data );
-                }
-                catch( NumberFormatException e )
-                {
-                    Main.kjas_err( "Could not parse out message length", e );
-                    System.exit( 1 );
-                }
-                catch( Throwable t )
-                {
-                    Main.debug( "commandLoop caught a throwable, still going" );
-                    t.printStackTrace();
-                }
-            }
-        }
-        catch( Exception i )
-        {
-            Main.kjas_err( "commandLoop exited on exception: ", i );
-            System.exit( 1 );
-        }
-    }
-
-    public void processCommand( byte[] command )
-    {
-        // Sanity checks
-        if ( command == null )
-            return;
-
-        //do all the parsing here and pass arguments as individual variables to the
-        //handler functions
-        int cmd_length = command.length;
-        cmd_index = 0;
-
-        int cmd_code_value = (int) command[cmd_index++];
-        if( cmd_code_value == CreateContextCode )
-        {
-            //parse out contextID- 1 argument
-            String contextID = getArg( command );
-            Main.debug( "createContext, id = " + contextID );
-
-            KJASAppletContext context = new KJASAppletContext( contextID );
-            contexts.put( contextID, context );
-        } else
-        if( cmd_code_value == DestroyContextCode )
-        {
-            //parse out contextID- 1 argument
-            String contextID = getArg( command );
-            Main.debug( "destroyContext, id = " + contextID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if( contexts != null )
-            {
-                context.destroy();
-                contexts.remove( contextID );
-            }
-        } else
-        if( cmd_code_value == CreateAppletCode )
-        {
-            //9 arguments- this order is important...
-            final String contextID  = getArg( command );
-            final String appletID   = getArg( command );
-            final String appletName = getArg( command );
-            final String className  = getArg( command );
-            final String baseURL    = getArg( command );
-            final String codeBase   = getArg( command );
-            final String archives   = getArg( command );
-            final String width      = getArg( command );
-            final String height     = getArg( command );
-            final String title      = getArg( command );
-
-            //get the number of parameter pairs...
-            String str_params = getArg( command );
-            int num_params = Integer.parseInt( str_params.trim() );
-            final Hashtable params = new Hashtable();
-            for( int i = 0; i < num_params; i++ )
-            {
-                String name  = getArg( command );
-                if( name == null )
-                    name = new String();
-
-                String value = getArg( command );
-                if( value == null )
-                    value = new String();
-                params.put( name.toUpperCase(), value );
-                //Main.debug( "parameter, name = " + name + ", value = " + value );
-            }
-
-            Main.debug( "createApplet, context = " + contextID + ", applet = " + appletID );
-            Main.debug( "              name = " + appletName + ", classname = " + className );
-            Main.debug( "              baseURL = " + baseURL + ", codeBase = " + codeBase );
-            Main.debug( "              archives = " + archives + ", width = " + width + 
-                        ", height = " + height );
-
-            final KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if( context != null )
-            {
-                context.createApplet( appletID, appletName, className,
-                                      baseURL, codeBase, archives,
-                                      width, height, title, params );
-            }
-
-        } else
-        if( cmd_code_value == DestroyAppletCode )
-        {
-            //2 arguments
-            String contextID = getArg( command );
-            String appletID  = getArg( command );
-            Main.debug( "destroyApplet, context = " + contextID + ", applet = " + appletID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if ( context != null )
-                context.destroyApplet( appletID );
-        } else
-        if( cmd_code_value == StartAppletCode )
-        {
-            //2 arguments
-            String contextID = getArg( command );
-            String appletID  = getArg( command );
-            Main.debug( "startApplet, context = " + contextID + ", applet = " + appletID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if ( context != null )
-                context.startApplet( appletID );
-        } else
-        if( cmd_code_value == StopAppletCode )
-        {
-            //2 arguments
-            String contextID = getArg( command );
-            String appletID  = getArg( command );
-            Main.debug( "stopApplet, context = " + contextID + ", applet = " + appletID );
-
-            KJASAppletContext context = (KJASAppletContext) contexts.get( contextID );
-            if ( context != null )
-                context.stopApplet( appletID );
-        } else
-        if( cmd_code_value == ShutdownServerCode )
-        {
-            Main.debug( "shutDownServer recieved" );
-            System.exit( 1 );
-        }
-        else
-        if( cmd_code_value == URLDataCode )
-        {
-            Main.debug( "URLData recieved" );
-            
-            String loaderID = getArg( command );
-            String requestedURL = getArg( command );
-            Main.debug( "data is for loader: " + loaderID );
-            Main.debug( "URL is " + requestedURL );
-
-            //rest of the command should be the data...
-            byte[] data = new byte[ cmd_length - cmd_index ];
-            System.arraycopy( command, cmd_index, data, 0, data.length );
-
-            KJASAppletClassLoader loader = KJASAppletClassLoader.getLoader( loaderID );
-            if( loader != null )
-            {
-                Main.debug( "this is a class loader request" );
-                loader.addResource( requestedURL, data );
-            }
-            else //see if there is a context with that ID, could be an image request
-            {
-                KJASAppletContext context = (KJASAppletContext) contexts.get( loaderID );
-                if( context != null )
-                {
-                    Main.debug( "this is  a context request for an image" );
-                    context.addImage( requestedURL, data );
-                }
-            }
-        }
-        else
-        {
-           throw new IllegalArgumentException( "Unknown command code" );
-        }
-    }
-
-    /**************************************************************
-     *****  Methods for talking to the applet server **************
-     **************************************************************/
-    public void sendGetURLDataCmd( String loaderID, String file )
-    {
-        Main.debug( "sendGetURLCmd from loader: " + loaderID + " url = " + file );
-        String ID_str = null;
-        String file_str = null;
-        try
-        {
-            ID_str = loaderID;
-            file_str = new URL( new URL(loaderID), file ).toString();
-        } catch( MalformedURLException e ) 
-        {
-            //this is an image request, take the file argument as is
-            ID_str = loaderID;
-            file_str = file;
-        }
-        finally
-        {
-            //length  = length of args plus 1 for code, 2 for seps and 1 for end
-            int length = ID_str.length() + file_str.length() + 4;
-            char[] chars = new char[ length + 8 ];
-            char[] tmpchar = getPaddedLength( length );
-            int index = 0;
-
-            System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-            index += tmpchar.length;
-            chars[index++] = (char) GetURLDataCode;
-            chars[index++] = sep;
-
-                tmpchar = ID_str.toCharArray();
-            System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-            index += tmpchar.length;
-            chars[index++] = sep;
-
-                tmpchar = file_str.toCharArray();
-            System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-            index += tmpchar.length;
-            chars[index++] = sep;
-
-            signals.print( chars );
-        }
-    }
-
-    public void sendShowDocumentCmd( String loaderKey, String url )
-    {
-        Main.debug( "sendShowDocumentCmd from context#" + loaderKey + " url = " + url );
-
-        //length = length of args + 2 for seps + 1 for end + 1 for code
-        int length = loaderKey.length() + url.length() + 4;
-        char[] chars = new char[ length + 8 ]; //8 for the length of this message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowDocumentCode;
-        chars[index++] = sep;
-
-        tmpchar = loaderKey.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = url.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    public void sendShowDocumentCmd( String contextID, String url, String frame)
-    {
-        Main.debug( "sendShowDocumentCmd from context#" + contextID +
-                         " url = " + url + ", frame = " + frame );
-
-        //length = length of args plus code, 3 seps, end
-        int length = contextID.length() + url.length() + frame.length() + 5;
-        char[] chars = new char[ length + 8 ]; //for length of message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowURLInFrameCode;
-        chars[index++] = sep;
-
-        tmpchar = contextID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = url.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = frame.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    public void sendShowStatusCmd( String contextID, String msg )
-    {
-        Main.debug( "sendShowStatusCmd, contextID = " + contextID + " msg = " + msg );
-
-        int length = contextID.length() + msg.length() + 4;
-        char[] chars = new char[ length + 8 ]; //for length of message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowStatusCode;
-        chars[index++] = sep;
-
-        tmpchar = contextID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = msg.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    public void sendResizeAppletCmd( String contextID, String appletID,
-                                     int width, int height )
-    {
-        Main.debug( "sendResizeAppletCmd, contextID = " + contextID + ", appletID = " + 
-                    appletID + ", width = " + width + ", height = " + height );
-
-        String width_str = String.valueOf( width );
-        String height_str = String.valueOf( height );
-
-        //lenght = length of args plus code, 4 seps, end
-        int length = contextID.length() + appletID.length() + width_str.length() +
-                     height_str.length() + 6;
-        char[] chars = new char[ length + 8 ]; //for length of message
-        char[] tmpchar = getPaddedLength( length );
-        int index = 0;
-
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = (char) ShowStatusCode;
-        chars[index++] = sep;
-
-        tmpchar = contextID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = appletID.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = width_str.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        tmpchar = height_str.toCharArray();
-        System.arraycopy( tmpchar, 0, chars, index, tmpchar.length );
-        index += tmpchar.length;
-        chars[index++] = sep;
-
-        signals.print( chars );
-    }
-
-    /**************************************************************
-     *****  Utility functions for parsing commands ****************
-     **************************************************************/
-    private String getArg( byte[] command )
-    {
-        int begin = cmd_index;
-        while( 0 != ((int) command[cmd_index++]) );
-
-        if( cmd_index > (begin + 1) )
-        {
-            String rval = new String( command, begin, (cmd_index - begin - 1) );
-            return rval;
-        }
-        else
-            return null;
-    }
-
-    private char[] getPaddedLength( int length )
-    {
-        String length_str = String.valueOf( length );
-
-        int pads = 8 - length_str.length();
-        String space = new String( " " );
-        String rval = length_str;
-        for( int i = 0; i < pads; i++ )
-        {
-            rval = space.concat( rval );
-        }
-
-        if( rval.length() != 8 )
-        {
-           throw new IllegalArgumentException( "can't create string number of length = 8" );
-        }
-
-        return rval.toCharArray();
-    }
-
-    private int readPaddedLength( int string_size )
-        throws IOException
-    {
-            //read in 8 bytes for command length- length will be sent as a padded string
-            byte[] length = new byte[string_size];
-            commands.read( length, 0, string_size );
-
-            String length_str = new String( length );
-            return Integer.parseInt( length_str.trim() );
-    }
-
-}
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASSecurityManager.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASSecurityManager.java
deleted file mode 100644
index d3b1281..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASSecurityManager.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.kde.kjas.server;
-
-import java.security.*;
-
-
-public class KJASSecurityManager extends SecurityManager
-{
-    public KJASSecurityManager()
-    {
-    }
-}
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java
deleted file mode 100644
index 8761e9b..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/KJASSoundPlayer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.kde.kjas.server;
-
-import java.applet.*;
-import java.net.*;
-
-public class KJASSoundPlayer implements AudioClip
-{
-    private URL file;
-
-    public KJASSoundPlayer( URL _file )
-    {
-        file = _file;
-    }
-
-    public void loop()
-    {
-    }
-
-    public void play()
-    {
-    }
-
-    public void stop()
-    {
-    }
-}
-
diff --git a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/Main.java b/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/Main.java
deleted file mode 100644
index 53da10a..0000000
--- a/WebCore/src/kdelibs/khtml/java/org/kde/kjas/server/Main.java
+++ /dev/null
@@ -1,133 +0,0 @@
-    package org.kde.kjas.server;
-
-import java.io.*;
-import java.security.*;
-import java.net.*;
-
-/**
- *  KJAS server recognizes these variablers:
- *    kjas.debug - makes server actions verbose
- *    kjas.showConsole - shows Java Console window
- *    kjas.log - save a transcript of the debug output to /tmp/kjas.log
- */
-
-public class Main
-{
-    //We need to save a reference to the original stdout
-    //for sending messages back
-    public  static final PrintStream         protocol_stdout;
-    public  static final KJASProtocolHandler protocol;
-    public  static final KJASConsole         console;
-    private static final boolean             show_console;
-    public  static final boolean             Debug;
-    public  static final boolean             log;
-    private static boolean                   good_jdk = true;
-
-    /**************************************************************************
-     * Initialization
-     **************************************************************************/
-    static
-    {
-        if( System.getProperty( "kjas.debug" ) != null )
-            Debug = true;
-        else
-            Debug = false;
-
-        if( System.getProperty( "kjas.showConsole" ) != null )
-            show_console = true;
-        else
-            show_console = false;
-
-        if( System.getProperty( "kjas.log" ) != null )
-            log = true;
-        else
-            log = false;
-
-        protocol_stdout = System.out;
-        console         = new KJASConsole();
-        protocol        = new KJASProtocolHandler( System.in, protocol_stdout );
-
-        Main.debug( "JVM version = " + System.getProperty( "java.version" ) );
-        String version = System.getProperty("java.version").substring( 0, 3 );
-        Main.debug( "JVM numerical version = " + version );
-        try
-        {
-            float java_version = Float.parseFloat( version );
-            if( java_version < 1.2 )
-                good_jdk = false;
-        } catch( NumberFormatException e )
-        {
-            good_jdk = false;
-        }
-    }
-
-    /**************************************************************************
-     * Public Utility functions available to the KJAS framework
-     **************************************************************************/
-    public static void debug( String msg )
-    {
-        if( Debug )
-        {
-            System.out.println( "KJAS: " + msg );
-        }
-    }
-
-    public static void kjas_err( String msg, Exception e )
-    {
-        System.err.println( msg );
-        System.err.println( "Backtrace: " );
-        e.printStackTrace();
-    }
-
-    public static void kjas_err( String msg, Throwable t )
-    {
-        System.err.println( msg );
-        t.printStackTrace();
-    }
-
-
-    /**************************************************************************
-     * Main- create the command loop
-     **************************************************************************/
-    public static void main( String[] args )
-    {
-        if( !good_jdk )
-        {
-            console.setVisible( true );
-            System.err.println( "ERROR: This version of Java is not supported for security reasons." );
-            System.err.println( "\t\tPlease use Java version 1.2 or higher." );
-            return;
-        }
-
-        if( show_console )
-            console.setVisible( true );
-
-
-        try  //Check for the JSSE packages, and install them
-        {
-            //set this property first
-            System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
-            if( Security.getProvider( "SunJSSE" ) == null )
-            {
-                Class provider = Class.forName("com.sun.net.ssl.internal.ssl.Provider");
-                if( provider != null )
-                {
-                    Main.debug( "adding Security Provider" );
-                    Provider p = (Provider) provider.newInstance();
-                    Security.addProvider( p );
-                }
-                else
-                    Main.debug( "could not get class: com.sun.net.ssl.internal.ssl.Provider" );
-            }
-            else
-                Main.debug( "could not get provider: SunJSSE" );
-        } catch( Exception e )
-        {
-            System.out.println( "Unable to load JSSE SSL stream handler, https support not available" );
-        }
-
-        //start the command parsing
-        protocol.commandLoop();
-    }
-
-}
diff --git a/WebCore/src/kdelibs/khtml/java/tests/badapplets/BadApplet.jar b/WebCore/src/kdelibs/khtml/java/tests/badapplets/BadApplet.jar
deleted file mode 100644
index fc9c274..0000000
Binary files a/WebCore/src/kdelibs/khtml/java/tests/badapplets/BadApplet.jar and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/java/tests/badapplets/BadApplet.java b/WebCore/src/kdelibs/khtml/java/tests/badapplets/BadApplet.java
deleted file mode 100644
index 6334097..0000000
--- a/WebCore/src/kdelibs/khtml/java/tests/badapplets/BadApplet.java
+++ /dev/null
@@ -1,202 +0,0 @@
-import java.awt.*;
-import java.awt.event.*;
-import java.applet.*;
-import javax.swing.*;
-import java.io.*;
-import java.net.*;
-import java.awt.datatransfer.*;
-
-public class BadApplet extends JApplet {
-    JTabbedPane tabs        = new JTabbedPane();
-    JPanel FileSystemTests  = new JPanel();
-    JPanel NetworkTests     = new JPanel();
-    JPanel EnvironmentTests = new JPanel();
-
-    JButton writeFileButton      = new JButton("Write File");
-    JButton readFileButton       = new JButton("Read File");
-    JButton connectSocketButton  = new JButton("Connect Socket");
-    JButton frameButton          = new JButton("Open Frame Without Warning Tag");
-    JButton readSystemPropButton = new JButton("Read System Property");
-    JButton printButton          = new JButton("Print");
-    JButton clipBoardButton      = new JButton("Read Clipboard");
-
-    JTextField writePath         = new JTextField( "/amd/ns/root/home/sbarnes/test.txt" );
-    JTextField readPath          = new JTextField("/amd/ns/root/home/sbarnes/test.txt");
-    JTextField url               = new JTextField("URL");
-    JTextField port              = new JTextField("port");
-    JTextField systemProp        = new JTextField("os.name");
-    JTextField output            = new JTextField();
-
-    //Construct the applet
-    public BadApplet() {
-        try {
-            //event handlers ******************************************************
-            writeFileButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    writeFileButton_actionPerformed(e);
-                }
-            });
-            readFileButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    readFileButton_actionPerformed(e);
-                }
-            });
-            connectSocketButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    connectSocketButton_actionPerformed(e);
-                }
-            });
-            frameButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                frameButton_actionPerformed(e);
-                }
-            });
-            readSystemPropButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    readSystemPropButton_actionPerformed(e);
-                }
-            });
-            printButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    printButton_actionPerformed(e);
-                }
-            });
-            clipBoardButton.addActionListener(new java.awt.event.ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    clipBoard_actionPerformed(e);
-                }
-            });
-
-            //do layout ***********************************************************
-            getContentPane().setLayout( new BorderLayout() );
-
-            FileSystemTests.setLayout( new FlowLayout( FlowLayout.LEFT ) );
-            FileSystemTests.add( writeFileButton );
-            FileSystemTests.add( writePath );
-            FileSystemTests.add( readFileButton );
-            FileSystemTests.add( readPath );
-
-            NetworkTests.setLayout( new FlowLayout( FlowLayout.LEFT ) );
-            NetworkTests.add( connectSocketButton );
-            NetworkTests.add( url );
-            NetworkTests.add( port );
-
-            EnvironmentTests.setLayout( new FlowLayout( FlowLayout.LEFT ) );
-            EnvironmentTests.add( frameButton );
-            EnvironmentTests.add( readSystemPropButton );
-            EnvironmentTests.add( systemProp );
-            EnvironmentTests.add( printButton );
-            EnvironmentTests.add( clipBoardButton );
-
-            tabs.add( FileSystemTests, "File System" );
-            tabs.add( NetworkTests, "Network" );
-            tabs.add( EnvironmentTests, "Environment" );
-
-            this.getContentPane().add( tabs, BorderLayout.CENTER );
-            this.getContentPane().add( output, BorderLayout.SOUTH );
-        }
-        catch(Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void paint( Graphics g )
-    {
-        System.out.println( "graphics g = " + g );
-        System.out.println( "clip area = " + g.getClip() );
-        System.out.println( "bounds of the clip area = " + g.getClipBounds() );
-
-        super.paint( g );
-    }
-
-    //Initialize the applet
-    public void init() {}
-
-    void writeFileButton_actionPerformed(ActionEvent e) {
-        try{
-            PrintWriter writer = new PrintWriter(new FileOutputStream(writePath.getText()));
-            writer.println("Here is some text");
-            writer.close();
-            output.setText("Write was successfull");
-        } catch (Exception ex){output.setText(ex.getMessage());}
-    }
-
-    void readSystemPropButton_actionPerformed(ActionEvent e) {
-        try{
-            output.setText(System.getProperty(systemProp.getText()));
-        } catch (Exception ex){output.setText("Error getting prop: " + ex.getMessage());}
-    }
-
-    void readFileButton_actionPerformed(ActionEvent e) {
-        try{
-            BufferedReader reader = new BufferedReader(new FileReader(readPath.getText()));
-            output.setText("Read was successfull: " + reader.readLine());
-        } catch (Exception ex){output.setText(ex.getMessage());}
-    }
-
-    void connectSocketButton_actionPerformed(ActionEvent e) {
-        try{
-            Integer thePort = new Integer(port.getText());
-            Socket socket = new Socket(url.getText(), thePort.intValue());
-            socket.getOutputStream();
-            output.setText("Socket connection successfull");
-        } catch (Exception ex){output.setText("Socket unsuccessfull: " + ex.getMessage());}
-    }
-
-    void frameButton_actionPerformed(ActionEvent e) {
-        JFrame frame = new JFrame("Does this Frame have a warning sign");
-        frame.setSize(200,200);
-        frame.show();
-        if (frame.getWarningString() == null)
-            output.setText("No warning string in frame");
-        else
-            output.setText(frame.getWarningString());
-    }
-
-    void clipBoard_actionPerformed(ActionEvent e) {
-        try {
-            Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
-
-            Transferable trans = clip.getContents(null);
-            if (trans == null){
-                output.setText("Clipboard is empty");
-                return;
-            }
-            output.setText((String)trans.getTransferData(DataFlavor.stringFlavor));
-        }catch(Exception ex){ex.getMessage();}
-    }
-
-    void printButton_actionPerformed(ActionEvent e) {
-        try{
-            JFrame testFrame = new JFrame("test");
-            testFrame.getContentPane().add(this, BorderLayout.CENTER);
-            PrintJob printer = Toolkit.getDefaultToolkit().getPrintJob(testFrame, "Applet Print Test", null);
-
-            if (printer == null){
-                output.setText("PrintJob is null");
-                return;
-            }
-
-            Graphics g = printer.getGraphics();
-            g.drawString("This is the applet print test", 50, 50);
-            g.dispose();
-            printer.end();
-        }catch(Exception ex){ex.getMessage();}
-    }
-
-    //Main method
-    public static void main(String[] args) {
-        BadApplet applet = new BadApplet();
-
-        JFrame frame = new JFrame();
-        frame.setDefaultCloseOperation( WindowConstants.DISPOSE_ON_CLOSE );
-        frame.setTitle("Applet Frame");
-        frame.getContentPane().add(applet, BorderLayout.CENTER);
-        frame.setSize(400,320);
-        frame.setVisible(true);
-
-        applet.init();
-        applet.start();
-    }
-
-}
diff --git a/WebCore/src/kdelibs/khtml/java/tests/badapplets/applet.html b/WebCore/src/kdelibs/khtml/java/tests/badapplets/applet.html
deleted file mode 100644
index fe9e47e..0000000
--- a/WebCore/src/kdelibs/khtml/java/tests/badapplets/applet.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-  <head>
-    <title>SwingSet demo</title>
-  </head>
-
-  <body>
-      <h1>SwingSet demo</h1>
-      <applet code=BadApplet.class
-              archive="BadApplet.jar"
-      	      width=695 height=525>
-      </applet>
-  </body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/java/tests/good_sites b/WebCore/src/kdelibs/khtml/java/tests/good_sites
deleted file mode 100644
index 32b1524..0000000
--- a/WebCore/src/kdelibs/khtml/java/tests/good_sites
+++ /dev/null
@@ -1,30 +0,0 @@
-http Sites
----------------------------------------------------------
-www.soda.co.uk
-java.sun.com
-www.javaboutique.com
-www.teledyn.com/fun/SaubleBeach
-www.fxapplets.com
-www.quote.com/quotecom/livecharts/
-games.yahoo.com/games/klondike.html
-www.webtrac.co.za/cgi-bin/demo/demo.pl
-www.sodaplay.com/constructor/player.htm
-www.dseffects.com/applets.html
-www.controlzed.com
-javaboutique.internet.com/Durius/
-screening.nasdaq.com/screening/NASDAQSearch.asp
-www.chess.net/play/java
-www.sodaplay.com
-www.indegocomputer.de
-www.kmelektronik.de/root/index.html
-rdufour.mytradecenter.com/applets/Tetris/Tetris.html
-http://www.shiatsu-austria.at
-http://aktien.onvista.de/risk-return-map/
-
-https Sites
----------------------------------------------------------
-https://brokerage-m3.consors.de/ConSors/ 
-https://homebanking.dvg-ka.de/045/index.html
-https://spk-ihb.izb-hb.de/SPK_Deggendorf/index.html
-https://www3.genodirekt.de/homebank.nsf/(rzbks)/xxq1050x?OpenDocument
-https://banking.sonline.de/kreissparkasse-duesseldorf/
diff --git a/WebCore/src/kdelibs/khtml/java/tests/testkjavaappletserver.cpp b/WebCore/src/kdelibs/khtml/java/tests/testkjavaappletserver.cpp
deleted file mode 100644
index e1439a0..0000000
--- a/WebCore/src/kdelibs/khtml/java/tests/testkjavaappletserver.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <kapp.h>
-#include <kcmdlineargs.h>
-#include <kjavaappletserver.h>
-#include <kjavaapplet.h>
-#include <kjavaappletwidget.h>
-#include <kdebug.h>
-#include <qstring.h>
-#include <stdio.h>
-#include <unistd.h>
-
-
-static KCmdLineOptions options[] =
-{
-    { "+[kdelibs_path]", "path to kdelibs directory", 0 },
-    { 0, 0, 0 }
-};
-
-int main(int argc, char **argv)
-{
-    KCmdLineArgs::init( argc, argv, "testKJASSever", "test program", "0.0" );
-
-    KApplication app;
-
-    QString path_to_kdelibs = "/build/wynnw/kde-src";
-
-    KJavaAppletContext* context = new KJavaAppletContext();
-    KJavaAppletWidget *a = new KJavaAppletWidget( context );
-
-    a->show();
-
-    a->applet()->setBaseURL( "file:" + path_to_kdelibs + "/kdelibs/khtml/test/" );
-    a->applet()->setAppletName( "Lake" );
-    a->applet()->setAppletClass( "lake.class" );
-    a->applet()->setParameter( "image", "konqi.gif" );
-
-    a->showApplet();
-    a->applet()->start();
-
-    app.exec();
-}
diff --git a/WebCore/src/kdelibs/khtml/khtml.desktop b/WebCore/src/kdelibs/khtml/khtml.desktop
deleted file mode 100644
index 150d08e..0000000
--- a/WebCore/src/kdelibs/khtml/khtml.desktop
+++ /dev/null
@@ -1,56 +0,0 @@
-[Desktop Entry]
-Type=Service
-Comment=Embeddable HTML viewing component
-Comment[az]=Hopdurula Bilən HTML nümayiş vasitəsi
-Comment[bg]=Елемент за преглед на вградени HTML
-Comment[br]=Parzh HTML gweler enframmus
-Comment[bs]=Umetljiva HTML komponenta
-Comment[ca]=Component visualitzador d'HTML encastable
-Comment[cs]=Komponenta pro zobrazování HTML
-Comment[da]=Html visnings komponent der kan indlejres
-Comment[de]=HTML-Betrachtungskomponente, die sich einbetten lässt
-Comment[el]=Ενσωματώσιμο άρθρωμα προβολής HTML
-Comment[eo]=HTML-rigardo-komponento
-Comment[es]=Componente incrustable para visualizar HTML
-Comment[et]=Põimitav HTMLi näitamise  komponent
-Comment[eu]=HTML ikuspen osagai txertagarria
-Comment[fi]=Upotettava HTML-komponentti
-Comment[fr]=Afficheur HTML incorporé
-Comment[gl]=Compoñente embebible de visualización de HTML
-Comment[he]=HTML תגוצתל העבטה-רב ביכר
-Comment[hr]=Umetljiva HTML komponenta
-Comment[hu]=Beágyazható HTML-néző komponens
-Comment[is]=Ásetjanleg HTML-sjá
-Comment[it]=Componente importabile per la visualizzazione degli HTML
-Comment[ja]=埋め込み可能なHTMLビューコンポーネント
-Comment[ko]=다른 곳에 끼워져서 HTML을 보여주는 콤포넌트
-Comment[lt]=Įdedamas HTML peržiūros komponentas
-Comment[lv]=Iegultā HTML skatīšanas komponente
-Comment[mk]=Вградлива компонента за гледање HTML
-Comment[mt]=Komponent integrat għall-wiri tal-HTML
-Comment[nl]=een inbedbaar HTML-viewercomponent
-Comment[no]=Inkluderbart HTML-visningskomponent
-Comment[no_NY]=Inkluderbart komponent for HTML-vising
-Comment[oc]=Component visualizador d'HTML encastable
-Comment[pl]=Składnik do przeglądania plików HTML
-Comment[pt_BR]=Componente embutível de visualização HTML
-Comment[pt]=Componente embebível para visualizar HTML
-Comment[ru]=Элемент просмотра встраиваемых HTML
-Comment[sk]=Vložiteľný komponent HTML prehliadač
-Comment[sl]=Integriran pregled besedila HTML
-Comment[sr]=Ugradiva komponenta za pregled HTML-a
-Comment[sv]=Inbäddningsbar HTML-visande komponent
-Comment[ta]=¯ð¦À¡¾¢ì¸ÅøÄ HTML ¸¡ðº¢ì ÜÚ
-Comment[tr]=Gömülebilir HTML görüntüleme aracı
-Comment[uk]=Вбудований копмонент-переглядач HTML
-Comment[vi]=Component đềExem HTML có thềEembedd được 
-Comment[xh]=Inxenye yemboniselo elungisiweyo ye HTML
-Comment[zh_CN.GB2312]=嵌入的 HTML 查看部件
-MimeType=text/html;text/xml;
-Icon=konqueror
-Name=KHTML
-Name[da]=KHtml
-Name[fr]=kHTML
-ServiceTypes=KParts/ReadOnlyPart,Browser/View
-X-KDE-Library=libkhtml
-InitialPreference=10
diff --git a/WebCore/src/kdelibs/khtml/khtml.rc b/WebCore/src/kdelibs/khtml/khtml.rc
deleted file mode 100644
index f640aae..0000000
--- a/WebCore/src/kdelibs/khtml/khtml.rc
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="khtmlpart" version="2">
-<MenuBar>
- <Menu name="edit"><text>&amp;Edit</text>
-  <Action name="selectAll" />
-  <Separator />
-  <Action name="find" />
- </Menu>
-</MenuBar>
-</kpartgui>
diff --git a/WebCore/src/kdelibs/khtml/khtml_browser.rc b/WebCore/src/kdelibs/khtml/khtml_browser.rc
deleted file mode 100644
index c5667b2..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_browser.rc
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="khtmlpart" version="8">
-<MenuBar>
- <Menu name="file"><text>&amp;File</text>
-  <Action name="saveBackground" />
-  <Action name="saveDocument" />
-  <Action name="saveFrame" />
-  <Separator />
-  <Action name="printFrame" group="print" />
- </Menu>
- <Menu name="edit"><text>&amp;Edit</text>
-  <Action name="selectAll" />
-  <Separator />
-  <Action name="find" />
- </Menu>
- <Menu name="view"><text>&amp;View</text>
-  <Action name="viewDocumentSource" />
-  <Action name="viewFrameSource" />
-  <Action name="security" />
-  <Action name="setEncoding" />
-<!--
-  <Separator />
-  <Action name="debugRenderTree" />
-  <Action name="debugDOMTree" />
--->
- </Menu>
-</MenuBar>
-<ToolBar name="mainToolBar"><text>Main Toolbar</text>
- <Action name="printFrame" />
- <Action name="find" /> 
- <Action name="incFontSizes" />
- <Action name="decFontSizes" />
- <ActionList name="loadImages" />
- <Separator />
- <Action name="security" />
-</ToolBar>
-</kpartgui>
diff --git a/WebCore/src/kdelibs/khtml/khtml_ext.cpp b/WebCore/src/kdelibs/khtml/khtml_ext.cpp
deleted file mode 100644
index a7ff1fe..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_ext.cpp
+++ /dev/null
@@ -1,518 +0,0 @@
-
-#include "khtml_ext.h"
-#include "khtmlview.h"
-#include "khtml_pagecache.h"
-#include "rendering/render_form.h"
-#include "dom/html_form.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpopupmenu.h>
-#include <qlineedit.h>
-#include <qmetaobject.h>
-
-#include <kdebug.h>
-#include <klocale.h>
-#include <kfiledialog.h>
-#include <kio/job.h>
-#include <ktoolbarbutton.h>
-#include <ktoolbar.h>
-#include <ktempfile.h>
-#include <ksavefile.h>
-#include <kurldrag.h>
-#include <kstringhandler.h>
-
-#include <dom/dom_element.h>
-#include <misc/htmltags.h>
-
-KHTMLPartBrowserExtension::KHTMLPartBrowserExtension( KHTMLPart *parent, const char *name )
-: KParts::BrowserExtension( parent, name )
-{
-    m_part = parent;
-    setURLDropHandlingEnabled( true );
-
-    enableAction( "cut", false );
-    enableAction( "copy", false );
-    enableAction( "paste", false );
-
-    m_connectedToClipboard = false;
-}
-
-int KHTMLPartBrowserExtension::xOffset()
-{
-    return m_part->view()->contentsX();
-}
-
-int KHTMLPartBrowserExtension::yOffset()
-{
-  return m_part->view()->contentsY();
-}
-
-void KHTMLPartBrowserExtension::saveState( QDataStream &stream )
-{
-  kdDebug( 6050 ) << "saveState!" << endl;
-  m_part->saveState( stream );
-}
-
-void KHTMLPartBrowserExtension::restoreState( QDataStream &stream )
-{
-  kdDebug( 6050 ) << "restoreState!" << endl;
-  m_part->restoreState( stream );
-}
-
-void KHTMLPartBrowserExtension::editableWidgetFocused( QWidget *widget )
-{
-    m_editableFormWidget = widget;
-    updateEditActions();
-
-    if ( !m_connectedToClipboard && m_editableFormWidget )
-    {
-        connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
-                 this, SLOT( updateEditActions() ) );
-
-        if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-            connect( m_editableFormWidget, SIGNAL( textChanged( const QString & ) ),
-                     this, SLOT( updateEditActions() ) );
-        else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-            connect( m_editableFormWidget, SIGNAL( textChanged() ),
-                     this, SLOT( updateEditActions() ) );
-
-        m_connectedToClipboard = true;
-    }
-}
-
-void KHTMLPartBrowserExtension::editableWidgetBlurred( QWidget *widget )
-{
-    QWidget *oldWidget = m_editableFormWidget;
-
-    m_editableFormWidget = widget;
-    enableAction( "cut", false );
-    enableAction( "paste", false );
-    m_part->emitSelectionChanged();
-
-    if ( m_connectedToClipboard )
-    {
-        disconnect( QApplication::clipboard(), SIGNAL( dataChanged() ),
-                    this, SLOT( updateEditActions() ) );
-
-        if ( oldWidget )
-        {
-            if ( oldWidget->inherits( "QLineEdit" ) )
-                disconnect( oldWidget, SIGNAL( textChanged( const QString & ) ),
-                            this, SLOT( updateEditActions() ) );
-            else if ( oldWidget->inherits( "QMultiLineEdit" ) )
-                disconnect( oldWidget, SIGNAL( textChanged() ),
-                            this, SLOT( updateEditActions() ) );
-        }
-
-        m_connectedToClipboard = false;
-    }
-}
-
-void KHTMLPartBrowserExtension::setExtensionProxy( KParts::BrowserExtension *proxy )
-{
-    if ( m_extensionProxy )
-        disconnect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ),
-                    this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
-
-    m_extensionProxy = proxy;
-
-    if ( m_extensionProxy )
-    {
-        connect( m_extensionProxy, SIGNAL( enableAction( const char *, bool ) ),
-                 this, SLOT( extensionProxyActionEnabled( const char *, bool ) ) );
-
-        enableAction( "cut", m_extensionProxy->isActionEnabled( "cut" ) );
-        enableAction( "copy", m_extensionProxy->isActionEnabled( "copy" ) );
-        enableAction( "paste", m_extensionProxy->isActionEnabled( "paste" ) );
-    }
-    else
-    {
-        updateEditActions();
-        enableAction( "copy", false ); // ### re-check this
-    }
-}
-
-void KHTMLPartBrowserExtension::cut()
-{
-    if ( m_extensionProxy )
-    {
-        callExtensionProxyMethod( "cut()" );
-        return;
-    }
-
-    ASSERT( m_editableFormWidget );
-    if ( !m_editableFormWidget )
-        return; // shouldn't happen
-
-    if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-        static_cast<QLineEdit *>( &(*m_editableFormWidget) )->cut();
-    else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-        static_cast<QMultiLineEdit *>( &(*m_editableFormWidget) )->cut();
-}
-
-void KHTMLPartBrowserExtension::copy()
-{
-    if ( m_extensionProxy )
-    {
-        callExtensionProxyMethod( "copy()" );
-        return;
-    }
-
-    kdDebug( 6050 ) << "************! KHTMLPartBrowserExtension::copy()" << endl;
-    if ( !m_editableFormWidget )
-    {
-        // get selected text and paste to the clipboard
-        QString text = m_part->selectedText();
-        QClipboard *cb = QApplication::clipboard();
-        cb->setText(text);
-    }
-    else
-    {
-        if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-            static_cast<QLineEdit *>( &(*m_editableFormWidget) )->copy();
-        else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-            static_cast<QMultiLineEdit *>( &(*m_editableFormWidget) )->copy();
-    }
-}
-
-void KHTMLPartBrowserExtension::paste()
-{
-    if ( m_extensionProxy )
-    {
-        callExtensionProxyMethod( "paste()" );
-        return;
-    }
-
-    ASSERT( m_editableFormWidget );
-    if ( !m_editableFormWidget )
-        return; // shouldn't happen
-
-    if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-        static_cast<QLineEdit *>( &(*m_editableFormWidget) )->paste();
-    else if ( m_editableFormWidget->inherits( "QMultiLineEdit" ) )
-        static_cast<QMultiLineEdit *>( &(*m_editableFormWidget) )->paste();
-}
-
-void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method )
-{
-    if ( !m_extensionProxy )
-        return;
-
-    QMetaData *metaData = m_extensionProxy->metaObject()->slot( method );
-    if ( !metaData )
-        return;
-
-    KParts::BrowserExtension *ext = static_cast<KParts::BrowserExtension *>( m_extensionProxy );
-    (ext->*(metaData->ptr))();
-}
-
-void KHTMLPartBrowserExtension::updateEditActions()
-{
-    if ( !m_editableFormWidget )
-    {
-        enableAction( "cut", false );
-        enableAction( "paste", false );
-        return;
-    }
-
-    // ### duplicated from KonqMainWindow::slotClipboardDataChanged
-    QMimeSource *data = QApplication::clipboard()->data();
-    enableAction( "paste", data->provides( "text/plain" ) );
-
-    bool hasSelection = false;
-
-    if ( m_editableFormWidget->inherits( "QLineEdit" ) )
-        hasSelection = static_cast<QLineEdit *>( &(*m_editableFormWidget) )->hasMarkedText();
-    else if ( m_editableFormWidget->inherits( "khtml::TextAreaWidget" ) )
-        hasSelection = static_cast<khtml::TextAreaWidget *>( &(*m_editableFormWidget) )->hasMarkedText();
-
-    enableAction( "copy", hasSelection );
-    enableAction( "cut", hasSelection );
-}
-
-void KHTMLPartBrowserExtension::extensionProxyActionEnabled( const char *action, bool enable )
-{
-    // only forward enableAction calls for actions we actually do foward
-    if ( strcmp( action, "cut" ) == 0 ||
-         strcmp( action, "copy" ) == 0 ||
-         strcmp( action, "paste" ) == 0 )
-        enableAction( action, enable );
-}
-
-void KHTMLPartBrowserExtension::reparseConfiguration()
-{
-  m_part->reparseConfiguration();
-}
-
-void KHTMLPartBrowserExtension::print()
-{
-  m_part->view()->print();
-}
-
-class KHTMLPopupGUIClient::KHTMLPopupGUIClientPrivate
-{
-public:
-  KHTMLPart *m_khtml;
-  KURL m_url;
-  KURL m_imageURL;
-  KAction *m_paPrintFrame;
-  KAction *m_paSaveLinkAs;
-  KAction *m_paSaveImageAs;
-  KAction *m_paCopyLinkLocation;
-  KAction *m_paStopAnimations;
-  KAction *m_paCopyImageLocation;
-  KAction *m_paViewImage;
-  KAction *m_paReloadFrame;
-  KAction *m_paViewFrameSource;
-};
-
-
-KHTMLPopupGUIClient::KHTMLPopupGUIClient( KHTMLPart *khtml, const QString &doc, const KURL &url )
-{
-  d = new KHTMLPopupGUIClientPrivate;
-  d->m_khtml = khtml;
-  d->m_url = url;
-
-  setInstance( khtml->instance() );
-
-  actionCollection()->insert( khtml->actionCollection()->action( "selectAll" ) );
-  actionCollection()->insert( khtml->actionCollection()->action( "viewDocumentSource" ) );
-
-  // frameset? -> add "Reload Frame" etc.
-  if ( khtml->parentPart() )
-  {
-    d->m_paReloadFrame = new KAction( i18n( "Reload Frame" ), 0, this, SLOT( slotReloadFrame() ),
-                                      actionCollection(), "reloadframe" );
-    d->m_paViewFrameSource = new KAction( i18n( "View Frame Source" ), 0, d->m_khtml, SLOT( slotViewDocumentSource() ),
-                                          actionCollection(), "viewFrameSource" );
-    // This one isn't in khtml_popupmenu.rc anymore, because Print isn't either,
-    // and because print frame is already in the toolbar and the menu.
-    // But leave this here, so that it's easy to readd it.
-    d->m_paPrintFrame = new KAction( i18n( "Print Frame..." ), "fileprint", 0, d->m_khtml->browserExtension(), SLOT( print() ), actionCollection(), "printFrame" );
-  }
-
-  actionCollection()->insert( khtml->actionCollection()->action( "setEncoding" ) );
-
-  if ( !url.isEmpty() )
-  {
-    d->m_paSaveLinkAs = new KAction( i18n( "&Save Link As..." ), 0, this, SLOT( slotSaveLinkAs() ),
-                                     actionCollection(), "savelinkas" );
-    d->m_paCopyLinkLocation = new KAction( i18n( "Copy Link Location" ), 0, this, SLOT( slotCopyLinkLocation() ),
-                                           actionCollection(), "copylinklocation" );
-  }
-
-  d->m_paStopAnimations = new KAction( i18n( "Stop Animations" ), 0, this, SLOT( slotStopAnimations() ),
-                                       actionCollection(), "stopanimations" );
-
-  DOM::Element e;
-  e = khtml->nodeUnderMouse();
-
-  if ( !e.isNull() && (e.elementId() == ID_IMG ||
-                       (e.elementId() == ID_INPUT && !static_cast<DOM::HTMLInputElement>(e).src().isEmpty())))
-  {
-    d->m_imageURL = KURL( d->m_khtml->url(), e.getAttribute( "src" ).string() );
-    d->m_paSaveImageAs = new KAction( i18n( "Save Image As..." ), 0, this, SLOT( slotSaveImageAs() ),
-                                      actionCollection(), "saveimageas" );
-    d->m_paCopyImageLocation = new KAction( i18n( "Copy Image Location" ), 0, this, SLOT( slotCopyImageLocation() ),
-                                            actionCollection(), "copyimagelocation" );
-    QString name = KStringHandler::csqueeze(d->m_imageURL.fileName()+d->m_imageURL.query(), 25);
-    d->m_paViewImage = new KAction( i18n( "View Image (%1)" ).arg(name), 0, this, SLOT( slotViewImage() ),
-                                            actionCollection(), "viewimage" );
-  }
-
-  setXML( doc );
-  setDOMDocument( QDomDocument(), true ); // ### HACK
-
-  QDomElement menu = domDocument().documentElement().namedItem( "Menu" ).toElement();
-
-  if ( actionCollection()->count() > 0 )
-    menu.insertBefore( domDocument().createElement( "separator" ), menu.firstChild() );
-}
-
-KHTMLPopupGUIClient::~KHTMLPopupGUIClient()
-{
-  delete d;
-}
-
-void KHTMLPopupGUIClient::slotSaveLinkAs()
-{
-  saveURL( d->m_khtml->widget(), i18n( "Save Link As" ), d->m_url );
-}
-
-void KHTMLPopupGUIClient::slotSaveImageAs()
-{
-  saveURL( d->m_khtml->widget(), i18n( "Save Image As" ), d->m_imageURL );
-}
-
-void KHTMLPopupGUIClient::slotCopyLinkLocation()
-{
-  KURL::List lst;
-  lst.append( d->m_url );
-  QApplication::clipboard()->setData( KURLDrag::newDrag( lst ) );
-}
-
-void KHTMLPopupGUIClient::slotStopAnimations()
-{
-  d->m_khtml->stopAnimations();
-}
-
-void KHTMLPopupGUIClient::slotCopyImageLocation()
-{
-  KURL::List lst;
-  lst.append( d->m_imageURL );
-  QApplication::clipboard()->setData( KURLDrag::newDrag( lst ) );
-}
-
-void KHTMLPopupGUIClient::slotViewImage()
-{
-  d->m_khtml->browserExtension()->createNewWindow(d->m_imageURL.url());
-}
-
-void KHTMLPopupGUIClient::slotReloadFrame()
-{
-  KParts::URLArgs args( d->m_khtml->browserExtension()->urlArgs() );
-  args.reload = true;
-  // reload document
-  d->m_khtml->closeURL();
-  d->m_khtml->browserExtension()->setURLArgs( args );
-  d->m_khtml->openURL( d->m_khtml->url() );
-}
-
-void KHTMLPopupGUIClient::saveURL( QWidget *parent, const QString &caption, const KURL &url, const QString &filter, long cacheId, const QString & suggestedFilename )
-{
-  KFileDialog *dlg = new KFileDialog( QString::null, filter, parent, "filedia", true );
-
-  dlg->setKeepLocation( true );
-
-  dlg->setCaption( caption );
-
-  if (!suggestedFilename.isEmpty())
-    dlg->setSelection( suggestedFilename );
-  else if (!url.fileName().isEmpty())
-    dlg->setSelection( url.fileName() );
-  else
-    dlg->setSelection( QString::fromLatin1("index.html") );
-
-  if ( dlg->exec() )
-  {
-    KURL destURL( dlg->selectedURL() );
-    if ( !destURL.isMalformed() )
-    {
-      bool saved = false;
-      if (KHTMLPageCache::self()->isValid(cacheId))
-      {
-        if (destURL.isLocalFile())
-        {
-          KSaveFile destFile(destURL.path());
-          if (destFile.status() == 0)
-          {
-            KHTMLPageCache::self()->saveData(cacheId, destFile.dataStream());
-            saved = true;
-          }
-        }
-        else
-        {
-          // save to temp file, then move to final destination.
-          KTempFile destFile;
-          if (destFile.status() == 0)
-          {
-            KHTMLPageCache::self()->saveData(cacheId, destFile.dataStream());
-            destFile.close();
-            KURL url2 = KURL();
-            url2.setPath(destFile.name());
-            KIO::move(url2, destURL);
-            saved = true;
-          }
-        }
-      }
-      if(!saved)
-      {
-        /*KIO::Job *job = */ KIO::copy( url, destURL );
-        // TODO connect job result, to display errors
-      }
-    }
-  }
-
-  delete dlg;
-}
-
-KHTMLPartBrowserHostExtension::KHTMLPartBrowserHostExtension( KHTMLPart *part )
-: KParts::BrowserHostExtension( part )
-{
-  m_part = part;
-}
-
-KHTMLPartBrowserHostExtension::~KHTMLPartBrowserHostExtension()
-{
-}
-
-QStringList KHTMLPartBrowserHostExtension::frameNames() const
-{
-  return m_part->frameNames();
-}
-
-const QList<KParts::ReadOnlyPart> KHTMLPartBrowserHostExtension::frames() const
-{
-  return m_part->frames();
-}
-
-bool KHTMLPartBrowserHostExtension::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
-{
-  return m_part->openURLInFrame( url, urlArgs );
-}
-
-KHTMLFontSizeAction::KHTMLFontSizeAction( KHTMLPart *part, bool direction, const QString &text, const QString &icon, const QObject *receiver, const char *slot, QObject *parent, const char *name )
-    : KAction( text, icon, 0, receiver, slot, parent, name )
-{
-    m_direction = direction;
-    m_part = part;
-
-    m_popup = new QPopupMenu;
-    m_popup->insertItem( i18n( "Default font size" ) );
-
-    int m = m_direction ? 1 : -1;
-
-    for ( int i = 1; i < 5; ++i )
-    {
-        int num = i * m;
-        QString numStr = QString::number( num );
-        if ( num > 0 ) numStr.prepend( '+' );
-
-        m_popup->insertItem( i18n( "Font Size %1" ).arg( numStr ) );
-    }
-
-    connect( m_popup, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
-}
-
-KHTMLFontSizeAction::~KHTMLFontSizeAction()
-{
-    delete m_popup;
-}
-
-int KHTMLFontSizeAction::plug( QWidget *w, int index )
-{
-    int containerId = KAction::plug( w, index );
-    if ( containerId == -1 || !w->inherits( "KToolBar" ) )
-        return containerId;
-
-    KToolBarButton *button = static_cast<KToolBar *>( w )->getButton( menuId( containerId ) );
-    if ( !button )
-        return containerId;
-
-    button->setDelayedPopup( m_popup );
-    return containerId;
-}
-
-void KHTMLFontSizeAction::slotActivated( int id )
-{
-    int idx = m_popup->indexOf( id );
-
-    if ( idx == 0 )
-        m_part->setFontBaseInternal( 0, true );
-    else
-        m_part->setFontBaseInternal( idx * ( m_direction ? 1 : -1 ), false );
-}
-
-using namespace KParts;
-#include "khtml_ext.moc"
-
diff --git a/WebCore/src/kdelibs/khtml/khtml_factory.cpp b/WebCore/src/kdelibs/khtml/khtml_factory.cpp
deleted file mode 100644
index fa71b64..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_factory.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "khtml_factory.h"
-#include "khtml_part.h"
-#include "khtml_settings.h"
-
-#include "css/cssstyleselector.h"
-#include "html/html_imageimpl.h"
-#include "rendering/render_style.h"
-#include "misc/loader.h"
-
-#include <kinstance.h>
-#include <kaboutdata.h>
-#include <klocale.h>
-#include <kparts/historyprovider.h>
-
-#include <assert.h>
-
-#include <kdebug.h>
-
-template class QList<KHTMLPart>;
-
-extern "C"
-{
-  void *init_libkhtml()
-  {
-      // We can't use a plain self() here, because that would
-      // return the global factory, which might already exist
-      // at the time init_libkhtml is called! As soon as someone
-      // does new KHTMLPart() in his application and loads up
-      // an html document into that part which either embeds
-      // embeds another KHTMLPart instance via <object> or
-      // as html frame, then we cannot return self(), as
-      // what we return here is what the KLibLoader deletes
-      // in the end, and we don't want the libloader to
-      // delete our global instance. Anyway, the new
-      // KHTMLFactory we create here is very cheap :)
-      // (Simon)
-      return new KHTMLFactory( true );
-  }
-};
-
-KHTMLFactory *KHTMLFactory::s_self = 0;
-unsigned long int KHTMLFactory::s_refcnt = 0;
-KInstance *KHTMLFactory::s_instance = 0;
-KAboutData *KHTMLFactory::s_about = 0;
-KHTMLSettings *KHTMLFactory::s_settings = 0;
-QList<KHTMLPart> *KHTMLFactory::s_parts = 0;
-
-KHTMLFactory::KHTMLFactory( bool clone )
-{
-    if ( clone )
-        ref();
-}
-
-KHTMLFactory::~KHTMLFactory()
-{
-    if ( s_self == this )
-    {
-        assert( !s_refcnt );
-
-        if ( s_instance )
-            delete s_instance;
-        if ( s_about )
-            delete s_about;
-        if ( s_settings )
-            delete s_settings;
-        if ( s_parts )
-        {
-            assert( s_parts->isEmpty() );
-            delete s_parts;
-        }
-
-        s_instance = 0;
-        s_about = 0;
-        s_settings = 0;
-        s_parts = 0;
-
-        kdDebug( 6000 ) << "KHTMLFactory::~KHTMLFactory" << endl;
-        // clean up static data
-        khtml::CSSStyleSelector::clear();
-        khtml::RenderStyle::cleanup();
-        khtml::Cache::clear();
-    }
-    else
-        deref();
-}
-
-KParts::Part *KHTMLFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const char *className, const QStringList & )
-{
-  KHTMLPart::GUIProfile prof = KHTMLPart::DefaultGUI;
-  if ( strcmp( className, "Browser/View" ) == 0 )
-    prof = KHTMLPart::BrowserViewGUI;
-
-  return new KHTMLPart( parentWidget, widgetName, parent, name, prof );
-}
-
-void KHTMLFactory::ref()
-{
-    if ( !s_refcnt && !s_self )
-    {
-        // we can't use a staticdeleter here, because that would mean
-        // that the factory gets deleted from within a qPostRoutine, called
-        // from the QApplication destructor. That however is too late, because
-        // we want to destruct a KInstance object, which involves destructing
-        // a KConfig object, which might call KGlobal::dirs() (in sync()) which
-        // probably is not going to work ;-)
-        // well, perhaps I'm wrong here, but as I'm unsure I try to stay on the
-        // safe side ;-) -> let's use a simple reference counting scheme
-        // (Simon)
-        s_self = new KHTMLFactory;
-        khtml::Cache::init();
-    }
-
-    s_refcnt++;
-}
-
-void KHTMLFactory::deref()
-{
-    if ( !--s_refcnt && s_self )
-    {
-        delete s_self;
-        s_self = 0;
-    }
-}
-
-void KHTMLFactory::registerPart( KHTMLPart *part )
-{
-    if ( !s_parts )
-        s_parts = new QList<KHTMLPart>;
-
-    if ( !s_parts->containsRef( part ) )
-    {
-        s_parts->append( part );
-        ref();
-    }
-}
-
-void KHTMLFactory::deregisterPart( KHTMLPart *part )
-{
-    assert( s_parts );
-
-    if ( s_parts->removeRef( part ) )
-    {
-        if ( s_parts->isEmpty() )
-        {
-            delete s_parts;
-            s_parts = 0;
-        }
-        deref();
-    }
-}
-
-KInstance *KHTMLFactory::instance()
-{
-  assert( s_self );
-
-  if ( !s_instance )
-  {
-    s_about = new KAboutData( "khtml", I18N_NOOP( "KHTML" ), "3.0",
-                              I18N_NOOP( "Embeddable HTML component" ),
-                              KAboutData::License_LGPL );
-    s_about->addAuthor( "Lars Knoll", 0, "knoll at kde.org" );
-    s_about->addAuthor( "Antti Koivisto", 0, "koivisto at kde.org" );
-    s_about->addAuthor( "Waldo Bastian", 0, "bastian at kde.org" );
-    s_about->addAuthor( "Torben Weis", 0, "weis at kde.org" );
-    s_about->addAuthor( "Martin Jones", 0, "mjones at kde.org" );
-    s_about->addAuthor( "Simon Hausmann", 0, "hausmann at kde.org" );
-
-    s_instance = new KInstance( s_about );
-  }
-
-  return s_instance;
-}
-
-KHTMLSettings *KHTMLFactory::defaultHTMLSettings()
-{
-  assert( s_self );
-  if ( !s_settings )
-    s_settings = new KHTMLSettings();
-
-  return s_settings;
-}
-
-using namespace KParts;
-#include "khtml_factory.moc"
-
diff --git a/WebCore/src/kdelibs/khtml/khtml_find.cpp b/WebCore/src/kdelibs/khtml/khtml_find.cpp
deleted file mode 100644
index b40b43f..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_find.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "khtml_find.h"
-#include "khtml_part.h"
-
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kstringhandler.h>
-
-KHTMLFind::KHTMLFind( KHTMLPart *part, QWidget *parent, const char *name )
-: KEdFind( parent, name, false )
-{
-//  connect( this, SIGNAL( done() ),
-//           this, SLOT( slotDone() ) );
-  connect( this, SIGNAL( search() ),
-	   this, SLOT( slotSearch() ) );
-  m_first = true;
-  m_part = part;
-  m_found = false;
-}
-
-KHTMLFind::~KHTMLFind()
-{
-}
-
-void KHTMLFind::slotDone()
-{
-  accept();
-}
-
-void KHTMLFind::slotSearch()
-{
-  if ( m_first )
-  {
-    m_part->findTextBegin();
-    m_first = false;
-  }
-
-  bool forward = !get_direction();
-
-  if ( m_part->findTextNext( getText(), forward, case_sensitive() ) )
-    m_found = true;
-  else if ( m_found )
-  {
-    if ( forward )
-    {
-      if ( KMessageBox::questionYesNo( this,
-           i18n("End of document reached.\n"\
-                "Continue from the beginning?"),
-	   i18n("Find") ) == KMessageBox::Yes )
-      {
-        m_first = true;
-	slotSearch();
-      }
-    }
-    else
-    {
-      if ( KMessageBox::questionYesNo( this,
-           i18n("Beginning of document reached.\n"\
-                "Continue from the end?"),
-	   i18n("Find") ) == KMessageBox::Yes )
-      {
-        m_first = true;
-	slotSearch();
-      }
-    }
-  }
-  else
-    KMessageBox::information( this, 
-    	i18n( "Search string '%1' not found." ).arg(KStringHandler::csqueeze(getText())),
-	i18n( "Find" ) );
-}
-
-void KHTMLFind::setNewSearch()
-{
-  m_first = true;
-  m_found = false;
-}
-
-#include "khtml_find.moc"
diff --git a/WebCore/src/kdelibs/khtml/khtml_find.h b/WebCore/src/kdelibs/khtml/khtml_find.h
deleted file mode 100644
index 7ea4d34..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_find.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_find_h__
-#define __khtml_find_h__
-
-#include <keditcl.h>
-
-class KHTMLPart;
-
-class KHTMLFind : public KEdFind
-{
-  Q_OBJECT
-public:
-  KHTMLFind( KHTMLPart *part, QWidget *parent, const char *name );
-  virtual ~KHTMLFind();
-
-  KHTMLPart *part() const { return m_part; }
-  void setPart( KHTMLPart *part ) { m_part = part; setNewSearch(); }
-  void setNewSearch();
-
-private slots:
-  void slotDone();
-  void slotSearch();
-
-private:
-  bool m_first;
-  bool m_found;
-  KHTMLPart *m_part;
-};
-
-#endif
diff --git a/WebCore/src/kdelibs/khtml/khtml_pagecache.cpp b/WebCore/src/kdelibs/khtml/khtml_pagecache.cpp
deleted file mode 100644
index fd9caf6..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_pagecache.cpp
+++ /dev/null
@@ -1,304 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Waldo Bastian <bastian at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "khtml_pagecache.h"
-
-#include <kstaticdeleter.h>
-#include <ktempfile.h>
-#include <kstddirs.h>
-
-#include <qintdict.h>
-#include <qtimer.h>
-
-#include <sys/types.h>
-#include <unistd.h>
-#include <assert.h>
-
-// We keep 12 pages in memory.
-#ifndef KHTML_PAGE_CACHE_SIZE
-#define KHTML_PAGE_CACHE_SIZE 12
-#endif
-
-template class QList<KHTMLPageCacheDelivery>;
-
-class KHTMLPageCacheEntry
-{
-  friend class KHTMLPageCache;
-public:
-  KHTMLPageCacheEntry(long id);
-
-  ~KHTMLPageCacheEntry();
-
-  void addData(const QByteArray &data);
-
-  void endData();
-
-  bool isValid()
-   { return m_valid; }
-
-  KHTMLPageCacheDelivery *fetchData(QObject *recvObj, const char *recvSlot);
-private:
-  long m_id;
-  bool m_valid;
-  QValueList<QByteArray> m_data;
-  KTempFile *m_file;
-};
-
-class KHTMLPageCachePrivate
-{
-public:
-  long newId;
-  QIntDict<KHTMLPageCacheEntry> dict;
-  QList<KHTMLPageCacheDelivery> delivery;
-  QList<KHTMLPageCacheEntry> expireQueue;
-  bool deliveryActive;
-};
-
-KHTMLPageCacheEntry::KHTMLPageCacheEntry(long id) : m_id(id), m_valid(false)
-{
-  QString path = locateLocal("data", "khtml/cache");
-  m_file = new KTempFile(path);
-  m_file->unlink();
-}
-
-KHTMLPageCacheEntry::~KHTMLPageCacheEntry()
-{
-  delete m_file;
-}
-
-
-void
-KHTMLPageCacheEntry::addData(const QByteArray &data)
-{
-  if (m_file->status() == 0)
-     m_file->dataStream()->writeRawBytes(data.data(), data.size());
-}
-
-void
-KHTMLPageCacheEntry::endData()
-{
-  m_valid = true;
-  if ( m_file->status() == 0) {
-    m_file->dataStream()->device()->flush();
-    m_file->dataStream()->device()->at(0);
-  }
-}
-
-
-KHTMLPageCacheDelivery *
-KHTMLPageCacheEntry::fetchData(QObject *recvObj, const char *recvSlot)
-{
-  // Duplicate fd so that entry can be safely deleted while delivering the data.
-  int fd = dup(m_file->handle());
-  lseek(fd, 0, SEEK_SET);
-  KHTMLPageCacheDelivery *delivery = new KHTMLPageCacheDelivery(fd);
-  recvObj->connect(delivery, SIGNAL(emitData(const QByteArray&)), recvSlot);
-  delivery->recvObj = recvObj;
-  return delivery;
-}
-
-static KStaticDeleter<KHTMLPageCache> pageCacheDeleter;
-
-KHTMLPageCache *KHTMLPageCache::_self = 0;
-
-KHTMLPageCache *
-KHTMLPageCache::self()
-{
-  if (!_self)
-     _self = pageCacheDeleter.setObject(new KHTMLPageCache);
-  return _self;
-}
-
-KHTMLPageCache::KHTMLPageCache()
-{
-  d = new KHTMLPageCachePrivate;
-  d->newId = 1;
-  d->deliveryActive = false;
-}
-
-KHTMLPageCache::~KHTMLPageCache()
-{
-  d->delivery.setAutoDelete(true);
-  d->dict.setAutoDelete(true);
-  delete d;
-}
-
-long
-KHTMLPageCache::createCacheEntry()
-{
-  KHTMLPageCacheEntry *entry = new KHTMLPageCacheEntry(d->newId);
-  d->dict.insert(d->newId, entry);
-  d->expireQueue.append(entry);
-  if (d->expireQueue.count() > KHTML_PAGE_CACHE_SIZE)
-  {
-     KHTMLPageCacheEntry *entry = d->expireQueue.take(0);
-     d->dict.remove(entry->m_id);
-     delete entry;
-  }
-  return (d->newId++);
-}
-
-void
-KHTMLPageCache::addData(long id, const QByteArray &data)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (entry)
-     entry->addData(data);
-}
-
-void
-KHTMLPageCache::endData(long id)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (entry)
-     entry->endData();
-}
-
-void
-KHTMLPageCache::cancelEntry(long id)
-{
-  KHTMLPageCacheEntry *entry = d->dict.take(id);
-  if (entry)
-  {
-     d->expireQueue.removeRef(entry);
-     delete entry;
-  }
-}
-
-bool
-KHTMLPageCache::isValid(long id)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (entry)
-     return entry->isValid();
-  return false;
-}
-
-void
-KHTMLPageCache::fetchData(long id, QObject *recvObj, const char *recvSlot)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  if (!entry) return;
-
-  // Make this entry the most recent entry.
-  d->expireQueue.removeRef(entry);
-  d->expireQueue.append(entry);
-
-  d->delivery.append( entry->fetchData(recvObj, recvSlot) );
-  if (!d->deliveryActive)
-  {
-     d->deliveryActive = true;
-     QTimer::singleShot(20, this, SLOT(sendData()));
-  }
-}
-
-void
-KHTMLPageCache::cancelFetch(QObject *recvObj)
-{
-  KHTMLPageCacheDelivery *next;
-  for(KHTMLPageCacheDelivery* delivery = d->delivery.first();
-      delivery;
-      delivery = next)
-  {
-      next = d->delivery.next();
-      if (delivery->recvObj == recvObj)
-      {
-         d->delivery.removeRef(delivery);
-         delete delivery;
-      }
-  }
-}
-
-void
-KHTMLPageCache::sendData()
-{
-  if (d->delivery.isEmpty())
-  {
-     d->deliveryActive = false;
-     return;
-  }
-  KHTMLPageCacheDelivery *delivery = d->delivery.take(0);
-  assert(delivery);
-
-  char buf[8192];
-  QByteArray byteArray;
-
-  int n = read(delivery->fd, buf, 8192);
-
-  if ((n < 0) && (errno == EINTR))
-  {
-     // try again later
-     d->delivery.append( delivery );
-  }
-  else if (n <= 0)
-  {
-     // done.
-     delivery->emitData(byteArray); // Empty array
-     delete delivery;
-  }
-  else
-  {
-     byteArray.setRawData(buf, n);
-     delivery->emitData(byteArray);
-     byteArray.resetRawData(buf, n);
-     d->delivery.append( delivery );
-  }
-  QTimer::singleShot(20, this, SLOT(sendData()));
-}
-
-void
-KHTMLPageCache::saveData(long id, QDataStream *str)
-{
-  KHTMLPageCacheEntry *entry = d->dict.find(id);
-  assert(entry);
-
-  int fd = entry->m_file->handle();
-  if ( fd < 0 ) return;
-
-  lseek(fd, 0, SEEK_SET);
-
-  char buf[8192];
-
-  while(true)
-  {
-     int n = read(fd, buf, 8192);
-     if ((n < 0) && (errno == EINTR))
-     {
-        // try again
-        continue;
-     }
-     else if (n <= 0)
-     {
-        // done.
-        break;
-     }
-     else
-     {
-        str->writeRawBytes(buf, n);
-     }
-  }
-}
-
-KHTMLPageCacheDelivery::~KHTMLPageCacheDelivery()
-{
-  close(fd);
-}
-
-#include "khtml_pagecache.moc"
diff --git a/WebCore/src/kdelibs/khtml/khtml_pagecache.h b/WebCore/src/kdelibs/khtml/khtml_pagecache.h
deleted file mode 100644
index c296a2b..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_pagecache.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000  Waldo Bastian <bastian at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_pagecache_h__
-#define __khtml_pagecache_h__
-
-#include <qobject.h>
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qlist.h>
-
-class KHTMLPageCachePrivate;
-
-/**
- * Singleton Object that handles a binary cache on top of
- * the http cache management of kio.
- *
- * A limited number of HTML pages are stored in this cache. This
- * cache is used for the history and operations like "view source".
- * These operations always want to use the original document and 
- * don't want to fetch the data from the network again.
- *
- * It operates completely independent from the kio_http cache.
- */
-class KHTMLPageCache : public QObject
-{
-  Q_OBJECT
-public:
-  /**
-   * static "constructor".
-   * @return returns a pointer to the cache, if it exists.
-   * creates a new cache otherwise.
-   */
-  static KHTMLPageCache *self();
-  ~KHTMLPageCache();
-  
-  /**
-   * Create a new cache entry. 
-   *
-   * @return a cache entry ID is returned.
-   */
-  long createCacheEntry();
-
-  /**
-   * Add @p data to the cache entry with id @p id.
-   */
-  void addData(long id, const QByteArray &data);
-
-  /**
-   * Signal end of data for the cache entry with id @p id.
-   * After calling this the entry is marked valid 
-   */
-  void endData(long id);
-
-  /**
-   * Cancel the entry.
-   */
-  void cancelEntry(long id);
-
-  /**
-   * @return true when the cache entry with id @p is still valid.
-   * and can be accessed for reading.
-   */
-  bool isValid(long id);
-  
-  /**
-   * Fetch data for cache entry @p id and send it to slot @p recvSlot
-   * in the object @p recvObj
-   */
-  void fetchData(long id, QObject *recvObj, const char *recvSlot);
-
-  /**
-   * Cancel sending data to @p recvObj
-   */
-  void cancelFetch(QObject *recvObj);
-
-  /**
-   * Save the data of cache entry @p id to the datastream @p str
-   */
-  void saveData(long id, QDataStream *str);
-
-private slots:
-  void sendData();
-
-private:  
-  KHTMLPageCache();
-
-  static KHTMLPageCache *_self;
-
-  KHTMLPageCachePrivate *d;  
-};
-
-class KHTMLPageCacheDelivery : public QObject
-{
-   friend class KHTMLPageCache;
-Q_OBJECT
-public:
-   KHTMLPageCacheDelivery(int _fd)
-    : fd(_fd) { }
-   ~KHTMLPageCacheDelivery();
-
-signals:
-   void emitData(const QByteArray &data);
-
-public: 
-   QObject *recvObj;
-   int fd;      
-};
-
-
-#endif
diff --git a/WebCore/src/kdelibs/khtml/khtml_part.cpp b/WebCore/src/kdelibs/khtml/khtml_part.cpp
deleted file mode 100644
index 75e795d..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_part.cpp
+++ /dev/null
@@ -1,4301 +0,0 @@
-// -*- c-basic-offset: 2 -*-
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- *                     1999 Lars Knoll <knoll at kde.org>
- *                     1999 Antti Koivisto <koivisto at kde.org>
- *                     2000 Simon Hausmann <hausmann at kde.org>
- *                     2000 Stefan Schimanski <1Stein at gmx.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-//#define SPEED_DEBUG
-#include "khtml_part.h"
-
-#include "khtml_factory.h"
-#include "khtml_run.h"
-#include "khtml_events.h"
-#include "khtml_find.h"
-#include "khtml_ext.h"
-#include "khtml_pagecache.h"
-
-#include "dom/dom_string.h"
-#include "dom/dom_element.h"
-#include "html/html_documentimpl.h"
-#include "html/html_baseimpl.h"
-#include "html/html_miscimpl.h"
-#include "html/html_imageimpl.h"
-#include "html/htmltokenizer.h"
-#include "rendering/render_text.h"
-#include "rendering/render_image.h"
-#include "rendering/render_frames.h"
-#include "misc/htmlhashes.h"
-#include "misc/loader.h"
-#include "xml/dom_textimpl.h"
-#include "xml/dom2_eventsimpl.h"
-#include "css/cssstyleselector.h"
-#include "java/kjavaappletcontext.h"
-using namespace DOM;
-
-#include "khtmlview.h"
-#include "decoder.h"
-#include "ecma/kjs_proxy.h"
-#include "khtml_settings.h"
-
-#include <sys/types.h>
-#include <assert.h>
-#include <unistd.h>
-
-#include <kglobal.h>
-#include <kstddirs.h>
-#include <kio/job.h>
-#include <kparts/historyprovider.h>
-#include <kmimetype.h>
-#include <kdebug.h>
-#include <klocale.h>
-#include <kcharsets.h>
-#include <kmessagebox.h>
-#include <kaction.h>
-#include <kstdaction.h>
-#include <kfiledialog.h>
-#include <ktrader.h>
-#include <kparts/partmanager.h>
-#include <kxmlgui.h>
-#include <kcursor.h>
-#include <kdatastream.h>
-#include <ktempfile.h>
-#include <kglobalsettings.h>
-#include <kurldrag.h>
-
-#include <kssl.h>
-#include <ksslinfodlg.h>
-
-#include <qtextcodec.h>
-
-#include <qstring.h>
-#include <qfile.h>
-#include <qclipboard.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <qmetaobject.h>
-
-namespace khtml
-{
-  struct ChildFrame
-  {
-      enum Type { Frame, IFrame, Object };
-
-      ChildFrame() { m_bCompleted = false; m_frame = 0L; m_bPreloaded = false; m_type = Frame; m_bNotify = false; }
-
-      ~ChildFrame() {  delete (KHTMLRun*) m_run; }
-
-    RenderPart *m_frame;
-    QGuardedPtr<KParts::ReadOnlyPart> m_part;
-    QGuardedPtr<KParts::BrowserExtension> m_extension;
-    QString m_serviceName;
-    QString m_serviceType;
-    QStringList m_services;
-    bool m_bCompleted;
-    QString m_name;
-    KParts::URLArgs m_args;
-    QGuardedPtr<KHTMLRun> m_run;
-    bool m_bPreloaded;
-    KURL m_workingURL;
-    Type m_type;
-    QStringList m_params;
-    bool m_bNotify;
-  };
-
-};
-
-class FrameList : public QValueList<khtml::ChildFrame>
-{
-public:
-    Iterator find( const QString &name );
-};
-
-int kjs_lib_count = 0;
-
-typedef FrameList::ConstIterator ConstFrameIt;
-typedef FrameList::Iterator FrameIt;
-
-class KHTMLPartPrivate
-{
-public:
-  KHTMLPartPrivate(QObject* parent)
-  {
-    m_doc = 0L;
-    m_decoder = 0L;
-    m_jscript = 0L;
-    m_runningScripts = 0;
-    m_kjs_lib = 0;
-    m_job = 0L;
-    m_bComplete = true;
-    m_bLoadEventEmitted = true;
-    m_bParsing = false;
-    m_bReloading = false;
-    m_manager = 0L;
-    m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
-    m_bClearing = false;
-    m_bCleared = false;
-    m_fontBase = 0;
-    m_bDnd = true;
-    m_startOffset = m_endOffset = 0;
-    m_startBeforeEnd = true;
-    m_linkCursor = KCursor::handCursor();
-    m_loadedImages = 0;
-    m_totalImageCount = 0;
-    m_haveEncoding = false;
-    m_activeFrame = 0L;
-    m_findDialog = 0;
-    m_ssl_in_use = false;
-    m_javaContext = 0;
-    m_cacheId = 0;
-    m_frameNameId = 1;
-
-    m_bJScriptForce = false;
-    m_bJScriptOverride = false;
-    m_bJavaForce = false;
-    m_bJavaOverride = false;
-    m_bPluginsForce = false;
-    m_bPluginsOverride = false;
-    m_onlyLocalReferences = false;
-
-    m_metaRefreshEnabled = true;
-    m_bHTTPRefresh = false;
-
-    m_bFirstData = true;
-    m_submitForm = 0;
-    m_delayRedirect = 0;
-
-    // inherit security settings from parent
-    if(parent && parent->inherits("KHTMLPart"))
-    {
-        KHTMLPart* part = static_cast<KHTMLPart*>(parent);
-        if(part->d)
-        {
-            m_bJScriptForce = part->d->m_bJScriptForce;
-            m_bJScriptOverride = part->d->m_bJScriptOverride;
-            m_bJavaForce = part->d->m_bJavaForce;
-            m_bJavaOverride = part->d->m_bJavaOverride;
-            m_bPluginsForce = part->d->m_bPluginsForce;
-            m_bPluginsOverride = part->d->m_bPluginsOverride;
-            // Same for SSL settings
-            m_ssl_in_use = part->d->m_ssl_in_use;
-            m_onlyLocalReferences = part->d->m_onlyLocalReferences;
-        }
-    }
-
-    m_focusNodeNumber = 0;
-    m_focusNodeRestored = false;
-    m_opener = 0;
-    m_openedByJS = false;
-  }
-  ~KHTMLPartPrivate()
-  {
-    delete m_extension;
-    delete m_settings;
-    delete m_jscript;
-    if ( m_kjs_lib && !--kjs_lib_count )
-      delete m_kjs_lib;
-    delete m_javaContext;
-  }
-
-  FrameList m_frames;
-  QValueList<khtml::ChildFrame> m_objects;
-
-  QGuardedPtr<KHTMLView> m_view;
-  KHTMLPartBrowserExtension *m_extension;
-  KHTMLPartBrowserHostExtension *m_hostExtension;
-  DOM::DocumentImpl *m_doc;
-  khtml::Decoder *m_decoder;
-  QString m_encoding;
-  QFont::CharSet m_charset;
-  long m_cacheId;
-  QString scheduledScript;
-  DOM::Node scheduledScriptNode;
-
-  KJSProxy *m_jscript;
-  KLibrary *m_kjs_lib;
-  int m_runningScripts;
-  bool m_bJScriptEnabled :1;
-  bool m_bJavaEnabled :1;
-  bool m_bPluginsEnabled :1;
-  bool m_bJScriptForce :1;
-  bool m_bJScriptOverride :1;
-  bool m_bJavaForce :1;
-  bool m_bJavaOverride :1;
-  bool m_bPluginsForce :1;
-  bool m_metaRefreshEnabled :1;
-  bool m_bPluginsOverride :1;
-  int m_frameNameId;
-  KJavaAppletContext *m_javaContext;
-
-  KHTMLSettings *m_settings;
-
-  KIO::TransferJob * m_job;
-
-  QString m_kjsStatusBarText;
-  QString m_kjsDefaultStatusBarText;
-
-  // QStrings for SSL metadata
-  // Note: When adding new variables don't forget to update ::saveState()/::restoreState()!
-  bool m_ssl_in_use;
-  QString m_ssl_peer_cert_subject,
-          m_ssl_peer_cert_issuer,
-          m_ssl_peer_ip,
-          m_ssl_cipher,
-          m_ssl_cipher_desc,
-          m_ssl_cipher_version,
-          m_ssl_cipher_used_bits,
-          m_ssl_cipher_bits,
-          m_ssl_cert_state,
-          m_ssl_good_from,
-          m_ssl_good_until;
-
-  bool m_bComplete:1;
-  bool m_bLoadEventEmitted:1;
-  bool m_bParsing:1;
-  bool m_bReloading:1;
-  bool m_haveEncoding:1;
-  bool m_haveCharset:1;
-  bool m_bHTTPRefresh:1;
-  bool m_onlyLocalReferences :1;
-
-  KURL m_workingURL;
-  KURL m_baseURL;
-  QString m_baseTarget;
-
-  QTimer m_redirectionTimer;
-#ifdef SPEED_DEBUG
-  QTime m_parsetime;
-#endif
-  int m_delayRedirect;
-  QString m_redirectURL;
-
-  KAction *m_paViewDocument;
-  KAction *m_paViewFrame;
-  KAction *m_paSaveBackground;
-  KAction *m_paSaveDocument;
-  KAction *m_paSaveFrame;
-  KAction *m_paSecurity;
-  KSelectAction *m_paSetEncoding;
-  KHTMLFontSizeAction *m_paIncFontSizes;
-  KHTMLFontSizeAction *m_paDecFontSizes;
-  KAction *m_paLoadImages;
-  KAction *m_paFind;
-  KAction *m_paPrintFrame;
-  KAction *m_paSelectAll;
-  KAction *m_paDebugDOMTree;
-  KAction *m_paDebugRenderTree;
-
-  KParts::PartManager *m_manager;
-
-  QString m_popupMenuXML;
-
-  int m_fontBase;
-
-  int m_findPos;
-  DOM::NodeImpl *m_findNode;
-
-  QString m_strSelectedURL;
-  QString m_referrer;
-
-  struct SubmitForm
-  {
-    const char *submitAction;
-    QString submitUrl;
-    QByteArray submitFormData;
-    QString target;
-    QString submitContentType;
-    QString submitBoundary;
-  };
-
-  SubmitForm *m_submitForm;
-
-  bool m_bMousePressed;
-  DOM::Node m_mousePressNode; //node under the mouse when the mouse was pressed (set in the mouse handler)
-
-  DOM::Node m_selectionStart;
-  long m_startOffset;
-  DOM::Node m_selectionEnd;
-  long m_endOffset;
-  QString m_overURL;
-  bool m_startBeforeEnd:1;
-  bool m_bDnd:1;
-  bool m_bFirstData:1;
-  bool m_bClearing:1;
-  bool m_bCleared:1;
-
-  bool m_focusNodeRestored:1;
-  int m_focusNodeNumber;
-
-  QPoint m_dragStartPos;
-#ifdef KHTML_NO_SELECTION
-  QPoint m_dragLastPos;
-#endif
-
-  QCursor m_linkCursor;
-  QTimer m_scrollTimer;
-
-  unsigned long m_loadedImages;
-  unsigned long m_totalImageCount;
-
-  KHTMLFind *m_findDialog;
-
-  struct findState
-  {
-    findState()
-    { caseSensitive = false; direction = false; }
-    QString text;
-    bool caseSensitive;
-    bool direction;
-  };
-
-  findState m_lastFindState;
-
-  //QGuardedPtr<KParts::Part> m_activeFrame;
-  KParts::Part * m_activeFrame;
-  QGuardedPtr<KHTMLPart> m_opener;
-  bool m_openedByJS;
-};
-
-namespace khtml {
-    class PartStyleSheetLoader : public CachedObjectClient
-    {
-    public:
-        PartStyleSheetLoader(KHTMLPart *part, DOM::DOMString url, DocLoader* dl)
-        {
-            m_part = part;
-            m_cachedSheet = dl->requestStyleSheet( url, part->baseURL().url(), QString::null );
-            if (m_cachedSheet)
-		m_cachedSheet->ref( this );
-        }
-        virtual ~PartStyleSheetLoader()
-        {
-            if ( m_cachedSheet ) m_cachedSheet->deref(this);
-        }
-        virtual void setStyleSheet(const DOM::DOMString&, const DOM::DOMString &sheet)
-        {
-          if ( m_part )
-            m_part->setUserStyleSheet( sheet.string() );
-
-            delete this;
-        }
-        QGuardedPtr<KHTMLPart> m_part;
-        khtml::CachedCSSStyleSheet *m_cachedSheet;
-    };
-};
-
-
-FrameList::Iterator FrameList::find( const QString &name )
-{
-    Iterator it = begin();
-    Iterator e = end();
-
-    for (; it!=e; ++it )
-        if ( (*it).m_name==name )
-            break;
-
-    return it;
-}
-
-
-static QString splitUrlTarget(const QString &url, QString *target=0)
-{
-   QString result = url;
-   if(url.left(7) == "target:")
-   {
-      KURL u(url);
-      result = u.ref();
-      if (target)
-         *target = u.host();
-   }
-   return result;
-}
-
-KHTMLPart::KHTMLPart( QWidget *parentWidget, const char *widgetname, QObject *parent, const char *name,
-                      GUIProfile prof )
-: KParts::ReadOnlyPart( parent, name )
-{
-    d = 0;
-    KHTMLFactory::registerPart( this );
-    setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI ); // doesn't work inside init() for derived classes
-    // Why?? :-} (Simon)
-    init( new KHTMLView( this, parentWidget, widgetname ), prof );
-}
-
-KHTMLPart::KHTMLPart( KHTMLView *view, QObject *parent, const char *name, GUIProfile prof )
-: KParts::ReadOnlyPart( parent, name )
-{
-    d = 0;
-    KHTMLFactory::registerPart( this );
-    setInstance( KHTMLFactory::instance(), prof == BrowserViewGUI );
-    assert( view );
-    init( view, prof );
-}
-
-void KHTMLPart::init( KHTMLView *view, GUIProfile prof )
-{
-  if ( prof == DefaultGUI )
-    setXMLFile( "khtml.rc" );
-  else if ( prof == BrowserViewGUI )
-    setXMLFile( "khtml_browser.rc" );
-
-  d = new KHTMLPartPrivate(parent());
-  kdDebug(6050) << "KHTMLPart::init this=" << this << " d=" << d << endl;
-
-  d->m_view = view;
-  setWidget( d->m_view );
-
-  d->m_extension = new KHTMLPartBrowserExtension( this );
-  d->m_hostExtension = new KHTMLPartBrowserHostExtension( this );
-
-  d->m_paLoadImages = 0;
-  d->m_bMousePressed = false;
-  d->m_paViewDocument = new KAction( i18n( "View Document Source" ), 0, this, SLOT( slotViewDocumentSource() ), actionCollection(), "viewDocumentSource" );
-  d->m_paViewFrame = new KAction( i18n( "View Frame Source" ), 0, this, SLOT( slotViewFrameSource() ), actionCollection(), "viewFrameSource" );
-  d->m_paSaveBackground = new KAction( i18n( "Save &Background Image As..." ), 0, this, SLOT( slotSaveBackground() ), actionCollection(), "saveBackground" );
-  d->m_paSaveDocument = new KAction( i18n( "&Save As..." ), CTRL+Key_S, this, SLOT( slotSaveDocument() ), actionCollection(), "saveDocument" );
-  d->m_paSaveFrame = new KAction( i18n( "Save &Frame As..." ), 0, this, SLOT( slotSaveFrame() ), actionCollection(), "saveFrame" );
-  d->m_paSecurity = new KAction( i18n( "Security..." ), "unlock", 0, this, SLOT( slotSecurity() ), actionCollection(), "security" );
-  d->m_paDebugRenderTree = new KAction( "print rendering tree to stdout", 0, this, SLOT( slotDebugRenderTree() ), actionCollection(), "debugRenderTree" );
-  d->m_paDebugDOMTree = new KAction( "print DOM tree to stdout", 0, this, SLOT( slotDebugDOMTree() ), actionCollection(), "debugDOMTree" );
-
-  QString foo1 = i18n("Show Images");
-  QString foo2 = i18n("Show Animated Images");
-  QString foo3 = i18n("Stop Animated Images");
-
-  d->m_paSetEncoding = new KSelectAction( i18n( "Set &Encoding" ), 0, this, SLOT( slotSetEncoding() ), actionCollection(), "setEncoding" );
-  QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
-  encodings.prepend( i18n( "Auto" ) );
-  d->m_paSetEncoding->setItems( encodings );
-  d->m_paSetEncoding->setCurrentItem(0);
-
-  d->m_paIncFontSizes = new KHTMLFontSizeAction( this, true, i18n( "Increase Font Sizes" ), "viewmag+", this, SLOT( slotIncFontSizes() ), actionCollection(), "incFontSizes" );
-  d->m_paDecFontSizes = new KHTMLFontSizeAction( this, false, i18n( "Decrease Font Sizes" ), "viewmag-", this, SLOT( slotDecFontSizes() ), actionCollection(), "decFontSizes" );
-  d->m_paDecFontSizes->setEnabled( false );
-
-  d->m_paFind = KStdAction::find( this, SLOT( slotFind() ), actionCollection(), "find" );
-
-  d->m_paPrintFrame = new KAction( i18n( "Print Frame" ), "frameprint", 0, this, SLOT( slotPrintFrame() ), actionCollection(), "printFrame" );
-
-  d->m_paSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), actionCollection(), "selectAll" );
-
-  // set the default java(script) flags according to the current host.
-  d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled();
-  d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled();
-  d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled();
-
-  connect( this, SIGNAL( completed() ),
-           this, SLOT( updateActions() ) );
-  connect( this, SIGNAL( completed( bool ) ),
-           this, SLOT( updateActions() ) );
-  connect( this, SIGNAL( started( KIO::Job * ) ),
-           this, SLOT( updateActions() ) );
-
-  d->m_popupMenuXML = KXMLGUIFactory::readConfigFile( locate( "data", "khtml/khtml_popupmenu.rc", KHTMLFactory::instance() ) );
-
-  connect( khtml::Cache::loader(), SIGNAL( requestDone( const DOM::DOMString &, khtml::CachedObject *) ),
-           this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject *) ) );
-  connect( khtml::Cache::loader(), SIGNAL( requestFailed( const DOM::DOMString &, khtml::CachedObject *) ),
-           this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject *) ) );
-
-  findTextBegin(); //reset find variables
-
-  connect( &d->m_redirectionTimer, SIGNAL( timeout() ),
-           this, SLOT( slotRedirect() ) );
-
-  d->m_view->viewport()->installEventFilter( this );
-}
-
-KHTMLPart::~KHTMLPart()
-{
-  if ( d->m_findDialog )
-      disconnect( d->m_findDialog, SIGNAL( destroyed() ),
-                  this, SLOT( slotFindDialogDestroyed() ) );
-
-  if ( d->m_manager )
-  {
-    d->m_manager->setActivePart( 0 );
-    // Shouldn't we delete d->m_manager here ? (David)
-    // No need to, I would say. We specify "this" as parent qobject
-    // in ::partManager() (Simon)
-  }
-
-  stopAutoScroll();
-  d->m_redirectionTimer.stop();
-
-  if ( d->m_job )
-    d->m_job->kill();
-
-  khtml::Cache::loader()->cancelRequests( m_url.url() );
-
-  disconnect( khtml::Cache::loader(), SIGNAL( requestDone( const DOM::DOMString &, khtml::CachedObject * ) ),
-              this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject * ) ) );
-  disconnect( khtml::Cache::loader(), SIGNAL( requestFailed( const DOM::DOMString &, khtml::CachedObject * ) ),
-              this, SLOT( slotLoaderRequestDone( const DOM::DOMString &, khtml::CachedObject * ) ) );
-
-  clear();
-
-  if ( d->m_view )
-  {
-    d->m_view->hide();
-    d->m_view->viewport()->hide();
-    d->m_view->m_part = 0;
-  }
-
-  delete d; d = 0;
-  KHTMLFactory::deregisterPart( this );
-}
-
-bool KHTMLPart::restoreURL( const KURL &url )
-{
-  // Save charset setting (it was already restored!)
-  QFont::CharSet charset = d->m_charset;
-
-  kdDebug( 6050 ) << "KHTMLPart::restoreURL " << url.url() << endl;
-
-  d->m_redirectionTimer.stop();
-
-  kdDebug( 6050 ) << "closing old URL" << endl;
-  closeURL();
-
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-  d->m_workingURL = url;
-
-  // set the java(script) flags according to the current host.
-  d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host());
-  d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host());
-  d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host());
-  d->m_haveCharset = true;
-  d->m_charset = charset;
-  d->m_settings->setCharset( d->m_charset );
-
-  m_url = url;
-
-  KHTMLPageCache::self()->fetchData( d->m_cacheId, this, SLOT(slotRestoreData(const QByteArray &)));
-
-  emit started( 0L );
-
-  return true;
-}
-
-
-bool KHTMLPart::openURL( const KURL &url )
-{
-  kdDebug( 6050 ) << "KHTMLPart::openURL " << url.url() << endl;
-
-  d->m_redirectionTimer.stop();
-#ifdef SPEED_DEBUG
-  d->m_parsetime.start();
-#endif
-
-  KParts::URLArgs args( d->m_extension->urlArgs() );
-
-  // in case we have a) no frameset, b) the url is identical with the currently
-  // displayed one (except for the htmlref!) , c) the url request is not a POST
-  // operation and d) the caller did not request to reload the page we try to
-  // be smart and instead of reloading the whole document we just jump to the
-  // request html anchor
-  if ( d->m_frames.count() == 0 && d->m_doc && d->m_bComplete &&
-       urlcmp( url.url(), m_url.url(), true, true ) && !args.doPost() && !args.reload )
-  {
-    kdDebug( 6050 ) << "KHTMLPart::openURL now m_url = " << url.url() << endl;
-    m_url = url;
-    emit started( 0L );
-
-    if ( !url.encodedHtmlRef().isEmpty() )
-      gotoAnchor( url.encodedHtmlRef() );
-    else
-      d->m_view->setContentsPos( 0, 0 );
-
-    d->m_bComplete = true;
-    d->m_bParsing = false;
-
-    emitLoadEvent();
-
-    kdDebug( 6050 ) << "completed..." << endl;
-    if ( !d->m_redirectURL.isEmpty() )
-    {
-       emit completed(true);
-    }
-    else emit completed();
-
-    return true;
-  }
-
-  kdDebug( 6050 ) << "closing old URL" << endl;
-  closeURL();
-
-  args.metaData().insert("main_frame_request", parentPart() == 0 ? "TRUE" : "FALSE" );
-  args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE" : "FALSE" );
-  args.metaData().insert("ssl_activate_warnings", "TRUE" );
-  d->m_bReloading = args.reload;
-
-  if ( args.doPost() && (url.protocol().startsWith("http")) )
-  {
-      d->m_job = KIO::http_post( url, args.postData, false );
-      d->m_job->addMetaData("content-type", args.contentType() );
-  }
-  else
-      d->m_job = KIO::get( url, args.reload, false );
-
-  d->m_job->addMetaData(args.metaData());
-
-  connect( d->m_job, SIGNAL( result( KIO::Job * ) ),
-           SLOT( slotFinished( KIO::Job * ) ) );
-  connect( d->m_job, SIGNAL( data( KIO::Job*, const QByteArray &)),
-           SLOT( slotData( KIO::Job*, const QByteArray &)));
-
-  connect( d->m_job, SIGNAL(redirection(KIO::Job*, const KURL&) ),
-           SLOT( slotRedirection(KIO::Job*,const KURL&) ) );
-
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-  d->m_workingURL = url;
-
-  // delete old status bar msg's from kjs (if it _was_ activated on last URL)
-  if( d->m_bJScriptEnabled )
-  {
-     d->m_kjsStatusBarText = QString::null;
-     d->m_kjsDefaultStatusBarText = QString::null;
-  }
-
-  // set the javascript flags according to the current url
-  d->m_bJScriptEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaScriptEnabled(url.host());
-  d->m_bJavaEnabled = KHTMLFactory::defaultHTMLSettings()->isJavaEnabled(url.host());
-  d->m_bPluginsEnabled = KHTMLFactory::defaultHTMLSettings()->isPluginsEnabled(url.host());
-  d->m_settings->resetCharset();
-  d->m_haveCharset = false;
-  d->m_charset = d->m_settings->charset();
-
-  // initializing m_url to the new url breaks relative links when opening such a link after this call and _before_ begin() is called (when the first
-  // data arrives) (Simon)
-  // That has been fixed by calling setBaseURL() in begin(). (Waldo)
-  m_url = url;
-  if(m_url.protocol().startsWith( "http" ) && !m_url.host().isEmpty() &&
-     m_url.path().isEmpty())
-    m_url.setPath("/");
-
-  kdDebug( 6050 ) << "KHTMLPart::openURL now (before started) m_url = " << m_url.url() << endl;
-
-  emit started( d->m_job );
-
-  return true;
-}
-
-bool KHTMLPart::closeURL()
-{
-  if ( d->m_job )
-  {
-    KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
-    d->m_job->kill();
-    d->m_job = 0;
-  }
-
-  d->m_bComplete = true; // to avoid emitting completed() in slotFinishedParsing() (David)
-  d->m_bLoadEventEmitted = true; // don't want that one either
-  d->m_bReloading = false;
-
-  KHTMLPageCache::self()->cancelFetch(this);
-  if ( d->m_bParsing )
-  {
-    kdDebug( 6050 ) << " was still parsing... calling end " << endl;
-    slotFinishedParsing();
-    d->m_bParsing = false;
-  }
-
-  if ( !d->m_workingURL.isEmpty() )
-  {
-    // Aborted before starting to render
-    kdDebug( 6050 ) << "Aborted before starting to render, reverting location bar to " << m_url.prettyURL() << endl;
-    emit d->m_extension->setLocationBarURL( m_url.prettyURL() );
-  }
-
-  d->m_workingURL = KURL();
-
-  khtml::Cache::loader()->cancelRequests( m_url.url() );
-
-  // Stop any started redirections as well!! (DA)
-  if ( d && d->m_redirectionTimer.isActive() )
-    d->m_redirectionTimer.stop();
-
-  // null node activated.
-  emit nodeActivated(Node());
-
-  return true;
-}
-
-DOM::HTMLDocument KHTMLPart::htmlDocument() const
-{
-  if (d->m_doc && d->m_doc->isHTMLDocument())
-    return static_cast<HTMLDocumentImpl*>(d->m_doc);
-  else
-    return static_cast<HTMLDocumentImpl*>(0);
-}
-
-DOM::Document KHTMLPart::document() const
-{
-    return d->m_doc;
-}
-
-
-KParts::BrowserExtension *KHTMLPart::browserExtension() const
-{
-  return d->m_extension;
-}
-
-KHTMLView *KHTMLPart::view() const
-{
-  return d->m_view;
-}
-
-void KHTMLPart::enableJScript( bool enable )
-{
-    setJScriptEnabled( enable );
-}
-
-void KHTMLPart::setJScriptEnabled( bool enable )
-{
-  d->m_bJScriptForce = enable;
-  d->m_bJScriptOverride = true;
-}
-
-bool KHTMLPart::jScriptEnabled() const
-{
-  if ( d->m_bJScriptOverride )
-      return d->m_bJScriptForce;
-  return d->m_bJScriptEnabled;
-}
-
-void KHTMLPart::enableMetaRefresh( bool enable )
-{
-  d->m_metaRefreshEnabled = enable;
-}
-
-bool KHTMLPart::metaRefreshEnabled() const
-{
-  return d->m_metaRefreshEnabled;
-}
-
-KJSProxy *KHTMLPart::jScript()
-{
-  if ( d->m_bJScriptOverride && !d->m_bJScriptForce || !d->m_bJScriptOverride && !d->m_bJScriptEnabled)
-      return 0;
-
-  if ( !d->m_jscript )
-  {
-    KLibrary *lib = KLibLoader::self()->library("kjs_html");
-    if ( !lib )
-      return 0;
-    // look for plain C init function
-    void *sym = lib->symbol("kjs_html_init");
-    if ( !sym ) {
-      delete lib;
-      return 0;
-    }
-    typedef KJSProxy* (*initFunction)(KHTMLPart *);
-    initFunction initSym = (initFunction) sym;
-    d->m_jscript = (*initSym)(this);
-    d->m_kjs_lib = lib;
-    kjs_lib_count++;
-  }
-
-  return d->m_jscript;
-}
-
-QVariant KHTMLPart::executeScript( const QString &script )
-{
-    return executeScript( DOM::Node(), script );
-}
-
-QVariant KHTMLPart::executeScript( const DOM::Node &n, const QString &script )
-{
-  //kdDebug(6050) << "KHTMLPart::executeScript n=" << n.nodeName().string().latin1() << "(" << n.nodeType() << ") " << script << endl;
-  KJSProxy *proxy = jScript();
-
-  if (!proxy)
-    return QVariant();
-  d->m_runningScripts++;
-  QVariant ret = proxy->evaluate( script.unicode(), script.length(), n );
-  d->m_runningScripts--;
-  if ( d->m_submitForm )
-      submitFormAgain();
-  if ( d->m_doc )
-    d->m_doc->updateRendering();
-
-  //kdDebug(6050) << "KHTMLPart::executeScript - done" << endl;
-  return ret;
-}
-
-bool KHTMLPart::scheduleScript(const DOM::Node &n, const QString& script)
-{
-    //kdDebug(6050) << "KHTMLPart::scheduleScript "<< script << endl;
-
-    d->scheduledScript = script;
-    d->scheduledScriptNode = n;
-
-    return true;
-}
-
-QVariant KHTMLPart::executeScheduledScript()
-{
-  if( d->scheduledScript.isEmpty() )
-    return QVariant();
-
-  //kdDebug(6050) << "executing delayed " << d->scheduledScript << endl;
-
-  QVariant ret = executeScript( d->scheduledScriptNode, d->scheduledScript );
-  d->scheduledScript = QString();
-  d->scheduledScriptNode = DOM::Node();
-
-  return ret;
-}
-
-
-void KHTMLPart::enableJava( bool enable )
-{
-  setJavaEnabled( enable );
-}
-
-void KHTMLPart::setJavaEnabled( bool enable )
-{
-  d->m_bJavaForce = enable;
-  d->m_bJavaOverride = true;
-}
-
-bool KHTMLPart::javaEnabled() const
-{
-  if( d->m_bJavaOverride )
-      return d->m_bJavaForce;
-  return d->m_bJavaEnabled;
-}
-
-KJavaAppletContext *KHTMLPart::javaContext()
-{
-  return d->m_javaContext;
-}
-
-KJavaAppletContext *KHTMLPart::createJavaContext()
-{
-  if ( !d->m_javaContext ) {
-      d->m_javaContext = new KJavaAppletContext();
-      connect( d->m_javaContext, SIGNAL(showStatus(const QString&)),
-               this, SIGNAL(setStatusBarText(const QString&)) );
-      connect( d->m_javaContext, SIGNAL(showDocument(const QString&, const QString&)),
-               this, SLOT(slotShowDocument(const QString&, const QString&)) );
-  }
-
-  return d->m_javaContext;
-}
-
-void KHTMLPart::enablePlugins( bool enable )
-{
-    setPluginsEnabled( enable );
-}
-
-void KHTMLPart::setPluginsEnabled( bool enable )
-{
-  d->m_bPluginsForce = enable;
-  d->m_bPluginsOverride = true;
-}
-
-bool KHTMLPart::pluginsEnabled() const
-{
-  if ( d->m_bPluginsOverride )
-      return d->m_bPluginsForce;
-  return d->m_bPluginsEnabled;
-}
-
-void KHTMLPart::slotShowDocument( const QString &url, const QString &target )
-{
-  // this is mostly copied from KHTMLPart::slotChildURLRequest. The better approach
-  // would be to put those functions into a single one.
-  khtml::ChildFrame *child = 0;
-  KParts::URLArgs args;
-  args.frameName = target;
-
-  QString frameName = args.frameName.lower();
-  if ( !frameName.isEmpty() )
-  {
-    if ( frameName == QString::fromLatin1( "_top" ) )
-    {
-      emit d->m_extension->openURLRequest( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_blank" ) )
-    {
-      emit d->m_extension->createNewWindow( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_parent" ) )
-    {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-
-      emit d->m_extension->openURLRequest( url, newArgs );
-      return;
-    }
-    else if ( frameName != QString::fromLatin1( "_self" ) )
-    {
-      khtml::ChildFrame *_frame = recursiveFrameRequest( url, args );
-
-      if ( !_frame )
-      {
-        emit d->m_extension->openURLRequest( url, args );
-        return;
-      }
-
-      child = _frame;
-    }
-  }
-
-  // TODO: handle child target correctly! currently the script are always executed fur the parent
-  if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
-      executeScript( url.right( url.length() - 11) );
-      return;
-  }
-
-  if ( child ) {
-      requestObject( child, KURL(url), args );
-  }  else if ( frameName==QString::fromLatin1("_self") ) // this is for embedded objects (via <object>) which want to replace the current document
-  {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-      emit d->m_extension->openURLRequest( KURL(url), newArgs );
-  }
-}
-
-void KHTMLPart::slotDebugDOMTree()
-{
-  if ( d->m_doc )
-    d->m_doc->printTree();
-}
-
-void KHTMLPart::slotDebugRenderTree()
-{
-  if ( d->m_doc )
-    d->m_doc->renderer()->printTree();
-}
-
-void KHTMLPart::autoloadImages( bool enable )
-{
-  setAutoloadImages( enable );
-}
-
-void KHTMLPart::setAutoloadImages( bool enable )
-{
-  if ( d->m_doc && d->m_doc->docLoader()->autoloadImages() == enable )
-    return;
-
-  if ( d->m_doc )
-    d->m_doc->docLoader()->setAutoloadImages( enable );
-
-  unplugActionList( "loadImages" );
-
-  if ( enable ) {
-    delete d->m_paLoadImages;
-    d->m_paLoadImages = 0;
-  }
-  else if ( !d->m_paLoadImages )
-    d->m_paLoadImages = new KAction( i18n( "Display Images on Page" ), "images_display", 0, this, SLOT( slotLoadImages() ), actionCollection(), "loadImages" );
-
-  if ( d->m_paLoadImages ) {
-    QList<KAction> lst;
-    lst.append( d->m_paLoadImages );
-    plugActionList( "loadImages", lst );
-  }
-}
-
-bool KHTMLPart::autoloadImages() const
-{
-  if ( d->m_doc )
-    return d->m_doc->docLoader()->autoloadImages();
-
-  return true;
-}
-
-void KHTMLPart::clear()
-{
-    kdDebug( 6090 ) << "KHTMLPart::clear() this = " << this << endl;
-  if ( d->m_bCleared )
-    return;
-  d->m_bCleared = true;
-
-  d->m_bClearing = true;
-
-  {
-    ConstFrameIt it = d->m_frames.begin();
-    ConstFrameIt end = d->m_frames.end();
-    for(; it != end; ++it )
-    {
-      // Stop HTMLRun jobs for frames
-      if ( (*it).m_run )
-        delete (*it).m_run;
-    }
-  }
-
-  {
-    QValueList<khtml::ChildFrame>::ConstIterator it = d->m_objects.begin();
-    QValueList<khtml::ChildFrame>::ConstIterator end = d->m_objects.end();
-    for(; it != end; ++it )
-    {
-      // Stop HTMLRun jobs for objects
-      if ( (*it).m_run )
-        delete (*it).m_run;
-    }
-  }
-
-
-  findTextBegin(); // resets d->m_findNode and d->m_findPos
-
-  d->m_mousePressNode = DOM::Node();
-
-
-  if ( d->m_doc )
-  {
-    kdDebug( 6090 ) << "KHTMLPart::clear(): dereferencing the document" << endl;
-    d->m_doc->detach();
-    kdDebug( 6090 ) << "KHTMLPart::clear(): dereferencing done.." << endl;
-  }
-
-  // Moving past doc so that onUnload works.
-  if ( d->m_jscript )
-    d->m_jscript->clear();
-
-  if ( d->m_view )
-    d->m_view->clear();
-
-  // do not dereference the document before the jscript and view are cleared, as some destructors
-  // might still try to access the document.
-  if ( d->m_doc )
-    d->m_doc->deref();
-  d->m_doc = 0;
-
-  delete d->m_decoder;
-
-  d->m_decoder = 0;
-
-  {
-    ConstFrameIt it = d->m_frames.begin();
-    ConstFrameIt end = d->m_frames.end();
-    for(; it != end; ++it )
-    {
-      if ( (*it).m_part )
-      {
-        partManager()->removePart( (*it).m_part );
-        delete (KParts::ReadOnlyPart *)(*it).m_part;
-      }
-    }
-  }
-
-  d->m_frames.clear();
-  d->m_objects.clear();
-
-  delete d->m_javaContext;
-  d->m_javaContext = 0;
-
-  d->m_baseURL = KURL();
-  d->m_baseTarget = QString::null;
-  d->m_delayRedirect = 0;
-  d->m_redirectURL = QString::null;
-  d->m_bHTTPRefresh = false;
-  d->m_bClearing = false;
-  d->m_frameNameId = 1;
-  d->m_bFirstData = true;
-
-  d->m_bMousePressed = false;
-
-  d->m_selectionStart = DOM::Node();
-  d->m_selectionEnd = DOM::Node();
-  d->m_startOffset = 0;
-  d->m_endOffset = 0;
-
-  d->m_totalImageCount = 0;
-  d->m_loadedImages = 0;
-
-  if ( !d->m_haveEncoding )
-    d->m_encoding = QString::null;
-}
-
-bool KHTMLPart::openFile()
-{
-  return true;
-}
-
-DOM::HTMLDocumentImpl *KHTMLPart::docImpl() const
-{
-    if ( d && d->m_doc && d->m_doc->isHTMLDocument() )
-        return static_cast<HTMLDocumentImpl*>(d->m_doc);
-    return 0;
-}
-
-DOM::DocumentImpl *KHTMLPart::xmlDocImpl() const
-{
-    if ( d )
-        return d->m_doc;
-    return 0;
-}
-
-/*bool KHTMLPart::isSSLInUse() const
-{
-  return d->m_ssl_in_use;
-}*/
-
-void KHTMLPart::slotData( KIO::Job* kio_job, const QByteArray &data )
-{
-  assert ( d->m_job == kio_job );
-
-    //kdDebug( 6050 ) << "slotData: " << data.size() << endl;
-  // The first data ?
-  if ( !d->m_workingURL.isEmpty() )
-  {
-      //kdDebug( 6050 ) << "begin!" << endl;
-    d->m_bParsing = true;
-
-    begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
-
-    d->m_doc->docLoader()->setReloading(d->m_bReloading);
-    d->m_workingURL = KURL();
-
-    d->m_cacheId = KHTMLPageCache::self()->createCacheEntry();
-
-    // When the first data arrives, the metadata has just been made available
-    d->m_ssl_in_use = (d->m_job->queryMetaData("ssl_in_use") == "TRUE");
-    kdDebug(6050) << "SSL in use? " << d->m_job->queryMetaData("ssl_in_use") << endl;
-    d->m_paSecurity->setIcon( d->m_ssl_in_use ? "lock" : "unlock" );
-    kdDebug(6050) << "setIcon " << ( d->m_ssl_in_use ? "lock" : "unlock" ) << " done." << endl;
-
-    // Shouldn't all of this be done only if ssl_in_use == true ? (DF)
-
-    d->m_ssl_peer_cert_subject = d->m_job->queryMetaData("ssl_peer_cert_subject");
-    d->m_ssl_peer_cert_issuer = d->m_job->queryMetaData("ssl_peer_cert_issuer");
-    d->m_ssl_peer_ip = d->m_job->queryMetaData("ssl_peer_ip");
-    d->m_ssl_cipher = d->m_job->queryMetaData("ssl_cipher");
-    d->m_ssl_cipher_desc = d->m_job->queryMetaData("ssl_cipher_desc");
-    d->m_ssl_cipher_version = d->m_job->queryMetaData("ssl_cipher_version");
-    d->m_ssl_cipher_used_bits = d->m_job->queryMetaData("ssl_cipher_used_bits");
-    d->m_ssl_cipher_bits = d->m_job->queryMetaData("ssl_cipher_bits");
-    d->m_ssl_good_from = d->m_job->queryMetaData("ssl_good_from");
-    d->m_ssl_good_until = d->m_job->queryMetaData("ssl_good_until");
-    d->m_ssl_cert_state = d->m_job->queryMetaData("ssl_cert_state");
-
-    // Check for charset meta-data
-    QString qData = d->m_job->queryMetaData("charset");
-    if ( !qData.isEmpty() && !d->m_haveEncoding ) // only use information if the user didn't override the settings
-    {
-       d->m_charset = KGlobal::charsets()->charsetForEncoding(qData);
-       d->m_settings->setCharset( d->m_charset );
-       d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding(qData, true) );
-       d->m_haveCharset = true;
-       d->m_encoding = qData;
-    }
-
-    // Support for http-refresh
-    qData = d->m_job->queryMetaData("http-refresh");
-    if( !qData.isEmpty() && d->m_metaRefreshEnabled )
-    {
-      kdDebug(6050) << "HTTP Refresh Request: " << qData << endl;
-      int delay;
-      int pos = qData.find( ';' );
-      if ( pos == -1 )
-        pos = qData.find( ',' );
-
-      if( pos == -1 )
-      {
-        delay = qData.stripWhiteSpace().toInt();
-          scheduleRedirection( qData.toInt(), m_url.url() );
-      }
-      else
-      {
-        int end_pos = qData.length();
-        delay = qData.left(pos).stripWhiteSpace().toInt();
-        while ( qData[++pos] == ' ' );
-        if ( qData.find( "url", pos, false ) == pos )
-        {
-          pos += 3;
-          while (qData[pos] == ' ' || qData[pos] == '=' )
-              pos++;
-          if ( qData[pos] == '"' )
-          {
-              pos++;
-              int index = end_pos-1;
-              while( index > pos )
-              {
-                if ( qData[index] == '"' )
-                    break;
-                index--;
-              }
-              if ( index > pos )
-                end_pos = index;
-          }
-        }
-        qData = KURL( d->m_baseURL, qData.mid(pos, end_pos) ).url();
-        scheduleRedirection( delay, qData );
-      }
-      d->m_bHTTPRefresh = true;
-    }
-  }
-
-  KHTMLPageCache::self()->addData(d->m_cacheId, data);
-  write( data.data(), data.size() );
-}
-
-void KHTMLPart::slotRestoreData(const QByteArray &data )
-{
-  // The first data ?
-  if ( !d->m_workingURL.isEmpty() )
-  {
-     long saveCacheId = d->m_cacheId;
-     begin( d->m_workingURL, d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
-     d->m_cacheId = saveCacheId;
-     d->m_workingURL = KURL();
-  }
-
-  //kdDebug( 6050 ) << "slotRestoreData: " << data.size() << endl;
-  write( data.data(), data.size() );
-
-  if (data.size() == 0)
-  {
-      //kdDebug( 6050 ) << "slotRestoreData: <<end of data>>" << endl;
-     // End of data.
-     if ( d->m_bParsing )
-     {
-        end(); //will emit completed()
-     }
-  }
-}
-
-void KHTMLPart::slotFinished( KIO::Job * job )
-{
-  if (job->error())
-  {
-    KHTMLPageCache::self()->cancelEntry(d->m_cacheId);
-    job->showErrorDialog( /*d->m_view*/ ); // TODO show the error text in this part, instead.
-    d->m_job = 0L;
-    emit canceled( job->errorString() );
-    // TODO: what else ?
-    checkCompleted();
-    return;
-  }
-  //kdDebug( 6050 ) << "slotFinished" << endl;
-
-  KHTMLPageCache::self()->endData(d->m_cacheId);
-
-  if ( d->m_doc && d->m_doc->docLoader()->expireDate())
-      KIO::http_update_cache(m_url, false, d->m_doc->docLoader()->expireDate());
-
-  d->m_workingURL = KURL();
-  d->m_job = 0L;
-
-  if ( d->m_bParsing )
-    end(); //will emit completed()
-}
-
-void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
-{
-  clear();
-  d->m_bCleared = false;
-  d->m_cacheId = 0;
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-
-  // ### the setFontSizes in restore currently doesn't seem to work,
-  // so let's also reset the font base here, so that the font buttons start
-  // at 0 and not at the last used value (would make sense if the sizes
-  // would be restored properly though)
-  d->m_fontBase = 0;
-
-  if(url.isValid())
-      KHTMLFactory::vLinks()->insert( url.url() );
-
-  // ###
-  //stopParser();
-
-  KParts::URLArgs args( d->m_extension->urlArgs() );
-  args.xOffset = xOffset;
-  args.yOffset = yOffset;
-  d->m_extension->setURLArgs( args );
-
-  d->m_referrer = url.url();
-  m_url = url;
-
-  if ( !m_url.isEmpty() )
-  {
-    KURL::List lst = KURL::split( m_url );
-    KURL baseurl;
-    if ( !lst.isEmpty() )
-      baseurl = *lst.begin();
-    // Use this for relative links.
-    // We prefer m_baseURL over m_url because m_url changes when we are
-    // about to load a new page.
-    setBaseURL(baseurl);
-
-    KURL title( baseurl );
-    title.setRef( QString::null );
-    title.setQuery( QString::null );
-    emit setWindowCaption( title.url() );
-  }
-  else
-    emit setWindowCaption( i18n( "no title", "* Unknown *" ) );
-
-  // ### not sure if XHTML documents served as text/xml should use DocumentImpl or HTMLDocumentImpl
-  if (args.serviceType == "text/xml")
-    d->m_doc = new DocumentImpl( d->m_view );
-  else
-    d->m_doc = new HTMLDocumentImpl( d->m_view );
-
-
-
-  d->m_doc->ref();
-  d->m_doc->attach( d->m_view );
-  d->m_doc->setURL( m_url.url() );
-
-  setAutoloadImages( KHTMLFactory::defaultHTMLSettings()->autoLoadImages() );
-  QString userStyleSheet = KHTMLFactory::defaultHTMLSettings()->userStyleSheet();
-  if ( !userStyleSheet.isEmpty() )
-    setUserStyleSheet( KURL( userStyleSheet ) );
-
-  d->m_doc->setRestoreState(args.docState);
-  d->m_doc->open();
-  // clear widget
-  d->m_view->resizeContents( 0, 0 );
-  connect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
-
-  emit d->m_extension->enableAction( "print", true );
-
-  d->m_bParsing = true;
-}
-
-void KHTMLPart::write( const char *str, int len )
-{
-    if ( !d->m_decoder ) {
-        d->m_decoder = new khtml::Decoder();
-        if(d->m_encoding != QString::null)
-            d->m_decoder->setEncoding(d->m_encoding.latin1(), d->m_haveEncoding);
-        else
-            d->m_decoder->setEncoding(settings()->encoding().latin1(), d->m_haveEncoding);
-    }
-  if ( len == 0 )
-    return;
-
-  if ( len == -1 )
-    len = strlen( str );
-
-  QString decoded = d->m_decoder->decode( str, len );
-
-  if(decoded.isEmpty()) return;
-
-  if(d->m_bFirstData) {
-      // determine the parse mode
-      d->m_doc->determineParseMode( decoded );
-      d->m_bFirstData = false;
-
-  //kdDebug(6050) << "KHTMLPart::write haveEnc = " << d->m_haveEncoding << endl;
-      // ### this is still quite hacky, but should work a lot better than the old solution
-      if(d->m_decoder->visuallyOrdered()) d->m_doc->setVisuallyOrdered();
-      if (!d->m_haveCharset)
-      {
-         const QTextCodec *c = d->m_decoder->codec();
-         //kdDebug(6005) << "setting up charset to " << (int) KGlobal::charsets()->charsetForEncoding(c->name()) << endl;
-         d->m_charset = KGlobal::charsets()->charsetForEncoding(c->name());
-         d->m_settings->setCharset( d->m_charset );
-         d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding(c->name(), true ));
-         //kdDebug(6005) << "charset is " << (int)d->m_settings->charset() << endl;
-      }
-      d->m_doc->applyChanges(true, true);
-  }
-
-  Tokenizer* t = d->m_doc->tokenizer();
-  if(t)
-    t->write( decoded, true );
-}
-
-void KHTMLPart::write( const QString &str )
-{
-  if ( str.isNull() )
-    return;
-
-  if(d->m_bFirstData) {
-      // determine the parse mode
-      d->m_doc->setParseMode( DocumentImpl::Strict );
-      d->m_bFirstData = false;
-  }
-  Tokenizer* t = d->m_doc->tokenizer();
-  if(t)
-    t->write( str, true );
-}
-
-void KHTMLPart::end()
-{
-    // make sure nothing's left in there...
-    if(d->m_decoder)
-        write(d->m_decoder->flush());
-    d->m_doc->finishParsing();
-}
-
-void KHTMLPart::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
-{
-    if (!d->m_view) return;
-    d->m_view->paint(p, rc, yOff, more);
-}
-
-void KHTMLPart::stopAnimations()
-{
-  if ( d->m_doc )
-    d->m_doc->docLoader()->setShowAnimations(false);
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( !( *it ).m_part.isNull() && ( *it ).m_part->inherits( "KHTMLPart" ) ) {
-      KParts::ReadOnlyPart* p = ( *it ).m_part;
-      static_cast<KHTMLPart*>( p )->stopAnimations();
-    }
-}
-
-void KHTMLPart::slotFinishedParsing()
-{
-  d->m_bParsing = false;
-  d->m_doc->close();
-  checkEmitLoadEvent();
-  disconnect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
-
-  if (!d->m_view)
-    return; // We are probably being destructed.
-  // check if the scrollbars are really needed for the content
-  // if not, remove them, relayout, and repaint
-
-  d->m_view->restoreScrollBar();
-
-  if ( !m_url.encodedHtmlRef().isEmpty() )
-    gotoAnchor( m_url.encodedHtmlRef() );
-
-#if 0
-  HTMLCollectionImpl imgColl( d->m_doc, HTMLCollectionImpl::DOC_IMAGES );
-
-  d->m_totalImageCount = 0;
-  KURL::List imageURLs;
-  unsigned long i = 0;
-  unsigned long len = imgColl.length();
-  for (; i < len; i++ )
-  {
-    NodeImpl *node = imgColl.item( i );
-    if ( node->id() != ID_IMG )
-      continue;
-
-    QString imgURL = static_cast<DOM::ElementImpl *>( node )->getAttribute( ATTR_SRC ).string();
-    KURL url;
-
-    if ( KURL::isRelativeURL( imgURL ) )
-      url = completeURL( imgURL );
-    else
-      url = KURL( imgURL );
-
-    if ( !imageURLs.contains( url ) )
-    {
-      d->m_totalImageCount++;
-      imageURLs.append( url );
-    }
-  }
-#endif
-
-  checkCompleted();
-}
-
-void KHTMLPart::slotLoaderRequestDone( const DOM::DOMString &/*baseURL*/, khtml::CachedObject *obj )
-{
-
-  if ( obj && obj->type() == khtml::CachedObject::Image )
-  {
-    d->m_loadedImages++;
-
-    // in case we have more images than we originally found, then they are most likely loaded by some
-    // javascript code. as we can't find out the exact number anyway we skip displaying any further image
-    // loading info message :P
-    if ( d->m_loadedImages <= d->m_totalImageCount && autoloadImages())
-      emit d->m_extension->infoMessage( i18n( "%1 of 1 Image loaded", "%1 of %n Images loaded", d->m_totalImageCount ).arg( d->m_loadedImages ) );
-  }
-
-  checkCompleted();
-}
-
-void KHTMLPart::checkCompleted()
-{
-  //kdDebug( 6050 ) << "KHTMLPart::checkCompleted() parsing: " << d->m_bParsing << endl;
-  //kdDebug( 6050 ) << "                           complete: " << d->m_bComplete << endl;
-
-  // restore the cursor position
-  if (d->m_doc && !d->m_bParsing && !d->m_focusNodeRestored)
-  {
-      int focusNodeNumber;
-      if ((focusNodeNumber = d->m_focusNodeNumber))
-      {
-          DOM::ElementImpl *focusNode = 0;
-          while(focusNodeNumber--)
-          {
-              if ((focusNode = d->m_doc->findNextLink(focusNode, true))==0)
-                  break;
-          }
-          if (focusNode)
-          {
-              //QRect focusRect = focusNode->getRect();
-              //d->m_view->ensureVisible(focusRect.x(), focusRect.y());
-              d->m_doc->setFocusNode(focusNode);
-          }
-      }
-      d->m_focusNodeRestored = true;
-  }
-
-  int requests = 0;
-
-  // Any frame that hasn't completed yet ?
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( !(*it).m_bCompleted )
-      return;
-
-  // Are we still parsing - or have we done the completed stuff already ?
-  if ( d->m_bParsing || d->m_bComplete )
-    return;
-
-  // Still waiting for images/scripts from the loader ?
-  requests = khtml::Cache::loader()->numRequests( m_url.url() );
-  //kdDebug( 6060 ) << "number of loader requests: " << requests << endl;
-  if ( requests > 0 )
-    return;
-
-  // OK, completed.
-  // Now do what should be done when we are really completed.
-  d->m_bComplete = true;
-
-  checkEmitLoadEvent(); // if we didn't do it before
-
-  if (!parentPart())
-    emit setStatusBarText(i18n("Done."));
-
-  // check for a <link rel="SHORTCUT ICON" href="url to icon">,
-  // IE extension to set an icon for this page to use in
-  // bookmarks and the locationbar
-  if (!parentPart() && d->m_doc && d->m_doc->isHTMLDocument())
-  {
-      DOM::TagNodeListImpl links(d->m_doc, "LINK");
-      for (unsigned long i = 0; i < links.length(); ++i)
-          if (links.item(i)->isElementNode())
-          {
-              DOM::ElementImpl *link = static_cast<DOM::ElementImpl *>(links.item(i));
-              kdDebug(6005) << "Checking..." << endl;
-              if (link->getAttribute("REL").string().upper() == "SHORTCUT ICON")
-              {
-                  KURL iconURL(d->m_baseURL, link->getAttribute("HREF").string());
-                  if (!iconURL.isEmpty())
-                  {
-                      emit d->m_extension->setIconURL(iconURL);
-                      break;
-                  }
-              }
-          }
-  }
-
-  if ( m_url.encodedHtmlRef().isEmpty() && d->m_view->contentsY() == 0 ) // check that the view has not been moved by the user
-      d->m_view->setContentsPos( d->m_extension->urlArgs().xOffset, d->m_extension->urlArgs().yOffset );
-
-  if ( !d->m_redirectURL.isEmpty() )
-  {
-    d->m_redirectionTimer.start( 1000 * d->m_delayRedirect, true );
-    emit completed( true );
-  }
-  else
-    emit completed();
-
-  emit setStatusBarText( i18n("Loading complete") );
-#ifdef SPEED_DEBUG
-  kdDebug(6050) << "DONE: " <<d->m_parsetime.elapsed() << endl;
-#endif
-}
-
-void KHTMLPart::checkEmitLoadEvent()
-{
-  if ( d->m_bLoadEventEmitted || d->m_bParsing )
-    return;
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( (*it).m_run ) // still got a frame running -> too early
-      return;
-  emitLoadEvent();
-}
-
-void KHTMLPart::emitLoadEvent()
-{
-  d->m_bLoadEventEmitted = true;
-  kdDebug(6050) << "KHTMLPart::emitLoadEvent " << this << endl;
-
-  if ( d->m_doc && d->m_doc->isHTMLDocument() ) {
-    HTMLDocumentImpl* hdoc = static_cast<HTMLDocumentImpl*>( d->m_doc );
-
-    if ( hdoc->body() )
-        hdoc->body()->dispatchWindowEvent( EventImpl::LOAD_EVENT, false, false );
-  }
-}
-
-void KHTMLPart::emitUnloadEvent()
-{
-  if ( d->m_doc && d->m_doc->isHTMLDocument() ) {
-    HTMLDocumentImpl* hdoc = static_cast<HTMLDocumentImpl*>( d->m_doc );
-
-    if ( hdoc->body() && d->m_bLoadEventEmitted ) {
-      hdoc->body()->dispatchWindowEvent( EventImpl::UNLOAD_EVENT, false, false );
-      d->m_bLoadEventEmitted = false;
-    }
-  }
-}
-
-const KHTMLSettings *KHTMLPart::settings() const
-{
-  return d->m_settings;
-}
-
-void KHTMLPart::setBaseURL( const KURL &url )
-{
-  d->m_baseURL = url;
-  if ( d->m_baseURL.protocol().startsWith( "http" ) && !d->m_baseURL.host().isEmpty() &&
-       d->m_baseURL.path().isEmpty() )
-    d->m_baseURL.setPath( "/" );
-}
-
-KURL KHTMLPart::baseURL() const
-{
-    if ( d->m_baseURL.isEmpty() )
-        return m_url;
-  return d->m_baseURL;
-}
-
-void KHTMLPart::setBaseTarget( const QString &target )
-{
-  d->m_baseTarget = target;
-}
-
-QString KHTMLPart::baseTarget() const
-{
-  return d->m_baseTarget;
-}
-
-KURL KHTMLPart::completeURL( const QString &url, const QString &/*target*/ )
-{
-  return KURL( d->m_baseURL.isEmpty() ? m_url : d->m_baseURL, url );
-}
-
-void KHTMLPart::scheduleRedirection( int delay, const QString &url )
-{
-    if( d->m_redirectURL.isEmpty() || delay < d->m_delayRedirect )
-    {
-       d->m_delayRedirect = delay;
-       d->m_redirectURL = url;
-       if ( d->m_bComplete ) {
-	   d->m_redirectionTimer.stop();
-	   d->m_redirectionTimer.start( 1000 * d->m_delayRedirect, true );
-       }
-    }
-}
-
-void KHTMLPart::slotRedirect()
-{
-  kdDebug( 6050 ) << "KHTMLPart::slotRedirect()" << endl;
-  QString u = d->m_redirectURL;
-  d->m_delayRedirect = 0;
-  d->m_redirectURL = QString::null;
-  QString target;
-  u = splitUrlTarget( u, &target );
-  KParts::URLArgs args;
-  args.reload = true;
-  args.setLockHistory( true );
-  urlSelected( u, 0, 0, target, args );
-}
-
-void KHTMLPart::slotRedirection(KIO::Job*, const KURL& url)
-{
-  // the slave told us that we got redirected
-  // kdDebug( 6050 ) << "redirection by KIO to " << url.url() << endl;
-  emit d->m_extension->setLocationBarURL( url.prettyURL() );
-  d->m_workingURL = url;
-}
-
-// ####
-bool KHTMLPart::setCharset( const QString &name, bool override )
-{
-  QFont f(settings()->stdFontName());
-  KGlobal::charsets()->setQFont(f, KGlobal::charsets()->charsetForEncoding(name) );
-
-  //kdDebug(6005) << "setting to charset " << (int)QFontInfo(f).charSet() <<" " << override << " should be " << name << endl;
-
-  d->m_settings->setDefaultCharset( f.charSet(), override );
-  return true;
-}
-
-bool KHTMLPart::setEncoding( const QString &name, bool override )
-{
-    d->m_encoding = name;
-    d->m_haveEncoding = override;
-
-//    setCharset( name, override );
-     d->m_charset = KGlobal::charsets()->charsetForEncoding(name);
-     d->m_settings->setCharset( d->m_charset );
-     // the script should not be unicode. We need to know the document is eg. arabic to be
-     // able to choose a unicode font that contains arabic glyphs.
-     d->m_settings->setScript( KGlobal::charsets()->charsetForEncoding( name, true ) );
-
-    if( !m_url.isEmpty() ) {
-        // reload document
-        closeURL();
-        KURL url = m_url;
-        m_url = 0;
-        openURL(url);
-    }
-
-    return true;
-}
-
-QString KHTMLPart::encoding()
-{
-    if(d->m_haveEncoding && !d->m_encoding.isEmpty())
-        return d->m_encoding;
-
-    if(d->m_decoder && d->m_decoder->encoding())
-        return QString(d->m_decoder->encoding());
-
-    return(settings()->encoding());
-}
-
-void KHTMLPart::setUserStyleSheet(const KURL &url)
-{
-  if ( d->m_doc && d->m_doc->docLoader() )
-    (void) new khtml::PartStyleSheetLoader(this, url.url(), d->m_doc->docLoader());
-}
-
-void KHTMLPart::setUserStyleSheet(const QString &styleSheet)
-{
-  if ( d->m_doc )
-    d->m_doc->setUserStyleSheet( styleSheet );
-}
-
-bool KHTMLPart::gotoAnchor( const QString &name )
-{
-  if (!d->m_doc)
-      return false;
-  HTMLCollectionImpl *anchors =
-      new HTMLCollectionImpl( d->m_doc, HTMLCollectionImpl::DOC_ANCHORS);
-  anchors->ref();
-  NodeImpl *n = anchors->namedItem(name);
-  anchors->deref();
-
-  if(!n) {
-      kdDebug(6050) << "KHTMLPart::gotoAnchor no node found" << endl;
-      return false;
-  }
-
-  int x = 0, y = 0;
-  HTMLElementImpl *a = static_cast<HTMLElementImpl *>(n);
-  a->getUpperLeftCorner(x, y);
-  d->m_view->setContentsPos(x-50, y-50);
-
-  return true;
-}
-
-void KHTMLPart::setFontSizes( const QValueList<int> &newFontSizes )
-{
-  d->m_settings->setFontSizes( newFontSizes );
-}
-
-QValueList<int> KHTMLPart::fontSizes() const
-{
-  return d->m_settings->fontSizes();
-}
-
-void KHTMLPart::resetFontSizes()
-{
-  d->m_settings->resetFontSizes();
-}
-
-void KHTMLPart::setStandardFont( const QString &name )
-{
-    d->m_settings->setStdFontName(name);
-}
-
-void KHTMLPart::setFixedFont( const QString &name )
-{
-    d->m_settings->setFixedFontName(name);
-}
-
-void KHTMLPart::setURLCursor( const QCursor &c )
-{
-  d->m_linkCursor = c;
-}
-
-const QCursor &KHTMLPart::urlCursor() const
-{
-  return d->m_linkCursor;
-}
-
-bool KHTMLPart::onlyLocalReferences() const
-{
-  return d->m_onlyLocalReferences;
-}
-
-void KHTMLPart::setOnlyLocalReferences(bool enable)
-{
-  d->m_onlyLocalReferences = enable;
-}
-
-void KHTMLPart::findTextBegin()
-{
-  d->m_findPos = -1;
-  d->m_findNode = 0;
-}
-
-bool KHTMLPart::findTextNext( const QRegExp &exp, bool forward )
-{
-    if ( !d->m_doc )
-        return false;
-
-    if(!d->m_findNode) {
-        if (d->m_doc->isHTMLDocument())
-            d->m_findNode = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-        else
-            d->m_findNode = d->m_doc;
-    }
-
-    if ( !d->m_findNode ||
-         d->m_findNode->id() == ID_FRAMESET )
-      return false;
-
-    while(1)
-    {
-        if( (d->m_findNode->nodeType() == Node::TEXT_NODE || d->m_findNode->nodeType() == Node::CDATA_SECTION_NODE) && d->m_findNode->renderer() )
-        {
-            DOMStringImpl *t = (static_cast<TextImpl *>(d->m_findNode))->string();
-            QConstString s(t->s, t->l);
-            d->m_findPos = s.string().find(exp, d->m_findPos+1);
-            if(d->m_findPos != -1)
-            {
-                int x = 0, y = 0;
-        khtml::RenderText *text = static_cast<khtml::RenderText *>(d->m_findNode->renderer());
-                text->posOfChar(d->m_findPos, x, y);
-                d->m_view->setContentsPos(x-50, y-50);
-                return true;
-            }
-        }
-        d->m_findPos = -1;
-
-        NodeImpl *next;
-
-        if ( forward )
-        {
-          next = d->m_findNode->firstChild();
-
-          if(!next) next = d->m_findNode->nextSibling();
-          while(d->m_findNode && !next) {
-              d->m_findNode = d->m_findNode->parentNode();
-              if( d->m_findNode ) {
-                  next = d->m_findNode->nextSibling();
-              }
-          }
-        }
-        else
-        {
-          next = d->m_findNode->lastChild();
-
-          if (!next ) next = d->m_findNode->previousSibling();
-          while ( d->m_findNode && !next )
-          {
-            d->m_findNode = d->m_findNode->parentNode();
-            if( d->m_findNode )
-            {
-              next = d->m_findNode->previousSibling();
-            }
-          }
-        }
-
-        d->m_findNode = next;
-        if(!d->m_findNode) return false;
-    }
-}
-
-bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensitive )
-{
-    if ( !d->m_doc )
-        return false;
-
-    if(!d->m_findNode) {
-        if (d->m_doc->isHTMLDocument())
-            d->m_findNode = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-        else
-            d->m_findNode = d->m_doc;
-    }
-
-    if ( !d->m_findNode ||
-         d->m_findNode->id() == ID_FRAMESET )
-      return false;
-
-    while(1)
-    {
-        if( (d->m_findNode->nodeType() == Node::TEXT_NODE || d->m_findNode->nodeType() == Node::CDATA_SECTION_NODE) && d->m_findNode->renderer() )
-        {
-            DOMStringImpl *t = (static_cast<TextImpl *>(d->m_findNode))->string();
-            QConstString s(t->s, t->l);
-            d->m_findPos = s.string().find(str, d->m_findPos+1, caseSensitive);
-            if(d->m_findPos != -1)
-            {
-                int x = 0, y = 0;
-        static_cast<khtml::RenderText *>(d->m_findNode->renderer())
-            ->posOfChar(d->m_findPos, x, y);
-                d->m_view->setContentsPos(x-50, y-50);
-
-                d->m_selectionStart = d->m_findNode;
-                d->m_startOffset = d->m_findPos;
-                d->m_selectionEnd = d->m_findNode;
-                d->m_endOffset = d->m_findPos + str.length();
-                d->m_startBeforeEnd = true;
-
-                d->m_doc->setSelection( d->m_selectionStart.handle(), d->m_startOffset,
-                                        d->m_selectionEnd.handle(), d->m_endOffset );
-                emitSelectionChanged();
-                return true;
-            }
-        }
-        d->m_findPos = -1;
-
-        NodeImpl *next;
-
-        if ( forward )
-        {
-          next = d->m_findNode->firstChild();
-
-          if(!next) next = d->m_findNode->nextSibling();
-          while(d->m_findNode && !next) {
-              d->m_findNode = d->m_findNode->parentNode();
-              if( d->m_findNode ) {
-                  next = d->m_findNode->nextSibling();
-              }
-          }
-        }
-        else
-        {
-          next = d->m_findNode->lastChild();
-
-          if (!next ) next = d->m_findNode->previousSibling();
-          while ( d->m_findNode && !next )
-          {
-            d->m_findNode = d->m_findNode->parentNode();
-            if( d->m_findNode )
-            {
-              next = d->m_findNode->previousSibling();
-            }
-          }
-        }
-
-        d->m_findNode = next;
-        if(!d->m_findNode) return false;
-    }
-}
-
-QString KHTMLPart::selectedText() const
-{
-  QString text;
-  DOM::Node n = d->m_selectionStart;
-  while(!n.isNull()) {
-      if(n.nodeType() == DOM::Node::TEXT_NODE) {
-        QString str = static_cast<TextImpl *>(n.handle())->data().string();
-        if(n == d->m_selectionStart && n == d->m_selectionEnd)
-          text = str.mid(d->m_startOffset, d->m_endOffset - d->m_startOffset);
-        else if(n == d->m_selectionStart)
-          text = str.mid(d->m_startOffset);
-        else if(n == d->m_selectionEnd)
-          text += str.left(d->m_endOffset);
-        else
-          text += str;
-      }
-      else {
-        // This is our simple HTML -> ASCII transformation:
-        unsigned short id = n.elementId();
-        switch(id) {
-          case ID_TD:
-          case ID_TH:
-          case ID_BR:
-          case ID_HR:
-          case ID_OL:
-          case ID_UL:
-          case ID_LI:
-          case ID_DD:
-          case ID_DL:
-          case ID_DT:
-          case ID_PRE:
-          case ID_BLOCKQUOTE:
-            text += "\n";
-            break;
-          case ID_P:
-          case ID_TR:
-          case ID_H1:
-          case ID_H2:
-          case ID_H3:
-          case ID_H4:
-          case ID_H5:
-          case ID_H6:
-            text += "\n\n";
-            break;
-        }
-      }
-      if(n == d->m_selectionEnd) break;
-      DOM::Node next = n.firstChild();
-      if(next.isNull()) next = n.nextSibling();
-      while( next.isNull() && !n.parentNode().isNull() ) {
-        n = n.parentNode();
-        next = n.nextSibling();
-      }
-
-      n = next;
-    }
-    return text;
-}
-
-bool KHTMLPart::hasSelection() const
-{
-  return ( !d->m_selectionStart.isNull() &&
-           !d->m_selectionEnd.isNull() );
-}
-
-DOM::Range KHTMLPart::selection() const
-{
-    DOM::Range r = document().createRange();DOM::Range();
-    r.setStart( d->m_selectionStart, d->m_startOffset );
-    r.setEnd( d->m_selectionEnd, d->m_endOffset );
-    return r;
-}
-
-
-void KHTMLPart::setSelection( const DOM::Range &r )
-{
-    d->m_selectionStart = r.startContainer();
-    d->m_startOffset = r.startOffset();
-    d->m_selectionEnd = r.endContainer();
-    d->m_endOffset = r.endOffset();
-    d->m_doc->setSelection(d->m_selectionStart.handle(),d->m_startOffset,
-                           d->m_selectionEnd.handle(),d->m_endOffset);
-}
-
-// TODO merge with other overURL (BCI)
-void KHTMLPart::overURL( const QString &url, const QString &target, bool shiftPressed )
-{
-  if( d->m_kjsStatusBarText.isEmpty() || shiftPressed )
-  {
-    overURL( url, target );
-  }
-  else
-  {
-    emit onURL( url );
-    emit setStatusBarText( d->m_kjsStatusBarText );
-    d->m_kjsStatusBarText = QString::null;
-  }
-}
-
-void KHTMLPart::overURL( const QString &url, const QString &target )
-{
-  emit onURL( url );
-
-  if ( url.isEmpty() )
-  {
-    emit setStatusBarText(url);
-    return;
-  }
-
-  if (url.find( QString::fromLatin1( "javascript:" ),0, false ) != -1 )
-  {
-    emit setStatusBarText( url.mid( url.find( "javascript:", 0, false ) ) );
-    return;
-  }
-
-  KURL u = completeURL( url );
-  // special case for <a href="">
-  if ( url.isEmpty() )
-    u.setFileName( url );
-
-  QString com;
-
-  KMimeType::Ptr typ = KMimeType::findByURL( u );
-
-  if ( typ )
-    com = typ->comment( u, false );
-
-  if ( u.isMalformed() )
-  {
-    emit setStatusBarText(u.prettyURL());
-    return;
-  }
-
-  if ( u.isLocalFile() )
-  {
-    // TODO : use KIO::stat() and create a KFileItem out of its result,
-    // to use KFileItem::statusBarText()
-    QCString path = QFile::encodeName( u.path() );
-
-    struct stat buff;
-    bool ok = !stat( path.data(), &buff );
-
-    struct stat lbuff;
-    if (ok) ok = !lstat( path.data(), &lbuff );
-
-    QString text = u.url();
-    QString text2 = text;
-
-    if (ok && S_ISLNK( lbuff.st_mode ) )
-    {
-      QString tmp;
-      if ( com.isNull() )
-        tmp = i18n( "Symbolic Link");
-      else
-        tmp = i18n("%1 (Link)").arg(com);
-      char buff_two[1024];
-      text += " -> ";
-      int n = readlink ( path.data(), buff_two, 1022);
-      if (n == -1)
-      {
-        text2 += "  ";
-        text2 += tmp;
-        emit setStatusBarText(text2);
-        return;
-      }
-      buff_two[n] = 0;
-
-      text += buff_two;
-      text += "  ";
-      text += tmp;
-    }
-    else if ( ok && S_ISREG( buff.st_mode ) )
-    {
-      if (buff.st_size < 1024)
-        text = i18n("%2 (%1 bytes)").arg((long) buff.st_size).arg(text2); // always put the URL last, in case it contains '%'
-      else
-      {
-        float d = (float) buff.st_size/1024.0;
-        text = i18n("%1 (%2 K)").arg(text2).arg(KGlobal::locale()->formatNumber(d, 2)); // was %.2f
-      }
-      text += "  ";
-      text += com;
-    }
-    else if ( ok && S_ISDIR( buff.st_mode ) )
-    {
-      text += "  ";
-      text += com;
-    }
-    else
-    {
-      text += "  ";
-      text += com;
-    }
-    emit setStatusBarText(text);
-  }
-  else
-  {
-    QString extra;
-    if (target == QString::fromLatin1("_blank"))
-    {
-      extra = i18n(" (In new window)");
-    }
-    else if (!target.isEmpty() &&
-             (target != QString::fromLatin1("_top")) &&
-             (target != QString::fromLatin1("_self")) &&
-             (target != QString::fromLatin1("_parent")))
-    {
-      extra = i18n(" (In other frame)");
-    }
-
-    if (u.protocol() == QString::fromLatin1("mailto")) {
-      QString mailtoMsg/* = QString::fromLatin1("<img src=%1>").arg(locate("icon", QString::fromLatin1("locolor/16x16/actions/mail_send.png")))*/;
-      mailtoMsg += i18n("Email to: ") + KURL::decode_string(u.path());
-      QStringList queries = QStringList::split('&', u.query().mid(1));
-      for (QStringList::Iterator it = queries.begin(); it != queries.end(); ++it)
-        if ((*it).startsWith(QString::fromLatin1("subject=")))
-          mailtoMsg += i18n(" - Subject: ") + KURL::decode_string((*it).mid(8));
-        else if ((*it).startsWith(QString::fromLatin1("cc=")))
-          mailtoMsg += i18n(" - CC: ") + KURL::decode_string((*it).mid(3));
-        else if ((*it).startsWith(QString::fromLatin1("bcc=")))
-          mailtoMsg += i18n(" - BCC: ") + KURL::decode_string((*it).mid(4));
-      emit setStatusBarText(mailtoMsg);
-			return;
-    } else if (u.protocol() == QString::fromLatin1("http")) {
-        DOM::Node hrefNode = nodeUnderMouse().parentNode();
-        while (hrefNode.nodeName().string() != QString::fromLatin1("A") && !hrefNode.isNull())
-          hrefNode = hrefNode.parentNode();
-
-/*        // Is this check neccessary at all? (Frerich)
-        if (!hrefNode.isNull()) {
-          DOM::Node hreflangNode = hrefNode.attributes().getNamedItem("HREFLANG");
-          if (!hreflangNode.isNull()) {
-            QString countryCode = hreflangNode.nodeValue().string().lower();
-            // Map the language code to an appropriate country code.
-            if (countryCode == QString::fromLatin1("en"))
-              countryCode = QString::fromLatin1("gb");
-            QString flagImg = QString::fromLatin1("<img src=%1>").arg(
-                locate("locale", QString::fromLatin1("l10n/")
-                + countryCode
-                + QString::fromLatin1("/flag.png")));
-            emit setStatusBarText(flagImg + u.prettyURL() + extra);
-          }
-        }*/
-      }
-    emit setStatusBarText(u.prettyURL() + extra);
-  }
-}
-
-void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target )
-{
-    urlSelected( url, button, state, _target, KParts::URLArgs() );
-}
-
-void KHTMLPart::urlSelected( const QString &url, int button, int state, const QString &_target,
-                             KParts::URLArgs args )
-{
-  bool hasTarget = false;
-
-  QString target = _target;
-  if ( target.isEmpty() )
-    target = d->m_baseTarget;
-  if ( !target.isEmpty() )
-      hasTarget = true;
-
-  if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 )
-  {
-    executeScript( url.right( url.length() - 11) );
-    return;
-  }
-
-
-  KURL cURL = completeURL( url, target );
-  // special case for <a href="">
-  if ( url.isEmpty() )
-    cURL.setFileName( url );
-
-  if ( !cURL.isValid() )
-    // ### ERROR HANDLING
-    return;
-
-  //kdDebug( 6000 ) << "complete URL:" << cURL.url() << " target = " << target << endl;
-
-  if ( button == LeftButton && ( state & ShiftButton ) )
-  {
-    KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save As..." ), cURL );
-    return;
-  }
-
-  if (!checkLinkSecurity(cURL,
-			 i18n( "<qt>The link <B>%1</B><BR>leads from this untrusted page to your local filesystem.<BR>Do you want to follow the link?" ),
-			 i18n( "Follow" )))
-    return;
-
-  args.frameName = target;
-
-  // For http-refresh, force the io-slave to re-get the page
-  // as needed instead of loading from cache. NOTE: I would
-  // have done a "verify" instead, but I am not sure that servers
-  // will include the correct response (specfically "Refresh:") on
-  // a "HEAD" request which is what a "verify" setting results in.(DA)
-  if ( d->m_bHTTPRefresh )
-  {
-    d->m_bHTTPRefresh = false;
-        args.metaData()["cache"]="reload"; //"verify";
-  }
-
-  args.metaData().insert("main_frame_request",
-                         parentPart() == 0 ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_activate_warnings", "TRUE");
-
-  if ( hasTarget )
-  {
-    // unknown frame names should open in a new window.
-    khtml::ChildFrame *frame = recursiveFrameRequest( cURL, args, false );
-    if ( frame )
-    {
-      args.metaData()["referrer"] = d->m_referrer;
-      requestObject( frame, cURL, args );
-      return;
-    }
-  }
-
-  if ( !d->m_bComplete && !hasTarget )
-    closeURL();
-
-  if (!d->m_referrer.isEmpty())
-    args.metaData()["referrer"] = d->m_referrer;
-
-  if ( button == MidButton && (state & ShiftButton) )
-  {
-    KParts::WindowArgs winArgs;
-    winArgs.lowerWindow = true;
-    KParts::ReadOnlyPart *newPart = 0;
-    emit d->m_extension->createNewWindow( cURL, args, winArgs, newPart );
-    return;
-  }
-  emit d->m_extension->openURLRequest( cURL, args );
-}
-
-void KHTMLPart::slotViewDocumentSource()
-{
-  KURL url(m_url);
-  if (!(url.isLocalFile()) && KHTMLPageCache::self()->isValid(d->m_cacheId))
-  {
-     KTempFile sourceFile(QString::null, QString::fromLatin1(".html"));
-     if (sourceFile.status() == 0)
-     {
-        KHTMLPageCache::self()->saveData(d->m_cacheId, sourceFile.dataStream());
-        url = KURL();
-        url.setPath(sourceFile.name());
-     }
-  }
-
-  //  emit d->m_extension->openURLRequest( m_url, KParts::URLArgs( false, 0, 0, QString::fromLatin1( "text/plain" ) ) );
-  (void) KRun::runURL( url, QString::fromLatin1("text/plain") );
-}
-
-void KHTMLPart::slotViewFrameSource()
-{
-  KParts::ReadOnlyPart *frame = static_cast<KParts::ReadOnlyPart *>( partManager()->activePart() );
-  if ( !frame )
-    return;
-
-  KURL url = frame->url();
-  if (!(url.isLocalFile()) && frame->inherits("KHTMLPart"))
-  {
-       long cacheId = static_cast<KHTMLPart *>(frame)->d->m_cacheId;
-
-       if (KHTMLPageCache::self()->isValid(cacheId))
-       {
-           KTempFile sourceFile(QString::null, QString::fromLatin1(".html"));
-           if (sourceFile.status() == 0)
-           {
-               KHTMLPageCache::self()->saveData(cacheId, sourceFile.dataStream());
-               url = KURL();
-               url.setPath(sourceFile.name());
-           }
-     }
-  }
-
-  (void) KRun::runURL( url, QString::fromLatin1("text/plain") );
-}
-
-void KHTMLPart::slotSaveBackground()
-{
-  // ### what about XML documents? get from CSS?
-  if (!d->m_doc || !d->m_doc->isHTMLDocument())
-    return;
-
-  QString relURL = static_cast<HTMLDocumentImpl*>(d->m_doc)->body()->getAttribute( ATTR_BACKGROUND ).string();
-
-  KURL backgroundURL( m_url, relURL );
-
-  KHTMLPopupGUIClient::saveURL( d->m_view, i18n("Save background image as"), backgroundURL );
-}
-
-void KHTMLPart::slotSaveDocument()
-{
-  KURL srcURL( m_url );
-
-  if ( srcURL.fileName(false).isEmpty() )
-    srcURL.setFileName( "index.html" );
-
-  KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save as" ), srcURL, i18n("*.html *.htm|HTML files"), d->m_cacheId );
-}
-
-void KHTMLPart::slotSecurity()
-{
-//   kdDebug( 6050 ) << "Meta Data:" << endl
-//                   << d->m_ssl_peer_cert_subject
-//                   << endl
-//                   << d->m_ssl_peer_cert_issuer
-//                   << endl
-//                   << d->m_ssl_cipher
-//                   << endl
-//                   << d->m_ssl_cipher_desc
-//                   << endl
-//                   << d->m_ssl_cipher_version
-//                   << endl
-//                   << d->m_ssl_good_from
-//                   << endl
-//                   << d->m_ssl_good_until
-//                   << endl
-//                   << d->m_ssl_cert_state
-//                   << endl;
-
-  KSSLInfoDlg *kid = new KSSLInfoDlg(d->m_ssl_in_use, widget(), "kssl_info_dlg", true );
-  if (d->m_ssl_in_use) {
-    kid->setup(d->m_ssl_peer_cert_subject,
-               d->m_ssl_peer_cert_issuer,
-               d->m_ssl_peer_ip,
-               m_url.url(),
-               d->m_ssl_cipher,
-               d->m_ssl_cipher_desc,
-               d->m_ssl_cipher_version,
-               d->m_ssl_cipher_used_bits.toInt(),
-               d->m_ssl_cipher_bits.toInt(),
-               (KSSLCertificate::KSSLValidation) d->m_ssl_cert_state.toInt(),
-               d->m_ssl_good_from, d->m_ssl_good_until);
-  }
-  kid->exec();
-}
-
-void KHTMLPart::slotSaveFrame()
-{
-    if ( !d->m_activeFrame )
-        return; // should never be the case, but one never knows :-)
-
-    KURL srcURL( static_cast<KParts::ReadOnlyPart *>( d->m_activeFrame )->url() );
-
-    if ( srcURL.fileName(false).isEmpty() )
-        srcURL.setFileName( "index.html" );
-
-    KHTMLPopupGUIClient::saveURL( d->m_view, i18n( "Save as" ), srcURL, i18n("*.html *.htm|HTML files") );
-}
-
-void KHTMLPart::slotSetEncoding()
-{
-    // first Item is always auto
-    if(d->m_paSetEncoding->currentItem() == 0)
-        setEncoding(QString::null, false);
-    else {
-        // strip of the language to get the raw encoding again.
-        QString enc = KGlobal::charsets()->encodingForName(d->m_paSetEncoding->currentText());
-        setEncoding(enc, true);
-    }
-}
-
-void KHTMLPart::updateActions()
-{
-  bool frames = false;
-
-  QValueList<khtml::ChildFrame>::ConstIterator it = d->m_frames.begin();
-  QValueList<khtml::ChildFrame>::ConstIterator end = d->m_frames.end();
-  for (; it != end; ++it )
-      if ( (*it).m_type == khtml::ChildFrame::Frame )
-      {
-          frames = true;
-          break;
-      }
-
-  d->m_paViewFrame->setEnabled( frames );
-  d->m_paSaveFrame->setEnabled( frames );
-
-  if ( frames )
-    d->m_paFind->setText( i18n( "&Find in Frame" ) );
-  else
-    d->m_paFind->setText( i18n( "&Find" ) );
-
-  KParts::Part *frame = 0;
-
-  if ( frames )
-    frame = partManager()->activePart();
-
-  bool enableFindAndSelectAll = true;
-
-  if ( frame )
-    enableFindAndSelectAll = frame->inherits( "KHTMLPart" );
-
-  d->m_paFind->setEnabled( enableFindAndSelectAll );
-  d->m_paSelectAll->setEnabled( enableFindAndSelectAll );
-
-  bool enablePrintFrame = false;
-
-  if ( frame )
-  {
-    QObject *ext = KParts::BrowserExtension::childObject( frame );
-    if ( ext )
-      enablePrintFrame = ext->metaObject()->slotNames().contains( "print()" );
-  }
-
-  d->m_paPrintFrame->setEnabled( enablePrintFrame );
-
-  QString bgURL;
-
-  // ### frames
-  if ( d->m_doc && d->m_doc->isHTMLDocument() && static_cast<HTMLDocumentImpl*>(d->m_doc)->body() && !d->m_bClearing )
-    bgURL = static_cast<HTMLDocumentImpl*>(d->m_doc)->body()->getAttribute( ATTR_BACKGROUND ).string();
-
-  d->m_paSaveBackground->setEnabled( !bgURL.isEmpty() );
-}
-
-bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, const QString &frameName,
-                              const QStringList &params, bool isIFrame )
-{
-//  kdDebug( 6050 ) << "childRequest( ..., " << url << ", " << frameName << " )" << endl;
-  FrameIt it = d->m_frames.find( frameName );
-  if ( it == d->m_frames.end() )
-  {
-    khtml::ChildFrame child;
-//    kdDebug( 6050 ) << "inserting new frame into frame map " << frameName << endl;
-    child.m_name = frameName;
-    it = d->m_frames.append( child );
-  }
-
-  (*it).m_type = isIFrame ? khtml::ChildFrame::IFrame : khtml::ChildFrame::Frame;
-  (*it).m_frame = frame;
-  (*it).m_params = params;
-
-  if ( url.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 && !isIFrame )
-  {
-      // static cast is safe as of isIFrame being false.
-      // but: shouldn't we support this javascript hack for iframes aswell?
-      khtml::RenderFrame* rf = static_cast<khtml::RenderFrame*>(frame);
-      assert(rf);
-      QVariant res = executeScript( DOM::Node(rf->frameImpl()), url.right( url.length() - 11) );
-      if ( res.type() == QVariant::String ) {
-        KURL myurl;
-        myurl.setProtocol("javascript");
-        myurl.setPath(res.asString());
-        return processObjectRequest(&(*it), myurl, QString("text/html") );
-      }
-      return false;
-  }
-  return requestObject( &(*it), completeURL( url ) );
-}
-
-QString KHTMLPart::requestFrameName()
-{
-   return QString::fromLatin1("<!--frame %1-->").arg(d->m_frameNameId++);
-}
-
-bool KHTMLPart::requestObject( khtml::RenderPart *frame, const QString &url, const QString &serviceType,
-                               const QStringList &params )
-{
-  if (url.isEmpty())
-    return false;
-  khtml::ChildFrame child;
-  QValueList<khtml::ChildFrame>::Iterator it = d->m_objects.append( child );
-  (*it).m_frame = frame;
-  (*it).m_type = khtml::ChildFrame::Object;
-  (*it).m_params = params;
-
-  KParts::URLArgs args;
-  args.serviceType = serviceType;
-  return requestObject( &(*it), completeURL( url ), args );
-}
-
-bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const KParts::URLArgs &_args )
-{
-  if (!checkLinkSecurity(url))
-    return false;
-  if ( child->m_bPreloaded )
-  {
-    // kdDebug(6005) << "KHTMLPart::requestObject preload" << endl;
-    if ( child->m_frame && child->m_part )
-      child->m_frame->setWidget( child->m_part->widget() );
-
-    child->m_bPreloaded = false;
-    return true;
-  }
-
-  KParts::URLArgs args( _args );
-
-  if ( child->m_run )
-    delete (KHTMLRun *)child->m_run;
-
-  if ( child->m_part && !args.reload && urlcmp( child->m_part->url().url(), url.url(), true, true ) )
-    args.serviceType = child->m_serviceType;
-
-  child->m_args = args;
-  child->m_serviceName = QString::null;
-  if (!d->m_referrer.isEmpty() && !child->m_args.metaData().contains( "referrer" ))
-    child->m_args.metaData()["referrer"] = d->m_referrer;
-
-  child->m_args.metaData().insert("main_frame_request",
-                                  parentPart() == 0 ? "TRUE":"FALSE");
-  child->m_args.metaData().insert("ssl_was_in_use",
-                                  d->m_ssl_in_use ? "TRUE":"FALSE");
-  child->m_args.metaData().insert("ssl_activate_warnings", "TRUE");
-
-  // Support for <frame url="">
-  if (url.isEmpty() && args.serviceType.isEmpty())
-    args.serviceType = QString::fromLatin1( "text/html" );
-
-  if ( args.serviceType.isEmpty() ) {
-    child->m_run = new KHTMLRun( this, child, url, child->m_args,
-                                 child->m_type != khtml::ChildFrame::Frame );
-    return false;
-  } else {
-    return processObjectRequest( child, url, args.serviceType );
-  }
-}
-
-bool KHTMLPart::processObjectRequest( khtml::ChildFrame *child, const KURL &_url, const QString &mimetype )
-{
-  //kdDebug( 6050 ) << "trying to create part for " << mimetype << endl;
-
-  // IMPORTANT: create a copy of the url here, because it is just a reference, which was likely to be given
-  // by an emitting frame part (emit openURLRequest( blahurl, ... ) . A few lines below we delete the part
-  // though -> the reference becomes invalid -> crash is likely
-  KURL url( _url );
-
-  // khtmlrun called us this way to indicate a loading error
-  if ( url.isEmpty() && mimetype.isEmpty() )
-  {
-      checkEmitLoadEvent();
-      child->m_bCompleted = true;
-      return true;
-  }
-
-  if (child->m_bNotify)
-  {
-      child->m_bNotify = false;
-      if ( !child->m_args.lockHistory() )
-          emit d->m_extension->openURLNotify();
-      // why change the locationbar URL here? Other browsers don't do it
-      // either for framesets and it's actually confusing IMHO, as it
-      // makes the user think he's visiting that new URL while he actually
-      // isn't. Not to mention that it breaks bookmark'ing framed sites (Simon)
-//      emit d->m_extension->setLocationBarURL( url.prettyURL() );
-  }
-
-  if ( !child->m_services.contains( mimetype ) )
-  {
-    KParts::ReadOnlyPart *part = createPart( d->m_view->viewport(), child->m_name.ascii(), this, child->m_name.ascii(), mimetype, child->m_serviceName, child->m_services, child->m_params );
-
-    if ( !part )
-    {
-        if ( child->m_frame )
-            child->m_frame->partLoadingErrorNotify();
-
-        checkEmitLoadEvent();
-        return false;
-    }
-
-    //CRITICAL STUFF
-    if ( child->m_part )
-    {
-      partManager()->removePart( (KParts::ReadOnlyPart *)child->m_part );
-      delete (KParts::ReadOnlyPart *)child->m_part;
-    }
-
-    child->m_serviceType = mimetype;
-    if ( child->m_frame )
-      child->m_frame->setWidget( part->widget() );
-
-    if ( child->m_type != khtml::ChildFrame::Object )
-      partManager()->addPart( part, false );
-//  else
-//      kdDebug(6005) << "AH! NO FRAME!!!!!" << endl;
-
-    child->m_part = part;
-    assert( child->m_part );
-
-    if ( child->m_type != khtml::ChildFrame::Object )
-    {
-      connect( part, SIGNAL( started( KIO::Job *) ),
-               this, SLOT( slotChildStarted( KIO::Job *) ) );
-      connect( part, SIGNAL( completed() ),
-               this, SLOT( slotChildCompleted() ) );
-      connect( part, SIGNAL( setStatusBarText( const QString & ) ),
-               this, SIGNAL( setStatusBarText( const QString & ) ) );
-    }
-
-    child->m_extension = KParts::BrowserExtension::childObject( part );
-
-    if ( child->m_extension )
-    {
-      connect( child->m_extension, SIGNAL( openURLNotify() ),
-               d->m_extension, SIGNAL( openURLNotify() ) );
-
-      connect( child->m_extension, SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ),
-               this, SLOT( slotChildURLRequest( const KURL &, const KParts::URLArgs & ) ) );
-
-      connect( child->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ),
-               d->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & ) ) );
-      connect( child->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs &, const KParts::WindowArgs &, KParts::ReadOnlyPart *& ) ),
-               d->m_extension, SIGNAL( createNewWindow( const KURL &, const KParts::URLArgs & , const KParts::WindowArgs &, KParts::ReadOnlyPart *&) ) );
-
-      connect( child->m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ),
-               d->m_extension, SIGNAL( popupMenu( const QPoint &, const KFileItemList & ) ) );
-      connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ),
-               d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KFileItemList & ) ) );
-      connect( child->m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ),
-               d->m_extension, SIGNAL( popupMenu( const QPoint &, const KURL &, const QString &, mode_t ) ) );
-      connect( child->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
-               d->m_extension, SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
-
-      connect( child->m_extension, SIGNAL( infoMessage( const QString & ) ),
-               d->m_extension, SIGNAL( infoMessage( const QString & ) ) );
-
-      child->m_extension->setBrowserInterface( d->m_extension->browserInterface() );
-    }
-  }
-
-  checkEmitLoadEvent();
-  // Some JS code in the load event may have destroyed the part
-  // In that case, abort
-  if ( !child->m_part )
-    return false;
-
-  if ( child->m_bPreloaded )
-  {
-    if ( child->m_frame && child->m_part )
-      child->m_frame->setWidget( child->m_part->widget() );
-
-    child->m_bPreloaded = false;
-    return true;
-  }
-
-  child->m_args.reload = d->m_bReloading;
-
-  // make sure the part has a way to find out about the mimetype.
-  // we actually set it in child->m_args in requestObject already,
-  // but it's useless if we had to use a KHTMLRun instance, as the
-  // point the run object is to find out exactly the mimetype.
-  child->m_args.serviceType = mimetype;
-
-  child->m_bCompleted = false;
-  if ( child->m_extension )
-    child->m_extension->setURLArgs( child->m_args );
-
-  if(url.protocol() == "javascript") {
-      if (!child->m_part->inherits("KHTMLPart"))
-          return false;
-
-      KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>(child->m_part));
-
-      p->begin();
-      p->m_url = url;
-      p->write(url.path());
-      p->end();
-      return true;
-  }
-  else if ( !url.isEmpty() )
-  {
-      //kdDebug( 6050 ) << "opening " << url.url() << " in frame " << child->m_part << endl;
-      return child->m_part->openURL( url );
-  }
-  else
-      return true;
-}
-
-KParts::ReadOnlyPart *KHTMLPart::createPart( QWidget *parentWidget, const char *widgetName,
-                                             QObject *parent, const char *name, const QString &mimetype,
-                                             QString &serviceName, QStringList &serviceTypes,
-                                             const QStringList &params )
-{
-  QString constr;
-  if ( !serviceName.isEmpty() )
-    constr.append( QString::fromLatin1( "Name == '%1'" ).arg( serviceName ) );
-
-  KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, QString::null );
-
-  if ( offers.isEmpty() )
-    return 0L;
-
-  KService::Ptr service = *offers.begin();
-
-  KLibFactory *factory = KLibLoader::self()->factory( service->library().latin1() );
-
-  if ( !factory )
-    return 0L;
-
-  KParts::ReadOnlyPart *res = 0L;
-
-  const char *className = "KParts::ReadOnlyPart";
-  if ( service->serviceTypes().contains( "Browser/View" ) )
-    className = "Browser/View";
-
-  if ( factory->inherits( "KParts::Factory" ) )
-    res = static_cast<KParts::ReadOnlyPart *>(static_cast<KParts::Factory *>( factory )->createPart( parentWidget, widgetName, parent, name, className, params ));
-  else
-  res = static_cast<KParts::ReadOnlyPart *>(factory->create( parentWidget, widgetName, className ));
-
-  if ( !res )
-    return res;
-
-  serviceTypes = service->serviceTypes();
-  serviceName = service->name();
-
-  return res;
-}
-
-KParts::PartManager *KHTMLPart::partManager()
-{
-  if ( !d->m_manager )
-  {
-    d->m_manager = new KParts::PartManager( d->m_view->topLevelWidget(), this, "khtml part manager" );
-    d->m_manager->setAllowNestedParts( true );
-    connect( d->m_manager, SIGNAL( activePartChanged( KParts::Part * ) ),
-             this, SLOT( slotActiveFrameChanged( KParts::Part * ) ) );
-    connect( d->m_manager, SIGNAL( partRemoved( KParts::Part * ) ),
-             this, SLOT( slotPartRemoved( KParts::Part * ) ) );
-  }
-
-  return d->m_manager;
-}
-
-void KHTMLPart::submitFormAgain()
-{
-  if( !d->m_bParsing && d->m_submitForm)
-    KHTMLPart::submitForm( d->m_submitForm->submitAction, d->m_submitForm->submitUrl, d->m_submitForm->submitFormData, d->m_submitForm->target, d->m_submitForm->submitContentType, d->m_submitForm->submitBoundary );
-
-  delete d->m_submitForm;
-  d->m_submitForm = 0;
-  disconnect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
-}
-
-void KHTMLPart::submitForm( const char *action, const QString &url, const QByteArray &formData, const QString &_target, const QString& contentType, const QString& boundary )
-{
-  QString target = _target;
-  if ( target.isEmpty() )
-    target = d->m_baseTarget;
-
-  KURL u = completeURL( url, target );
-
-  if ( !u.isValid() )
-  {
-    // ### ERROR HANDLING!
-    return;
-  }
-
-  QString urlstring = u.url();
-
-  if ( urlstring.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
-      urlstring = KURL::decode_string(urlstring);
-      executeScript( urlstring.right( urlstring.length() - 11) );
-      return;
-  }
-
-  if (!checkLinkSecurity(u,
-			 i18n( "<qt>The form will be submitted to <BR><B>%1</B><BR>on your local filesystem.<BR>Do you want to submit the form?" ),
-			 i18n( "Submit" )))
-    return;
-
-  KParts::URLArgs args;
-
-  if (!d->m_referrer.isEmpty())
-     args.metaData()["referrer"] = d->m_referrer;
-
-  args.metaData().insert("main_frame_request",
-                         parentPart() == 0 ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_was_in_use", d->m_ssl_in_use ? "TRUE":"FALSE");
-  args.metaData().insert("ssl_activate_warnings", "TRUE");
-
-  if ( strcmp( action, "get" ) == 0 )
-  {
-    u.setQuery( QString::fromLatin1( formData.data(), formData.size() ) );
-
-    args.frameName = target;
-    args.setDoPost( false );
-  }
-  else
-  {
-    args.postData = formData;
-    args.frameName = target;
-    args.setDoPost( true );
-
-    // construct some user headers if necessary
-    if (contentType.isNull() || contentType == "application/x-www-form-urlencoded")
-      args.setContentType( "Content-Type: application/x-www-form-urlencoded" );
-    else // contentType must be "multipart/form-data"
-      args.setContentType( "Content-Type: " + contentType + "; boundary=" + boundary );
-  }
-
-  if ( d->m_bParsing || d->m_runningScripts > 0 ) {
-    if( d->m_submitForm ) {
-        return;
-    }
-    d->m_submitForm = new KHTMLPartPrivate::SubmitForm;
-    d->m_submitForm->submitAction = action;
-    d->m_submitForm->submitUrl = url;
-    d->m_submitForm->submitFormData = formData;
-    d->m_submitForm->target = _target;
-    d->m_submitForm->submitContentType = contentType;
-    d->m_submitForm->submitBoundary = boundary;
-    connect(this, SIGNAL(completed()), this, SLOT(submitFormAgain()));
-  }
-  else
-    emit d->m_extension->openURLRequest( u, args );
-
-}
-
-void KHTMLPart::popupMenu( const QString &url )
-{
-  KURL completedURL( completeURL( url ) );
-  KURL popupURL;
-  if ( !url.isEmpty() )
-    popupURL = completedURL;
-
-  /*
-  mode_t mode = 0;
-  if ( !u.isLocalFile() )
-  {
-    QString cURL = u.url( 1 );
-    int i = cURL.length();
-    // A url ending with '/' is always a directory
-    if ( i >= 1 && cURL[ i - 1 ] == '/' )
-      mode = S_IFDIR;
-  }
-  */
-  mode_t mode = S_IFDIR; // treat all html documents as "DIR" in order to have the back/fwd/reload
-                         // buttons in the popupmenu
-
-  KXMLGUIClient *client = new KHTMLPopupGUIClient( this, d->m_popupMenuXML, popupURL );
-
-  emit d->m_extension->popupMenu( client, QCursor::pos(), completedURL,
-                                  QString::fromLatin1( "text/html" ), mode );
-
-  delete client;
-
-  emit popupMenu(url, QCursor::pos());
-}
-
-void KHTMLPart::slotChildStarted( KIO::Job *job )
-{
-  khtml::ChildFrame *child = frame( sender() );
-
-  assert( child );
-
-  child->m_bCompleted = false;
-
-  if ( d->m_bComplete )
-  {
-#if 0
-    // WABA: Looks like this belongs somewhere else
-    if ( !parentPart() ) // "toplevel" html document? if yes, then notify the hosting browser about the document (url) changes
-    {
-      emit d->m_extension->openURLNotify();
-    }
-#endif
-    d->m_bComplete = false;
-    emit started( job );
-  }
-}
-
-void KHTMLPart::slotChildCompleted()
-{
-  khtml::ChildFrame *child = frame( sender() );
-
-  assert( child );
-
-  child->m_bCompleted = true;
-  child->m_args = KParts::URLArgs();
-
-  checkCompleted();
-}
-
-void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &args )
-{
-  khtml::ChildFrame *child = frame( sender()->parent() );
-
-  QString frameName = args.frameName.lower();
-  if ( !frameName.isEmpty() )
-  {
-    if ( frameName == QString::fromLatin1( "_top" ) )
-    {
-      emit d->m_extension->openURLRequest( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_blank" ) )
-    {
-      emit d->m_extension->createNewWindow( url, args );
-      return;
-    }
-    else if ( frameName == QString::fromLatin1( "_parent" ) )
-    {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-
-      emit d->m_extension->openURLRequest( url, newArgs );
-      return;
-    }
-    else if ( frameName != QString::fromLatin1( "_self" ) )
-    {
-      khtml::ChildFrame *_frame = recursiveFrameRequest( url, args );
-
-      if ( !_frame )
-      {
-        emit d->m_extension->openURLRequest( url, args );
-        return;
-      }
-
-      child = _frame;
-    }
-  }
-
-  // TODO: handle child target correctly! currently the script are always executed fur the parent
-  QString urlStr = url.url();
-  if ( urlStr.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
-      executeScript( urlStr.right( urlStr.length() - 11) );
-      return;
-  }
-
-  if ( child ) {
-      // Inform someone that we are about to show something else.
-      child->m_bNotify = true;
-      requestObject( child, url, args );
-  }  else if ( frameName==QString::fromLatin1("_self") ) // this is for embedded objects (via <object>) which want to replace the current document
-  {
-      KParts::URLArgs newArgs( args );
-      newArgs.frameName = QString::null;
-      emit d->m_extension->openURLRequest( url, newArgs );
-  }
-}
-
-khtml::ChildFrame *KHTMLPart::frame( const QObject *obj )
-{
-    assert( obj->inherits( "KParts::ReadOnlyPart" ) );
-    const KParts::ReadOnlyPart *part = static_cast<const KParts::ReadOnlyPart *>( obj );
-
-    FrameIt it = d->m_frames.begin();
-    FrameIt end = d->m_frames.end();
-    for (; it != end; ++it )
-      if ( (KParts::ReadOnlyPart *)(*it).m_part == part )
-        return &(*it);
-
-    return 0L;
-}
-
-KHTMLPart *KHTMLPart::findFrame( const QString &f )
-{
-#if 0
-  kdDebug() << "KHTMLPart::findFrame '" << f << "'" << endl;
-  FrameIt it2 = d->m_frames.begin();
-  FrameIt end = d->m_frames.end();
-  for (; it2 != end; ++it2 )
-      kdDebug() << "  - having frame '" << (*it2).m_name << "'" << endl;
-#endif
-  // ### http://www.w3.org/TR/html4/appendix/notes.html#notes-frames
-  ConstFrameIt it = d->m_frames.find( f );
-  if ( it == d->m_frames.end() )
-  {
-    //kdDebug() << "KHTMLPart::findFrame frame " << f << " not found" << endl;
-    return 0L;
-  }
-  else {
-    KParts::ReadOnlyPart *p = (*it).m_part;
-    if ( p && p->inherits( "KHTMLPart" ))
-    {
-      //kdDebug() << "KHTMLPart::findFrame frame " << f << " is a KHTMLPart, ok" << endl;
-      return (KHTMLPart*)p;
-    }
-    else
-    {
-#if 0
-      if (p)
-        kdWarning() << "KHTMLPart::findFrame frame " << f << " found but isn't a KHTMLPart ! " << p->className() << endl;
-      else
-        kdWarning() << "KHTMLPart::findFrame frame " << f << " found but m_part=0L" << endl;
-#endif
-      return 0L;
-    }
-  }
-}
-
-bool KHTMLPart::frameExists( const QString &frameName )
-{
-  ConstFrameIt it = d->m_frames.find( frameName );
-  if ( it == d->m_frames.end() )
-    return false;
-
-  // WABA: We only return true if the child actually has a frame
-  // set. Otherwise we might find our preloaded-selve.
-  // This happens when we restore the frameset.
-  return ((*it).m_frame != 0);
-}
-
-KHTMLPart *KHTMLPart::parentPart()
-{
-  if ( !parent() || !parent()->inherits( "KHTMLPart" ) )
-    return 0L;
-
-  return (KHTMLPart *)parent();
-}
-
-khtml::ChildFrame *KHTMLPart::recursiveFrameRequest( const KURL &url, const KParts::URLArgs &args,
-                                                     bool callParent )
-{
-  FrameIt it = d->m_frames.find( args.frameName );
-
-  if ( it != d->m_frames.end() )
-    return &(*it);
-
-  it = d->m_frames.begin();
-  FrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( (*it).m_part && (*it).m_part->inherits( "KHTMLPart" ) )
-    {
-      KHTMLPart *childPart = (KHTMLPart *)(KParts::ReadOnlyPart *)(*it).m_part;
-
-      khtml::ChildFrame *res = childPart->recursiveFrameRequest( url, args, false );
-      if ( !res )
-        continue;
-
-      childPart->requestObject( res, url, args );
-      return 0L;
-    }
-
-  if ( parentPart() && callParent )
-  {
-    khtml::ChildFrame *res = parentPart()->recursiveFrameRequest( url, args );
-
-    if ( res )
-      parentPart()->requestObject( res, url, args );
-
-    return 0L;
-  }
-
-  return 0L;
-}
-
-void KHTMLPart::saveState( QDataStream &stream )
-{
-  kdDebug( 6050 ) << "KHTMLPart::saveState saving URL " << m_url.url() << endl;
-
-  stream << m_url << (Q_INT32)d->m_view->contentsX() << (Q_INT32)d->m_view->contentsY();
-
-  // save link cursor position
-  int focusNodeNumber;
-  if (!d->m_focusNodeRestored)
-  {
-      focusNodeNumber = d->m_focusNodeNumber;
-  }
-  else
-  {
-      focusNodeNumber = 0;
-      if (d->m_doc)
-      {
-          DOM::ElementImpl *focusNode = d->m_doc->focusNode();
-          while( focusNode )
-          {
-              focusNodeNumber++;
-              focusNode = d->m_doc->findNextLink(focusNode, false);
-          }
-      }
-  }
-  stream << focusNodeNumber;
-
-  // Save the doc's cache id.
-  stream << d->m_cacheId;
-
-  // Save the state of the document (Most notably the state of any forms)
-  QStringList docState;
-  if (d->m_doc)
-  {
-     docState = d->m_doc->state();
-  }
-  stream << (Q_UINT32) d->m_settings->charset() << d->m_encoding << docState;
-
-  // Save font data
-  stream << fontSizes() << d->m_fontBase;
-
-  // Save ssl data
-  stream << d->m_ssl_in_use
-         << d->m_ssl_peer_cert_subject
-         << d->m_ssl_peer_cert_issuer
-         << d->m_ssl_peer_ip
-         << d->m_ssl_cipher
-         << d->m_ssl_cipher_desc
-         << d->m_ssl_cipher_version
-         << d->m_ssl_cipher_used_bits
-         << d->m_ssl_cipher_bits
-         << d->m_ssl_cert_state
-         << d->m_ssl_good_from
-         << d->m_ssl_good_until;
-
-  // Save frame data
-  stream << (Q_UINT32)d->m_frames.count();
-
-  QStringList frameNameLst, frameServiceTypeLst, frameServiceNameLst;
-  KURL::List frameURLLst;
-  QValueList<QByteArray> frameStateBufferLst;
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-  {
-    frameNameLst << (*it).m_name;
-    frameServiceTypeLst << (*it).m_serviceType;
-    frameServiceNameLst << (*it).m_serviceName;
-    if ( (*it).m_part )
-      frameURLLst << (*it).m_part->url();
-    else
-      frameURLLst << KURL();
-
-    QByteArray state;
-    QDataStream frameStream( state, IO_WriteOnly );
-
-    if ( (*it).m_part && (*it).m_extension )
-      (*it).m_extension->saveState( frameStream );
-
-    frameStateBufferLst << state;
-  }
-
-  stream << frameNameLst << frameServiceTypeLst << frameServiceNameLst << frameURLLst << frameStateBufferLst;
-}
-
-void KHTMLPart::restoreState( QDataStream &stream )
-{
-  KURL u;
-  Q_INT32 xOffset;
-  Q_INT32 yOffset;
-  Q_UINT32 frameCount;
-  QStringList frameNames, frameServiceTypes, docState, frameServiceNames;
-  KURL::List frameURLs;
-  QValueList<QByteArray> frameStateBuffers;
-  QValueList<int> fSizes;
-  KURL::List visitedLinks;
-  Q_INT32 charset;
-  long old_cacheId = d->m_cacheId;
-  QString encoding;
-
-  stream >> u >> xOffset >> yOffset;
-
-  // restore link cursor position
-  // nth node is active. value is set in checkCompleted()
-  stream >> d->m_focusNodeNumber;
-  d->m_focusNodeRestored = false;
-  kdDebug(6050)<<"new focus Node number is:"<<d->m_focusNodeNumber<<endl;
-
-  stream >> d->m_cacheId;
-
-  stream >> charset >> encoding >> docState;
-  d->m_charset = (QFont::CharSet) charset;
-  d->m_encoding = encoding;
-  if ( d->m_settings ) d->m_settings->setCharset( d->m_charset );
-  kdDebug(6050)<<"restoring charset to:"<< charset << endl;
-
-
-  stream >> fSizes >> d->m_fontBase;
-  // ### odd: this doesn't appear to have any influence on the used font
-  // sizes :(
-  setFontSizes( fSizes );
-
-  // Restore ssl data
-  stream >> d->m_ssl_in_use
-         >> d->m_ssl_peer_cert_subject
-         >> d->m_ssl_peer_cert_issuer
-         >> d->m_ssl_peer_ip
-         >> d->m_ssl_cipher
-         >> d->m_ssl_cipher_desc
-         >> d->m_ssl_cipher_version
-         >> d->m_ssl_cipher_used_bits
-         >> d->m_ssl_cipher_bits
-         >> d->m_ssl_cert_state
-         >> d->m_ssl_good_from
-         >> d->m_ssl_good_until;
-
-  d->m_paSecurity->setIcon( d->m_ssl_in_use ? "lock" : "unlock" );
-
-  stream >> frameCount >> frameNames >> frameServiceTypes >> frameServiceNames
-         >> frameURLs >> frameStateBuffers;
-
-  d->m_bComplete = false;
-  d->m_bLoadEventEmitted = false;
-
-//   kdDebug( 6050 ) << "restoreStakte() docState.count() = " << docState.count() << endl;
-//   kdDebug( 6050 ) << "m_url " << m_url.url() << " <-> " << u.url() << endl;
-//   kdDebug( 6050 ) << "m_frames.count() " << d->m_frames.count() << " <-> " << frameCount << endl;
-
-  if (d->m_cacheId == old_cacheId)
-  {
-    // Partial restore
-    d->m_redirectionTimer.stop();
-
-    FrameIt fIt = d->m_frames.begin();
-    FrameIt fEnd = d->m_frames.end();
-
-    for (; fIt != fEnd; ++fIt )
-        (*fIt).m_bCompleted = false;
-
-    fIt = d->m_frames.begin();
-
-    QStringList::ConstIterator fNameIt = frameNames.begin();
-    QStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
-    QStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
-    KURL::List::ConstIterator fURLIt = frameURLs.begin();
-    QValueList<QByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
-
-    for (; fIt != fEnd; ++fIt, ++fNameIt, ++fServiceTypeIt, ++fServiceNameIt, ++fURLIt, ++fBufferIt )
-    {
-      khtml::ChildFrame *child = &(*fIt);
-
-//      kdDebug( 6050 ) <<  *fNameIt  << " ---- " <<  *fServiceTypeIt << endl;
-
-      if ( child->m_name != *fNameIt || child->m_serviceType != *fServiceTypeIt )
-      {
-        child->m_bPreloaded = true;
-        child->m_name = *fNameIt;
-        child->m_serviceName = *fServiceNameIt;
-        processObjectRequest( child, *fURLIt, *fServiceTypeIt );
-      }
-
-      if ( child->m_part )
-      {
-        child->m_bCompleted = false;
-        if ( child->m_extension )
-        {
-          QDataStream frameStream( *fBufferIt, IO_ReadOnly );
-          child->m_extension->restoreState( frameStream );
-        }
-        else
-          child->m_part->openURL( *fURLIt );
-      }
-    }
-
-    KParts::URLArgs args( d->m_extension->urlArgs() );
-    args.xOffset = xOffset;
-    args.yOffset = yOffset;
-    args.docState = docState; // WABA: How are we going to restore this??
-    d->m_extension->setURLArgs( args );
-
-    d->m_view->setContentsPos( xOffset, yOffset );
-  }
-  else
-  {
-    // Full restore.
-    closeURL();
-    // We must force a clear because we want to be sure to delete all
-    // frames.
-    d->m_bCleared = false;
-    clear();
-    d->m_charset = (QFont::CharSet) charset;
-    d->m_encoding = encoding;
-    if ( d->m_settings ) d->m_settings->setCharset( (QFont::CharSet)charset );
-
-    QStringList::ConstIterator fNameIt = frameNames.begin();
-    QStringList::ConstIterator fNameEnd = frameNames.end();
-
-    QStringList::ConstIterator fServiceTypeIt = frameServiceTypes.begin();
-    QStringList::ConstIterator fServiceNameIt = frameServiceNames.begin();
-    KURL::List::ConstIterator fURLIt = frameURLs.begin();
-    QValueList<QByteArray>::ConstIterator fBufferIt = frameStateBuffers.begin();
-
-    for (; fNameIt != fNameEnd; ++fNameIt, ++fServiceTypeIt, ++fServiceNameIt, ++fURLIt, ++fBufferIt )
-    {
-      khtml::ChildFrame newChild;
-      newChild.m_bPreloaded = true;
-      newChild.m_name = *fNameIt;
-      newChild.m_serviceName = *fServiceNameIt;
-
-//      kdDebug( 6050 ) << *fNameIt << " ---- " << *fServiceTypeIt << endl;
-
-      FrameIt childFrame = d->m_frames.append( newChild );
-
-      processObjectRequest( &(*childFrame), *fURLIt, *fServiceTypeIt );
-
-      (*childFrame).m_bPreloaded = true;
-
-      if ( (*childFrame).m_part )
-      {
-        if ( (*childFrame).m_extension )
-        {
-          QDataStream frameStream( *fBufferIt, IO_ReadOnly );
-          (*childFrame).m_extension->restoreState( frameStream );
-        }
-        else
-          (*childFrame).m_part->openURL( *fURLIt );
-      }
-    }
-
-    KParts::URLArgs args( d->m_extension->urlArgs() );
-    args.xOffset = xOffset;
-    args.yOffset = yOffset;
-    args.docState = docState;
-    d->m_extension->setURLArgs( args );
-//    kdDebug( 6050 ) << "in restoreState : calling openURL for " << u.url() << endl;
-    if (!KHTMLPageCache::self()->isValid(d->m_cacheId))
-       openURL( u );
-    else
-       restoreURL( u );
-  }
-
-}
-
-void KHTMLPart::show()
-{
-  if ( d->m_view )
-    d->m_view->show();
-}
-
-void KHTMLPart::hide()
-{
-  if ( d->m_view )
-    d->m_view->hide();
-}
-
-DOM::Node KHTMLPart::nodeUnderMouse() const
-{
-    return d->m_view->nodeUnderMouse();
-}
-
-void KHTMLPart::emitSelectionChanged()
-{
-  emit d->m_extension->enableAction( "copy", hasSelection() );
-  emit d->m_extension->selectionInfo( selectedText() );
-  emit selectionChanged();
-}
-
-void KHTMLPart::slotIncFontSizes()
-{
-  updateFontSize( ++d->m_fontBase );
-  if ( !d->m_paDecFontSizes->isEnabled() )
-    d->m_paDecFontSizes->setEnabled( true );
-}
-
-void KHTMLPart::slotDecFontSizes()
-{
-  if ( d->m_fontBase >= 1 )
-    updateFontSize( --d->m_fontBase );
-
-  if ( d->m_fontBase == 0 )
-    d->m_paDecFontSizes->setEnabled( false );
-}
-
-void KHTMLPart::setFontBaseInternal( int base, bool absolute )
-{
-    if ( absolute )
-      d->m_fontBase = base;
-    else
-      d->m_fontBase += base;
-
-    if ( d->m_fontBase < 0 )
-        d->m_fontBase = 0;
-
-   d->m_paDecFontSizes->setEnabled( d->m_fontBase > 0 );
-
-    updateFontSize( d->m_fontBase );
-}
-
-void KHTMLPart::setJSStatusBarText( const QString &text )
-{
-   d->m_kjsStatusBarText = text;
-   emit setStatusBarText( d->m_kjsStatusBarText );
-}
-
-void KHTMLPart::setJSDefaultStatusBarText( const QString &text )
-{
-   d->m_kjsDefaultStatusBarText = text;
-   emit setStatusBarText( d->m_kjsDefaultStatusBarText );
-}
-
-QString KHTMLPart::jsStatusBarText() const
-{
-    return d->m_kjsStatusBarText;
-}
-
-QString KHTMLPart::jsDefaultStatusBarText() const
-{
-   return d->m_kjsDefaultStatusBarText;
-}
-
-void KHTMLPart::updateFontSize( int add )
-{
-  resetFontSizes();
-  QValueList<int> sizes = fontSizes();
-
-  QValueList<int>::Iterator it = sizes.begin();
-  QValueList<int>::Iterator end = sizes.end();
-  for (; it != end; ++it )
-    (*it) += add;
-
-  setFontSizes( sizes );
-
-  QApplication::setOverrideCursor( waitCursor );
-  if(d->m_doc) d->m_doc->applyChanges();
-  QApplication::restoreOverrideCursor();
-}
-
-void KHTMLPart::slotLoadImages()
-{
-  if (d->m_doc )
-    d->m_doc->docLoader()->setAutoloadImages( !d->m_doc->docLoader()->autoloadImages() );
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    if ( !( *it ).m_part.isNull() && ( *it ).m_part->inherits( "KHTMLPart" ) ) {
-      KParts::ReadOnlyPart* p = ( *it ).m_part;
-      static_cast<KHTMLPart*>( p )->slotLoadImages();
-    }
-}
-
-void KHTMLPart::reparseConfiguration()
-{
-  KHTMLSettings *settings = KHTMLFactory::defaultHTMLSettings();
-  settings->init();
-
-  // Keep original charset setting.
-  settings->setCharset(d->m_settings->charset());
-  settings->setScript(d->m_settings->script());
-
-  autoloadImages( settings->autoLoadImages() );
-
-  // PENDING(lars) Pass hostname to the following two methods.
-  d->m_bJScriptEnabled = settings->isJavaScriptEnabled();
-  d->m_bJavaEnabled = settings->isJavaEnabled();
-  d->m_bPluginsEnabled = settings->isPluginsEnabled();
-  delete d->m_settings;
-  d->m_settings = new KHTMLSettings(*KHTMLFactory::defaultHTMLSettings());
-
-  QApplication::setOverrideCursor( waitCursor );
-  if(d->m_doc) d->m_doc->applyChanges();
-  QApplication::restoreOverrideCursor();
-}
-
-QStringList KHTMLPart::frameNames() const
-{
-  QStringList res;
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-    res += (*it).m_name;
-
-  return res;
-}
-
-const QList<KParts::ReadOnlyPart> KHTMLPart::frames() const
-{
-  QList<KParts::ReadOnlyPart> res;
-
-  ConstFrameIt it = d->m_frames.begin();
-  ConstFrameIt end = d->m_frames.end();
-  for (; it != end; ++it )
-     res.append( (*it).m_part );
-
-  return res;
-}
-
-bool KHTMLPart::openURLInFrame( const KURL &url, const KParts::URLArgs &urlArgs )
-{
-  FrameIt it = d->m_frames.find( urlArgs.frameName );
-
-  if ( it == d->m_frames.end() )
-    return false;
-
-  // Inform someone that we are about to show something else.
-  if ( !urlArgs.lockHistory() )
-      emit d->m_extension->openURLNotify();
-
-  requestObject( &(*it), url, urlArgs );
-
-  return true;
-}
-
-void KHTMLPart::setDNDEnabled( bool b )
-{
-  d->m_bDnd = b;
-}
-
-bool KHTMLPart::dndEnabled() const
-{
-  return d->m_bDnd;
-}
-
-bool KHTMLPart::event( QEvent *event )
-{
-  if ( KParts::ReadOnlyPart::event( event ) )
-   return true;
-
-  if ( khtml::MousePressEvent::test( event ) )
-  {
-    khtmlMousePressEvent( static_cast<khtml::MousePressEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::MouseDoubleClickEvent::test( event ) )
-  {
-    khtmlMouseDoubleClickEvent( static_cast<khtml::MouseDoubleClickEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::MouseMoveEvent::test( event ) )
-  {
-    khtmlMouseMoveEvent( static_cast<khtml::MouseMoveEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::MouseReleaseEvent::test( event ) )
-  {
-    khtmlMouseReleaseEvent( static_cast<khtml::MouseReleaseEvent *>( event ) );
-    return true;
-  }
-
-  if ( khtml::DrawContentsEvent::test( event ) )
-  {
-    khtmlDrawContentsEvent( static_cast<khtml::DrawContentsEvent *>( event ) );
-    return true;
-  }
-
-  return false;
-}
-
-void KHTMLPart::khtmlMousePressEvent( khtml::MousePressEvent *event )
-{
-  DOM::DOMString url = event->url();
-  QMouseEvent *_mouse = event->qmouseEvent();
-  DOM::Node innerNode = event->innerNode();
-  d->m_mousePressNode = innerNode;
-
-   d->m_dragStartPos = _mouse->pos();
-
-  if ( event->url() != 0 )
-    d->m_strSelectedURL = event->url().string();
-  else
-    d->m_strSelectedURL = QString::null;
-
-  if ( _mouse->button() == LeftButton ||
-       _mouse->button() == MidButton )
-  {
-    d->m_bMousePressed = true;
-
-#ifndef KHTML_NO_SELECTION
-    if ( _mouse->button() == LeftButton )
-    {
-      if ( !innerNode.isNull() )
-      {
-          int offset;
-          DOM::Node node;
-          innerNode.handle()->findSelectionNode( event->x(), event->y(),
-                                            event->nodeAbsX(), event->nodeAbsY(),
-                                                 node, offset );
-
-        if ( node.isNull() || !node.handle() )
-        {
-            //kdDebug( 6000 ) << "Hmm, findSelectionNode returned no node" << endl;
-            d->m_selectionStart = innerNode;
-            d->m_startOffset = 0; //?
-        } else {
-            d->m_selectionStart = node;
-            d->m_startOffset = offset;
-        }
-        //kdDebug(6005) << "KHTMLPart::khtmlMousePressEvent selectionStart=" << d->m_selectionStart.handle()->renderer()
-        //              << " offset=" << d->m_startOffset << endl;
-        d->m_selectionEnd = d->m_selectionStart;
-        d->m_endOffset = d->m_startOffset;
-        d->m_doc->clearSelection();
-      }
-      else
-      {
-        d->m_selectionStart = DOM::Node();
-        d->m_selectionEnd = DOM::Node();
-      }
-      emitSelectionChanged();
-      startAutoScroll();
-    }
-#else
-    d->m_dragLastPos = _mouse->globalPos();
-#endif
-  }
-
-  if ( _mouse->button() == RightButton )
-  {
-    popupMenu( splitUrlTarget(d->m_strSelectedURL) );
-    d->m_strSelectedURL = QString::null;
-  }
-}
-
-void KHTMLPart::khtmlMouseDoubleClickEvent( khtml::MouseDoubleClickEvent * )
-{
-}
-
-void KHTMLPart::khtmlMouseMoveEvent( khtml::MouseMoveEvent *event )
-{
-  QMouseEvent *_mouse = event->qmouseEvent();
-  DOM::DOMString url = event->url();
-  DOM::Node innerNode = event->innerNode();
-
-#ifndef QT_NO_DRAGANDDROP
-  if( d->m_bMousePressed && (!d->m_strSelectedURL.isEmpty() || (!innerNode.isNull() && innerNode.elementId() == ID_IMG) ) &&
-      ( d->m_dragStartPos - _mouse->pos() ).manhattanLength() > KGlobalSettings::dndEventDelay() &&
-      d->m_bDnd && d->m_mousePressNode == innerNode ) {
-
-      QPixmap p;
-      QDragObject *drag = 0;
-      if( !d->m_strSelectedURL.isEmpty() ) {
-          KURL u( completeURL( splitUrlTarget(d->m_strSelectedURL)) );
-          KURL::List uris;
-          uris.append(u);
-          drag = KURLDrag::newDrag( uris, d->m_view->viewport() );
-          p = KMimeType::pixmapForURL(u, 0, KIcon::SizeMedium);
-      } else {
-          HTMLImageElementImpl *i = static_cast<HTMLImageElementImpl *>(innerNode.handle());
-          if( i ) {
-            drag = new QImageDrag( i->currentImage() , d->m_view->viewport() );
-            p = KMimeType::mimeType("image/*")->pixmap(KIcon::Desktop);
-          }
-      }
-
-    if ( !p.isNull() )
-      drag->setPixmap(p);
-
-    stopAutoScroll();
-    if(drag)
-        drag->drag();
-
-    // when we finish our drag, we need to undo our mouse press
-    d->m_bMousePressed = false;
-    d->m_strSelectedURL = "";
-    return;
-  }
-#endif
-
-  QString target;
-  QString surl = splitUrlTarget(url.string(), &target);
-
-  // Not clicked -> mouse over stuff
-  if ( !d->m_bMousePressed )
-  {
-    // The mouse is over something
-    if ( url.length() )
-    {
-      bool shiftPressed = ( _mouse->state() & ShiftButton );
-
-      // Image map
-      if ( !innerNode.isNull() && innerNode.elementId() == ID_IMG )
-      {
-        HTMLImageElementImpl *i = static_cast<HTMLImageElementImpl *>(innerNode.handle());
-        if ( i && i->isServerMap() )
-        {
-          khtml::RenderImage *r = static_cast<khtml::RenderImage *>(i->renderer());
-          if(r)
-          {
-            int absx, absy, vx, vy;
-            r->absolutePosition(absx, absy);
-            view()->contentsToViewport( absx, absy, vx, vy );
-
-            int x(_mouse->x() - vx), y(_mouse->y() - vy);
-
-            d->m_overURL = surl + QString("?%1,%2").arg(x).arg(y);
-            overURL( d->m_overURL, target, shiftPressed );
-            return;
-          }
-        }
-      }
-
-      // normal link
-      QString target;
-      QString surl = splitUrlTarget(url.string(), &target);
-      if ( d->m_overURL.isEmpty() || d->m_overURL != surl )
-      {
-        d->m_overURL = surl;
-        overURL( d->m_overURL, target, shiftPressed );
-      }
-    }
-    else  // Not over a link...
-    {
-      if( !d->m_overURL.isEmpty() ) // and we were over a link  -> reset to "default statusbar text"
-      {
-        d->m_overURL = QString::null;
-        emit onURL( QString::null );
-        // Default statusbar text can be set from javascript. Otherwise it's empty.
-        emit setStatusBarText( d->m_kjsDefaultStatusBarText );
-      }
-    }
-  }
-  else {
-#ifndef KHTML_NO_SELECTION
-    // selection stuff
-    if( d->m_bMousePressed && !innerNode.isNull() && ( _mouse->state() == LeftButton )) {
-      int offset;
-      DOM::Node node;
-      //kdDebug(6000) << "KHTMLPart::khtmlMouseMoveEvent x=" << event->x() << " y=" << event->y()
-      //              << " nodeAbsX=" << event->nodeAbsX() << " nodeAbsY=" << event->nodeAbsY()
-      //              << endl;
-      innerNode.handle()->findSelectionNode( event->x(), event->y(),
-                                             event->nodeAbsX(), event->nodeAbsY(),
-                                             node, offset );
-      // When this stuff is finished, this should never happen.
-      // But currently....
-      if ( node.isNull() || !node.handle() )
-      {
-        //kdWarning( 6000 ) << "findSelectionNode returned no node" << endl;
-        d->m_selectionEnd = innerNode;
-        d->m_endOffset = 0; //?
-      }
-      else
-      {
-        d->m_selectionEnd = node;
-        d->m_endOffset = offset;
-      }
-      //kdDebug( 6000 ) << "setting end of selection to " << d->m_selectionEnd.handle()->renderer() << "/"
-      //                << d->m_endOffset << endl;
-
-      // we have to get to know if end is before start or not...
-      DOM::Node n = d->m_selectionStart;
-      d->m_startBeforeEnd = false;
-      while(!n.isNull()) {
-        if(n == d->m_selectionEnd) {
-          d->m_startBeforeEnd = true;
-          break;
-        }
-        DOM::Node next = n.firstChild();
-        if(next.isNull()) next = n.nextSibling();
-        while( next.isNull() && !n.parentNode().isNull() ) {
-          n = n.parentNode();
-          next = n.nextSibling();
-        }
-        n = next;
-        //d->m_view->viewport()->repaint(false);
-      }
-
-      if ( !d->m_selectionStart.isNull() && !d->m_selectionEnd.isNull() )
-      {
-        if (d->m_selectionEnd == d->m_selectionStart && d->m_endOffset < d->m_startOffset)
-          d->m_doc
-            ->setSelection(d->m_selectionStart.handle(),d->m_endOffset,
-                           d->m_selectionEnd.handle(),d->m_startOffset);
-        else if (d->m_startBeforeEnd)
-          d->m_doc
-            ->setSelection(d->m_selectionStart.handle(),d->m_startOffset,
-                           d->m_selectionEnd.handle(),d->m_endOffset);
-        else
-          d->m_doc
-            ->setSelection(d->m_selectionEnd.handle(),d->m_endOffset,
-                           d->m_selectionStart.handle(),d->m_startOffset);
-      }
-#else
-      if ( d->m_doc && d->m_view ) {
-        QPoint diff( _mouse->globalPos() - d->m_dragLastPos );
-
-        if ( abs( diff.x() ) > 64 || abs( diff.y() ) > 64 ) {
-          d->m_view->scrollBy( -diff.x(), -diff.y() );
-          d->m_dragLastPos = _mouse->globalPos();
-        }
-#endif
-    }
-  }
-
-}
-
-void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
-{
-  QMouseEvent *_mouse = event->qmouseEvent();
-  DOM::Node innerNode = event->innerNode();
-  d->m_mousePressNode = DOM::Node();
-
-  if ( d->m_bMousePressed )
-    stopAutoScroll();
-
-  // Used to prevent mouseMoveEvent from initiating a drag before
-  // the mouse is pressed again.
-  d->m_bMousePressed = false;
-
-#ifndef QT_NO_CLIPBOARD
-  if ((_mouse->button() == MidButton) && (event->url() == 0))
-  {
-    QClipboard *cb = QApplication::clipboard();
-    QCString plain("plain");
-    QString url = cb->text(plain);
-    KURL u(url);
-    if (u.isValid())
-    {
-      QString savedReferrer = d->m_referrer;
-      d->m_referrer = QString::null; // Disable referrer.
-      urlSelected(url, 0,0, "_top");
-      d->m_referrer = savedReferrer; // Restore original referrer.
-    }
-  }
-#endif
-
-#ifndef KHTML_NO_SELECTION
-  // delete selection in case start and end position are at the same point
-  if(d->m_selectionStart == d->m_selectionEnd && d->m_startOffset == d->m_endOffset) {
-    d->m_selectionStart = 0;
-    d->m_selectionEnd = 0;
-    d->m_startOffset = 0;
-    d->m_endOffset = 0;
-    emitSelectionChanged();
-  } else {
-    // we have to get to know if end is before start or not...
-    DOM::Node n = d->m_selectionStart;
-    d->m_startBeforeEnd = false;
-    if( d->m_selectionStart == d->m_selectionEnd ) {
-      if( d->m_startOffset < d->m_endOffset )
-        d->m_startBeforeEnd = true;
-    } else {
-      while(!n.isNull()) {
-        if(n == d->m_selectionEnd) {
-          d->m_startBeforeEnd = true;
-          break;
-        }
-        DOM::Node next = n.firstChild();
-        if(next.isNull()) next = n.nextSibling();
-        while( next.isNull() && !n.parentNode().isNull() ) {
-          n = n.parentNode();
-          next = n.nextSibling();
-        }
-        n = next;
-      }
-    }
-    if(!d->m_startBeforeEnd)
-    {
-      DOM::Node tmpNode = d->m_selectionStart;
-      int tmpOffset = d->m_startOffset;
-      d->m_selectionStart = d->m_selectionEnd;
-      d->m_startOffset = d->m_endOffset;
-      d->m_selectionEnd = tmpNode;
-      d->m_endOffset = tmpOffset;
-      d->m_startBeforeEnd = true;
-    }
-    // get selected text and paste to the clipboard
-#ifndef QT_NO_CLIPBOARD
-    QString text = selectedText();
-    text.replace(QRegExp(QChar(0xa0)), " ");
-    QClipboard *cb = QApplication::clipboard();
-    cb->setText(text);
-#endif
-    //kdDebug( 6000 ) << "selectedText = " << text << endl;
-    emitSelectionChanged();
-  }
-#endif
-
-}
-
-void KHTMLPart::khtmlDrawContentsEvent( khtml::DrawContentsEvent * )
-{
-}
-
-bool KHTMLPart::eventFilter( QObject* o, QEvent* ev )
-{
-    // ### BCI remove for 3.0 (no longer needed)
-    return KParts::ReadOnlyPart::eventFilter( o, ev );
-}
-
-void KHTMLPart::guiActivateEvent( KParts::GUIActivateEvent *event )
-{
-  if ( event->activated() )
-  {
-    emitSelectionChanged();
-    emit d->m_extension->enableAction( "print", d->m_doc != 0 );
-
-    if ( !d->m_settings->autoLoadImages() && d->m_paLoadImages )
-    {
-        QList<KAction> lst;
-        lst.append( d->m_paLoadImages );
-        plugActionList( "loadImages", lst );
-    }
-  }
-}
-
-void KHTMLPart::slotFind()
-{
-  KHTMLPart *part = 0;
-
-  if ( d->m_frames.count() > 0 )
-    part = static_cast<KHTMLPart *>( partManager()->activePart() );
-
-  if(!part)
-      part = this;
-
-  if (!part->inherits("KHTMLPart") )
-  {
-      kdError(6000) << "slotFind: part is a " << part->className() << ", can't do a search into it" << endl;
-      return;
-  }
-
-  // use the part's (possibly frame) widget as parent widget, so that it gets
-  // properly destroyed when the (possible) frame dies
-  if ( !d->m_findDialog ) {
-      d->m_findDialog = new KHTMLFind( part, part->widget(), "khtmlfind" );
-      connect( d->m_findDialog, SIGNAL( done() ),
-               this, SLOT( slotFindDone() ) );
-      connect( d->m_findDialog, SIGNAL( destroyed() ),
-               this, SLOT( slotFindDialogDestroyed() ) );
-  }
-
-  d->m_findDialog->setPart( part );
-  d->m_findDialog->setText( part->d->m_lastFindState.text );
-  d->m_findDialog->setCaseSensitive( part->d->m_lastFindState.caseSensitive );
-  d->m_findDialog->setDirection( part->d->m_lastFindState.direction );
-
-  d->m_findDialog->show();
-
-  d->m_paFind->setEnabled( false );
-}
-
-void KHTMLPart::slotFindDone()
-{
-    assert( d->m_findDialog );
-
-    KHTMLPart *part = d->m_findDialog->part();
-
-    // this code actually belongs into some saveState() method in
-    // KHTMLFind, but as we're saving into the private data section of
-    // the part we have to do it here (no way to access it from the outside
-    // as it is defined only in khtml_part.cpp) (Simon)
-    part->d->m_lastFindState.text = d->m_findDialog->getText();
-    part->d->m_lastFindState.caseSensitive = d->m_findDialog->case_sensitive();
-    part->d->m_lastFindState.direction = d->m_findDialog->get_direction();
-
-    d->m_paFind->setEnabled( true );
-}
-
-void KHTMLPart::slotFindDialogDestroyed()
-{
-    assert( sender() == d->m_findDialog );
-
-    d->m_findDialog = 0;
-    d->m_paFind->setEnabled( true );
-}
-
-void KHTMLPart::slotPrintFrame()
-{
-  if ( d->m_frames.count() == 0 )
-    return;
-
-  KParts::Part *frame = partManager()->activePart();
-
-  KParts::BrowserExtension *ext = KParts::BrowserExtension::childObject( frame );
-
-  if ( !ext )
-    return;
-
-  QMetaData *mdata = ext->metaObject()->slot( "print()" );
-  if ( mdata )
-    (ext->*(mdata->ptr))();
-}
-
-void KHTMLPart::slotSelectAll()
-{
-  KHTMLPart *part = this;
-
-  if ( d->m_frames.count() > 0 && partManager()->activePart() )
-    part = static_cast<KHTMLPart *>( partManager()->activePart() );
-
-  assert( part );
-
-  part->selectAll();
-}
-
-void KHTMLPart::startAutoScroll()
-{
-   connect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
-   d->m_scrollTimer.start(100, false);
-}
-
-void KHTMLPart::stopAutoScroll()
-{
-   disconnect(&d->m_scrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ));
-   if (d->m_scrollTimer.isActive())
-       d->m_scrollTimer.stop();
-}
-
-
-void KHTMLPart::slotAutoScroll()
-{
-    if (d->m_view)
-      d->m_view->doAutoScroll();
-    else
-      stopAutoScroll(); // Safety
-}
-
-void KHTMLPart::selectAll()
-{
-  NodeImpl *first;
-  if (d->m_doc->isHTMLDocument())
-    first = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-  else
-    first = d->m_doc;
-  NodeImpl *next;
-
-  // Look for first text/cdata node that has a renderer
-  while ( first && !((first->nodeType() == Node::TEXT_NODE || first->nodeType() == Node::CDATA_SECTION_NODE) && first->renderer()) )
-  {
-    next = first->firstChild();
-    if ( !next ) next = first->nextSibling();
-    while( first && !next )
-    {
-      first = first->parentNode();
-      if ( first )
-        next = first->nextSibling();
-    }
-    first = next;
-  }
-
-  NodeImpl *last;
-  if (d->m_doc->isHTMLDocument())
-    last = static_cast<HTMLDocumentImpl*>(d->m_doc)->body();
-  else
-    last = d->m_doc;
-  // Look for last text/cdata node that has a renderer
-  while ( last && !((last->nodeType() == Node::TEXT_NODE || last->nodeType() == Node::CDATA_SECTION_NODE) && last->renderer()) )
-  {
-    next = last->lastChild();
-    if ( !next ) next = last->previousSibling();
-    while ( last && !next )
-    {
-      last = last->parentNode();
-      if ( last )
-        next = last->previousSibling();
-    }
-    last = next;
-  }
-
-  if ( !first || !last )
-    return;
-  ASSERT(first->renderer());
-  ASSERT(last->renderer());
-
-  d->m_selectionStart = first;
-  d->m_startOffset = 0;
-  d->m_selectionEnd = last;
-  d->m_endOffset = static_cast<TextImpl *>( last )->string()->l;
-  d->m_startBeforeEnd = true;
-
-  d->m_doc->setSelection( d->m_selectionStart.handle(), d->m_startOffset,
-                          d->m_selectionEnd.handle(), d->m_endOffset );
-
-  emitSelectionChanged();
-}
-
-bool KHTMLPart::checkLinkSecurity(const KURL &linkURL,const QString &message, const QString &button)
-{
-  // Security check on the link.
-  // KURL u( url ); Wrong!! Relative URL could be mis-interpreted!!! (DA)
-  QString linkProto = linkURL.protocol().lower();
-  QString proto = m_url.protocol().lower();
-
-  if ( !linkProto.isEmpty() && !proto.isEmpty() &&
-       ( linkProto == "cgi" || linkProto == "file" ) &&
-       proto != "file" && proto != "cgi" && proto != "man")
-  {
-    Tokenizer *tokenizer = d->m_doc->tokenizer();
-    if (tokenizer)
-      tokenizer->setOnHold(true);
-
-    int response = KMessageBox::Cancel;
-    if (!message.isEmpty())
-    {
-	    response = KMessageBox::warningContinueCancel( 0,
-							   message.arg(linkURL.url()),
-							   i18n( "Security Warning" ),
-							   button);
-    }
-    else
-    {
-	    KMessageBox::error( 0,
-				i18n( "<qt>This untrusted page contains a link<BR><B>%1</B><BR>to your local file system.").arg(linkURL.url()),
-				i18n( "Security Alert" ));
-    }
-
-    if (tokenizer)
-      tokenizer->setOnHold(false);
-    return (response==KMessageBox::Continue);
-  }
-  return true;
-}
-
-void KHTMLPart::slotPartRemoved( KParts::Part *part )
-{
-//    kdDebug(6050) << "KHTMLPart::slotPartRemoved " << part << endl;
-    if ( part == d->m_activeFrame )
-        d->m_activeFrame = 0L;
-}
-
-void KHTMLPart::slotActiveFrameChanged( KParts::Part *part )
-{
-//    kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged part=" << part << endl;
-    if ( part == this )
-    {
-        kdError(6050) << "strange error! we activated ourselves" << endl;
-        assert( false );
-        return;
-    }
-//    kdDebug(6050) << "KHTMLPart::slotActiveFrameChanged d->m_activeFrame=" << d->m_activeFrame << endl;
-    if ( d->m_activeFrame && d->m_activeFrame->widget() && d->m_activeFrame->widget()->inherits( "QFrame" ) )
-    {
-        QFrame *frame = static_cast<QFrame *>( d->m_activeFrame->widget() );
-        if (frame->frameStyle() != QFrame::NoFrame)
-        {
-           frame->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken);
-           frame->repaint();
-        }
-    }
-
-    d->m_activeFrame = part;
-
-    if ( d->m_activeFrame && d->m_activeFrame->widget()->inherits( "QFrame" ) )
-    {
-        QFrame *frame = static_cast<QFrame *>( d->m_activeFrame->widget() );
-        if (frame->frameStyle() != QFrame::NoFrame)
-        {
-           frame->setFrameStyle( QFrame::StyledPanel | QFrame::Plain);
-           frame->repaint();
-        }
-        kdDebug(6050) << "new active frame " << d->m_activeFrame << endl;
-    }
-
-    updateActions();
-
-    // (note: childObject returns 0 if the argument is 0)
-    d->m_extension->setExtensionProxy( KParts::BrowserExtension::childObject( d->m_activeFrame ) );
-}
-
-void KHTMLPart::setActiveNode(const DOM::Node &node)
-{
-    if (!d->m_doc)
-        return;
-    // at the moment, only element nodes can receive focus.
-    DOM::ElementImpl *e = static_cast<DOM::ElementImpl *>(node.handle());
-    if (node.isNull() || e->isElementNode())
-        d->m_doc->setFocusNode(e);
-    if (!d->m_view || !e || e->ownerDocument()!=d->m_doc)
-        return;
-    QRect rect  = e->getRect();
-    kdDebug(6050)<<"rect.x="<<rect.x()<<" rect.y="<<rect.y()<<" rect.width="<<rect.width()<<" rect.height="<<rect.height()<<endl;
-    d->m_view->ensureVisible(rect.right(), rect.bottom());
-    d->m_view->ensureVisible(rect.left(), rect.top());
-}
-
-DOM::Node KHTMLPart::activeNode() const
-{
-    return DOM::Node(d->m_doc?d->m_doc->focusNode():0);
-}
-
-DOM::EventListener *KHTMLPart::createHTMLEventListener( QString code )
-{
-  KJSProxy *proxy = jScript();
-
-  if (!proxy)
-    return 0;
-
-  return proxy->createHTMLEventHandler( code );
-}
-
-KHTMLPart *KHTMLPart::opener()
-{
-    return d->m_opener;
-}
-
-void KHTMLPart::setOpener(KHTMLPart *_opener)
-{
-    d->m_opener = _opener;
-}
-
-bool KHTMLPart::openedByJS()
-{
-    return d->m_openedByJS;
-}
-
-void KHTMLPart::setOpenedByJS(bool _openedByJS)
-{
-    d->m_openedByJS = _openedByJS;
-}
-
-using namespace KParts;
-#include "khtml_part.moc"
-
diff --git a/WebCore/src/kdelibs/khtml/khtml_popupmenu.rc b/WebCore/src/kdelibs/khtml/khtml_popupmenu.rc
deleted file mode 100644
index 4caa819..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_popupmenu.rc
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"><kpartgui name="khtmlpart_popupmenu" version="7">
-<Menu name="popupmenu">
- <Action name="reloadframe" group="reload" />
- <Action name="printFrame" group="print" />
- <Separator weakSeparator="1" />
- <Action name="savelinkas" />
- <Action name="saveimageas" />
- <Separator weakSeparator="1" />
- <Action name="selectAll" />
- <Separator weakSeparator="1" />
- <Action name="copylinklocation" />
- <Action name="stopanimations" />
- <Action name="copyimagelocation" />
- <Action name="viewimage" />
- <Separator weakSeparator="1" />
- <Action name="viewDocumentSource" />
- <Action name="viewFrameSource" />
- <Action name="setEncoding" />
-</Menu>
-</kpartgui>
diff --git a/WebCore/src/kdelibs/khtml/khtml_run.cpp b/WebCore/src/kdelibs/khtml/khtml_run.cpp
deleted file mode 100644
index 7db4ae9..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_run.cpp
+++ /dev/null
@@ -1,183 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- *                     1999 Lars Knoll <knoll at kde.org>
- *                     1999 Antti Koivisto <koivisto at kde.org>
- *                     2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#include "khtml_run.h"
-#include "khtml_part.h"
-#include <kio/job.h>
-#include <kdebug.h>
-#include <kuserprofile.h>
-#include <kmessagebox.h>
-#include <kstringhandler.h>
-#include <klocale.h>
-#include <khtml_ext.h>
-
-KHTMLRun::KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url,
-                    const KParts::URLArgs &args, bool hideErrorDialog )
-: KRun( url, 0, false, false /* No GUI */ ) , m_part( part ),
-  m_args( args ), m_child( child ), m_hideErrorDialog( hideErrorDialog )
-{
-}
-
-void KHTMLRun::foundMimeType( const QString &_type )
-{
-    QString mimeType = _type; // this ref comes from the job, we lose it when using KIO again
-    if ( !m_part->processObjectRequest( m_child, m_strURL, mimeType ) )
-    {
-       if ( !m_bFinished && // couldn't embed
-            mimeType != "inode/directory" && // dirs can't be saved
-            !m_strURL.isLocalFile() ) // ... and remote URL
-       {
-           KService::Ptr offer = KServiceTypeProfile::preferredService(mimeType, true);
-           if ( askSave( m_strURL, offer, mimeType, m_suggestedFilename ) ) // ... -> ask whether to save
-           { // true: saving done or canceled
-               m_bFinished = true;
-               m_bFault = true; // make Konqueror think there was an error, in order to stop the spinning wheel
-           }
-       }
-
-       // Check if running is allowed
-       if ( !m_bFinished &&  //     If not embedddable ...
-            !allowExecution( mimeType, m_strURL ) ) // ...and the user said no (for executables etc.)
-       {
-           m_bFinished = true;
-           //m_bFault = true; // might not be necessary in khtml
-       }
-
-       if ( m_bFinished )
-       {
-           m_timer.start( 0, true );
-           return;
-       }
-
-       kdDebug(6050) << "KHTMLRun::foundMimeType " << _type << " couldn't open" << endl;
-       KRun::foundMimeType( mimeType );
-       return;
-    }
-    m_bFinished = true;
-    m_timer.start( 0, true );
-}
-
-bool KHTMLRun::allowExecution( const QString &serviceType, const KURL &url )
-{
-    if ( !isExecutable( serviceType ) )
-      return true;
-
-    return ( KMessageBox::warningYesNo( 0, i18n( "Do you really want to execute '%1' ? " ).arg( url.prettyURL() ) ) == KMessageBox::Yes );
-}
-
-bool KHTMLRun::isExecutable( const QString &serviceType )
-{
-    return ( serviceType == "application/x-desktop" ||
-             serviceType == "application/x-executable" ||
-             serviceType == "application/x-shellscript" );
-}
-
-bool KHTMLRun::askSave( const KURL & url, KService::Ptr offer, const QString & mimeType, const QString & suggestedFilename )
-{
-    QString surl = KStringHandler::csqueeze( url.prettyURL() );
-    // Inspired from kmail
-    QString question = offer ? i18n("Open '%1' using '%2'?").
-                               arg( surl ).arg(offer->name())
-                       : i18n("Open '%1' ?").arg( surl );
-    int choice = KMessageBox::warningYesNoCancel(
-        0L, question, QString::null,
-        i18n("Save to disk"), i18n("Open"),
-        QString::fromLatin1("askSave")+mimeType); // dontAskAgainName
-    if ( choice == KMessageBox::Yes ) // Save
-        KHTMLPopupGUIClient::saveURL( m_part->widget(), i18n( "Save As..." ), url, QString::null, 0, suggestedFilename );
-
-    return choice != KMessageBox::No; // saved or canceled -> don't open
-}
-
-void KHTMLRun::scanFile()
-{
-  if (m_strURL.protocol().left(4) != "http") // http and https
-  {
-     KRun::scanFile();
-     return;
-  }
-
-  // No check for well-known extensions, since we don't trust HTTP
-
-  KIO::TransferJob *job;
-  if ( m_args.doPost() )
-  {
-      job = KIO::http_post( m_strURL, m_args.postData, false );
-      job->addMetaData("content-type", m_args.contentType());
-  }
-  else
-      job = KIO::get(m_strURL, false, false);
-
-  job->addMetaData(m_args.metaData());
-
-  //job->setWindow((KMainWindow *)m_pMainWindow);
-  connect( job, SIGNAL( result( KIO::Job *)),
-           this, SLOT( slotKHTMLScanFinished(KIO::Job *)));
-  connect( job, SIGNAL( mimetype( KIO::Job *, const QString &)),
-           this, SLOT( slotKHTMLMimetype(KIO::Job *, const QString &)));
-  m_job = job;
-}
-
-void KHTMLRun::slotKHTMLScanFinished(KIO::Job *job)
-{
-  if ( m_hideErrorDialog && job->error() )
-      handleError();
-  else
-      KRun::slotScanFinished(job);
-}
-
-void KHTMLRun::slotKHTMLMimetype(KIO::Job *, const QString &type)
-{
-  KIO::TransferJob *job = (KIO::TransferJob *) m_job;
-  // Update our URL in case of a redirection
-  m_strURL = job->url();
-
-  m_suggestedFilename = job->queryMetaData("content-disposition");
-
-  // Make copy to avoid dead reference
-  QString _type = type;
-  job->putOnHold();
-  m_job = 0;
-
-  foundMimeType( _type );
-}
-
-void KHTMLRun::slotStatResult( KIO::Job *job )
-{
-    if ( m_hideErrorDialog && job->error() )
-        handleError();
-    else
-        KRun::slotStatResult( job );
-}
-
-void KHTMLRun::handleError()
-{
-    // pass an empty url and mimetype to indicate a loading error
-    m_part->processObjectRequest( m_child, KURL(), QString::null );
-    m_job = 0;
-    m_bFault = true;
-    m_bFinished = true;
-
-    m_timer.start( 0, true );
-}
-
-#include "khtml_run.moc"
diff --git a/WebCore/src/kdelibs/khtml/khtml_run.h b/WebCore/src/kdelibs/khtml/khtml_run.h
deleted file mode 100644
index 10d3620..0000000
--- a/WebCore/src/kdelibs/khtml/khtml_run.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
- *                     1999 Lars Knoll <knoll at kde.org>
- *                     1999 Antti Koivisto <koivisto at kde.org>
- *                     2000 Simon Hausmann <hausmann at kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-#ifndef __khtml_run_h__
-#define __khtml_run_h__
-
-#include <krun.h>
-#include <kurl.h>
-#include <kservice.h>
-#include <kparts/browserextension.h>
-
-class KHTMLPart;
-
-namespace khtml
-{
-  struct ChildFrame;
-};
-
-class KHTMLRun : public KRun
-{
-  Q_OBJECT
-public:
-  KHTMLRun( KHTMLPart *part, khtml::ChildFrame *child, const KURL &url, 
-            const KParts::URLArgs &args, bool hideErrorDialog );
-
-  virtual void foundMimeType( const QString &mimetype );
-
-  KHTMLPart *part() const { return m_part; }
-  KParts::URLArgs urlArgs() const { return m_args; }
-
-protected:
-  virtual void scanFile();
-
-  bool allowExecution( const QString &serviceType, const KURL &url );
-  bool isExecutable( const QString &serviceType );
-  bool askSave( const KURL & url, KService::Ptr offer, const QString & mimeType, const QString & suggestedFilename );
-
-protected slots:
-  void slotKHTMLScanFinished(KIO::Job *job);
-  void slotKHTMLMimetype(KIO::Job *job, const QString &type);
-  void slotStatResult( KIO::Job *job );
-
-private:
-  void handleError();
-
-  KHTMLPart *m_part;
-  KParts::URLArgs m_args;
-  khtml::ChildFrame *m_child;
-  QString m_suggestedFilename;
-  bool m_hideErrorDialog;
-};
-
-#endif
diff --git a/WebCore/src/kdelibs/khtml/khtmldefaults.h b/WebCore/src/kdelibs/khtml/khtmldefaults.h
deleted file mode 100644
index cff8f48..0000000
--- a/WebCore/src/kdelibs/khtml/khtmldefaults.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 1998, 1999 Torben Weis <weis at kde.org>
-   Copyright (C) 1999 David Faure <faure at kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-// browser window color defaults -- Bernd
-#define HTML_DEFAULT_LNK_COLOR Qt::blue
-#define HTML_DEFAULT_TXT_COLOR Qt::black
-#define HTML_DEFAULT_VLNK_COLOR Qt::magenta
-
-// KEEP IN SYNC WITH konqdefaults.h in kdebase/libkonq!
-// lets be modern .. -- Bernd
-#define HTML_DEFAULT_VIEW_FONT "helvetica"
-#define HTML_DEFAULT_VIEW_FIXED_FONT "courier"
-// generic CSS fonts. Since usual X distributions don't have a good set of fonts, this
-// is quite conservative...
-#define HTML_DEFAULT_VIEW_SERIF_FONT "times"
-#define HTML_DEFAULT_VIEW_SANSSERIF_FONT "helvetica"
-#define HTML_DEFAULT_VIEW_CURSIVE_FONT "helvetica"
-#define HTML_DEFAULT_VIEW_FANTASY_FONT "helvetica"
-#define HTML_DEFAULT_MIN_FONT_SIZE 7 // everything smaller is usually unreadable.
diff --git a/WebCore/src/kdelibs/khtml/khtmlimage.cpp b/WebCore/src/kdelibs/khtml/khtmlimage.cpp
deleted file mode 100644
index 06b20fa..0000000
--- a/WebCore/src/kdelibs/khtml/khtmlimage.cpp
+++ /dev/null
@@ -1,256 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-#include "khtmlimage.h"
-#include "khtml_part.h"
-#include "khtmlview.h"
-#include "khtml_ext.h"
-#include "xml/dom_docimpl.h"
-#include "html/html_documentimpl.h"
-#include "html/html_elementimpl.h"
-#include "rendering/render_image.h"
-#include "misc/loader.h"
-
-#include <qvbox.h>
-#include <qtimer.h>
-
-#include <kparts/factory.h>
-#include <kio/job.h>
-#include <kglobal.h>
-#include <kinstance.h>
-#include <kaction.h>
-#include <kmimetype.h>
-#include <klocale.h>
-
-extern "C"
-{
-    void *init_libkhtmlimage()
-    {
-        return new KHTMLImageFactory();
-    }
-};
-
-KInstance *KHTMLImageFactory::s_instance = 0;
-
-KHTMLImageFactory::KHTMLImageFactory()
-{
-    s_instance = new KInstance( "khtmlimage" );
-}
-
-KHTMLImageFactory::~KHTMLImageFactory()
-{
-    delete s_instance;
-}
-
-KParts::Part *KHTMLImageFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
-                                                   QObject *parent, const char *name,
-                                                   const char *, const QStringList & )
-{
-    return new KHTMLImage( parentWidget, widgetName, parent, name );
-}
-
-KHTMLImage::KHTMLImage( QWidget *parentWidget, const char *widgetName,
-                        QObject *parent, const char *name )
-    : KParts::ReadOnlyPart( parent, name )
-{
-    setInstance( KHTMLImageFactory::instance() );
-
-    QVBox *box = new QVBox( parentWidget, widgetName );
-
-    m_khtml = new KHTMLPart( box, widgetName, this, "htmlimagepart" );
-    m_khtml->autoloadImages( true );
-
-    setWidget( box );
-
-    setXMLFile( m_khtml->xmlFile() );
-
-    m_ext = new KHTMLImageBrowserExtension( this, "be" );
-
-    connect( m_khtml->browserExtension(), SIGNAL( popupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ),
-             this, SLOT( slotPopupMenu( KXMLGUIClient *, const QPoint &, const KURL &, const QString &, mode_t ) ) );
-
-    connect( m_khtml->browserExtension(), SIGNAL( enableAction( const char *, bool ) ),
-             m_ext, SIGNAL( enableAction( const char *, bool ) ) );
-
-    m_ext->setURLDropHandlingEnabled( true );
-}
-
-KHTMLImage::~KHTMLImage()
-{
-    // important: delete the html part before the part or qobject destructor runs.
-    // we now delete the htmlpart which deletes the part's widget which makes
-    // _OUR_ m_widget 0 which in turn avoids our part destructor to delete the
-    // widget ;-)
-    // ### additional note: it _can_ be that the part has been deleted before:
-    // when we're in a html frameset and the view dies first, then it will also
-    // kill the htmlpart
-    if ( m_khtml )
-        delete static_cast<KHTMLPart *>( m_khtml );
-}
-
-bool KHTMLImage::openURL( const KURL &url )
-{
-    static const QString &html = KGlobal::staticQString( "<html><body><img src=\"%1\"></body></html>" );
-
-    m_url = url;
-
-    emit started( 0 );
-
-    KParts::URLArgs args = m_ext->urlArgs();
-    m_mimeType = args.serviceType;
-
-    m_khtml->begin( m_url, args.xOffset, args.yOffset );
-    m_khtml->setAutoloadImages( true );
-
-    DOM::DocumentImpl *impl = dynamic_cast<DOM::DocumentImpl *>( m_khtml->document().handle() ); // ### hack ;-)
-    if ( impl && m_ext->urlArgs().reload )
-        impl->docLoader()->setReloading(true);
-
-    m_khtml->write( html.arg( m_url.url() ) );
-    m_khtml->end();
-
-    KIO::Job *job = khtml::Cache::loader()->jobForRequest( m_url.url() );
-
-    emit setWindowCaption( url.prettyURL() );
-
-    if ( job )
-    {
-        emit started( job );
-
-        connect( job, SIGNAL( result( KIO::Job * ) ),
-                 this, SLOT( slotImageJobFinished( KIO::Job * ) ) );
-    }
-    else
-    {
-        emit started( 0 );
-        emit completed();
-    }
-
-    return true;
-}
-
-bool KHTMLImage::closeURL()
-{
-    return true;
-}
-
-void KHTMLImage::guiActivateEvent( KParts::GUIActivateEvent *e )
-{
-    if ( e->activated() )
-        emit setWindowCaption( m_url.prettyURL() );
-}
-
-void KHTMLImage::slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u,
-                                const QString &, mode_t mode )
-{
-    KAction *encodingAction = cl->actionCollection()->action( "setEncoding" );
-    if ( encodingAction )
-        cl->actionCollection()->take( encodingAction );
-    emit m_ext->popupMenu( cl, pos, u, m_mimeType, mode );
-}
-
-void KHTMLImage::slotImageJobFinished( KIO::Job *job )
-{
-    if ( job->error() )
-    {
-        job->showErrorDialog();
-        emit canceled( job->errorString() );
-    }
-    else
-    {
-        if ( m_khtml->view()->contentsY() == 0 )
-        {
-            KParts::URLArgs args = m_ext->urlArgs();
-            m_khtml->view()->setContentsPos( args.xOffset, args.yOffset );
-        }
-
-        emit completed();
-
-        QTimer::singleShot( 0, this, SLOT( updateWindowCaption() ) );
-    }
-}
-
-void KHTMLImage::updateWindowCaption()
-{
-    if ( !m_khtml )
-        return;
-
-    DOM::HTMLDocumentImpl *impl = dynamic_cast<DOM::HTMLDocumentImpl *>( m_khtml->document().handle() );
-    if ( !impl )
-        return;
-
-    DOM::HTMLElementImpl *body = impl->body();
-    if ( !body )
-        return;
-
-    DOM::NodeImpl *image = body->firstChild();
-    if ( !image )
-        return;
-
-    khtml::RenderImage *renderImage = dynamic_cast<khtml::RenderImage *>( image->renderer() );
-    if ( !renderImage )
-        return;
-
-    QPixmap pix = renderImage->pixmap();
-
-    QString caption;
-
-    KMimeType::Ptr mimeType;
-    if ( !m_mimeType.isEmpty() )
-        mimeType = KMimeType::mimeType( m_mimeType );
-
-    if ( mimeType )
-        caption = i18n( "%1 - %2x%3 Pixels" ).arg( mimeType->comment() )
-                  .arg( pix.width() ).arg( pix.height() );
-    else
-        caption = i18n( "Image - %2x%3 Pixels" ).arg( pix.width() ).arg( pix.height() );
-
-    emit setWindowCaption( caption );
-}
-
-KHTMLImageBrowserExtension::KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name )
-    : KParts::BrowserExtension( parent, name )
-{
-    m_imgPart = parent;
-}
-
-int KHTMLImageBrowserExtension::xOffset()
-{
-    return m_imgPart->doc()->view()->contentsX();
-}
-
-int KHTMLImageBrowserExtension::yOffset()
-{
-    return m_imgPart->doc()->view()->contentsY();
-}
-
-void KHTMLImageBrowserExtension::print()
-{
-    static_cast<KHTMLPartBrowserExtension *>( m_imgPart->doc()->browserExtension() )->print();
-}
-
-void KHTMLImageBrowserExtension::reparseConfiguration()
-{
-    static_cast<KHTMLPartBrowserExtension *>( m_imgPart->doc()->browserExtension() )->reparseConfiguration();
-    m_imgPart->doc()->autoloadImages( true );
-}
-
-using namespace KParts;
-
-#include "khtmlimage.moc"
diff --git a/WebCore/src/kdelibs/khtml/khtmlimage.desktop b/WebCore/src/kdelibs/khtml/khtmlimage.desktop
deleted file mode 100644
index aba499a..0000000
--- a/WebCore/src/kdelibs/khtml/khtmlimage.desktop
+++ /dev/null
@@ -1,86 +0,0 @@
-[Desktop Entry]
-Type=Service
-Comment=Embeddable Image Viewing Component
-Comment[az]=Hopdurula Bilən Rəsm Nümayiş Vasitəsi
-Comment[bg]=Вграден елемент на преглед за картини
-Comment[cs]=Komponenta pro zobrazování obrázků
-Comment[da]=Indbygget komponent til fremvisning af billeder.
-Comment[de]=Einbettungsfähige Bildbetrachter-Komponente
-Comment[el]=Ενσωματώσιμο άρθρωμα Προβολής Εικόνων
-Comment[eo]=Enkonstruebla bildrigardilo
-Comment[es]=Componente incrustable para visualizar imágenes
-Comment[et]=Põimitav pildifailide näitamise komponent
-Comment[fi]=Upotettava kuviennäyttökomponentti
-Comment[fr]=Composant afficheur d'images incorporé
-Comment[gl]=Compoñente de visualización de imaxes embebible
-Comment[he]=תונומת תגצהל העבטה-רב ביכר
-Comment[hu]=Beágyazható képnéző komponens
-Comment[is]=khtmlimage:  Ásetjanleg mynd-sjá
-Comment[it]=Componente importabile per la visualizzazione delle immagini
-Comment[ja]=埋め込み可能なイメージビューコンポーネント
-Comment[ko]=다른 곳에 끼워져서 그림을 보여주는 콤포넌트
-Comment[lt]=Įdedamas piešinių peržiūros komponentas
-Comment[lv]=Iegultā Attēlu Skatīšanas Komponente
-Comment[mk]=Вградлива компонента за гледање слики
-Comment[mt]=Komponent integrat għall wiri tal-istampi
-Comment[nl]=een inbedbaar afbeeldingenviewercomponent
-Comment[no]=Inkluderbart bildevisningskomponent
-Comment[no_NY]=Inkluderbart komponent for biletevising
-Comment[pl]=Składnik do przeglądania obrazów
-Comment[pt_BR]=Componente embutível de visualização de imagens
-Comment[pt]=Componente embebível para visualizar imagens
-Comment[ru]=Элемент просмотра встраиваемых изображений
-Comment[sk]=Vložiteľný komponent prehliadač obrázkov
-Comment[sl]=Integrirana komponenta za pregled slik
-Comment[sr]=Ugradiva komponenta za pregled slika
-Comment[sv]=Inbäddningsbar bildvisande komponent
-Comment[ta]=¯ð¦À¡¾¢ó¾ ¯ì¸¡ðÊì ÜÚ
-Comment[tr]=Gömülebilir Resim Görüntüleme Aracı
-Comment[uk]=Вбудований копмонент-переглядач образів
-Comment[vi]=Component đềExem ảnh có thềEembedd được 
-Comment[xh]=Inxenye yemboniselo yomfanekiso olungisiweyo
-Comment[zh_CN.GB2312]=可嵌入的图像查看部件
-MimeType=image/gif;image/x-xpm;image/x-xbm;image/jpeg;image/bmp;image/png;image/x-ico;
-Name=Embeddable Image Viewer
-Name[az]=Daxili Rəsm Nümayişçisi
-Name[bg]=Вграден преглед на картини
-Name[cs]=Zabudovaný prohlížeč obrázků
-Name[da]=Indbygget billedfremviser.
-Name[de]=Eingebetteter Bildbetrachter
-Name[el]=Ενσωματώσιμη Προβολή Εικόνας
-Name[eo]=Enkonstruita bildrigardilo
-Name[es]=Visor de imágenes incrustable
-Name[et]=Põimitav pildifailide näitaja
-Name[fi]=Upotettava kuvannäyttäjä
-Name[fr]=Afficheur d'images incorporé
-Name[gl]=Visualizador de Imaxes Embebible
-Name[he]=העבטה-רב תונומת גיצמ
-Name[hu]=Beágyazható képnézegető
-Name[is]=Ásetjanleg myndsjá
-Name[it]=Visualizzatore integrabile di immagini
-Name[ja]=埋め込みイメージビューア
-Name[ko]=다른 곳에 끼워지는 그림 보기
-Name[lt]=Įdedamas piešinių žiūriklis
-Name[lv]=Iegultais Attēlu Skatītājs
-Name[mk]=Вгнездлив гледач на слики
-Name[mt]=Werrej integrat tal-istampi
-Name[nl]=Ingebedde Afbeeldingenviewer
-Name[no]=Innlimbart bildeviser
-Name[no_NY]=Innebygd biletevisar
-Name[pl]=Wbudowana przeglądarka obrazów
-Name[pt_BR]=Visualizador embutido de imagens
-Name[pt]=Visualizador de Imagens Embebido
-Name[ru]=Просмотрщик встроенных изображений
-Name[sk]=Vložiteľný prehliadač obrázkov
-Name[sl]=Vgrajen pregledovalnik slik
-Name[sr]=Ugrađeni prikazivač slika
-Name[sv]=Inbäddningsbar bildvisare
-Name[ta]=¯ð¦À¡¾¢ó¾ ¯Õì ¸¡ðÊ
-Name[tr]=Gömülü Resim Görüntüleyici
-Name[uk]=Вмонтований переглядач образів
-Name[vi]=Trình xem ảnh có thềEembedd được 
-Name[xh]=Umboniseli womfanekiso olungisiweyo
-Name[zh_CN.GB2312]=可嵌入的图像查看器
-ServiceTypes=KParts/ReadOnlyPart
-InitialPreference=4
-X-KDE-Library=libkhtmlimage
diff --git a/WebCore/src/kdelibs/khtml/khtmlimage.h b/WebCore/src/kdelibs/khtml/khtmlimage.h
deleted file mode 100644
index 29bfac8..0000000
--- a/WebCore/src/kdelibs/khtml/khtmlimage.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2000 Simon Hausmann <hausmann at kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.
-*/
-
-#ifndef __khtmlimage_h__
-#define __khtmlimage_h__
-
-#include <kparts/part.h>
-#include <kparts/factory.h>
-#include <kparts/browserextension.h>
-
-class KHTMLPart;
-class KInstance;
-
-class KHTMLImageFactory : public KParts::Factory
-{
-    Q_OBJECT
-public:
-    KHTMLImageFactory();
-    virtual ~KHTMLImageFactory();
-
-    virtual KParts::Part *createPartObject( QWidget *parentWidget, const char *widgetName,
-                                            QObject *parent, const char *name,
-                                            const char *className, const QStringList &args );
-
-    static KInstance *instance() { return s_instance; }
-
-private:
-    static KInstance *s_instance;
-};
-
-class KHTMLImage : public KParts::ReadOnlyPart
-{
-    Q_OBJECT
-public:
-    KHTMLImage( QWidget *parentWidget, const char *widgetName,
-                QObject *parent, const char *name );
-    virtual ~KHTMLImage();
-
-    virtual bool openFile() { return true; } // grmbl, should be non-pure in part.h, IMHO
-
-    virtual bool openURL( const KURL &url );
-
-    virtual bool closeURL();
-
-    KHTMLPart *doc() const { return m_khtml; }
-
-protected:
-    virtual void guiActivateEvent( KParts::GUIActivateEvent *e );
-
-private slots:
-    void slotPopupMenu( KXMLGUIClient *cl, const QPoint &pos, const KURL &u, const QString &mime, mode_t mode );
-    void slotImageJobFinished( KIO::Job *job );
-
-    void updateWindowCaption();
-
-private:
-    QGuardedPtr<KHTMLPart> m_khtml;
-    KParts::BrowserExtension *m_ext;
-    QString m_mimeType;
-};
-
-class KHTMLImageBrowserExtension : public KParts::BrowserExtension
-{
-    Q_OBJECT
-public:
-    KHTMLImageBrowserExtension( KHTMLImage *parent, const char *name = 0 );
-
-    virtual int xOffset();
-    virtual int yOffset();
-
-protected slots:
-    void print();
-    void reparseConfiguration();
-
-private:
-    KHTMLImage *m_imgPart;
-};
-
-#endif
diff --git a/WebCore/src/kdelibs/khtml/pics/hi16-action-images_display.png b/WebCore/src/kdelibs/khtml/pics/hi16-action-images_display.png
deleted file mode 100644
index 32cf56e..0000000
Binary files a/WebCore/src/kdelibs/khtml/pics/hi16-action-images_display.png and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/pics/hi22-action-images_display.png b/WebCore/src/kdelibs/khtml/pics/hi22-action-images_display.png
deleted file mode 100644
index 5df2c52..0000000
Binary files a/WebCore/src/kdelibs/khtml/pics/hi22-action-images_display.png and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/pics/hi32-action-images_display.png b/WebCore/src/kdelibs/khtml/pics/hi32-action-images_display.png
deleted file mode 100644
index 4f0b2bd..0000000
Binary files a/WebCore/src/kdelibs/khtml/pics/hi32-action-images_display.png and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/test/README b/WebCore/src/kdelibs/khtml/test/README
deleted file mode 100644
index 2ffc4a9..0000000
--- a/WebCore/src/kdelibs/khtml/test/README
+++ /dev/null
@@ -1,6 +0,0 @@
-The contents of this directory will be moved to the toplevel directory khtmltests
-
-PLEASE DO NOT POST TEST CASES HERE ANY MORE
-
-
-See  khtmltests/README
diff --git a/WebCore/src/kdelibs/khtml/test/URL1.html b/WebCore/src/kdelibs/khtml/test/URL1.html
deleted file mode 100644
index cb54704..0000000
--- a/WebCore/src/kdelibs/khtml/test/URL1.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<html> <head> <title>URL Test 1</title> </head>
-
-
-<body>
-<BASE href="http://localhost/test/URL.html">
-<H1>URL Test 1</H1>
-This page is the first regression test out of a set for URL handling
-within HTML.<BR>
-Testing &lt;BASE href="http://localhost/test/URL.html"&gt;<BR>
-The following link should point to "http://localhost/test/URL2.html": 
-<a href="URL2.html">link</a><BR>
-<BR>
-The following link should point to "http://localhost/test/URL2.html?somedata"
-<a href="URL2.html?somedata">link</a><BR>
-<BR>
-The following link should point to "http://localhost/test/~username"
-<a href="~username">link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org" if you click on it
-you should indeed get there.
-<a href="
-http://www.kde.org">link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org" if you click on it
-you should indeed get there.
-<a href="http://www.kde.org
- ">link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org" if you click on it
-you should indeed get there.
-<a href='http://www.kde.org'>link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org/"quote"/".
-<a href='http://www.kde.org/"quote"/'>link</a><BR>
-<BR>
-The following link should point to "http://www.kde.org/'quote'/".
-<a href="http://www.kde.org/'quote'/">link</a><BR>
-<BR>
-The following link should point to "http://cwisdb.cc.kuleuven.ac.be/oo-bin/9899/liststudj.pl?bla&amp;lang=N&amp;cyclus=tweede".
-<a href="http://cwisdb.cc.kuleuven.ac.be/oo-bin/9899/liststudj.pl?bla&lang=N&cyclus=tweede">link</a><BR>
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/URL2.html b/WebCore/src/kdelibs/khtml/test/URL2.html
deleted file mode 100644
index 2689522..0000000
--- a/WebCore/src/kdelibs/khtml/test/URL2.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html> <head> <title>URL Test 2</title> </head>
-
-
-<body>
-<H1>URL Test 2</H1>
-This page is the second regression test out of a set for URL handling
-within HTML.<BR>
-Testing relative and absolute links<BR>
-The following link should bring you to the page "URL Test 1"  : 
-<a href="URL1.html">link</a><BR>
-<BR>
-The following link should bring you to "http://localhost/URL1.html" :
-<a href="http://localhost/URL1.html">link</a><BR>
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/align.html b/WebCore/src/kdelibs/khtml/test/align.html
deleted file mode 100644
index ab663bf..0000000
--- a/WebCore/src/kdelibs/khtml/test/align.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Left Aligned Image</TITLE>
-</HEAD>
-<BODY>
-<IMG SRC="nav_bar.gif" height=100 width=200 ALIGN=left border=1>
-The image on this page should be left aligned. Especially the list which
-follows this text should be laid out correctly. Bla bla bla
-This is just some text which you can safely ignore. This is just some 
-text which you can safely ignore. This is just some text which you can 
-safely ignore. This is just some text which you can safely ignore. 
-<br>
-<ul>
-<li> an item
-<li> This is a very long line which really should be placed on the right 
-place despite it's very long length.
-<li> another item. 
-</ul>
-This is some text placed after the list
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/align1.html b/WebCore/src/kdelibs/khtml/test/align1.html
deleted file mode 100644
index f288b52..0000000
--- a/WebCore/src/kdelibs/khtml/test/align1.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Left Aligned Image</TITLE>
-</HEAD>
-<BODY>
-<IMG SRC="nav_bar.gif" height=100 width=200 ALIGN=right border=1>
-The image on this page should be left aligned. Especially the list which
-follows this text should be laid out correctly. Bla bla bla
-This is just some text which you can safely ignore. This is just some 
-text which you can safely ignore. This is just some text which you can 
-safely ignore. This is just some text which you can safely ignore. 
-<br>
-<ul>
-<li> an item
-<li> This is a very long line which really should be placed on the right 
-place despite it's very long length.
-<li> another item. 
-</ul>
-This is some text placed after the list
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/align2.html b/WebCore/src/kdelibs/khtml/test/align2.html
deleted file mode 100644
index 56f3feb..0000000
--- a/WebCore/src/kdelibs/khtml/test/align2.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Align Test 2</TITLE>
-</HEAD>
-<BODY>
-<H1>Align Test 2</H1>
-This page contains regression tests for vertical alignment of images.
-Each test consist of a table with a colored background. 
-Within the table an empty image is shown with a border of 1 pixel around it. 
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1>
-<FONT size=7>This image has no alignment</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=top>
-<FONT size=7>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=middle>
-<FONT size=7>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=bottom>
-<FONT size=7>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1>
-<FONT size=7>This image has no alignment</FONT>
-<IMG SRC="unknown.gif" height=50 width=50 border=1>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=top>
-<FONT size=7>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=middle>
-<FONT size=7>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=bottom>
-<FONT size=7>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1>
-<FONT>This image has no alignment</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=top>
-<FONT>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=middle>
-<FONT>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=10 width=50 border=1 align=bottom>
-<FONT>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1>
-<FONT>This image has no alignment</FONT>
-<IMG SRC="unknown.gif" height=50 width=50 border=1>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=top>
-<FONT>This image has align=top</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=middle>
-<FONT>This image has align=middle</FONT>
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 100%>
-<tr><td bgcolor="0000ff">
-<IMG SRC="unknown.gif" height=150 width=50 border=1 align=bottom>
-<FONT>This image has align=bottom</FONT>
-</td></tr>
-</TABLE>
-<HR>
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/anchor1.html b/WebCore/src/kdelibs/khtml/test/anchor1.html
deleted file mode 100644
index 4dfb261..0000000
--- a/WebCore/src/kdelibs/khtml/test/anchor1.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<html> <head> <title>Anchor Test 1</title> </head>
-
-
-<body>
-<H1>Anchor Test 1</H1>
-This page is a regression test for anchor's.
-<P>
-<A href="#anchor1">This</a> link should jump to anchor1.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-<P>
-Note that the page may not scroll, if there are no scrollbars!
-</td>
-<td><img src="nav_bar.gif" height=200></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor1>anchor1</a>.
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/anchor2.html b/WebCore/src/kdelibs/khtml/test/anchor2.html
deleted file mode 100644
index 4f54e83..0000000
--- a/WebCore/src/kdelibs/khtml/test/anchor2.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<html> <head> <title>Anchor Test 1</title> </head>
-
-
-<body>
-<H1>Anchor Test 1</H1>
-This page is a regression test for anchor's.
-<P>
-This is <a name=anchor1>anchor1</a>.
-<P>
-<A href="#anchor2">This</a> link should jump to anchor2.
-<P>
-<A href="#anchor3">This</a> link should jump to anchor3.
-<P>
-<A href="#anchor4">This</a> link should jump to anchor4.
-<P>
-<A href="#anchor5">This</a> link should jump to anchor5.
-<P>
-<A href="#anchor6">This</a> link should jump to anchor6.
-<P>
-<A href="#anchor7">This</a> link should jump to anchor7.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=100></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor2>anchor2</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=4000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor3>anchor3</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=8000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor4>anchor4</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=17000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor5>anchor5</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-<Table border=1>
-<tr>
-<td>
-This is a table to get some vertical spacing.
-</td>
-<td><img src="unknown.gif" height=33000></td>
-</tr>
-</table>
-<P>
-This is <a name=anchor6>anchor6</a>.<BR>
-Jump back to <a href="#anchor1">anchor1</a>.
-<P>
-This <b id="anchor7">bold</b> tag has the id anchor7.
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/badpages.html b/WebCore/src/kdelibs/khtml/test/badpages.html
deleted file mode 100644
index bdbb154..0000000
--- a/WebCore/src/kdelibs/khtml/test/badpages.html
+++ /dev/null
@@ -1,127 +0,0 @@
-<html> <head> <title>Bad Pages</title> </head>
-
-
-<body>
-<H1>Bad Pages</H1>
-This page contains links to pages which have been reported to look
-'bad' in the past.
-
-<HR><B>
-<a href="http://www.nytimes.com/library/world/asia/102898china-rights.html">
-http://www.nytimes.com/library/world/asia/102898china-rights.html
-</a></b>
-<P>
-Report: This page doesn't show anything<BR>
-WABA: The error "Access denied" isn't shown to the user<BR>
-malte: No "Access denied", but a misplaced &lt;SELECT&gt;
-
-<HR><B>
-<a href="http://www.apa.at">
-http://www.apa.at
-</a></b>
-<P>
-Report: Loads forever, and bottom two frames never show anything<br>
-malte: reloads once triggered by JS, does not when entered as http://www.apa.at/<br>
-Some frames may not be loaded, when the frameset is loaded from file:/, all is well
-
-<HR><B>
-<a href="http://www.exploits.org/~rkroll/ups.html">
-http://www.exploits.org/~rkroll/ups.html
-</a></b>
-<P>
-Report: If I print it to A4 paper, AOK.
-I try to print it to letter (paper size),
-and kfm crashes.
-I can print other URL's or directory listings
-without mishap.
-
-<HR><B>
-<a href="http://www.blizzard.com">
-http://www.blizzard.com
-</a></b>
-<P>
-Report: just displays big black page<br>
-malte: some links still missing
-
-
-<HR><B>
-<a href="http://www.hotbot.com">
-http://www.hotbot.com
-</a></b>
-<P>
-Report: Lots of errors on this page. Also some odd repainting when resizing<br>
-malte: Label for language combo misplaced<br>
-<a href="table10.html">Testcase</a>
-
-<HR><B>
-<a href="http://www.download.com">
-http://www.download.com
-</a></b>
-<P>
-Report: follow the "Wordperfect for linux" download link and you'll
-come to a badly formatted page.<br>
-malte: Can't reproduce, but text overlaps images on entry page<br>
-<a href="table11.html">Testcase</a>
-
-<HR><B>
-<a href="http://www.ihug.co.nz">
-http://www.ihug.co.nz
-</a></b>
-<P>
-Report: The title banner "ihug something" is not right.
-The rh text should scroll in from the rhs.
-Animated advertisments on this page are not right.
-If it looks like it might have worked the first time
-then reload the page and it'll be wrong.<br>
-malte: what text should scroll? the banners are indeed screwed (wrong colours)
-
-<HR><B>
-<a href="http://www.irt.de/IRT/indexaktuelles.htm">
-http://www.irt.de/IRT/indexaktuelles.htm
-</a></b>
-<P>
-Report: #5648, main frame (including vertical scrollbar) exceeds window size<br>
-<a href="frameset2.html">Testcase</a>
-
-<HR><B>
-<a href="http://www.happypenguin.org">
-http://www.happypenguin.org
-</a></b>
-<P>
-Report: #6937 Middle column way too small, left column too wide instead<br>
-malte: The layout is completely screwed. The top of the page is at the bottom, tables are
-badly messed up
-
-<HR><B>
-<a href="http://www.tweakers.net/pricewatch.dsp">
-http://www.tweakers.net/pricewatch.dsp
-</a></b>
-<P>
-Report: #7597, navbar and logo missing on top, page is too high
-
-<HR><B>
-<a href="http://www.linux.nu">
-http://www.linux.nu
-</a></b>
-<P>
-Report: #8599 massively broken table layout.
-
-<HR><B>
-<a href="http://www.thief-thecircle.com">
-http://www.thief-thecircle.com
-</a></b>
-<P>
-Report: #8792 misaligned images
-
-<HR><B>
-<a href="http://www.reichel.at/page10.html">
-http://www.reichel.at/page10.html
-</a></b>
-<P>
-Report: Page very long 4155<br>
-
-<HR>
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/buggy.html b/WebCore/src/kdelibs/khtml/test/buggy.html
deleted file mode 100644
index ad548a9..0000000
--- a/WebCore/src/kdelibs/khtml/test/buggy.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-  <head>
-    <title>pages that are still a bit buggy in khtml</title>
-  </head>
-
-  <body>
-<p>
-<a href="http://www.infoworld.com">www.infoworld.com</a><br>
-Frames are less than perfect
-<p>
-<a href="http://www.crme.de">crme.de</a>
-Frames don't resize correctly
-<p>
-page very long
-4155 <a href="http://www.reichel.at/page10.html"> http://www.reichel.at/page10.html</a>
- <p> 
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/button.html b/WebCore/src/kdelibs/khtml/test/button.html
deleted file mode 100644
index b9c3ae1..0000000
--- a/WebCore/src/kdelibs/khtml/test/button.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<body bgcolor=white>
-text before
-<button name=button type=submit value="this should get replaced by the contents">
-some text
-<table width=200 border=1>
-<tr><td bgcolor=red>1<td bgcolor=blue>2</tr>
-<tr><td bgcolor=blue>3<td bgcolor=red>4</tr>
-</table>
-more text
-</button>
-text after text after text after text after text after text after text after text after text after text after text after text after text after text after text after text after 
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/src/kdelibs/khtml/test/color.html b/WebCore/src/kdelibs/khtml/test/color.html
deleted file mode 100644
index ff56172..0000000
--- a/WebCore/src/kdelibs/khtml/test/color.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<HTML>
-<HEAD>
-   <TITLE>Color Test 1</TITLE>
-</HEAD>
-<BODY>
-<H1>Color Test 1</H1>
-This page contains regression tests for the parsing of colors.
-Each test consist of a table with a colored background. 
-Within the table the name of the color is written in black text.
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="#0000ff">
-Blue (#0000ff)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="0000ff">
-Blue (0000ff)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="blue">
-Blue (blue)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="BLUE">
-Blue (BLUE)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="#ffff00">
-Yellow (#ffff00)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="ffff00">
-Yellow (ffff00)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="yellow">
-Yellow (yellow)
-</td></tr>
-</TABLE>
-<HR>
-<TABLE width = 150>
-<tr><td bgcolor="teal">
-Teal (teal)
-</td></tr>
-</TABLE>
-<HR>
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/fixed-background.html b/WebCore/src/kdelibs/khtml/test/fixed-background.html
deleted file mode 100644
index 087c9ef..0000000
--- a/WebCore/src/kdelibs/khtml/test/fixed-background.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html> <head> <title>Listing Test 1</title> 
-<style>
-html { background-attachment: fixed;
-    background-image: url(konqi.gif);
-}
-body { color: red; }
-</style>
-</head>
-<body>
-<H1>Listing Test 1</H1>
-This is a regression test to see if the parser handles the &lt;listing&gt;
-tag correctly.<BR>
-<H2>Simple listing</H2>
-Now follows a short listing, after the listing the text
-"End of listing" should be visible.
-<listing>
-//----------------------------------------------------------------------------
-//
-// KDE HTML Widget -- Debug functions
-// $Id$
-
-#include <stdio.h>
-#include <stdarg.h>
-#include "khtml.h"
-
-#ifdef MARTINSDEBUG
-void debugM( const char *msg, ...)
-{
-    va_list ap;
-    va_start( ap, msg );                // use variable arg list
-    vfprintf( stdout, msg, ap );
-    va_end( ap );
-#else
-void debugM(const char *, ... )
-{
-#endif
-}
-</listing>
-End of listing.
-<H2>Listing with entities</H2>
-Now follows a short listing, the listing shoul read
-"a = b&amp;amp;"<BR>
-<listing>
-a = b&amp;
-</listing>
-
-</BODY>
-</HTML>
diff --git a/WebCore/src/kdelibs/khtml/test/image.gif b/WebCore/src/kdelibs/khtml/test/image.gif
deleted file mode 100644
index ba019ef..0000000
Binary files a/WebCore/src/kdelibs/khtml/test/image.gif and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/test/image_map.html b/WebCore/src/kdelibs/khtml/test/image_map.html
deleted file mode 100644
index 21e0023..0000000
--- a/WebCore/src/kdelibs/khtml/test/image_map.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<html> <head> <title>Image Map Test 1</title> </head>
-
-
-<body>
-<H1>Image Map Test 1</H1>
-
-The following image is a clickable map:
-<P>
-<IMG ISMAP SRC="nav_bar.gif" ALT="" BORDER=0 USEMAP="#topbar" HEIGHT=18 WIDTH=361>
-<P>
-Moving the mouse cursor over the image should show different destinations
-<P>
-
-<!-- ===============  TOP IMAGE MAP =========== -->
-<MAP name="topbar">
-<AREA shape="rect" coords="90,0,120,18" href="http://www.kde.org/faq/kdefaq.html">
-<AREA shape="rect" coords="130,0,205,18" href="ftp://ftp.kde.org/pub/kde/">
-<AREA shape="rect" coords="215,0,295,18" href="http://www.kde.org/absolute_url.html">
-<AREA shape="rect" coords="305,0,355,18" href="relative_url_index.html">
-<AREA shape="default" nohref>
-</MAP>
-
-</BODY>
-</HTML>
diff --git a/WebCore/src/kdelibs/khtml/test/index.html b/WebCore/src/kdelibs/khtml/test/index.html
deleted file mode 100644
index ad0c77c..0000000
--- a/WebCore/src/kdelibs/khtml/test/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<html> <head> <title>KHTML Test pages</title> </head>
-
-<body>
-<H1>KHTML Test pages</H1>
-<P>This Page contains links to the regression test pages in this directory</P>
-
-<ul>
-  <li>General Parsing
-    <ul>
-      <li><a href="parser1.html">parser1.html</a> - Spaces, LFs, broken tags</li>
-      <li><a href="parser2.html">parser2.html</a> - Entities</li>
-      <li><a href="parser3.html">parser3.html</a> - Entities inside PRE</li>
-      <li><a href="parser4.html">parser4.html</a> - Entities in different contexts</li>
-      <li><a href="parser_ext1.html">parser_ext1.html</a> - Unencoded &lt; and &gt;</li>
-      <li><a href="comments.html">comments.html</a> - Comment Parsing</li>
-      <li><a href="nbsp.html">npsb.html</a> - Non-breaking white space</li>
-    </ul>
-  </li>
-  <li>Some Tags
-    <ul>
-      <li><a href="title.html">title.html</a> - Titled page</li>
-      <li><a href="notitle.html">notitle.html</a> - Untitled page</li>
-      <li><a href="tag_br.html">tag_br.html</a> - Linebreaks with BR</li>
-      <li><a href="tag_hr.html">tag_hr.html</a> - Rules with HR</li>
-      <li><a href="tag_ol.html">tag_ol.html</a> - Ordered lists with OL</li>
-      <li><a href="tag_ul.html">tag_ul.html</a> - Unordered lists with UL</li>
-      <li><a href="listing.html">listing.html</a> - The LISTING tag</li>
-    </ul>
-  </li>
-  <li>Text Attributes and Layouting
-    <ul>
-      <li><a href="color.html">color.html</a> - Colour handling</li>
-      <li><a href="align.html">align.html</a> - Horizontal alignment (left)</li>
-      <li><a href="align1.html">align.html</a> - Horizontal alignment (right)</li>
-      <li><a href="align2.html">align2.html</a> - Vertical alignment</li>
-      <li><a href="layout.html">layout.html</a> - Layouting</li>
-    </ul>
-  </li>
-  <li>Backgrounds
-    <ul>
-      <li><a href="1pixel.html">1pixel.html</a> - Transparent background image and background colour</li>
-      <li><a href="2pixel.html">2pixel.html</a> - Transparent background image and background colour</li>
-      <li><a href="4pixel.html">4pixel.html</a> - Partially transparent background image</li>
-      <li><a href="fixed-background.html">fixed-background.html</a> - Non-scrolling background</li>
-    </ul>
-  </li>
-  <li>Anchors and Hyperlinks
-    <ul>
-      <li><a href="anchor1.html">anchor1.html</a> - Single anchor</li>
-      <li><a href="anchor2.html">anchor2.html</a> - Multiple anchors</li>
-      <li><a href="URL1.html">URL1.html</a> - BASE and links</li>
-      <li><a href="URL2.html">URL2.html</a> - Absolute and relative URLS</li>
-    </ul>
-  </li>
-  <li>Tables and Lists
-    <ul>
-      <li><a href="lists.html">lists.html</a> - Lists and simple tables</li>
-      <li><a href="table1.html">table1.html</a> - Cell widths #1</li>
-      <li><a href="table2.html">table2.html</a> - Large table performance</li>
-      <li><a href="table3.html">table3.html</a> - Simple tables</li>
-      <li><a href="table4.html">table4.html</a> - Cell widths #2</li>
-      <li><a href="table5.html">table5.html</a> - Cell widths #3</li>
-      <li><a href="table6.html">table6.html</a> - Cell widths #4</li>
-      <li><a href="table7.html">table7.html</a> - colspan and rowspan</li>
-      <li><a href="table8.html">table8.html</a> - Vertical alignment</li>
-      <li><a href="table9.html">table9.html</a> - COL and COLGROUP</li>
-    </ul>
-  </li>
-  <li>Forms
-    <ul>
-      <li><a href="forms.html">forms.html</a> - Forms</li>
-      <li><a href="textarea.html">textarea.html</a> - TEXTAREA</li>
-      <li><a href="button.html">button.html</a> - BUTTON</li>
-    </ul>
-  </li>
-  <li>Frames
-    <ul>
-      <li><a href="frameset.html">frameset.html</a> - Simple FRAMESET</li>
-      <li><a href="iframe.html">iframe.html</a> - IFRAME</li>
-      <li><a href="recursive_frames.html">recursive_frames.html</a> - Recursive FRAMESET</li>
-    </ul>
-  </li>
-  <li>Images, Objects, Plugins, Applets
-    <ul>
-      <li><a href="image_map.html">image_map.html</a> - Imagemap</li>
-      <li><a href="object.html">object.html</a> - OBJECT</li>
-      <li><a href="embed2.html">embed2.html</a> - Different attributes to EMBED</li>
-      <li><a href="embed3.html">embed3.html</a> - OBJECT and EMBED</li>
-      <li><a href="embed4.html">embed4.html</a> - EMBEDs galore</li>
-      <li><a href="embed5.html">embed5.html</a> - Open EMBED</li>
-      <li><a href="embed6.html">embed6.html</a> - Real Player</li>
-      <li><a href="embed7.html">embed7.html</a> - Parameters to MIME-Type</li>
-      <li><a href="embed8.html">embed8.html</a> - Java VM</li>
-      <li><a href="java.html">java.html</a> - Java applet</li>
-    </ul>
-  </li>
-  <li>I18N Support
-    <ul>
-      <li><a href="unicode.html">unicode.html</a> - Unicode characters</li>
-      <li><a href="bidi.html">bidi.html</a> - BiDi</li>
-      <li><a href="bidi2.html">bidi2.html</a> - More bidi</li>
-    </ul>
-  </li>
-  <li>Scripting
-    <ul>
-      <li><a href="javascript.html">javascript.html</a> - JavaScript</li>
-      <li><a href="dom.html">dom.html</a> - General DOM</li>
-      <li><a href="dom_html.html">dom_html.html</a> - HTML DOM</li>
-    </ul>
-  </li>
-  <li><a href="testpages.html">Links to other test suits</a></li>
-  <li><a href="badpages.html">Pages KHTML doesn't like</a></li>
-</ul>
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/java.html b/WebCore/src/kdelibs/khtml/test/java.html
deleted file mode 100644
index dfe8d69..0000000
--- a/WebCore/src/kdelibs/khtml/test/java.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>
-<body>
-<table>
-<tr>
-<td width=240>
-<APPLET CODE=lake.class ID=Lake WIDTH=240 HEIGHT=630>
-    <PARAM NAME=image VALUE="konqi.gif">
-</APPLET>
-<td width=240>
-This is a small page to test html's java support. On the left you should see a picture of
-Konqi, which is mirrored on a water surface below.
-</table>
-This text should be directly beow the applet...
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/src/kdelibs/khtml/test/javascript.html b/WebCore/src/kdelibs/khtml/test/javascript.html
deleted file mode 100644
index 5d1fb56..0000000
--- a/WebCore/src/kdelibs/khtml/test/javascript.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<html>
-  <head>
-    <title>JavaScript Test</title>
-  </head>
-  <body bgcolor=green>
-    <h1>JavaScript Test</h1>
-
-<script>
-var swapped = false;
-function swapPic() {
-  if (!swapped) {
-    window.document.Bild.src='konqi.gif';
-    swapped = true;
-  } else {
-    document.images['Bild'].src='image.gif';
-    swapped = false;
-  }
-}
-var colorSwapped = false;
-function swapCol() {
-  if (!colorSwapped) {
-    document.body.bgColor='red';
-    colorSwapped = true;
-  } else {
-    document.body.bgColor='green';
-    colorSwapped = false;
-  }
-}
-
-</script>
-
-<p>
-<script>document.write('Title: ' + document.title);</script>
-<p>
-<script>document.write('URL: ' + document.URL);</script>
-<p>
-<script>document.write('sin(1) = ' + Math.sin(1));</script>
-<p>
-<a href="" onmouseover="window.status='CLICK HERE !';" onmouseout="window.status='';" onClick="window.alert('Greetings !\n\nYour JavaScript interpreter');">Click here.</a>
-
-<p>
-<img src="image.gif" id="Bild" onmouseover="swapPic();" onmouseout="swapPic();">
-
-<p onmouseover="swapCol();" onmouseout="swapCol();">Change background color</p>
-  </body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/jsplugins.html b/WebCore/src/kdelibs/khtml/test/jsplugins.html
deleted file mode 100644
index 7af7a25..0000000
--- a/WebCore/src/kdelibs/khtml/test/jsplugins.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<HTML>
-<HEAD>
-<TITLE>About Plug-ins</TITLE>
-</HEAD>
-<BODY>
-<SCRIPT language="javascript">
-
-
-<!-- JavaScript to enumerate and display all installed plug-ins -->
-
-<!-- First, refresh plugins in case anything has been changed recently in prefs:                        -->
-<!-- (The "false" argument tells refresh not to reload or activate any plugins that would       -->
-<!-- be active otherwise.  In contrast, one would use "true" in the case of ASD instead of      -->
-<!-- restarting)                                                                                                                                                        -->
-navigator.plugins.refresh(false);
-
-
-numPlugins = navigator.plugins.length;
-
-if (numPlugins > 0)
-        document.writeln("<b><font size=+3>Installed plug-ins</font></b><br>");
-else
-        document.writeln("<b><font size=+2>No plug-ins are installed.</font></b><br>");
-
-document.writeln("For more information on Netscape plug-ins, <A HREF=http://home.netscape.com/plugins/>click here</A>.<p><hr>");
-
-for (i = 0; i < numPlugins; i++)
-{
-        plugin = navigator.plugins[i];
-        
-        document.write("<center><font size=+1><b>");
-        document.write(plugin.name);
-        document.writeln("</b></font></center><br>");
-        
-        document.writeln("<dl><dd>File name:");
-        document.write(plugin.filename);
-        document.write("<dd><br>");
-        document.write(plugin.description);
-        document.writeln("</dl><p>");
-
-        document.writeln("<table width=100% border=2 cellpadding=5>");
-        document.writeln("<tr><th width=20%><font size=-1>Mime Type</font></th>");
-        document.writeln("<th width=50%><font size=-1>Description</font></th>");
-        document.writeln("<th width=20%><font size=-1>Suffixes</font></th>");
-        document.writeln("<th><font size=-1>Enabled</th></tr>");
-        numTypes = plugin.length;
-        for (j = 0; j < numTypes; j++)
-        {
-                mimetype = plugin[j];
-                
-                if (mimetype)
-                {
-                        enabled = "No";
-                        enabledPlugin = mimetype.enabledPlugin;
-                        if (enabledPlugin && (enabledPlugin.name == plugin.name))
-                                enabled = "Yes";
-
-                        document.writeln("<tr align=center>");
-                        document.writeln("<td>" + mimetype.type + "</td>");
-                        document.writeln("<td>" + mimetype.description + "</td>");
-                        document.writeln("<td>" + mimetype.suffixes + "</td>");
-                        document.writeln("<td>" + enabled + "</td>");
-                        document.writeln("</tr>");
-                }
-        }
-        
-        document.write("</table><p><hr><p>");
-}
-
-
-</SCRIPT>
-</BODY>
-</HTML>
\ No newline at end of file
diff --git a/WebCore/src/kdelibs/khtml/test/konqi.gif b/WebCore/src/kdelibs/khtml/test/konqi.gif
deleted file mode 100644
index b80293a..0000000
Binary files a/WebCore/src/kdelibs/khtml/test/konqi.gif and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/test/lake.class b/WebCore/src/kdelibs/khtml/test/lake.class
deleted file mode 100644
index 3196702..0000000
Binary files a/WebCore/src/kdelibs/khtml/test/lake.class and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/test/listing.html b/WebCore/src/kdelibs/khtml/test/listing.html
deleted file mode 100644
index 4f0eefa..0000000
--- a/WebCore/src/kdelibs/khtml/test/listing.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<html> <head> <title>Listing Test 1</title> </head>
-
-<body>
-<H1>Listing Test 1</H1>
-This is a regression test to see if the parser handles the &lt;listing&gt; 
-tag correctly.<BR>
-<H2>Simple listing</H2>
-Now follows a short listing, after the listing the text 
-"End of listing" should be visible.
-<listing>
-//----------------------------------------------------------------------------
-//
-// KDE HTML Widget -- Debug functions
-// $Id$
-
-#include <stdio.h>  
-#include <stdarg.h>      
-#include "khtml.h"
-
-#ifdef MARTINSDEBUG
-void debugM( const char *msg, ...)
-{
-    va_list ap;
-    va_start( ap, msg );                // use variable arg list
-    vfprintf( stdout, msg, ap );
-    va_end( ap );
-#else
-void debugM(const char *, ... )
-{
-#endif
-}       
-</listing>
-End of listing.
-<H2>Listing with entities</H2>
-Now follows a short listing, the listing shoul read 
-"a = b&amp;amp;"<BR>
-<listing>
-a = b&amp;
-</listing>
-
-</BODY>
-</HTML>
diff --git a/WebCore/src/kdelibs/khtml/test/lists.html b/WebCore/src/kdelibs/khtml/test/lists.html
deleted file mode 100644
index 8f78165..0000000
--- a/WebCore/src/kdelibs/khtml/test/lists.html
+++ /dev/null
@@ -1,221 +0,0 @@
-<html>
-<body>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-
-<hr>
-In a fixed width table:
-<table width=100 border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-
-<hr>
-In a variable width table:
-<table border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-
-<hr>
-Now the same thing in a right to left context:
-
-<div dir=rtl>
-<hr>
-<ul dir=rtl>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-
-<hr>
-In a fixed width table:
-<table width=100 border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-
-<hr>
-In a variable width table:
-<table border=1 bgcolor=white>
-<tr><td>
-<ul>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ul>
-
-<hr>
-
-Nested lists:
-<ul>
-<li> first item
-<li> second item
-<li> a nested list
-<ul>
-<li> first nested item
-<li> second nested item
-</ul>
-<li> fourth item
-</ul>
-
-<hr>
-
-Numbered list:
-<ol>
-<li> first item
-<li> second item
-<li> third item
-<li> fourth item
-</ol>
-</td></tr>
-</table>
-</div>
-
-
-</body>
-</html>
\ No newline at end of file
diff --git a/WebCore/src/kdelibs/khtml/test/nav_bar.gif b/WebCore/src/kdelibs/khtml/test/nav_bar.gif
deleted file mode 100644
index 174348d..0000000
Binary files a/WebCore/src/kdelibs/khtml/test/nav_bar.gif and /dev/null differ
diff --git a/WebCore/src/kdelibs/khtml/test/nbsp.html b/WebCore/src/kdelibs/khtml/test/nbsp.html
deleted file mode 100644
index 7a8bde9..0000000
--- a/WebCore/src/kdelibs/khtml/test/nbsp.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html> <head> <title>NBSP Test</title> </head>
-
-
-<body>
-<H1>NBSP Test</H1>
-This page is a regression test to test non-breaking spaces.<BR>
-The following text contains normal and non-breaking spaces.<BR>
-After each 'a' a non-breaking space occurs. After each 'b' a
-breaking space occurs:
-<HR>
-<FONT face="lucida">
-ccccccca&nbsp;cccca&nbsp;ccccccb ccb cb ccb ccca&nbsp;ca&nbsp;a&nbsp;cb
-c4d&nbsp;&nbsp;&nbsp;&nbsp;cccc2d&nbsp;&nbsp;ccccb ccb ccc
-</FONT>
-<HR>
-
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/notitle.html b/WebCore/src/kdelibs/khtml/test/notitle.html
deleted file mode 100644
index cfabc29..0000000
--- a/WebCore/src/kdelibs/khtml/test/notitle.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html> <head> </head>
-
-
-<body>
-<H1>Title Test 2</H1>
-This page is the second regression test out of a set for Title handling
-within HTML.<BR>
-The title of this window should NOT be 
-<blockquote><PRE>Title Test 1</PRE></blockquote>
-
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/object.html b/WebCore/src/kdelibs/khtml/test/object.html
deleted file mode 100644
index 91da9f5..0000000
--- a/WebCore/src/kdelibs/khtml/test/object.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<html><head></head><body>
-<object type="inode/directory" data="file:/home/" width="300" height="100">
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/pseudo.html b/WebCore/src/kdelibs/khtml/test/pseudo.html
deleted file mode 100644
index caba3bf..0000000
--- a/WebCore/src/kdelibs/khtml/test/pseudo.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-<html>
-<head>
-<style>
-span { background-color: blue; }
-span:hover { background-color: red; }
-div { border: 2px solid blue; }
-div:first-letter { background-color: green; float: left; font-size: 3em; margin: 3px 3px 3px 3px}
-div:first-line { background-color: red; font-size: 1em; }
-
-</style>
-</head>
-<body>
-<h1>:first-letter and :first-line</h1>
-<div>
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-Hello world Hello world Hello worldHello world Hello world Hello world Hello world
-</div>
-<h1>:hover</h1>
-<p>
- jee jee <span>jee</span> jee jee jee
-</p>
-</body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/renders.html b/WebCore/src/kdelibs/khtml/test/renders.html
deleted file mode 100644
index d50aa96..0000000
--- a/WebCore/src/kdelibs/khtml/test/renders.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<html>
-  <head>
-    <title>pages khtml renders correctly</title>
-  </head>
-  <body>
-<p>
-    <a href="http://slashdot.org">Slashdot</a><br>
-      The left column is sensitive to changes/bugs in the table layouting code.
-<p>
-<a href="http://spiegel.de">Spiegel</a><br>
-      Page layout is done with floats.
-<p>
-<a href="http://www.linux.com">linux.com</a><br>
-nothing special about this one...
-<p>
-<a href="http://www.w3.org/Style/CSS/Test/current/sec5526c-test.htm">The acid test</a>
-complicated CSS layout using floats
-<p>
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/">David Baron's DOM test suite</a><br>
-Tests that work perfectly so far:
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/DocumentFragment">DocumentFragment</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Document">Document</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Comment">Comment</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Node">Node</a>,
-<a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/Text">Text</a>
-
-<p>
-<a href="http://www.jeremie.com/Dev/DOM/index.jer">more jscript tests</a>
-
-<p>
-<a href="http://www.people.fas.harvard.edu/~dbaron/css/test/">David Barons CSS test suite</a>
-<p>
-Some pages with tests from mozilla.org:
-<ul>
-<li><a href="http://komodo.mozilla.org/buster/">tests lots of pages</a>
-<li><a href="http://www.mozilla.org/quality/browser_sc.html">collection of links to test pages</a>
-</ul>
-
-  </body>
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/supsub.html b/WebCore/src/kdelibs/khtml/test/supsub.html
deleted file mode 100644
index c764267..0000000
--- a/WebCore/src/kdelibs/khtml/test/supsub.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<html> <head> <title>SUP &amp; SUB Test</title> </head>
-
-
-<body>
-<H1>SUP &amp; SUB Test</H1>
-<P>
-This page is a regression test to test the &lt;sup&gt; and &lt;sub&gt; tags.<BR>
-<HR>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-<HR>
-<FONT size=+1>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=+2>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=+3>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=-1>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=-2>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-<FONT size=-3>
-This text contains <SUP>super</SUP>text and <SUB>sub</SUB>text.
-Another line with super<SUP>text</SUP> and sub<SUB>text</SUB>. 
-</FONT>
-<HR>
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/testpages.html b/WebCore/src/kdelibs/khtml/test/testpages.html
deleted file mode 100644
index 7c4192d..0000000
--- a/WebCore/src/kdelibs/khtml/test/testpages.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<html>
-<title>
-Links to some test pages
-</title>
-<body>
-A site with lots of test pages for style sheets:
-<a href="http://style.verso.com/boxacidtest/">http://style.verso.com/boxacidtest/</a>
-<p>
-Some more CSS: <a href="http://haughey.com/csshorrors/">http://haughey.com/csshorrors/</a>
-<p>
-The w3c CSS test suite:<a href="http://www.w3.org/Style/CSS/Test/">
-http://www.w3.org/Style/CSS/Test/</a>
-<p>
-Some CSS2 tests: <a href="http://www.editions-eyrolles.com/livres/glazman/Tests/index.asp?ID=217554">
-http://www.editions-eyrolles.com/livres/glazman/Tests/index.asp?ID=217554</a><p>
-DOM test suite: <a href="http://www.people.fas.harvard.edu/~dbaron/dom/test/">http://www.people.fas.harvard.edu/~dbaron/dom/test/</a><p>
-More evil CSS tests on <a href="http://www.bath.ac.uk/~py8ieh/cgi/listsuites.pl?suite=ETS&mode=list&sort=">bath.ac.uk</a>
-</body>
-</html>
-
diff --git a/WebCore/src/kdelibs/khtml/test/textarea.html b/WebCore/src/kdelibs/khtml/test/textarea.html
deleted file mode 100644
index ea997f0..0000000
--- a/WebCore/src/kdelibs/khtml/test/textarea.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<html> <head> <title>Textarea Test</title> </head>
-
-
-<body>
-<H1>Textarea Test</H1>
-This page is a regression test for the &lt;textarea&gt; tag.<BR>
-The word "Start" should be above the textarea.<BR>
-The word "End" should be underneath the textarea.<BR>
-The text inside the textarea should match with its description.
-<form action="cgi-bin/test.cgi" method=post> 
-<H2>Textarea 1: Emtpy</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50></textarea>
-<P>End
-<P>
-<H2>Textarea 2: Single words</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>Single words</textarea>
-<P>End
-<P>
-<H2>Textarea 3: Lines of text</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>
-This is some text which is inserted into
-the textarea. This area contains 3 lines
-of text.
-</textarea>
-<P>End
-<P>
-<H2>Textarea 4: Text with tags inside</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>
-This is 3 lines of text.
-This lines contains a <B> tag.
-This line does not.
-</textarea>
-<P>End (Note that this text should NOT be bold)
-<P>
-<H2>Textarea 5: Text with entities</H2>
-<P>Start
-<P>
-<textarea wrap=virtual name=textarea1 rows=5 cols=50>
-This is 3 lines of text.
-The correct way to write &lt;TAGS&gt; is by using &amp;entities.
-This is the third line.
-</textarea>
-<P>End
-<P>
-<input type=submit name=mode value="Submit">
-</form>
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/test/title.html b/WebCore/src/kdelibs/khtml/test/title.html
deleted file mode 100644
index 604b571..0000000
--- a/WebCore/src/kdelibs/khtml/test/title.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<html> <head> <title>Title Test 1</title> </head>
-
-
-<body>
-<H1>Title Test 1</H1>
-This page is the first regression test out of a set for Title handling
-within HTML.<BR>
-The title of this window should be 
-<blockquote><PRE>Title Test 1</PRE></blockquote>
-<P>
-Click <a href="notitle.html">here</a> to continue.
-
-</body>
-
-</html>
diff --git a/WebCore/src/kdelibs/khtml/testcss.cpp b/WebCore/src/kdelibs/khtml/testcss.cpp
deleted file mode 100644
index 89c745c..0000000
--- a/WebCore/src/kdelibs/khtml/testcss.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// programm to test the CSS implementation
-
-#include <kapp.h>
-#include <kdebug.h>
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdio.h>
-#include "css/css_stylesheetimpl.h"
-#include "dom/dom_string.h"
-#include "css/cssstyleselector.h"
-#include "html/html_documentimpl.h"
-#include "html/html_elementimpl.h"
-#include "html/html_blockimpl.h"
-using namespace DOM;
-using namespace khtml;
-
-int main(int argc, char *argv[])
-{
-    KApplication a(argc, argv, "testcss");
-
-    char buf[40000];
-    int fd;
-
-    if(argc == 2)
-	fd = open(argv[1], O_RDONLY);
-    else
-	fd = open("/home/kde/test.css", O_RDONLY);
-	
-    if (fd < 0)
-    {
-        kdDebug( 6000 ) << "Couldn't open file" << endl;
-        return 0;
-    }
-
-    int len = read(fd, buf, 40000);
-
-    DOM::DOMString str(buf);
-
-    close(fd);
-
-    DOM::CSSStyleSheetImpl *sheet = new DOM::CSSStyleSheetImpl((DOM::CSSStyleSheetImpl *)0);
-    sheet->parseString( str );
-#if 0
-    kdDebug( 6000 ) << "==============> finished parsing <==================" << endl;
-
-    CSSStyleSelector *selector = new CSSStyleSelector(sheet);
-
-    kdDebug( 6000 ) << "==============> finished creation of Selector <==================" << endl;
-
-    HTMLDocumentImpl *doc;
-    HTMLElementImpl *e = new HTMLParagraphElementImpl(doc);
-    e->setAttribute(DOMString("id"), DOMString("myid"));
-    e->setAttribute(DOMString("class"), DOMString("c myclass anotherclass"));
-
-    selector->styleForElement(e);
-#endif
-    return 0;
-}
diff --git a/WebCore/src/kdelibs/khtml/testkhtml.cpp b/WebCore/src/kdelibs/khtml/testkhtml.cpp
deleted file mode 100644
index 4149a34..0000000
--- a/WebCore/src/kdelibs/khtml/testkhtml.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// programm to test the new khtml implementation
-
-#include <stdlib.h>
-#include "decoder.h"
-#include "kapp.h"
-#include <qfile.h>
-#include "html_document.h"
-#include "htmltokenizer.h"
-// to be able to delete a static protected member pointer in kbrowser...
-// just for memory debugging
-#define protected public
-#include "khtmlview.h"
-#include "khtml_part.h"
-#undef protected
-#include <qpushbutton.h>
-#include "testkhtml.h"
-#include "testkhtml.moc"
-#include "misc/loader.h"
-#include <qcursor.h>
-#include <qcolor.h>
-#include <dom_string.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qobject.h>
-#include <qpushbutton.h>
-#include <qscrollview.h>
-#include <qwidget.h>
-#include <qvaluelist.h>
-#include "dom/dom2_range.h"
-#include "dom/html_document.h"
-#include "dom/dom_exception.h"
-#include <stdio.h>
-#include <khtml_factory.h>
-#include <css/cssstyleselector.h>
-#include <html/html_imageimpl.h>
-#include <rendering/render_style.h>
-#include <kmainwindow.h>
-#include <kcmdlineargs.h>
-#include <kaction.h>
-#include "domtreeview.h"
-
-static KCmdLineOptions options[] = { { "+file", "url to open", 0 } , {0, 0, 0} };
-
-int main(int argc, char *argv[])
-{
-
-    KCmdLineArgs::init(argc, argv, "Testkhtml", "a basic web browser using the KHTML library", "1.0");
-    KCmdLineArgs::addCmdLineOptions(options);
-
-    KApplication a;
-    KCmdLineArgs *args = KCmdLineArgs::parsedArgs( );
-    if ( args->count() == 0 ) {
-	KCmdLineArgs::usage();
-	::exit( 1 );
-    }
-
-    KHTMLFactory *fac = new KHTMLFactory();
-
-    KMainWindow *toplevel = new KMainWindow();
-    KHTMLPart *doc = new KHTMLPart( toplevel, 0,
-				    toplevel, 0, KHTMLPart::BrowserViewGUI );
-
-    Dummy *dummy = new Dummy( doc );
-    QObject::connect( doc->browserExtension(), SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
-		      dummy, SLOT( slotOpenURL( const KURL&, const KParts::URLArgs & ) ) );
-
-    doc->openURL( args->url(0) );
-    DOMTreeView * dtv = new DOMTreeView(0, doc, "DomTreeView");
-    dtv->show();
-    dtv->setGeometry(0, 0, 360, 800);
-
-    toplevel->setCentralWidget( doc->widget() );
-    toplevel->resize( 640, 800);
-    
-    QDomDocument d = doc->domDocument();
-    QDomElement viewMenu = d.documentElement().firstChild().childNodes().item( 2 ).toElement();
-    QDomElement e = d.createElement( "action" );
-    e.setAttribute( "name", "debugRenderTree" );
-    viewMenu.appendChild( e );
-    e = d.createElement( "action" );
-    e.setAttribute( "name", "debugDOMTree" );
-    viewMenu.appendChild( e );
-    QDomElement toolBar = d.documentElement().firstChild().nextSibling().toElement();
-    e = d.createElement( "action" );
-    e.setAttribute( "name", "reload" );
-    toolBar.insertBefore( e, toolBar.firstChild() );
-
-    (void)new KAction( "Reload", "reload", Qt::Key_F5, dummy, SLOT( reload() ), doc->actionCollection(), "reload" );
-
-    toplevel->guiFactory()->addClient( doc );
-
-    doc->enableJScript(true);
-    doc->enableJava(true);
-    doc->setURLCursor(QCursor(PointingHandCursor));
-    a.setTopWidget(doc->widget());
-    QWidget::connect(doc, SIGNAL(setWindowCaption(const QString &)),
-		     doc->widget(), SLOT(setCaption(const QString &)));
-    doc->widget()->show();
-    toplevel->show();
-    ((QScrollView *)doc->widget())->viewport()->show();
-
-
-    int ret = a.exec();
-
-    //delete dtv;
-
-    khtml::Cache::clear();
-    khtml::CSSStyleSelector::clear();
-    khtml::RenderStyle::cleanup();
-
-    delete fac;
-    return ret;
-}
-
diff --git a/WebCore/src/kdelibs/khtml/testkhtml.h b/WebCore/src/kdelibs/khtml/testkhtml.h
deleted file mode 100644
index 07615ab..0000000
--- a/WebCore/src/kdelibs/khtml/testkhtml.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef TESTKHTML_H
-#define TESTKHTML_H
-
-/**
- * @internal
- */
-class Dummy : public QObject
-{
-  Q_OBJECT
-public:
-  Dummy( KHTMLPart *part ) : QObject( part ) { m_part = part; };
-
-private slots:
-  void slotOpenURL( const KURL &url, const KParts::URLArgs &args )
-  {
-    m_part->browserExtension()->setURLArgs( args );
-    m_part->openURL( url );
-  }
-  void reload()
-  {
-      KParts::URLArgs args; args.reload = true;
-      m_part->browserExtension()->setURLArgs( args );
-      m_part->openURL( m_part->url() );
-  }
-
-private:
-  KHTMLPart *m_part;
-};
-
-#endif
diff --git a/WebCore/src/kdelibs/khtml/testrender.cpp b/WebCore/src/kdelibs/khtml/testrender.cpp
deleted file mode 100644
index d8667c8..0000000
--- a/WebCore/src/kdelibs/khtml/testrender.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Peter Kelly <pmk at post.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-// See testrender.h for a description of this program
-
-// #include <iostream.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#define private public // bad bad bad....
-#include <khtml_part.h>
-#undef private
-#include <khtmlview.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <klocale.h>
-#include <kdebug.h>
-
-#include "testrender.h"
-#include "testrender.moc"
-
-#include "xml/dom_docimpl.h"
-#include "html/html_documentimpl.h"
-#include "rendering/render_object.h"
-
-#define PAINT_BUFFER_HEIGHT 150
-
-TestRender::TestRender(QString _sourceDir, QString _destDir, QString _logFilename, QWidget *parent, const char *name) : QWidget(parent, name)
-{
-  // setup gui
-  sourceDir = _sourceDir;
-  destDir = _destDir;
-  logFilename = _logFilename;
-  resize(800,600);
-  (new QVBoxLayout(this))->setAutoAdd(true);
-
-  QWidget *infoWidget = new QWidget(this);
-  QHBoxLayout *hLayout = new QHBoxLayout(infoWidget);
-  info = new QLabel("KHTML test",infoWidget);
-  hLayout->addWidget(info,50);
-  progress = new QProgressBar(infoWidget);
-  hLayout->addWidget(progress,50);
-  fileno = 0;
-
-  part = new KHTMLPart(this);
-  connect(part,SIGNAL(completed()),this,SLOT(slotPartCompleted()));
-
-  // get list of filenames
-  QDir d(sourceDir);
-  sourceDir = d.absPath();
-  d.setFilter( QDir::Files  );
-  d.setSorting( QDir::Name );
-
-  const QFileInfoList *fileInfoList = d.entryInfoList();
-  QFileInfoListIterator it(*fileInfoList);
-
-  for (; it.current(); ++it) {
-    if (!strcasecmp(it.current()->fileName().right(5).latin1(),".html"))
-        filenames.append(it.current()->fileName().latin1());
-  }
-
-  progress->setTotalSteps(filenames.count());
-}
-
-TestRender::~TestRender()
-{
-  delete part;
-}
-
-void TestRender::processFiles()
-{
-  fileno = -1;
-
-  logFile = new QFile(logFilename);
-  if (!logFile->open(IO_WriteOnly)) {
-    delete logFile;
-    close();
-    return;
-  }
-
-  logStream = new QTextStream(logFile);
-  *logStream << "----------- TestRender begin " << sourceDir << " -------------" << endl;
-
-  nextPage();
-}
-
-void TestRender::slotPartCompleted()
-{
-  *logStream << "Finished rendering "+QString(filenames.at(fileno)) << endl;
-  renderToImage();
-  nextPage();
-}
-
-void TestRender::nextPage()
-{
-  fileno++;
-  progress->setProgress(fileno);
-  if (fileno < int(filenames.count())) {
-    info->setText("Rendering "+QString(filenames.at(fileno)));
-    *logStream << "Rendering "+QString(filenames.at(fileno)) << endl;
-    part->openURL(sourceDir+"/"+filenames.at(fileno));
-  }
-  else {
-    *logStream << "----------- Completed successfully -------------" << endl;
-    info->setText("Finished");
-    logFile->close();
-    delete logStream;
-    delete logFile;
-//    close();
-  }
-}
-
-void TestRender::renderToImage()
-{
-  int py=0;
-  int ew = part->view()->viewport()->width();
-  int eh = part->view()->viewport()->height();
-  QPixmap paintBuffer(800,600);
-
-  while (py < eh)
-  {
-    QPainter* tp = new QPainter;
-    tp->begin( &paintBuffer );
-
-    int ph = eh-py<PAINT_BUFFER_HEIGHT ? eh-py : PAINT_BUFFER_HEIGHT;
-
-    tp->fillRect(0, py, ew, ph, palette().normal().brush(QColorGroup::Background));
-    part->docImpl()->renderer()->print(tp, 0, py, ew, ph, 0, 0);
-    tp->end();
-    delete tp;
-    py += PAINT_BUFFER_HEIGHT;
-  }
-
-  if (!paintBuffer.save(destDir+"/"+filenames.at(fileno)+".png","PNG"))
-    *logStream << "Error writing to file "+destDir+"/"+filenames.at(fileno)+".png" << endl;
-
-}
-
-static KCmdLineOptions options[] =
-{
-  { "+[SourceDir]", I18N_NOOP("dir containing test files"), 0 },
-  { "+[DestDir]", I18N_NOOP("dir to save rendered images in"), 0 },
-  { "+[DestDir]", I18N_NOOP("log filename"), 0 },
-  { 0, 0, 0 }
-  // INSERT YOUR COMMANDLINE OPTIONS HERE
-};
-
-int main(int argc, char *argv[])
-{
-
-  KAboutData aboutData( "testrender", I18N_NOOP("TestRender"),
-    0, "Program to test rendering", KAboutData::License_LGPL,"");
-  KCmdLineArgs::init( argc, argv, &aboutData );
-  KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
-
-  KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
-  if (args->count() < 3) {
-    kdError() << "testrender <sourcedir> <imagesdir> <logfile>\n";
-    return 0;
-  }
-
-  QString sourceDir = args->arg(0);
-  QString destDir = args->arg(1);
-  QString logFilename = args->arg(2);
-  if (!QDir(sourceDir).exists()) {
-    kdError() << "source dir \"" << sourceDir.latin1() << "\" does not exist\n";
-    return 0;
-  }
-
-  if (!QDir(destDir).exists()) {
-    kdError() << "dest dir \"" << destDir.latin1() << "\" does not exist\n";
-    return 0;
-  }
-
-
-  KApplication a;
-  TestRender *testrender = new TestRender(sourceDir,destDir,logFilename);
-  a.setMainWidget(testrender);
-  testrender->show();
-//  testrender->showMaximized();
-  testrender->processFiles();
-
-  return a.exec();
-}
diff --git a/WebCore/src/kdelibs/khtml/testrender.h b/WebCore/src/kdelibs/khtml/testrender.h
deleted file mode 100644
index 59a29ff..0000000
--- a/WebCore/src/kdelibs/khtml/testrender.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* This file is part of the KDE project
- *
- * Copyright (C) 2000 Peter Kelly <pmk at post.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-
-/*
-  This program can be used to render a series of pages into png files. It is
-  useful for comparing the results of rendering before/after making changes
-  to khtml.
-
-  USAGE: testrender <sourcedir> <imagesdir> <logfile>
-
-  where <sourcedir> contains some html files. Images will be output to <imagesdir>
-  Then you can use diff -qr to compare two images directories and see what
-  has changed.
-
-  This program seems to have problems occasionally with grabbing pages before they
-  are ready.... will fix sometime
-*/
-
-
-#ifndef TESTRENDER_H
-#define TESTRENDER_H
-
-#include <qwidget.h>
-#include <qdir.h>
-#include <kapp.h>
-#include <kurl.h>
-#include <khtmlview.h>
-
-class QLabel;
-class QProgressBar;
-class QFile;
-class QTextStream;
-class KHTMLPart;
-class MyKHTMLView;
-
-/**
- * @internal
- */
-class TestRender : public QWidget
-{
-  Q_OBJECT
-public:
-  /** construtor */
-  TestRender(QString _sourceDir, QString _destDir, QString _logFilename, QWidget* parent=0, const char *name=0);
-  /** destructor */
-  ~TestRender();
-
-  void processFiles();
-protected:
-  QLabel *info;
-  QProgressBar *progress;
-  KHTMLPart *part;
-  MyKHTMLView *view;
-
-  QString sourceDir;
-  QString destDir;
-  QString logFilename;
-  QStrList filenames;
-  int fileno;
-  QFile *logFile;
-  QTextStream *logStream;
-
-  void nextPage();
-  void renderToImage();
-
-protected slots:
-  void slotPartCompleted();
-};
-
-
-
-#endif
diff --git a/WebCore/src/kdelibs/kjs/README b/WebCore/src/kdelibs/kjs/README
deleted file mode 100644
index b4a0fcc..0000000
--- a/WebCore/src/kdelibs/kjs/README
+++ /dev/null
@@ -1,25 +0,0 @@
-This library provides an ECMAScript compatible interpreter. The ECMA standard
-is based on well known scripting languages such as Netscape's JavaScript and
-Microsoft's JScript.
-
-I'm currently pursuing to be compliant with Edition 3 of ECMA-262. Postscript
-and pdf versions of the standard are avaiable at:
-
-http://www.ecma.ch
-
-About 90% of the required features should be covered by now. Note that this
-number covers the core language elements only. Features like the famous
-roll-over buttons on the www are NOT part of the standard. Those extensions
-are added via a module loaded dynamically by the KHTML Widget.
-
-I'll provide some examples of how to extend this library for various needs at
-a later point in time. Feel free to contact me via mail if you have any
-questions on how to provide scripting capabilites for your application.
-
-A debugger is being worked on. To compile it, add -DKJS_DEBUGGER to the CXXFLAGS
-section in the Makefile.am of kdelibs/kjs and kdelibs/khtml/ecma.
-
-Bug reports, patches or feedback of any kind is very welcome.
-
-Harri Porten <porten at kde.org>
-
diff --git a/WebCore/src/kdelibs/kjs/THANKS b/WebCore/src/kdelibs/kjs/THANKS
deleted file mode 100644
index 036e5e7..0000000
--- a/WebCore/src/kdelibs/kjs/THANKS
+++ /dev/null
@@ -1,7 +0,0 @@
-I would like to thank the following people for their help:
-
-Richard Moore <rich at kde.org> - for filling the Math object with some life
-Daegeun Lee <realking at mizi.com> - for pointing out some bugs and providing
-                                  much code for the String and Date object.
-Marco Pinelli <pinmc at libero.it> - for his patches
-Christian Kirsch <ck at held.mind.de> - for his contribution to the Date object
diff --git a/WebCore/src/kdelibs/kjs/create_hash_table b/WebCore/src/kdelibs/kjs/create_hash_table
deleted file mode 100755
index 85c6744..0000000
--- a/WebCore/src/kdelibs/kjs/create_hash_table
+++ /dev/null
@@ -1,116 +0,0 @@
-#! /usr/bin/perl
-
-$file = $ARGV[0];
-open(IN, $file) or die "No such file $file";
-
- at keys = ();
- at values = ();
- at attrs = ();
-
-my $inside = 0;
-my $name;
-my $size;
-my $hashsize;
-my $banner = 0;
-
-while (<IN>) {
-  chop; 
-  s/^\s*//g; 
-  if (/^\#|^$/) {
-      # comment. do nothing
-    } elsif (/^\@begin\s*(\w+)\s*(\d+)\s*$/ && !$inside) {
-      $inside = 1;
-      $name = $1;
-      $hashsize = $2;
-    } elsif (/^\@end\s*$/ && $inside) {
-      calcTable();
-      output();
-      @keys = ();
-      @values = ();
-      @attrs = ();
-      $inside = 0;
-    } elsif (/^(\w+)\s*([\w\:]+)\s*([\w\|]*)\s*$/ && $inside) {
-      push(@keys, $1);
-      push(@values, $2);
-      push(@attrs, length($3) > 0 ? $3 : "0");
-    } else {
-      die "invalid data";
-    }
-}
-
-die "missing closing \@end" if ($inside);
-
-sub calcTable() {
-  @table = ();
-  @links = ();
-  $size = $hashsize;
-  my $collisions = 0;
-  my $i = 0;
-  foreach $key (@keys) {
-    my $h = hashValue($key) % $hashsize;
-    while (defined($table[$h])) {
-      if (defined($links[$h])) {
-	$h = $links[$h];
-      } else {
-	$collisions++;
-	$links[$h] = $size;
-	$h = $size;
-	$size++;
-      }
-    }
-    $table[$h] = $i;
-    $i++;
-  }
-
-# print "// Number of collisions: $collisions\n";
-#  printf "total size: $size\n";
-#  my $i = 0;
-#  foreach $entry (@table) {
-#    print "$i " . $entry;
-#    print " -> " . $links[$i] if (defined($links[$i]));
-#    print "\n";
-#    $i++;
-#  }
-}
-
-sub hashValue {
-  @chars = split(/ */, @_[0]);
-  my $val = 0;
-  foreach $c (@chars) {
-    $val += ord($c);
-  }
-  return $val;
-}
-
-sub output {
-  if (!$banner) {
-    $banner = 1;
-    print "/* automatically generated from $file. DO NOT EDIT ! */\n";
-  }
-
-  print "\nnamespace KJS {\n";
-  print "\nconst struct HashEntry2 ${name}Entries[] = {\n";
-  my $i = 0;
-  foreach $entry (@table) {
-    if (defined($entry)) {
-      my $key = $keys[$entry];
-      print "   \{ \"" . $key . "\"";
-      print ", " . $values[$entry];
-      print ", " . $attrs[$entry] . ", ";
-      if (defined($links[$i])) {
-	print "&${name}Entries[$links[$i]]" . " \}";
-      } else {
-	print "0 \}"
-      }
-    } else {
-      print "   \{ 0, 0, 0, 0 \}";
-    }
-    print "," unless ($i == $size - 1);
-    print "\n";
-    $i++;
-  }
-  print "};\n";
-  print "\nconst struct HashTable2 $name = ";
-  print "\{ 2, $size, ${name}Entries, $hashsize \};\n\n";
-  print "}; // namespace\n";
-}
diff --git a/WebCore/src/kdelibs/kjs/keywords.table b/WebCore/src/kdelibs/kjs/keywords.table
deleted file mode 100644
index 391aa34..0000000
--- a/WebCore/src/kdelibs/kjs/keywords.table
+++ /dev/null
@@ -1,66 +0,0 @@
-# main keywords
- at begin mainTable 41
-# types
-null		NULLTOKEN
-true		TRUETOKEN
-false		FALSETOKEN
-# keywords
-break		BREAK
-case		CASE
-catch		CATCH
-default		DEFAULT
-finally		FINALLY
-for		FOR
-instanceof	INSTANCEOF
-new		NEW
-var		VAR
-continue	CONTINUE
-function	FUNCTION
-return		RETURN
-void		VOID
-delete		DELETE
-if		IF
-this		THIS
-do		DO
-while		WHILE
-else		ELSE
-in		IN
-switch		SWITCH
-throw		THROW
-try		TRY
-typeof		TYPEOF
-with		WITH
-# reserved for future use
-abstract	RESERVED
-boolean		RESERVED
-byte		RESERVED
-char		RESERVED
-class		RESERVED
-const		RESERVED
-debugger	RESERVED
-double		RESERVED
-enum		RESERVED
-export		RESERVED
-extends		RESERVED
-final		RESERVED
-float		RESERVED
-goto		RESERVED
-implements	RESERVED
-import		RESERVED
-int		RESERVED
-interface	RESERVED
-long		RESERVED
-native		RESERVED
-package		RESERVED
-private		RESERVED
-protected	RESERVED
-public		RESERVED
-short		RESERVED
-static		RESERVED
-super		RESERVED
-synchronized	RESERVED
-throws		RESERVED
-transient	RESERVED
-volatile	RESERVED
- at end
-

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list