[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
cblu
cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:51:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 493c5cd1d260034fbd9f125e6a739cdf86fb4f13
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 6 18:47:10 2001 +0000
KWQKstddirs now accesses html4.css in WebKit's Resources directory
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 24b33ca..6354c50 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -147,10 +147,7 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s)
{
if(defaultStyle) return;
- // FIXME: replace the next line with the commented out one
- // immediately following it
- QFile f("/symroots/html4.css");
- //QFile f(locate( "data", "khtml/css/html4.css" ) );
+ QFile f(locate( "data", "khtml/css/html4.css" ) );
f.open(IO_ReadOnly);
QCString file( f.size()+1 );
diff --git a/WebCore/kwq/KWQKStandardDirs.mm b/WebCore/kwq/KWQKStandardDirs.mm
index 76eeb11..503902c 100644
--- a/WebCore/kwq/KWQKStandardDirs.mm
+++ b/WebCore/kwq/KWQKStandardDirs.mm
@@ -26,14 +26,20 @@
#include <kstddirs.h>
#include <kwqdebug.h>
-QString locate(const char *type, const QString& filename,
- const KInstance* instance)
+QString locate(const char *type, const QString& filename, const KInstance* instance)
{
- return "/symroots/appdata/"+filename;
+ NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
+ NSString *subpath = QSTRING_TO_NSSTRING(filename);
+ NSString *file = [subpath lastPathComponent];
+
+ if([file isEqualToString:@"html4.css"]){
+ return NSSTRING_TO_QSTRING([wkBundle pathForResource:@"html4" ofType:@"css"]);
+ }else{
+ return "/symroots/appdata/" + filename;
+ }
}
-QString locateLocal(const char *type, const QString &filename,
- const KInstance *instance)
+QString locateLocal(const char *type, const QString &filename, const KInstance *instance)
{
return "/symroots/appdata/"+filename;
}
diff --git a/WebCore/kwq/KWQKstddirs.mm b/WebCore/kwq/KWQKstddirs.mm
index 76eeb11..503902c 100644
--- a/WebCore/kwq/KWQKstddirs.mm
+++ b/WebCore/kwq/KWQKstddirs.mm
@@ -26,14 +26,20 @@
#include <kstddirs.h>
#include <kwqdebug.h>
-QString locate(const char *type, const QString& filename,
- const KInstance* instance)
+QString locate(const char *type, const QString& filename, const KInstance* instance)
{
- return "/symroots/appdata/"+filename;
+ NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
+ NSString *subpath = QSTRING_TO_NSSTRING(filename);
+ NSString *file = [subpath lastPathComponent];
+
+ if([file isEqualToString:@"html4.css"]){
+ return NSSTRING_TO_QSTRING([wkBundle pathForResource:@"html4" ofType:@"css"]);
+ }else{
+ return "/symroots/appdata/" + filename;
+ }
}
-QString locateLocal(const char *type, const QString &filename,
- const KInstance *instance)
+QString locateLocal(const char *type, const QString &filename, const KInstance *instance)
{
return "/symroots/appdata/"+filename;
}
diff --git a/WebCore/src/kdelibs/khtml/css/cssstyleselector.cpp b/WebCore/src/kdelibs/khtml/css/cssstyleselector.cpp
index 24b33ca..6354c50 100644
--- a/WebCore/src/kdelibs/khtml/css/cssstyleselector.cpp
+++ b/WebCore/src/kdelibs/khtml/css/cssstyleselector.cpp
@@ -147,10 +147,7 @@ void CSSStyleSelector::loadDefaultStyle(const KHTMLSettings *s)
{
if(defaultStyle) return;
- // FIXME: replace the next line with the commented out one
- // immediately following it
- QFile f("/symroots/html4.css");
- //QFile f(locate( "data", "khtml/css/html4.css" ) );
+ QFile f(locate( "data", "khtml/css/html4.css" ) );
f.open(IO_ReadOnly);
QCString file( f.size()+1 );
diff --git a/WebCore/src/kwq/KWQKstddirs.mm b/WebCore/src/kwq/KWQKstddirs.mm
index 76eeb11..503902c 100644
--- a/WebCore/src/kwq/KWQKstddirs.mm
+++ b/WebCore/src/kwq/KWQKstddirs.mm
@@ -26,14 +26,20 @@
#include <kstddirs.h>
#include <kwqdebug.h>
-QString locate(const char *type, const QString& filename,
- const KInstance* instance)
+QString locate(const char *type, const QString& filename, const KInstance* instance)
{
- return "/symroots/appdata/"+filename;
+ NSBundle *wkBundle = [NSBundle bundleWithIdentifier:@"com.apple.webkit"];
+ NSString *subpath = QSTRING_TO_NSSTRING(filename);
+ NSString *file = [subpath lastPathComponent];
+
+ if([file isEqualToString:@"html4.css"]){
+ return NSSTRING_TO_QSTRING([wkBundle pathForResource:@"html4" ofType:@"css"]);
+ }else{
+ return "/symroots/appdata/" + filename;
+ }
}
-QString locateLocal(const char *type, const QString &filename,
- const KInstance *instance)
+QString locateLocal(const char *type, const QString &filename, const KInstance *instance)
{
return "/symroots/appdata/"+filename;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list