46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
|
--- kdelibs-4.0.4/khtml/css/html4.css (Revision 813565)
|
||
|
+++ kdelibs-4.0.4/khtml/css/html4.css (Revision 813566)
|
||
|
@@ -5,6 +5,8 @@
|
||
|
* Konqueror/khtml relies on the existence of this style sheet for
|
||
|
* rendering. Do not remove or modify this file unless you know
|
||
|
* what you are doing.
|
||
|
+ *
|
||
|
+ * KHTML_STYLE_VERSION: 1
|
||
|
*/
|
||
|
|
||
|
@namespace "http://www.w3.org/1999/xhtml";
|
||
|
--- kdelibs-4.0.4/khtml/css/cssstyleselector.cpp (Revision 813565)
|
||
|
+++ kdelibs-4.0.4/khtml/css/cssstyleselector.cpp (Revision 813566)
|
||
|
@@ -62,12 +62,16 @@
|
||
|
#include <kconfig.h>
|
||
|
#include <QtCore/QFile>
|
||
|
#include <QtCore/QString>
|
||
|
+#include <QtCore/QFileInfo>
|
||
|
|
||
|
#include <kdebug.h>
|
||
|
#include <kurl.h>
|
||
|
#include <assert.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
+// keep in sync with html4.css'
|
||
|
+#define KHTML_STYLE_VERSION 1
|
||
|
+
|
||
|
#undef RELATIVE
|
||
|
#undef ABSOLUTE
|
||
|
|
||
|
@@ -386,6 +390,14 @@
|
||
|
file[readbytes] = '\0';
|
||
|
|
||
|
QString style = QLatin1String( file.data() );
|
||
|
+
|
||
|
+ QRegExp checkVersion( "KHTML_STYLE_VERSION:\\s*(\\d+)" );
|
||
|
+ checkVersion.setMinimal( true );
|
||
|
+ if (checkVersion.indexIn( style ) == -1 || checkVersion.cap(1).toInt() != KHTML_STYLE_VERSION) {
|
||
|
+ qFatal( "!!!!!!! ERROR !!!!!!! - KHTML default stylesheet version mismatch. Aborting. Check your installation. File used was: %s. Expected STYLE_VERSION %d\n",
|
||
|
+ QFileInfo( f ).absoluteFilePath().toLatin1().data(), KHTML_STYLE_VERSION );
|
||
|
+ }
|
||
|
+
|
||
|
if(s)
|
||
|
style += s->settingsToCSS();
|
||
|
DOMString str(style);
|