[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:37:44 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit fbff58903c73e3358b632e36c885e940c9cc313a
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 10 15:52:06 2002 +0000
WebCore:
- fixed 2942809 -- remove all direct access to "WebKit" defaults from WebCore
* kwq/WebCoreSettings.h: Add willLoadImagesAutomatically and userStyleSheetLocation.
* kwq/WebCoreSettings.m:
(-[WebCoreSettings _updateAllViews]): Added. Placeholder for a function that will
cause all views to update styles and layout.
(-[WebCoreSettings setStandardFontFamily:]): Call _updateAllViews if a change happened.
(-[WebCoreSettings setFixedFontFamily:]): Ditto.
(-[WebCoreSettings setSerifFontFamily:]): Ditto.
(-[WebCoreSettings setSansSerifFontFamily:]): Ditto.
(-[WebCoreSettings setCursiveFontFamily:]): Ditto.
(-[WebCoreSettings setFantasyFontFamily:]): Ditto.
(-[WebCoreSettings setMinimumFontSize:]): Ditto.
(-[WebCoreSettings setDefaultFontSize:]): Ditto.
(-[WebCoreSettings setDefaultFixedFontSize:]): Ditto.
(-[WebCoreSettings setWillLoadImagesAutomatically:]): Added.
(-[WebCoreSettings willLoadImagesAutomatically]): Added.
(-[WebCoreSettings setUserStyleSheetLocation:]): Added. Call _updateAllViews if a change happened.
(-[WebCoreSettings userStyleSheetLocation]): Added.
* WebCore.exp: Add WebCoreSettings to the exported class list.
* kwq/KWQKHTMLSettings.mm: Get settings from WebCoreSettings rather than going
directly at WebKit user defaults.
* kwq/KWQKConfigBase.mm:
(KConfig::readNumEntry): Check key.
(KConfig::readUnsignedNumEntry): Use WebCoreSettings to get the value of the
"JavaScript can open windows automatically" setting, rather than going directly
at a WebKit user default.
(KConfig::readColorEntry): Remove log message. This is implemented well enough.
- fixed 3015877 -- either wean WebCore from _web_URLFromString, or make it public API in WebFoundation
* kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::redirectionTimerStartedOrStopped):
Use KURL to make an NSURL rather than using [NSURL _web_URLWithString:].
* kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::setBaseURL): Ditto.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge completeURLForDOMString:]): Ditto.
After fixing the above bugs, I noticed that I could remove the WebFoundation dependency.
* WebCore.pbproj/project.pbxproj: Remove WebFoundation framework.
* kwq/WebCoreBridge.h: Replace reportError with reportBadURL.
* kwq/KWQLoaderImpl.mm: (KWQServeRequest): Use reportBadURL instead of reportError.
This was the last bit of direct dependency on WebFoundation.
Do some preparation work for implementing "referrer".
* khtml/khtml_part.cpp: Remove lots of APPLE_CHANGES and compile more
original code. This in preparation for using the "referrer" code from KHTML.
* khtml/khtmlview.h: Ditto.
* khtml/misc/loader.cpp: Ditto.
* kwq/kdecore/kurl.h: Add things needed by code formerly inside APPLE_CHANGES.
* kwq/KWQKURL.mm: (KURL::hasRef): Ditto.
(urlcmp): Implement in a simple-minded way. Needed by some code formerly inside
APPLE_CHANGES. We can make a more full-featured version when and if we need it.
* kwq/kio/global.h: Ditto.
* kwq/kio/job.h: Ditto.
* kwq/kio/jobclasses.h: Ditto.
* kwq/KWQKjobclasses.mm: Ditto.
* kwq/kparts/browserextension.h:
* kwq/kparts/part.h: Ditto.
* kwq/qt/qstringlist.h: Ditto.
* kwq/KWQStringList.mm: (QStringList::pop_front): Ditto.
* kwq/qt/qvaluelist.h: Ditto.
* kwq/KWQValueListImpl.h: Ditto.
* kwq/KWQValueListImpl.mm: (KWQValueListImpl::isEqual): Ditto.
Other changes.
* kwq/KWQApplication.mm:
(QApplication::setOverrideCursor): Don't report an error for this, it's OK
to do nothing.
(QApplication::restoreOverrideCursor): Ditto.
WebKit:
WebKit part of weaning WebCore from getting directly at WebKit defaults.
* WebView.subproj/WebPreferences.h:
* WebView.subproj/WebPreferences.m:
(-[WebPreferences _updateWebCoreSettings]): Added. Propagates all preferences
to WebCore. This way WebCore doesn't have to actively ask for the values
of preferences using defaults keys that are WebKit secrets.
(+[WebPreferences load]): Set up an observer that calls _updateWebCoreSettings
whenever NSUserDefaultsDidChangeNotification is posted.
(-[WebPreferences setStandardFontFamily:]): Call _updateWebCoreSettings right
away, don't wait for NSUserDefaultsDidChangeNotification.
(-[WebPreferences setFixedFontFamily:]): Ditto.
(-[WebPreferences setSerifFontFamily:]): Ditto.
(-[WebPreferences setSansSerifFontFamily:]): Ditto.
(-[WebPreferences setCursiveFontFamily:]): Ditto.
(-[WebPreferences setFantasyFontFamily:]): Ditto.
(-[WebPreferences setDefaultFontSize:]): Ditto.
(-[WebPreferences setDefaultFixedFontSize:]): Ditto.
(-[WebPreferences setMinimumFontSize:]): Ditto.
(-[WebPreferences setUserStyleSheetEnabled:]): Ditto.
(-[WebPreferences setUserStyleSheetLocation:]): Ditto.
(-[WebPreferences setJavaEnabled:]): Ditto.
(-[WebPreferences setJavaScriptEnabled:]): Ditto.
(-[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]): Ditto.
(-[WebPreferences setPluginsEnabled:]): Ditto.
(-[WebPreferences setDisplayImages:]): Ditto.
* WebCoreSupport.subproj/WebBridge.m: (-[WebBridge reportBadURL:]):
Add this method, which replaces reportError. Now WebCore doesn't use
WebFoundation directly at all! Pretty neat.
WebBrowser:
* Preferences.subproj/ActiveContentPreferences.m: WebKit now calls it "Java",
not "java".
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index e109c28..8436839 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,81 @@
+2002-09-10 Darin Adler <darin at apple.com>
+
+ - fixed 2942809 -- remove all direct access to "WebKit" defaults from WebCore
+
+ * kwq/WebCoreSettings.h: Add willLoadImagesAutomatically and userStyleSheetLocation.
+ * kwq/WebCoreSettings.m:
+ (-[WebCoreSettings _updateAllViews]): Added. Placeholder for a function that will
+ cause all views to update styles and layout.
+ (-[WebCoreSettings setStandardFontFamily:]): Call _updateAllViews if a change happened.
+ (-[WebCoreSettings setFixedFontFamily:]): Ditto.
+ (-[WebCoreSettings setSerifFontFamily:]): Ditto.
+ (-[WebCoreSettings setSansSerifFontFamily:]): Ditto.
+ (-[WebCoreSettings setCursiveFontFamily:]): Ditto.
+ (-[WebCoreSettings setFantasyFontFamily:]): Ditto.
+ (-[WebCoreSettings setMinimumFontSize:]): Ditto.
+ (-[WebCoreSettings setDefaultFontSize:]): Ditto.
+ (-[WebCoreSettings setDefaultFixedFontSize:]): Ditto.
+ (-[WebCoreSettings setWillLoadImagesAutomatically:]): Added.
+ (-[WebCoreSettings willLoadImagesAutomatically]): Added.
+ (-[WebCoreSettings setUserStyleSheetLocation:]): Added. Call _updateAllViews if a change happened.
+ (-[WebCoreSettings userStyleSheetLocation]): Added.
+
+ * WebCore.exp: Add WebCoreSettings to the exported class list.
+
+ * kwq/KWQKHTMLSettings.mm: Get settings from WebCoreSettings rather than going
+ directly at WebKit user defaults.
+ * kwq/KWQKConfigBase.mm:
+ (KConfig::readNumEntry): Check key.
+ (KConfig::readUnsignedNumEntry): Use WebCoreSettings to get the value of the
+ "JavaScript can open windows automatically" setting, rather than going directly
+ at a WebKit user default.
+ (KConfig::readColorEntry): Remove log message. This is implemented well enough.
+
+ - fixed 3015877 -- either wean WebCore from _web_URLFromString, or make it public API in WebFoundation
+
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::redirectionTimerStartedOrStopped):
+ Use KURL to make an NSURL rather than using [NSURL _web_URLWithString:].
+ * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::setBaseURL): Ditto.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge completeURLForDOMString:]): Ditto.
+
+ After fixing the above bugs, I noticed that I could remove the WebFoundation dependency.
+
+ * WebCore.pbproj/project.pbxproj: Remove WebFoundation framework.
+
+ * kwq/WebCoreBridge.h: Replace reportError with reportBadURL.
+ * kwq/KWQLoaderImpl.mm: (KWQServeRequest): Use reportBadURL instead of reportError.
+ This was the last bit of direct dependency on WebFoundation.
+
+ Do some preparation work for implementing "referrer".
+
+ * khtml/khtml_part.cpp: Remove lots of APPLE_CHANGES and compile more
+ original code. This in preparation for using the "referrer" code from KHTML.
+ * khtml/khtmlview.h: Ditto.
+ * khtml/misc/loader.cpp: Ditto.
+
+ * kwq/kdecore/kurl.h: Add things needed by code formerly inside APPLE_CHANGES.
+ * kwq/KWQKURL.mm: (KURL::hasRef): Ditto.
+ (urlcmp): Implement in a simple-minded way. Needed by some code formerly inside
+ APPLE_CHANGES. We can make a more full-featured version when and if we need it.
+ * kwq/kio/global.h: Ditto.
+ * kwq/kio/job.h: Ditto.
+ * kwq/kio/jobclasses.h: Ditto.
+ * kwq/KWQKjobclasses.mm: Ditto.
+ * kwq/kparts/browserextension.h:
+ * kwq/kparts/part.h: Ditto.
+ * kwq/qt/qstringlist.h: Ditto.
+ * kwq/KWQStringList.mm: (QStringList::pop_front): Ditto.
+ * kwq/qt/qvaluelist.h: Ditto.
+ * kwq/KWQValueListImpl.h: Ditto.
+ * kwq/KWQValueListImpl.mm: (KWQValueListImpl::isEqual): Ditto.
+
+ Other changes.
+
+ * kwq/KWQApplication.mm:
+ (QApplication::setOverrideCursor): Don't report an error for this, it's OK
+ to do nothing.
+ (QApplication::restoreOverrideCursor): Ditto.
+
2002-09-09 Richard Williamson (Home) <rjw at apple.com>
Implemented disable images automatically (2896319).
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index e109c28..8436839 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,81 @@
+2002-09-10 Darin Adler <darin at apple.com>
+
+ - fixed 2942809 -- remove all direct access to "WebKit" defaults from WebCore
+
+ * kwq/WebCoreSettings.h: Add willLoadImagesAutomatically and userStyleSheetLocation.
+ * kwq/WebCoreSettings.m:
+ (-[WebCoreSettings _updateAllViews]): Added. Placeholder for a function that will
+ cause all views to update styles and layout.
+ (-[WebCoreSettings setStandardFontFamily:]): Call _updateAllViews if a change happened.
+ (-[WebCoreSettings setFixedFontFamily:]): Ditto.
+ (-[WebCoreSettings setSerifFontFamily:]): Ditto.
+ (-[WebCoreSettings setSansSerifFontFamily:]): Ditto.
+ (-[WebCoreSettings setCursiveFontFamily:]): Ditto.
+ (-[WebCoreSettings setFantasyFontFamily:]): Ditto.
+ (-[WebCoreSettings setMinimumFontSize:]): Ditto.
+ (-[WebCoreSettings setDefaultFontSize:]): Ditto.
+ (-[WebCoreSettings setDefaultFixedFontSize:]): Ditto.
+ (-[WebCoreSettings setWillLoadImagesAutomatically:]): Added.
+ (-[WebCoreSettings willLoadImagesAutomatically]): Added.
+ (-[WebCoreSettings setUserStyleSheetLocation:]): Added. Call _updateAllViews if a change happened.
+ (-[WebCoreSettings userStyleSheetLocation]): Added.
+
+ * WebCore.exp: Add WebCoreSettings to the exported class list.
+
+ * kwq/KWQKHTMLSettings.mm: Get settings from WebCoreSettings rather than going
+ directly at WebKit user defaults.
+ * kwq/KWQKConfigBase.mm:
+ (KConfig::readNumEntry): Check key.
+ (KConfig::readUnsignedNumEntry): Use WebCoreSettings to get the value of the
+ "JavaScript can open windows automatically" setting, rather than going directly
+ at a WebKit user default.
+ (KConfig::readColorEntry): Remove log message. This is implemented well enough.
+
+ - fixed 3015877 -- either wean WebCore from _web_URLFromString, or make it public API in WebFoundation
+
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::redirectionTimerStartedOrStopped):
+ Use KURL to make an NSURL rather than using [NSURL _web_URLWithString:].
+ * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::setBaseURL): Ditto.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge completeURLForDOMString:]): Ditto.
+
+ After fixing the above bugs, I noticed that I could remove the WebFoundation dependency.
+
+ * WebCore.pbproj/project.pbxproj: Remove WebFoundation framework.
+
+ * kwq/WebCoreBridge.h: Replace reportError with reportBadURL.
+ * kwq/KWQLoaderImpl.mm: (KWQServeRequest): Use reportBadURL instead of reportError.
+ This was the last bit of direct dependency on WebFoundation.
+
+ Do some preparation work for implementing "referrer".
+
+ * khtml/khtml_part.cpp: Remove lots of APPLE_CHANGES and compile more
+ original code. This in preparation for using the "referrer" code from KHTML.
+ * khtml/khtmlview.h: Ditto.
+ * khtml/misc/loader.cpp: Ditto.
+
+ * kwq/kdecore/kurl.h: Add things needed by code formerly inside APPLE_CHANGES.
+ * kwq/KWQKURL.mm: (KURL::hasRef): Ditto.
+ (urlcmp): Implement in a simple-minded way. Needed by some code formerly inside
+ APPLE_CHANGES. We can make a more full-featured version when and if we need it.
+ * kwq/kio/global.h: Ditto.
+ * kwq/kio/job.h: Ditto.
+ * kwq/kio/jobclasses.h: Ditto.
+ * kwq/KWQKjobclasses.mm: Ditto.
+ * kwq/kparts/browserextension.h:
+ * kwq/kparts/part.h: Ditto.
+ * kwq/qt/qstringlist.h: Ditto.
+ * kwq/KWQStringList.mm: (QStringList::pop_front): Ditto.
+ * kwq/qt/qvaluelist.h: Ditto.
+ * kwq/KWQValueListImpl.h: Ditto.
+ * kwq/KWQValueListImpl.mm: (KWQValueListImpl::isEqual): Ditto.
+
+ Other changes.
+
+ * kwq/KWQApplication.mm:
+ (QApplication::setOverrideCursor): Don't report an error for this, it's OK
+ to do nothing.
+ (QApplication::restoreOverrideCursor): Ditto.
+
2002-09-09 Richard Williamson (Home) <rjw at apple.com>
Implemented disable images automatically (2896319).
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e109c28..8436839 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,81 @@
+2002-09-10 Darin Adler <darin at apple.com>
+
+ - fixed 2942809 -- remove all direct access to "WebKit" defaults from WebCore
+
+ * kwq/WebCoreSettings.h: Add willLoadImagesAutomatically and userStyleSheetLocation.
+ * kwq/WebCoreSettings.m:
+ (-[WebCoreSettings _updateAllViews]): Added. Placeholder for a function that will
+ cause all views to update styles and layout.
+ (-[WebCoreSettings setStandardFontFamily:]): Call _updateAllViews if a change happened.
+ (-[WebCoreSettings setFixedFontFamily:]): Ditto.
+ (-[WebCoreSettings setSerifFontFamily:]): Ditto.
+ (-[WebCoreSettings setSansSerifFontFamily:]): Ditto.
+ (-[WebCoreSettings setCursiveFontFamily:]): Ditto.
+ (-[WebCoreSettings setFantasyFontFamily:]): Ditto.
+ (-[WebCoreSettings setMinimumFontSize:]): Ditto.
+ (-[WebCoreSettings setDefaultFontSize:]): Ditto.
+ (-[WebCoreSettings setDefaultFixedFontSize:]): Ditto.
+ (-[WebCoreSettings setWillLoadImagesAutomatically:]): Added.
+ (-[WebCoreSettings willLoadImagesAutomatically]): Added.
+ (-[WebCoreSettings setUserStyleSheetLocation:]): Added. Call _updateAllViews if a change happened.
+ (-[WebCoreSettings userStyleSheetLocation]): Added.
+
+ * WebCore.exp: Add WebCoreSettings to the exported class list.
+
+ * kwq/KWQKHTMLSettings.mm: Get settings from WebCoreSettings rather than going
+ directly at WebKit user defaults.
+ * kwq/KWQKConfigBase.mm:
+ (KConfig::readNumEntry): Check key.
+ (KConfig::readUnsignedNumEntry): Use WebCoreSettings to get the value of the
+ "JavaScript can open windows automatically" setting, rather than going directly
+ at a WebKit user default.
+ (KConfig::readColorEntry): Remove log message. This is implemented well enough.
+
+ - fixed 3015877 -- either wean WebCore from _web_URLFromString, or make it public API in WebFoundation
+
+ * kwq/KWQKHTMLPartImpl.mm: (KWQKHTMLPartImpl::redirectionTimerStartedOrStopped):
+ Use KURL to make an NSURL rather than using [NSURL _web_URLWithString:].
+ * kwq/KWQKJavaAppletWidget.mm: (KJavaAppletWidget::setBaseURL): Ditto.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge completeURLForDOMString:]): Ditto.
+
+ After fixing the above bugs, I noticed that I could remove the WebFoundation dependency.
+
+ * WebCore.pbproj/project.pbxproj: Remove WebFoundation framework.
+
+ * kwq/WebCoreBridge.h: Replace reportError with reportBadURL.
+ * kwq/KWQLoaderImpl.mm: (KWQServeRequest): Use reportBadURL instead of reportError.
+ This was the last bit of direct dependency on WebFoundation.
+
+ Do some preparation work for implementing "referrer".
+
+ * khtml/khtml_part.cpp: Remove lots of APPLE_CHANGES and compile more
+ original code. This in preparation for using the "referrer" code from KHTML.
+ * khtml/khtmlview.h: Ditto.
+ * khtml/misc/loader.cpp: Ditto.
+
+ * kwq/kdecore/kurl.h: Add things needed by code formerly inside APPLE_CHANGES.
+ * kwq/KWQKURL.mm: (KURL::hasRef): Ditto.
+ (urlcmp): Implement in a simple-minded way. Needed by some code formerly inside
+ APPLE_CHANGES. We can make a more full-featured version when and if we need it.
+ * kwq/kio/global.h: Ditto.
+ * kwq/kio/job.h: Ditto.
+ * kwq/kio/jobclasses.h: Ditto.
+ * kwq/KWQKjobclasses.mm: Ditto.
+ * kwq/kparts/browserextension.h:
+ * kwq/kparts/part.h: Ditto.
+ * kwq/qt/qstringlist.h: Ditto.
+ * kwq/KWQStringList.mm: (QStringList::pop_front): Ditto.
+ * kwq/qt/qvaluelist.h: Ditto.
+ * kwq/KWQValueListImpl.h: Ditto.
+ * kwq/KWQValueListImpl.mm: (KWQValueListImpl::isEqual): Ditto.
+
+ Other changes.
+
+ * kwq/KWQApplication.mm:
+ (QApplication::setOverrideCursor): Don't report an error for this, it's OK
+ to do nothing.
+ (QApplication::restoreOverrideCursor): Ditto.
+
2002-09-09 Richard Williamson (Home) <rjw at apple.com>
Implemented disable images automatically (2896319).
diff --git a/WebCore/WebCore.exp b/WebCore/WebCore.exp
index b126db8..ac6118d 100644
--- a/WebCore/WebCore.exp
+++ b/WebCore/WebCore.exp
@@ -5,6 +5,7 @@
.objc_class_name_WebCoreHistory
.objc_class_name_WebCoreImageRendererFactory
.objc_class_name_WebCoreJavaScript
+.objc_class_name_WebCoreSettings
.objc_class_name_WebCoreTestController
.objc_class_name_WebCoreTextRendererFactory
.objc_class_name_WebCoreViewFactory
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 3d9b1d0..2ae9232 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -109,7 +109,6 @@
F5C2869402846DCD018635CA,
F5C2869502846DCD018635CA,
F8216299029F4FB501000131,
- F821629B029F4FB501000131,
);
isa = PBXGroup;
name = Frameworks;
@@ -737,7 +736,6 @@
F5C287BC02846DCD018635CA,
F5C287BD02846DCD018635CA,
F82162D7029F4FB501000131,
- F82162D9029F4FB501000131,
);
isa = PBXFrameworksBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -8202,23 +8200,12 @@
path = JavaScriptCore.framework;
refType = 3;
};
- F821629B029F4FB501000131 = {
- isa = PBXFrameworkReference;
- path = WebFoundation.framework;
- refType = 3;
- };
F82162D7029F4FB501000131 = {
fileRef = F8216299029F4FB501000131;
isa = PBXBuildFile;
settings = {
};
};
- F82162D9029F4FB501000131 = {
- fileRef = F821629B029F4FB501000131;
- isa = PBXBuildFile;
- settings = {
- };
- };
};
rootObject = 0867D690FE84028FC02AAC07;
}
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index 4026f59..af6438a 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -118,7 +118,6 @@ namespace khtml {
};
};
-#ifndef APPLE_CHANGES
FrameList::Iterator FrameList::find( const QString &name )
{
@@ -132,8 +131,6 @@ FrameList::Iterator FrameList::find( const QString &name )
return it;
}
-#endif // APPLE_CHANGES
-
KHTMLPart::KHTMLPart( QWidget *parentWidget, const char *widgetname, QObject *parent, const char *name,
GUIProfile prof )
: KParts::ReadOnlyPart( parent, name )
@@ -377,6 +374,7 @@ bool KHTMLPart::openURL( const KURL &url )
return true;
}
}
+#endif // APPLE_CHANGES
KParts::URLArgs args( d->m_extension->urlArgs() );
// in case we have a) no frameset (don't test m_frames.count(), iframes get in there)
@@ -445,11 +443,6 @@ bool KHTMLPart::openURL( const KURL &url )
connect( d->m_job, SIGNAL(redirection(KIO::Job*, const KURL&) ),
SLOT( slotRedirection(KIO::Job*,const KURL&) ) );
-#endif // APPLE_CHANGES
-
-#ifdef APPLE_CHANGES
- closeURL();
-#endif
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
@@ -478,7 +471,6 @@ bool KHTMLPart::openURL( const KURL &url )
// copy to m_workingURL after fixing m_url above
d->m_workingURL = m_url;
-#ifndef APPLE_CHANGES
kdDebug( 6050 ) << "KHTMLPart::openURL now (before started) m_url = " << m_url.url() << endl;
connect( d->m_job, SIGNAL( speed( KIO::Job*, unsigned long ) ),
@@ -486,14 +478,12 @@ bool KHTMLPart::openURL( const KURL &url )
connect( d->m_job, SIGNAL( percent( KIO::Job*, unsigned long ) ),
this, SLOT( slotJobPercent( KIO::Job*, unsigned long ) ) );
-#endif // APPLE_CHANGES
emit started( 0L );
return true;
}
-
bool KHTMLPart::closeURL()
{
#ifdef APPLE_CHANGES
@@ -526,9 +516,7 @@ bool KHTMLPart::closeURL()
if ( d->m_doc && d->m_doc->parsing() )
{
kdDebug( 6050 ) << " was still parsing... calling end " << endl;
-#ifndef APPLE_CHANGES
slotFinishedParsing();
-#endif
d->m_doc->setParsing(false);
}
@@ -544,14 +532,12 @@ bool KHTMLPart::closeURL()
if ( d->m_doc && d->m_doc->docLoader() )
khtml::Cache::loader()->cancelRequests( d->m_doc->docLoader() );
-#ifndef APPLE_CHANGES
// tell all subframes to stop as well
ConstFrameIt it = d->m_frames.begin();
ConstFrameIt end = d->m_frames.end();
for (; it != end; ++it )
if ( !( *it ).m_part.isNull() )
( *it ).m_part->closeURL();
-#endif
d->m_bPendingChildRedirection = false;
@@ -910,9 +896,9 @@ void KHTMLPart::clear()
(*it).m_run->abort();
}
}
-
#endif
+
findTextBegin(); // resets d->m_findNode and d->m_findPos
d->m_mousePressNode = DOM::Node();
@@ -1383,12 +1369,10 @@ void KHTMLPart::begin( const KURL &url, int xOffset, int yOffset )
if ( !userStyleSheet.isEmpty() )
setUserStyleSheet( KURL( userStyleSheet ) );
-#ifndef APPLE_CHANGES
- d->m_doc->setRestoreState(args.docState);
-#endif
-
#ifdef APPLE_CHANGES
impl->restoreDocumentState();
+#else
+ d->m_doc->setRestoreState(args.docState);
#endif
d->m_doc->open();
@@ -1478,7 +1462,6 @@ void KHTMLPart::paint(QPainter *p, const QRect &rc, int yOff, bool *more)
void KHTMLPart::stopAnimations()
{
-#ifndef APPLE_CHANGES
if ( d->m_doc )
d->m_doc->docLoader()->setShowAnimations( KHTMLSettings::KAnimationDisabled );
@@ -1489,7 +1472,6 @@ void KHTMLPart::stopAnimations()
KParts::ReadOnlyPart* p = ( *it ).m_part;
static_cast<KHTMLPart*>( p )->stopAnimations();
}
-#endif
}
void KHTMLPart::slotFinishedParsing()
@@ -1762,12 +1744,10 @@ void KHTMLPart::slotRedirect()
return;
}
KParts::URLArgs args;
-#ifndef APPLE_CHANGES
if ( urlcmp( u, m_url.url(), true, true ) )
args.reload = true;
args.setLockHistory( d->m_redirectLockHistory );
-#endif
urlSelected( u, 0, 0, "_self", args );
}
@@ -3204,6 +3184,7 @@ void KHTMLPart::slotChildCompleted( bool complete )
child->m_bCompleted = true;
child->m_args = KParts::URLArgs();
+
if ( parentPart() == 0 )
d->m_bPendingChildRedirection = (d->m_bPendingChildRedirection || complete);
@@ -3288,9 +3269,6 @@ khtml::ChildFrame *KHTMLPart::frame( const QObject *obj )
KHTMLPart *KHTMLPart::findFrame( const QString &f )
{
-#ifdef APPLE_CHANGES
- return impl->findFrame(f);
-#else
#if 0
kdDebug() << "KHTMLPart::findFrame '" << f << "'" << endl;
FrameIt it2 = d->m_frames.begin();
@@ -3323,7 +3301,6 @@ KHTMLPart *KHTMLPart::findFrame( const QString &f )
return 0L;
}
}
-#endif
}
#ifndef APPLE_CHANGES
@@ -3347,9 +3324,6 @@ KParts::ReadOnlyPart *KHTMLPart::currentFrame() const
bool KHTMLPart::frameExists( const QString &frameName )
{
-#ifdef APPLE_CHANGES
- return impl->frameExists(frameName);
-#else
ConstFrameIt it = d->m_frames.find( frameName );
if ( it == d->m_frames.end() )
return false;
@@ -3358,7 +3332,6 @@ bool KHTMLPart::frameExists( const QString &frameName )
// set. Otherwise we might find our preloaded-selve.
// This happens when we restore the frameset.
return (!(*it).m_frame.isNull());
-#endif
}
KHTMLPart *KHTMLPart::parentPart()
@@ -3814,10 +3787,8 @@ void KHTMLPart::reparseConfiguration()
settings->init();
setAutoloadImages( settings->autoLoadImages() );
-#ifndef APPLE_CHANGES
if (d->m_doc)
d->m_doc->docLoader()->setShowAnimations( settings->showAnimations() );
-#endif
d->m_bJScriptEnabled = settings->isJavaScriptEnabled(m_url.host());
d->m_bJScriptDebugEnabled = settings->isJavaScriptDebugEnabled();
@@ -3837,8 +3808,6 @@ void KHTMLPart::reparseConfiguration()
QApplication::restoreOverrideCursor();
}
-#ifndef APPLE_CHANGES
-
QStringList KHTMLPart::frameNames() const
{
QStringList res;
@@ -3852,13 +3821,8 @@ QStringList KHTMLPart::frameNames() const
return res;
}
-#endif
-
QPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
{
-#ifdef APPLE_CHANGES
- return impl->frames();
-#else
QPtrList<KParts::ReadOnlyPart> res;
ConstFrameIt it = d->m_frames.begin();
@@ -3868,7 +3832,6 @@ QPtrList<KParts::ReadOnlyPart> KHTMLPart::frames() const
res.append( (*it).m_part );
return res;
-#endif
}
#ifndef APPLE_CHANGES
diff --git a/WebCore/khtml/khtmlview.h b/WebCore/khtml/khtmlview.h
index a3ed144..6feaaa7 100644
--- a/WebCore/khtml/khtmlview.h
+++ b/WebCore/khtml/khtmlview.h
@@ -195,7 +195,6 @@ private:
void scheduleRepaint(int x, int y, int w, int h);
-#ifndef APPLE_CHANGES
/**
* Paints the HTML document to a QPainter.
* The document will be scaled to match the width of
@@ -205,7 +204,6 @@ private:
* beyond the rc or false if everything below yOff was painted.
**/
void paint(QPainter *p, const QRect &rc, int yOff = 0, bool *more = 0);
-#endif
/**
* Get/set the CSS Media Type.
diff --git a/WebCore/khtml/misc/loader.cpp b/WebCore/khtml/misc/loader.cpp
index bd59d05..e8d3bbc 100644
--- a/WebCore/khtml/misc/loader.cpp
+++ b/WebCore/khtml/misc/loader.cpp
@@ -435,6 +435,8 @@ static QString buildAcceptHeader()
return result;
}
+#endif // APPLE_CHANGES
+
static bool crossDomain(const QString &a, const QString &b)
{
if (a == b) return false;
@@ -459,8 +461,6 @@ static bool crossDomain(const QString &a, const QString &b)
return true;
}
-#endif // APPLE_CHANGES
-
// -------------------------------------------------------------------------------------
CachedImage::CachedImage(DocLoader* dl, const DOMString &url, KIO::CacheControl _cachePolicy, time_t _expireDate)
@@ -1145,10 +1145,6 @@ void Loader::servePendingRequests()
KURL u(req->object->url().string());
KIO::TransferJob* job = KIO::get( u, false, false /*no GUI*/);
-#ifdef APPLE_CHANGES
- if (KWQServeRequest(this, req, job))
- m_requestsLoading.insert(job, req);
-#else
job->addMetaData("cache", getCacheControlString(req->object->cachePolicy()));
if (!req->object->accept().isEmpty())
job->addMetaData("accept", req->object->accept());
@@ -1169,6 +1165,10 @@ void Loader::servePendingRequests()
connect( job, SIGNAL( data( KIO::Job*, const QByteArray &)),
SLOT( slotData( KIO::Job*, const QByteArray &)));
+#ifdef APPLE_CHANGES
+ if (KWQServeRequest(this, req, job))
+ m_requestsLoading.insert(job, req);
+#else
if ( req->object->schedule() )
KIO::Scheduler::scheduleJob( job );
diff --git a/WebCore/kwq/KWQApplication.mm b/WebCore/kwq/KWQApplication.mm
index 58eed53..a8a29af 100644
--- a/WebCore/kwq/KWQApplication.mm
+++ b/WebCore/kwq/KWQApplication.mm
@@ -62,12 +62,10 @@ QSize QApplication::globalStrut()
void QApplication::setOverrideCursor(const QCursor &c)
{
- ERROR("not yet implemented");
}
void QApplication::restoreOverrideCursor()
{
- ERROR("not yet implemented");
}
QStyle &QApplication::style()
diff --git a/WebCore/kwq/KWQKConfigBase.mm b/WebCore/kwq/KWQKConfigBase.mm
index 3da592d..1b16a4a 100644
--- a/WebCore/kwq/KWQKConfigBase.mm
+++ b/WebCore/kwq/KWQKConfigBase.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2001, 2002 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,6 +28,7 @@
#import <KWQLogging.h>
#import <qcolor.h>
#import <qstringlist.h>
+#import <WebCoreSettings.h>
#import <WebCoreViewFactory.h>
class KWQKConfigImpl
@@ -67,12 +68,7 @@ void KConfig::writeEntry(const QString &pKey, const QStringList &rValue,
QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
{
if (impl->isPluginInfo) {
- id <WebCorePluginInfo> plugin;
- NSArray *mimeTypes;
- NSMutableString *bigMimeString;
- uint i;
-
- plugin = [[[WebCoreViewFactory sharedFactory] pluginsInfo] objectAtIndex:impl->pluginIndex];
+ id <WebCorePluginInfo> plugin = [[[WebCoreViewFactory sharedFactory] pluginsInfo] objectAtIndex:impl->pluginIndex];
if (strcmp(pKey, "name") == 0) {
return QString::fromNSString([plugin name]);
} else if (strcmp(pKey, "file") == 0) {
@@ -80,9 +76,9 @@ QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
} else if (strcmp(pKey, "description") == 0) {
return QString::fromNSString([plugin pluginDescription]);
} else if (strcmp(pKey, "mime") == 0) {
- mimeTypes = [plugin mimeTypes];
- bigMimeString = [NSMutableString string];
- for(i = 0; i < [mimeTypes count]; i++) {
+ NSArray *mimeTypes = [plugin mimeTypes];
+ NSMutableString *bigMimeString = [NSMutableString string];
+ for (uint i = 0; i < [mimeTypes count]; i++) {
[bigMimeString appendString:[[mimeTypes objectAtIndex:i] objectAtIndex:0]]; // mime type
[bigMimeString appendString:@":"];
[bigMimeString appendString:[[mimeTypes objectAtIndex:i] objectAtIndex:1]]; // mime's extension
@@ -95,12 +91,12 @@ QString KConfig::readEntry(const char *pKey, const QString& aDefault) const
}
ERROR("not yet implemented");
- return QString();
+ return QString::null;
}
int KConfig::readNumEntry(const char *pKey, int nDefault) const
{
- if (impl->isPluginInfo) {
+ if (impl->isPluginInfo && strcmp(pKey, "number") == 0) {
return [[[WebCoreViewFactory sharedFactory] pluginsInfo] count];
}
ERROR("not yet implemented");
@@ -109,8 +105,8 @@ int KConfig::readNumEntry(const char *pKey, int nDefault) const
unsigned int KConfig::readUnsignedNumEntry(const char *pKey, unsigned int nDefault) const
{
- if (impl->isKonquerorRC && QString(pKey) == "WindowOpenPolicy") {
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitJavaScriptCanOpenWindowsAutomatically"]) {
+ if (impl->isKonquerorRC && strcmp(pKey, "WindowOpenPolicy") == 0) {
+ if ([[WebCoreSettings sharedSettings] JavaScriptCanOpenWindowsAutomatically]) {
return 0;
} else {
return 3;
@@ -120,21 +116,17 @@ unsigned int KConfig::readUnsignedNumEntry(const char *pKey, unsigned int nDefau
return nDefault;
}
-
bool KConfig::readBoolEntry(const char *pKey, bool nDefault) const
{
ERROR("not yet implemented");
return nDefault;
}
-
QColor KConfig::readColorEntry(const char *pKey, const QColor *pDefault) const
{
- LOG(NotYetImplemented, "not yet implemented");
- return pDefault ? *pDefault : QColor(0,0,0);
+ return pDefault ? *pDefault : QColor(0, 0, 0);
}
-
QStringList KConfig::readListEntry(const QString &pKey, char sep) const
{
ERROR("not yet implemented");
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 1823d30..d900a0e 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -36,8 +36,6 @@
#import <WebCoreBridge.h>
#import <WebCoreViewFactory.h>
-#import <WebFoundation/WebNSURLExtras.h>
-
#import <KWQLogging.h>
#undef _KWQ_TIMING
@@ -495,9 +493,9 @@ void KWQKHTMLPartImpl::jumpToSelection()
void KWQKHTMLPartImpl::redirectionTimerStartedOrStopped()
{
if (d->m_redirectionTimer.isActive()) {
- [_bridge reportClientRedirectTo:[NSURL _web_URLWithString:d->m_redirectURL.getNSString()]
- delay:d->m_delayRedirect
- fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
+ [_bridge reportClientRedirectTo:KURL(d->m_redirectURL).getNSURL()
+ delay:d->m_delayRedirect
+ fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
} else {
[_bridge reportClientRedirectCancelled];
}
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 1823d30..d900a0e 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -36,8 +36,6 @@
#import <WebCoreBridge.h>
#import <WebCoreViewFactory.h>
-#import <WebFoundation/WebNSURLExtras.h>
-
#import <KWQLogging.h>
#undef _KWQ_TIMING
@@ -495,9 +493,9 @@ void KWQKHTMLPartImpl::jumpToSelection()
void KWQKHTMLPartImpl::redirectionTimerStartedOrStopped()
{
if (d->m_redirectionTimer.isActive()) {
- [_bridge reportClientRedirectTo:[NSURL _web_URLWithString:d->m_redirectURL.getNSString()]
- delay:d->m_delayRedirect
- fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
+ [_bridge reportClientRedirectTo:KURL(d->m_redirectURL).getNSURL()
+ delay:d->m_delayRedirect
+ fireDate:[d->m_redirectionTimer.getNSTimer() fireDate]];
} else {
[_bridge reportClientRedirectCancelled];
}
diff --git a/WebCore/kwq/KWQKHTMLSettings.mm b/WebCore/kwq/KWQKHTMLSettings.mm
index a3854c0..bc98be7 100644
--- a/WebCore/kwq/KWQKHTMLSettings.mm
+++ b/WebCore/kwq/KWQKHTMLSettings.mm
@@ -24,36 +24,37 @@
*/
#import <khtml_settings.h>
-#import <KWQLogging.h>
+
+#import <WebCoreSettings.h>
QString KHTMLSettings::stdFontName() const
{
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitStandardFont"]);
+ return QString::fromNSString([[WebCoreSettings sharedSettings] standardFontFamily]);
}
QString KHTMLSettings::fixedFontName() const
{
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitFixedFont"]);
+ return QString::fromNSString([[WebCoreSettings sharedSettings] fixedFontFamily]);
}
QString KHTMLSettings::serifFontName() const
{
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitSerifFont"]);
+ return QString::fromNSString([[WebCoreSettings sharedSettings] serifFontFamily]);
}
QString KHTMLSettings::sansSerifFontName() const
{
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitSansSerifFont"]);
+ return QString::fromNSString([[WebCoreSettings sharedSettings] sansSerifFontFamily]);
}
QString KHTMLSettings::cursiveFontName() const
{
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitCursiveFont"]);
+ return QString::fromNSString([[WebCoreSettings sharedSettings] cursiveFontFamily]);
}
QString KHTMLSettings::fantasyFontName() const
{
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitFantasyFont"]);
+ return QString::fromNSString([[WebCoreSettings sharedSettings] fantasyFontFamily]);
}
QString KHTMLSettings::settingsToCSS() const
@@ -69,17 +70,17 @@ const QString &KHTMLSettings::encoding() const
int KHTMLSettings::minFontSize() const
{
- return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitMinimumFontSize"];
+ return (int)rint([[WebCoreSettings sharedSettings] minimumFontSize]);
}
int KHTMLSettings::mediumFontSize() const
{
- return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitDefaultFontSize"];
+ return (int)rint([[WebCoreSettings sharedSettings] defaultFontSize]);
}
int KHTMLSettings::mediumFixedFontSize() const
{
- return [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitDefaultFixedFontSize"];
+ return (int)rint([[WebCoreSettings sharedSettings] defaultFixedFontSize]);
}
bool KHTMLSettings::changeCursor() const
@@ -109,12 +110,12 @@ bool KHTMLSettings::isJavaEnabled(QString const&) const
bool KHTMLSettings::isJavaEnabled() const
{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJavaEnabled"] boolValue];
+ return [[WebCoreSettings sharedSettings] JavaEnabled];
}
bool KHTMLSettings::autoLoadImages() const
{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitDisplayImagesKey"] boolValue];
+ return [[WebCoreSettings sharedSettings] willLoadImagesAutomatically];
}
bool KHTMLSettings::isPluginsEnabled(QString const&) const
@@ -124,7 +125,7 @@ bool KHTMLSettings::isPluginsEnabled(QString const&) const
bool KHTMLSettings::isPluginsEnabled() const
{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitPluginsEnabled"] boolValue];
+ return [[WebCoreSettings sharedSettings] pluginsEnabled];
}
bool KHTMLSettings::isJavaScriptEnabled(QString const&) const
@@ -134,7 +135,7 @@ bool KHTMLSettings::isJavaScriptEnabled(QString const&) const
bool KHTMLSettings::isJavaScriptEnabled() const
{
- return [[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitJavaScriptEnabled"] boolValue];
+ return [[WebCoreSettings sharedSettings] JavaScriptEnabled];
}
bool KHTMLSettings::isJavaScriptDebugEnabled() const
@@ -144,9 +145,5 @@ bool KHTMLSettings::isJavaScriptDebugEnabled() const
QString KHTMLSettings::userStyleSheet() const
{
- if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitUserStyleSheetEnabledPreferenceKey"] boolValue])
- // The user style sheet is enabled.
- return QString::fromNSString([[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitUserStyleSheetLocationPreferenceKey"]);
-
- return QString();
+ return QString::fromNSString([[WebCoreSettings sharedSettings] userStyleSheetLocation]);
}
diff --git a/WebCore/kwq/KWQKIOGlobal.h b/WebCore/kwq/KWQKIOGlobal.h
index 7811a65..3bac1ba 100644
--- a/WebCore/kwq/KWQKIOGlobal.h
+++ b/WebCore/kwq/KWQKIOGlobal.h
@@ -30,6 +30,7 @@
#include <qmap.h>
namespace KIO {
+
enum CacheControl
{
CC_Cache,
@@ -38,7 +39,10 @@ namespace KIO {
CC_Reload
};
- const QMap<QString, QString> MetaData();
+ typedef QMap<QString, QString> MetaData;
+
+ inline QString getCacheControlString(CacheControl) { return QString::null; }
+
}
#endif /* KIO_GLOBAL_H_ */
diff --git a/WebCore/kwq/KWQKJavaAppletWidget.mm b/WebCore/kwq/KWQKJavaAppletWidget.mm
index 7c5d11a..f2db84e 100644
--- a/WebCore/kwq/KWQKJavaAppletWidget.mm
+++ b/WebCore/kwq/KWQKJavaAppletWidget.mm
@@ -24,8 +24,9 @@
*/
#import <kjavaappletwidget.h>
+
+#import <kurl.h>
#import <WebCoreViewFactory.h>
-#import <WebFoundation/WebNSURLExtras.h>
KJavaAppletWidget::KJavaAppletWidget(KJavaAppletContext *, QWidget *)
: m_applet(*this)
@@ -43,7 +44,7 @@ KJavaAppletWidget::~KJavaAppletWidget()
void KJavaAppletWidget::setBaseURL(const QString &baseURL)
{
[m_baseURL release];
- m_baseURL = [[NSURL _web_URLWithString:baseURL.getNSString()] retain];
+ m_baseURL = [KURL(baseURL).getNSURL() retain];
}
void KJavaAppletWidget::setParameter(const QString &name, const QString &value)
diff --git a/WebCore/kwq/KWQKJob.h b/WebCore/kwq/KWQKJob.h
index 4890ff9..6960730 100644
--- a/WebCore/kwq/KWQKJob.h
+++ b/WebCore/kwq/KWQKJob.h
@@ -39,6 +39,9 @@ void http_update_cache(const KURL &, bool, time_t);
inline TransferJob *get(const KURL &url, bool reload = false, bool showProgressInfo = true)
{ return new TransferJob(url, reload, showProgressInfo); }
+inline TransferJob *http_post(const KURL& url, const QByteArray &postData, bool showProgressInfo = true)
+ { return new TransferJob(url, postData, showProgressInfo); }
+
} // namespace KIO
#endif
diff --git a/WebCore/kwq/KWQKJobClasses.h b/WebCore/kwq/KWQKJobClasses.h
index 9bb1f38..0c2cc22 100644
--- a/WebCore/kwq/KWQKJobClasses.h
+++ b/WebCore/kwq/KWQKJobClasses.h
@@ -26,10 +26,12 @@
#ifndef JOBCLASSES_H_
#define JOBCLASSES_H_
-#include <kurl.h>
+#include <qmap.h>
#include <qobject.h>
#include <qstring.h>
+#include <kurl.h>
+
#ifdef __OBJC__
@protocol WebCoreResourceHandle;
typedef id <WebCoreResourceHandle> WebCoreResourceHandlePtr;
@@ -52,6 +54,7 @@ public:
class TransferJob : public Job {
public:
TransferJob(const KURL &, bool reload = false, bool showProgressInfo = true);
+ TransferJob(const KURL &, const QByteArray &postData, bool showProgressInfo = true);
~TransferJob();
int error() const;
@@ -60,6 +63,7 @@ public:
bool isErrorPage() const;
QString queryMetaData(const QString &key) const;
void addMetaData(const QString &key, const QString &value);
+ void addMetaData(const QMap<QString, QString> &value);
void kill();
void setHandle(WebCoreResourceHandlePtr);
diff --git a/WebCore/kwq/KWQKJobClasses.mm b/WebCore/kwq/KWQKJobClasses.mm
index 2357a01..2ea8803 100644
--- a/WebCore/kwq/KWQKJobClasses.mm
+++ b/WebCore/kwq/KWQKJobClasses.mm
@@ -62,6 +62,11 @@ TransferJob::TransferJob(const KURL &url, bool reload, bool showProgressInfo)
d = new TransferJobPrivate(url);
}
+TransferJob::TransferJob(const KURL &url, const QByteArray &postData, bool showProgressInfo)
+{
+ d = new TransferJobPrivate(url);
+}
+
TransferJob::~TransferJob()
{
kill();
@@ -91,19 +96,23 @@ QString TransferJob::errorText() const
QString TransferJob::queryMetaData(const QString &key) const
{
- NSString *value;
-
- value = [d->metaData objectForKey:key.getNSString()];
+ NSString *value = [d->metaData objectForKey:key.getNSString()];
return value ? QString::fromNSString(value) : QString::null;
}
void TransferJob::addMetaData(const QString &key, const QString &value)
{
- // When putting strings into dictionaries, we should use an immutable copy.
- // That's not necessary for keys, because they are copied.
- NSString *immutableValue = [value.getNSString() copy];
- [d->metaData setObject:immutableValue forKey:key.getNSString()];
- [immutableValue release];
+ [d->metaData setObject:value.getNSString() forKey:key.getNSString()];
+}
+
+void TransferJob::addMetaData(const QMap<QString, QString> &keysAndValues)
+{
+ QMapConstIterator<QString, QString> it = keysAndValues.begin();
+ QMapConstIterator<QString, QString> end = keysAndValues.end();
+ while (it != end) {
+ [d->metaData setObject:it.data().getNSString() forKey:it.key().getNSString()];
+ ++it;
+ }
}
void TransferJob::kill()
diff --git a/WebCore/kwq/KWQKPartsBrowserExtension.h b/WebCore/kwq/KWQKPartsBrowserExtension.h
index 23679d8..7e74d84 100644
--- a/WebCore/kwq/KWQKPartsBrowserExtension.h
+++ b/WebCore/kwq/KWQKPartsBrowserExtension.h
@@ -26,8 +26,9 @@
#ifndef BROWSEREXTENSION_H_
#define BROWSEREXTENSION_H_
-#include <qpoint.h>
#include <qevent.h>
+#include <qmap.h>
+#include <qpoint.h>
#include <kurl.h>
@@ -41,11 +42,22 @@ namespace KParts {
struct URLArgs {
QString frameName;
+ QByteArray postData;
+ bool reload;
QString serviceType;
int xOffset;
int yOffset;
URLArgs() : xOffset(0), yOffset(0) { }
+
+ QString contentType() const { return QString::null; }
+ bool doPost() const { return false; }
+
+ QMap<QString, QString> &metaData() { return m_metadata; }
+ void setLockHistory(bool) { }
+
+private:
+ QMap<QString, QString> m_metadata;
};
@@ -72,7 +84,7 @@ struct WindowArgs {
class BrowserExtension : public QObject {
public:
- BrowserExtension() {}
+ BrowserExtension() { }
BrowserInterface *browserInterface() const { return 0; }
virtual void openURLRequest(const KURL &, const KParts::URLArgs &args = KParts::URLArgs()) = 0;
diff --git a/WebCore/kwq/KWQKPartsPart.h b/WebCore/kwq/KWQKPartsPart.h
index 993d800..b99e44c 100644
--- a/WebCore/kwq/KWQKPartsPart.h
+++ b/WebCore/kwq/KWQKPartsPart.h
@@ -71,6 +71,8 @@ public:
void setParent(QObject *parent) { m_parent = parent; }
QObject *parent() const { return m_parent; }
void setInstance(KInstance *, bool) { }
+
+ virtual bool closeURL() = 0;
private:
QObject *m_parent;
diff --git a/WebCore/kwq/KWQKURL.h b/WebCore/kwq/KWQKURL.h
index 7e7e24b..a2831f6 100644
--- a/WebCore/kwq/KWQKURL.h
+++ b/WebCore/kwq/KWQKURL.h
@@ -55,6 +55,7 @@ public:
QString pass() const;
QString user() const;
QString ref() const;
+ bool hasRef() const;
QString query() const;
QString path() const;
QString htmlRef() const;
@@ -91,4 +92,7 @@ private:
int fragmentEndPos;
};
+// True if both URLs are the same.
+bool urlcmp(const QString &URLA, const QString &URLB, bool ignoreTrailingSlash, bool ignoreRef);
+
#endif
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index c18efab..e056fec 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -479,11 +479,16 @@ QString KURL::ref() const
return QString();
}
- if (fragmentEndPos == queryEndPos) {
+ if (fragmentEndPos <= queryEndPos + 1) {
return QString();
}
- return urlString.mid(queryEndPos + 1, fragmentEndPos - queryEndPos - 1);
+ return urlString.mid(queryEndPos + 1, fragmentEndPos - (queryEndPos + 1));
+}
+
+bool KURL::hasRef() const
+{
+ return m_isValid && fragmentEndPos > queryEndPos + 1;
}
QString KURL::query() const
@@ -955,3 +960,8 @@ bool operator==(const KURL &a, const KURL &b)
{
return a.urlString == b.urlString;
}
+
+bool urlcmp(const QString &a, const QString &b, bool, bool)
+{
+ return a == b;
+}
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 08d0983..0bd3639 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -30,9 +30,6 @@
#import <khtml_part.h>
-#import <WebFoundation/WebCacheLoaderConstants.h>
-#import <WebFoundation/WebError.h>
-
#import <WebCoreBridge.h>
#import <WebCoreResourceLoader.h>
@@ -102,11 +99,7 @@ bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
NSURL *URL = job->url().getNSURL();
if (URL == nil) {
- WebError *badURLError = [[WebError alloc] initWithErrorCode:WebResultBadURLError
- inDomain:WebErrorDomainWebFoundation
- failingURL:job->url().url().getNSString()];
- [bridge reportError:badURLError];
- [badURLError release];
+ [bridge reportBadURL:job->url().url().getNSString()];
delete job;
return false;
}
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 08d0983..0bd3639 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -30,9 +30,6 @@
#import <khtml_part.h>
-#import <WebFoundation/WebCacheLoaderConstants.h>
-#import <WebFoundation/WebError.h>
-
#import <WebCoreBridge.h>
#import <WebCoreResourceLoader.h>
@@ -102,11 +99,7 @@ bool KWQServeRequest(Loader *loader, Request *request, TransferJob *job)
NSURL *URL = job->url().getNSURL();
if (URL == nil) {
- WebError *badURLError = [[WebError alloc] initWithErrorCode:WebResultBadURLError
- inDomain:WebErrorDomainWebFoundation
- failingURL:job->url().url().getNSString()];
- [bridge reportError:badURLError];
- [badURLError release];
+ [bridge reportBadURL:job->url().url().getNSString()];
delete job;
return false;
}
diff --git a/WebCore/kwq/KWQStringList.h b/WebCore/kwq/KWQStringList.h
index f0901a8..fab8beb 100644
--- a/WebCore/kwq/KWQStringList.h
+++ b/WebCore/kwq/KWQStringList.h
@@ -35,6 +35,8 @@ public:
static QStringList split(const QChar &, const QString &, bool allowEmptyEntries = false);
QString join(const QString &) const;
+
+ QString pop_front();
};
#endif
diff --git a/WebCore/kwq/KWQStringList.mm b/WebCore/kwq/KWQStringList.mm
index e334ccf..bce4bc7 100644
--- a/WebCore/kwq/KWQStringList.mm
+++ b/WebCore/kwq/KWQStringList.mm
@@ -76,3 +76,10 @@ QString QStringList::join(const QString &separator) const
return result;
}
+
+QString QStringList::pop_front()
+{
+ QString front = first();
+ remove(begin());
+ return front;
+}
diff --git a/WebCore/kwq/KWQValueList.h b/WebCore/kwq/KWQValueList.h
index 56ba558..97b526b 100644
--- a/WebCore/kwq/KWQValueList.h
+++ b/WebCore/kwq/KWQValueList.h
@@ -87,6 +87,7 @@ private:
friend class QValueList<T>;
};
+template<class T> bool operator==(const QValueList<T> &a, const QValueList<T> &b);
template <class T> class QValueList {
public:
@@ -118,8 +119,10 @@ public:
T& operator[] (uint index) { return ((QValueListNode<T> *)impl.nodeAt(index))->value; }
const T& operator[] (uint index) const { return ((const QValueListNode<T> *)impl.nodeAt(index))->value; }
- QValueList &operator+=(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
- QValueList &operator<<(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
+ QValueList &operator+=(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
+ QValueList &operator<<(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
+
+ friend bool operator==<>(const QValueList<T> &, const QValueList<T> &);
private:
KWQValueListImpl impl;
@@ -131,6 +134,12 @@ private:
{ return new QValueListNode<T>(((QValueListNode<T> *)node)->value); }
};
+template<class T>
+inline bool operator==(const QValueList<T> &a, const QValueList<T> &b)
+{
+ return a.impl.isEqual(b.impl, QValueList<T>::nodesEqual);
+}
+
#ifdef _KWQ_IOSTREAM_
template<class T>
diff --git a/WebCore/kwq/KWQValueListImpl.h b/WebCore/kwq/KWQValueListImpl.h
index bf48a41..419af11 100644
--- a/WebCore/kwq/KWQValueListImpl.h
+++ b/WebCore/kwq/KWQValueListImpl.h
@@ -91,6 +91,8 @@ public:
KWQValueListNodeImpl *nodeAt(uint index);
KWQValueListNodeImpl *nodeAt(uint index) const;
+ bool isEqual(const KWQValueListImpl &other, bool (*equalFunc)(const KWQValueListNodeImpl *, const KWQValueListNodeImpl *)) const;
+
private:
void copyOnWrite();
diff --git a/WebCore/kwq/KWQValueListImpl.mm b/WebCore/kwq/KWQValueListImpl.mm
index c3696c3..dbefc00 100644
--- a/WebCore/kwq/KWQValueListImpl.mm
+++ b/WebCore/kwq/KWQValueListImpl.mm
@@ -419,3 +419,14 @@ void KWQValueListImpl::copyOnWrite()
d = KWQRefPtr<KWQValueListPrivate>(new KWQValueListPrivate(*d));
}
}
+
+bool KWQValueListImpl::isEqual(const KWQValueListImpl &other, bool (*equalFunc)(const KWQValueListNodeImpl *, const KWQValueListNodeImpl *)) const
+{
+ KWQValueListNodeImpl *p, *q;
+ for (p = d->head, q = other.d->head; p && q; p = p->next, q = q->next) {
+ if (!equalFunc(p, q)) {
+ return false;
+ }
+ }
+ return !p && !q;
+}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 82def13..39ac036 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -168,7 +168,7 @@ typedef khtml::RenderPart KHTMLRenderPart;
- (void)setWindowFrame:(NSRect)frame;
- (id <WebCoreResourceHandle>)startLoadingResource:(id <WebCoreResourceLoader>)loader withURL:(NSURL *)URL;
-- (void)reportError:(WebError *)error;
+- (void)reportBadURL:(NSString *)badURL;
- (void)objectLoadedFromCache:(NSURL *)URL size:(unsigned)bytes;
- (BOOL)isReloading;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 3929f4d..29d9900 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -41,7 +41,6 @@
#import <KWQDOMNode.h>
#import <WebCoreImageRenderer.h>
#import <WebCoreTextRendererFactory.h>
-#import <WebFoundation/WebNSURLExtras.h>
#import <KWQCharsets.h>
using DOM::DocumentImpl;
@@ -418,8 +417,7 @@ using khtml::RenderPart;
- (NSURL *)completeURLForDOMString:(const DOMString &)s
{
- NSString *URLString = part->impl->document()->completeURL(s.string()).getNSString();
- return [NSURL _web_URLWithString:URLString];
+ return KURL(part->impl->document()->completeURL(s.string())).getNSURL();
}
- (NSDictionary *)elementAtPoint:(NSPoint)point
diff --git a/WebCore/kwq/WebCoreSettings.h b/WebCore/kwq/WebCoreSettings.h
index de694fb..50ba042 100644
--- a/WebCore/kwq/WebCoreSettings.h
+++ b/WebCore/kwq/WebCoreSettings.h
@@ -40,6 +40,8 @@
BOOL pluginsEnabled;
BOOL JavaScriptEnabled;
BOOL JavaScriptCanOpenWindowsAutomatically;
+ BOOL willLoadImagesAutomatically;
+ NSString *userStyleSheetLocation;
}
+ (WebCoreSettings *)sharedSettings;
@@ -83,4 +85,10 @@
- (void)setJavaScriptCanOpenWindowsAutomatically:(BOOL)enabled;
- (BOOL)JavaScriptCanOpenWindowsAutomatically;
+- (void)setWillLoadImagesAutomatically:(BOOL)load;
+- (BOOL)willLoadImagesAutomatically;
+
+- (void)setUserStyleSheetLocation:(NSString *)location;
+- (NSString *)userStyleSheetLocation;
+
@end
diff --git a/WebCore/kwq/WebCoreSettings.m b/WebCore/kwq/WebCoreSettings.m
index 08ed669..4169b11 100644
--- a/WebCore/kwq/WebCoreSettings.m
+++ b/WebCore/kwq/WebCoreSettings.m
@@ -48,11 +48,18 @@
[super dealloc];
}
+- (void)_updateAllViews
+{
+}
+
- (void)setStandardFontFamily:(NSString *)s
{
- NSString *c = [s copy];
+ if ([standardFontFamily isEqualToString:s]) {
+ return;
+ }
[standardFontFamily release];
- standardFontFamily = c;
+ standardFontFamily = [s copy];
+ [self _updateAllViews];
}
- (NSString *)standardFontFamily
@@ -62,9 +69,12 @@
- (void)setFixedFontFamily:(NSString *)s
{
- NSString *c = [s copy];
+ if ([fixedFontFamily isEqualToString:s]) {
+ return;
+ }
[fixedFontFamily release];
- fixedFontFamily = c;
+ fixedFontFamily = [s copy];
+ [self _updateAllViews];
}
- (NSString *)fixedFontFamily
@@ -74,9 +84,12 @@
- (void)setSerifFontFamily:(NSString *)s
{
- NSString *c = [s copy];
+ if ([serifFontFamily isEqualToString:s]) {
+ return;
+ }
[serifFontFamily release];
- serifFontFamily = c;
+ serifFontFamily = [s copy];
+ [self _updateAllViews];
}
- (NSString *)serifFontFamily
@@ -86,9 +99,12 @@
- (void)setSansSerifFontFamily:(NSString *)s
{
- NSString *c = [s copy];
+ if ([sansSerifFontFamily isEqualToString:s]) {
+ return;
+ }
[sansSerifFontFamily release];
- sansSerifFontFamily = c;
+ sansSerifFontFamily = [s copy];
+ [self _updateAllViews];
}
- (NSString *)sansSerifFontFamily
@@ -98,9 +114,12 @@
- (void)setCursiveFontFamily:(NSString *)s
{
- NSString *c = [s copy];
+ if ([cursiveFontFamily isEqualToString:s]) {
+ return;
+ }
[cursiveFontFamily release];
- cursiveFontFamily = c;
+ cursiveFontFamily = [s copy];
+ [self _updateAllViews];
}
- (NSString *)cursiveFontFamily
@@ -110,9 +129,12 @@
- (void)setFantasyFontFamily:(NSString *)s
{
- NSString *c = [s copy];
+ if ([fantasyFontFamily isEqualToString:s]) {
+ return;
+ }
[fantasyFontFamily release];
- fantasyFontFamily = c;
+ fantasyFontFamily = [s copy];
+ [self _updateAllViews];
}
- (NSString *)fantasyFontFamily
@@ -122,7 +144,11 @@
- (void)setMinimumFontSize:(float)size
{
+ if (minimumFontSize == size) {
+ return;
+ }
minimumFontSize = size;
+ [self _updateAllViews];
}
- (float)minimumFontSize
@@ -132,7 +158,11 @@
- (void)setDefaultFontSize:(float)size
{
+ if (defaultFontSize == size) {
+ return;
+ }
defaultFontSize = size;
+ [self _updateAllViews];
}
- (float)defaultFontSize
@@ -142,7 +172,11 @@
- (void)setDefaultFixedFontSize:(float)size
{
+ if (defaultFixedFontSize == size) {
+ return;
+ }
defaultFixedFontSize = size;
+ [self _updateAllViews];
}
- (float)defaultFixedFontSize
@@ -190,4 +224,29 @@
return JavaScriptCanOpenWindowsAutomatically;
}
+- (void)setWillLoadImagesAutomatically:(BOOL)load
+{
+ willLoadImagesAutomatically = load;
+}
+
+- (BOOL)willLoadImagesAutomatically
+{
+ return willLoadImagesAutomatically;
+}
+
+- (void)setUserStyleSheetLocation:(NSString *)s
+{
+ if ([userStyleSheetLocation isEqualToString:s]) {
+ return;
+ }
+ [userStyleSheetLocation release];
+ userStyleSheetLocation = [s copy];
+ [self _updateAllViews];
+}
+
+- (NSString *)userStyleSheetLocation
+{
+ return userStyleSheetLocation;
+}
+
@end
diff --git a/WebCore/kwq/kdecore/kurl.h b/WebCore/kwq/kdecore/kurl.h
index 7e7e24b..a2831f6 100644
--- a/WebCore/kwq/kdecore/kurl.h
+++ b/WebCore/kwq/kdecore/kurl.h
@@ -55,6 +55,7 @@ public:
QString pass() const;
QString user() const;
QString ref() const;
+ bool hasRef() const;
QString query() const;
QString path() const;
QString htmlRef() const;
@@ -91,4 +92,7 @@ private:
int fragmentEndPos;
};
+// True if both URLs are the same.
+bool urlcmp(const QString &URLA, const QString &URLB, bool ignoreTrailingSlash, bool ignoreRef);
+
#endif
diff --git a/WebCore/kwq/kio/global.h b/WebCore/kwq/kio/global.h
index 7811a65..3bac1ba 100644
--- a/WebCore/kwq/kio/global.h
+++ b/WebCore/kwq/kio/global.h
@@ -30,6 +30,7 @@
#include <qmap.h>
namespace KIO {
+
enum CacheControl
{
CC_Cache,
@@ -38,7 +39,10 @@ namespace KIO {
CC_Reload
};
- const QMap<QString, QString> MetaData();
+ typedef QMap<QString, QString> MetaData;
+
+ inline QString getCacheControlString(CacheControl) { return QString::null; }
+
}
#endif /* KIO_GLOBAL_H_ */
diff --git a/WebCore/kwq/kio/job.h b/WebCore/kwq/kio/job.h
index 4890ff9..6960730 100644
--- a/WebCore/kwq/kio/job.h
+++ b/WebCore/kwq/kio/job.h
@@ -39,6 +39,9 @@ void http_update_cache(const KURL &, bool, time_t);
inline TransferJob *get(const KURL &url, bool reload = false, bool showProgressInfo = true)
{ return new TransferJob(url, reload, showProgressInfo); }
+inline TransferJob *http_post(const KURL& url, const QByteArray &postData, bool showProgressInfo = true)
+ { return new TransferJob(url, postData, showProgressInfo); }
+
} // namespace KIO
#endif
diff --git a/WebCore/kwq/kio/jobclasses.h b/WebCore/kwq/kio/jobclasses.h
index 9bb1f38..0c2cc22 100644
--- a/WebCore/kwq/kio/jobclasses.h
+++ b/WebCore/kwq/kio/jobclasses.h
@@ -26,10 +26,12 @@
#ifndef JOBCLASSES_H_
#define JOBCLASSES_H_
-#include <kurl.h>
+#include <qmap.h>
#include <qobject.h>
#include <qstring.h>
+#include <kurl.h>
+
#ifdef __OBJC__
@protocol WebCoreResourceHandle;
typedef id <WebCoreResourceHandle> WebCoreResourceHandlePtr;
@@ -52,6 +54,7 @@ public:
class TransferJob : public Job {
public:
TransferJob(const KURL &, bool reload = false, bool showProgressInfo = true);
+ TransferJob(const KURL &, const QByteArray &postData, bool showProgressInfo = true);
~TransferJob();
int error() const;
@@ -60,6 +63,7 @@ public:
bool isErrorPage() const;
QString queryMetaData(const QString &key) const;
void addMetaData(const QString &key, const QString &value);
+ void addMetaData(const QMap<QString, QString> &value);
void kill();
void setHandle(WebCoreResourceHandlePtr);
diff --git a/WebCore/kwq/kparts/browserextension.h b/WebCore/kwq/kparts/browserextension.h
index 23679d8..7e74d84 100644
--- a/WebCore/kwq/kparts/browserextension.h
+++ b/WebCore/kwq/kparts/browserextension.h
@@ -26,8 +26,9 @@
#ifndef BROWSEREXTENSION_H_
#define BROWSEREXTENSION_H_
-#include <qpoint.h>
#include <qevent.h>
+#include <qmap.h>
+#include <qpoint.h>
#include <kurl.h>
@@ -41,11 +42,22 @@ namespace KParts {
struct URLArgs {
QString frameName;
+ QByteArray postData;
+ bool reload;
QString serviceType;
int xOffset;
int yOffset;
URLArgs() : xOffset(0), yOffset(0) { }
+
+ QString contentType() const { return QString::null; }
+ bool doPost() const { return false; }
+
+ QMap<QString, QString> &metaData() { return m_metadata; }
+ void setLockHistory(bool) { }
+
+private:
+ QMap<QString, QString> m_metadata;
};
@@ -72,7 +84,7 @@ struct WindowArgs {
class BrowserExtension : public QObject {
public:
- BrowserExtension() {}
+ BrowserExtension() { }
BrowserInterface *browserInterface() const { return 0; }
virtual void openURLRequest(const KURL &, const KParts::URLArgs &args = KParts::URLArgs()) = 0;
diff --git a/WebCore/kwq/kparts/part.h b/WebCore/kwq/kparts/part.h
index 993d800..b99e44c 100644
--- a/WebCore/kwq/kparts/part.h
+++ b/WebCore/kwq/kparts/part.h
@@ -71,6 +71,8 @@ public:
void setParent(QObject *parent) { m_parent = parent; }
QObject *parent() const { return m_parent; }
void setInstance(KInstance *, bool) { }
+
+ virtual bool closeURL() = 0;
private:
QObject *m_parent;
diff --git a/WebCore/kwq/qt/qstringlist.h b/WebCore/kwq/qt/qstringlist.h
index f0901a8..fab8beb 100644
--- a/WebCore/kwq/qt/qstringlist.h
+++ b/WebCore/kwq/qt/qstringlist.h
@@ -35,6 +35,8 @@ public:
static QStringList split(const QChar &, const QString &, bool allowEmptyEntries = false);
QString join(const QString &) const;
+
+ QString pop_front();
};
#endif
diff --git a/WebCore/kwq/qt/qvaluelist.h b/WebCore/kwq/qt/qvaluelist.h
index 56ba558..97b526b 100644
--- a/WebCore/kwq/qt/qvaluelist.h
+++ b/WebCore/kwq/qt/qvaluelist.h
@@ -87,6 +87,7 @@ private:
friend class QValueList<T>;
};
+template<class T> bool operator==(const QValueList<T> &a, const QValueList<T> &b);
template <class T> class QValueList {
public:
@@ -118,8 +119,10 @@ public:
T& operator[] (uint index) { return ((QValueListNode<T> *)impl.nodeAt(index))->value; }
const T& operator[] (uint index) const { return ((const QValueListNode<T> *)impl.nodeAt(index))->value; }
- QValueList &operator+=(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
- QValueList &operator<<(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
+ QValueList &operator+=(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
+ QValueList &operator<<(const T &value) { impl.appendNode(new QValueListNode<T>(value)); return *this; }
+
+ friend bool operator==<>(const QValueList<T> &, const QValueList<T> &);
private:
KWQValueListImpl impl;
@@ -131,6 +134,12 @@ private:
{ return new QValueListNode<T>(((QValueListNode<T> *)node)->value); }
};
+template<class T>
+inline bool operator==(const QValueList<T> &a, const QValueList<T> &b)
+{
+ return a.impl.isEqual(b.impl, QValueList<T>::nodesEqual);
+}
+
#ifdef _KWQ_IOSTREAM_
template<class T>
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0a9ba95..b7ef837 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,36 @@
+2002-09-10 Darin Adler <darin at apple.com>
+
+ WebKit part of weaning WebCore from getting directly at WebKit defaults.
+
+ * WebView.subproj/WebPreferences.h:
+ * WebView.subproj/WebPreferences.m:
+ (-[WebPreferences _updateWebCoreSettings]): Added. Propagates all preferences
+ to WebCore. This way WebCore doesn't have to actively ask for the values
+ of preferences using defaults keys that are WebKit secrets.
+ (+[WebPreferences load]): Set up an observer that calls _updateWebCoreSettings
+ whenever NSUserDefaultsDidChangeNotification is posted.
+ (-[WebPreferences setStandardFontFamily:]): Call _updateWebCoreSettings right
+ away, don't wait for NSUserDefaultsDidChangeNotification.
+ (-[WebPreferences setFixedFontFamily:]): Ditto.
+ (-[WebPreferences setSerifFontFamily:]): Ditto.
+ (-[WebPreferences setSansSerifFontFamily:]): Ditto.
+ (-[WebPreferences setCursiveFontFamily:]): Ditto.
+ (-[WebPreferences setFantasyFontFamily:]): Ditto.
+ (-[WebPreferences setDefaultFontSize:]): Ditto.
+ (-[WebPreferences setDefaultFixedFontSize:]): Ditto.
+ (-[WebPreferences setMinimumFontSize:]): Ditto.
+ (-[WebPreferences setUserStyleSheetEnabled:]): Ditto.
+ (-[WebPreferences setUserStyleSheetLocation:]): Ditto.
+ (-[WebPreferences setJavaEnabled:]): Ditto.
+ (-[WebPreferences setJavaScriptEnabled:]): Ditto.
+ (-[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]): Ditto.
+ (-[WebPreferences setPluginsEnabled:]): Ditto.
+ (-[WebPreferences setDisplayImages:]): Ditto.
+
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge reportBadURL:]):
+ Add this method, which replaces reportError. Now WebCore doesn't use
+ WebFoundation directly at all! Pretty neat.
+
2002-09-09 Richard Williamson (Home) <rjw at apple.com>
Implemented disable images automatically (2896319).
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0a9ba95..b7ef837 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,36 @@
+2002-09-10 Darin Adler <darin at apple.com>
+
+ WebKit part of weaning WebCore from getting directly at WebKit defaults.
+
+ * WebView.subproj/WebPreferences.h:
+ * WebView.subproj/WebPreferences.m:
+ (-[WebPreferences _updateWebCoreSettings]): Added. Propagates all preferences
+ to WebCore. This way WebCore doesn't have to actively ask for the values
+ of preferences using defaults keys that are WebKit secrets.
+ (+[WebPreferences load]): Set up an observer that calls _updateWebCoreSettings
+ whenever NSUserDefaultsDidChangeNotification is posted.
+ (-[WebPreferences setStandardFontFamily:]): Call _updateWebCoreSettings right
+ away, don't wait for NSUserDefaultsDidChangeNotification.
+ (-[WebPreferences setFixedFontFamily:]): Ditto.
+ (-[WebPreferences setSerifFontFamily:]): Ditto.
+ (-[WebPreferences setSansSerifFontFamily:]): Ditto.
+ (-[WebPreferences setCursiveFontFamily:]): Ditto.
+ (-[WebPreferences setFantasyFontFamily:]): Ditto.
+ (-[WebPreferences setDefaultFontSize:]): Ditto.
+ (-[WebPreferences setDefaultFixedFontSize:]): Ditto.
+ (-[WebPreferences setMinimumFontSize:]): Ditto.
+ (-[WebPreferences setUserStyleSheetEnabled:]): Ditto.
+ (-[WebPreferences setUserStyleSheetLocation:]): Ditto.
+ (-[WebPreferences setJavaEnabled:]): Ditto.
+ (-[WebPreferences setJavaScriptEnabled:]): Ditto.
+ (-[WebPreferences setJavaScriptCanOpenWindowsAutomatically:]): Ditto.
+ (-[WebPreferences setPluginsEnabled:]): Ditto.
+ (-[WebPreferences setDisplayImages:]): Ditto.
+
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge reportBadURL:]):
+ Add this method, which replaces reportError. Now WebCore doesn't use
+ WebFoundation directly at all! Pretty neat.
+
2002-09-09 Richard Williamson (Home) <rjw at apple.com>
Implemented disable images automatically (2896319).
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 9198245..84954c1 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -12,12 +12,13 @@
#import <WebKit/WebHistoryItem.h>
#import <WebKit/WebHTMLRepresentationPrivate.h>
#import <WebKit/WebHTMLViewPrivate.h>
-#import <WebFoundation/WebAssertions.h>
#import <WebKit/WebKitStatisticsPrivate.h>
#import <WebKit/WebLoadProgress.h>
#import <WebKit/WebSubresourceClient.h>
#import <WebKit/WebViewPrivate.h>
+#import <WebFoundation/WebAssertions.h>
+#import <WebFoundation/WebError.h>
#import <WebFoundation/WebNSStringExtras.h>
#import <WebFoundation/WebResourceHandle.h>
#import <WebFoundation/WebResourceRequest.h>
@@ -292,12 +293,16 @@
[attributes release];
}
-- (void)reportError:(WebError *)error
+- (void)reportBadURL:(NSString *)badURL
{
- [[frame controller] _receivedError:error
+ WebError *badURLError = [[WebError alloc] initWithErrorCode:WebResultBadURLError
+ inDomain:WebErrorDomainWebFoundation
+ failingURL:badURL];
+ [[frame controller] _receivedError:badURLError
forResourceHandle:nil
partialProgress:nil
fromDataSource:[self dataSource]];
+ [badURLError release];
}
- (void)saveDocumentState: (NSArray *)documentState
diff --git a/WebKit/WebView.subproj/WebPreferences.h b/WebKit/WebView.subproj/WebPreferences.h
index 3f8c73a..5d447d0 100644
--- a/WebKit/WebView.subproj/WebPreferences.h
+++ b/WebKit/WebView.subproj/WebPreferences.h
@@ -48,13 +48,13 @@
- (NSString *)userStyleSheetLocation;
- (void)setUserStyleSheetLocation:(NSString *)string;
-- (BOOL)javaEnabled;
+- (BOOL)JavaEnabled;
- (void)setJavaEnabled:(BOOL)flag;
-- (BOOL)javaScriptEnabled;
+- (BOOL)JavaScriptEnabled;
- (void)setJavaScriptEnabled:(BOOL)flag;
-- (BOOL)javaScriptCanOpenWindowsAutomatically;
+- (BOOL)JavaScriptCanOpenWindowsAutomatically;
- (void)setJavaScriptCanOpenWindowsAutomatically:(BOOL)flag;
- (BOOL)pluginsEnabled;
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index 2f4c059..6a6138a 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -1,42 +1,45 @@
/*
WebPreferences.mm
- Copyright 2001, Apple, Inc. All rights reserved.
+ Copyright 2001, 2002, Apple Computer, Inc. All rights reserved.
*/
+
#import "WebPreferences.h"
+#import <WebCore/WebCoreSettings.h>
+
// These are private because callers should be using the cover methods
-#define WebKitLogLevelPreferenceKey @"WebKitLogLevel"
-#define WebKitStandardFontPreferenceKey @"WebKitStandardFont"
-#define WebKitFixedFontPreferenceKey @"WebKitFixedFont"
-#define WebKitSerifFontPreferenceKey @"WebKitSerifFont"
-#define WebKitSansSerifFontPreferenceKey @"WebKitSansSerifFont"
-#define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont"
-#define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont"
-#define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
-#define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"
-#define WebKitDefaultFixedFontSizePreferenceKey @"WebKitDefaultFixedFontSize"
-#define WebKitDefaultTextEncodingPreferenceKey @"WebKitDefaultTextEncoding"
-#define WebKitUserStyleSheetEnabledPreferenceKey @"WebKitUserStyleSheetEnabledPreferenceKey"
-#define WebKitUserStyleSheetLocationPreferenceKey @"WebKitUserStyleSheetLocationPreferenceKey"
-#define WebKitJavaEnabledPreferenceKey @"WebKitJavaEnabled"
-#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
-#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
-#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
-#define WebKitInitialTimedLayoutDelayPreferenceKey @"WebKitInitialTimedLayoutDelay"
-#define WebKitInitialTimedLayoutSizePreferenceKey @"WebKitInitialTimedLayoutSize"
-#define WebKitInitialTimedLayoutEnabledPreferenceKey @"WebKitInitialTimedLayoutEnabled"
-#define WebKitResourceTimedLayoutEnabledPreferenceKey @"WebKitResourceTimedLayoutEnabled"
-#define WebKitResourceTimedLayoutDelayPreferenceKey @"WebKitResourceTimedLayoutDelay"
-#define WebKitAllowAnimatedImagesPreferenceKey @"WebKitAllowAnimatedImagesPreferenceKey"
-#define WebKitAllowAnimatedImageLoopingPreferenceKey @"WebKitAllowAnimatedImageLoopingPreferenceKey"
-#define WebKitDisplayImagesKey @"WebKitDisplayImagesKey"
+#define WebKitLogLevelPreferenceKey @"WebKitLogLevel"
+#define WebKitStandardFontPreferenceKey @"WebKitStandardFont"
+#define WebKitFixedFontPreferenceKey @"WebKitFixedFont"
+#define WebKitSerifFontPreferenceKey @"WebKitSerifFont"
+#define WebKitSansSerifFontPreferenceKey @"WebKitSansSerifFont"
+#define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont"
+#define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont"
+#define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
+#define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"
+#define WebKitDefaultFixedFontSizePreferenceKey @"WebKitDefaultFixedFontSize"
+#define WebKitDefaultTextEncodingPreferenceKey @"WebKitDefaultTextEncoding"
+#define WebKitUserStyleSheetEnabledPreferenceKey @"WebKitUserStyleSheetEnabledPreferenceKey"
+#define WebKitUserStyleSheetLocationPreferenceKey @"WebKitUserStyleSheetLocationPreferenceKey"
+#define WebKitJavaEnabledPreferenceKey @"WebKitJavaEnabled"
+#define WebKitJavaScriptEnabledPreferenceKey @"WebKitJavaScriptEnabled"
+#define WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey @"WebKitJavaScriptCanOpenWindowsAutomatically"
+#define WebKitPluginsEnabledPreferenceKey @"WebKitPluginsEnabled"
+#define WebKitInitialTimedLayoutDelayPreferenceKey @"WebKitInitialTimedLayoutDelay"
+#define WebKitInitialTimedLayoutSizePreferenceKey @"WebKitInitialTimedLayoutSize"
+#define WebKitInitialTimedLayoutEnabledPreferenceKey @"WebKitInitialTimedLayoutEnabled"
+#define WebKitResourceTimedLayoutEnabledPreferenceKey @"WebKitResourceTimedLayoutEnabled"
+#define WebKitResourceTimedLayoutDelayPreferenceKey @"WebKitResourceTimedLayoutDelay"
+#define WebKitAllowAnimatedImagesPreferenceKey @"WebKitAllowAnimatedImagesPreferenceKey"
+#define WebKitAllowAnimatedImageLoopingPreferenceKey @"WebKitAllowAnimatedImageLoopingPreferenceKey"
+#define WebKitDisplayImagesKey @"WebKitDisplayImagesKey"
@implementation WebPreferences
-static WebPreferences *_standardPreferences = nil;
-
+ (WebPreferences *)standardPreferences
{
+ static WebPreferences *_standardPreferences = nil;
+
if (_standardPreferences == nil) {
_standardPreferences = [[WebPreferences alloc] init];
}
@@ -44,22 +47,38 @@ static WebPreferences *_standardPreferences = nil;
return _standardPreferences;
}
+- (void)_updateWebCoreSettings
+{
+ WebCoreSettings *settings = [WebCoreSettings sharedSettings];
+
+ [settings setCursiveFontFamily:[self cursiveFontFamily]];
+ [settings setDefaultFixedFontSize:[self defaultFixedFontSize]];
+ [settings setDefaultFontSize:[self defaultFontSize]];
+ [settings setFantasyFontFamily:[self fantasyFontFamily]];
+ [settings setFixedFontFamily:[self fixedFontFamily]];
+ [settings setJavaEnabled:[self JavaEnabled]];
+ [settings setJavaScriptEnabled:[self JavaScriptEnabled]];
+ [settings setJavaScriptCanOpenWindowsAutomatically:[self JavaScriptCanOpenWindowsAutomatically]];
+ [settings setMinimumFontSize:[self minimumFontSize]];
+ [settings setPluginsEnabled:[self pluginsEnabled]];
+ [settings setSansSerifFontFamily:[self sansSerifFontFamily]];
+ [settings setSerifFontFamily:[self serifFontFamily]];
+ [settings setStandardFontFamily:[self standardFontFamily]];
+ [settings setWillLoadImagesAutomatically:[self displayImages]];
+
+ if ([self userStyleSheetEnabled]) {
+ [settings setUserStyleSheetLocation:[self userStyleSheetLocation]];
+ } else {
+ [settings setUserStyleSheetLocation:@""];
+ }
+}
+
// if we ever have more than one WebPreferences object, this would move to init
+ (void)load
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSNumber *displayImages = [NSNumber numberWithBool:TRUE];
- NSNumber *pluginsEnabled = [NSNumber numberWithBool:TRUE];
- NSNumber *userStyleSheetEnabled = [NSNumber numberWithBool:FALSE];
- NSNumber *javaEnabled = [NSNumber numberWithBool:FALSE];
- NSNumber *javaScriptEnabled = [NSNumber numberWithBool:TRUE];
- NSNumber *javaScriptCanOpenWindows = [NSNumber numberWithBool:FALSE];
- NSNumber *timedLayoutEnabled = [NSNumber numberWithBool:TRUE];
- NSNumber *resourceTimedLayoutEnabled = [NSNumber numberWithBool:TRUE];
- NSNumber *allowAnimatedImages = [NSNumber numberWithBool:TRUE];
- NSNumber *allowAnimatedImageLooping = [NSNumber numberWithBool:TRUE];
- NSNumber *defaultTextEncoding = [NSNumber numberWithInt:(int)kCFStringEncodingWindowsLatin1];
+ NSNumber *latin1 = [NSNumber numberWithInt:(int)kCFStringEncodingWindowsLatin1];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
@"0x0", WebKitLogLevelPreferenceKey,
@@ -72,25 +91,33 @@ static WebPreferences *_standardPreferences = nil;
@"6", WebKitMinimumFontSizePreferenceKey,
@"14", WebKitDefaultFontSizePreferenceKey,
@"14", WebKitDefaultFixedFontSizePreferenceKey,
- defaultTextEncoding, WebKitDefaultTextEncodingPreferenceKey,
+ latin1, WebKitDefaultTextEncodingPreferenceKey,
@"1.00", WebKitInitialTimedLayoutDelayPreferenceKey,
@"4096", WebKitInitialTimedLayoutSizePreferenceKey,
@"1.00", WebKitResourceTimedLayoutDelayPreferenceKey,
- timedLayoutEnabled, WebKitInitialTimedLayoutEnabledPreferenceKey,
- resourceTimedLayoutEnabled, WebKitResourceTimedLayoutEnabledPreferenceKey,
- userStyleSheetEnabled, WebKitUserStyleSheetEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitInitialTimedLayoutEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitResourceTimedLayoutEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitUserStyleSheetEnabledPreferenceKey,
@"", WebKitUserStyleSheetLocationPreferenceKey,
- javaEnabled, WebKitJavaEnabledPreferenceKey,
- javaScriptEnabled, WebKitJavaScriptEnabledPreferenceKey,
- javaScriptCanOpenWindows, WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
- pluginsEnabled, WebKitPluginsEnabledPreferenceKey,
- allowAnimatedImages, WebKitAllowAnimatedImagesPreferenceKey,
- allowAnimatedImageLooping, WebKitAllowAnimatedImageLoopingPreferenceKey,
- displayImages, WebKitDisplayImagesKey,
+ [NSNumber numberWithBool:NO], WebKitJavaEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitJavaScriptEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitPluginsEnabledPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitAllowAnimatedImagesPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitAllowAnimatedImageLoopingPreferenceKey,
+ [NSNumber numberWithBool:YES], WebKitDisplayImagesKey,
nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:dict];
+ [[NSNotificationCenter defaultCenter]
+ addObserver:[self standardPreferences]
+ selector:@selector(_updateWebCoreSettings)
+ name:NSUserDefaultsDidChangeNotification
+ object:[NSUserDefaults standardUserDefaults]];
+
+ [[self standardPreferences] _updateWebCoreSettings];
+
[pool release];
}
@@ -102,6 +129,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setStandardFontFamily:(NSString *)family
{
[[NSUserDefaults standardUserDefaults] setObject:family forKey:WebKitStandardFontPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (NSString *)fixedFontFamily
@@ -112,6 +140,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setFixedFontFamily:(NSString *)family
{
[[NSUserDefaults standardUserDefaults] setObject:family forKey:WebKitFixedFontPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (NSString *)serifFontFamily
@@ -122,6 +151,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setSerifFontFamily:(NSString *)family
{
[[NSUserDefaults standardUserDefaults] setObject:family forKey:WebKitSerifFontPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (NSString *)sansSerifFontFamily
@@ -132,6 +162,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setSansSerifFontFamily:(NSString *)family
{
[[NSUserDefaults standardUserDefaults] setObject:family forKey:WebKitSansSerifFontPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (NSString *)cursiveFontFamily
@@ -142,6 +173,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setCursiveFontFamily:(NSString *)family
{
[[NSUserDefaults standardUserDefaults] setObject:family forKey:WebKitCursiveFontPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (NSString *)fantasyFontFamily
@@ -152,6 +184,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setFantasyFontFamily:(NSString *)family
{
[[NSUserDefaults standardUserDefaults] setObject:family forKey:WebKitFantasyFontPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (int)defaultFontSize
@@ -162,6 +195,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setDefaultFontSize:(int)size
{
[[NSUserDefaults standardUserDefaults] setInteger:size forKey:WebKitDefaultFontSizePreferenceKey];
+ [self _updateWebCoreSettings];
}
- (int)defaultFixedFontSize
@@ -172,6 +206,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setDefaultFixedFontSize:(int)size
{
[[NSUserDefaults standardUserDefaults] setInteger:size forKey:WebKitDefaultFixedFontSizePreferenceKey];
+ [self _updateWebCoreSettings];
}
- (int)minimumFontSize
@@ -182,6 +217,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setMinimumFontSize:(int)size
{
[[NSUserDefaults standardUserDefaults] setInteger:size forKey:WebKitMinimumFontSizePreferenceKey];
+ [self _updateWebCoreSettings];
}
- (CFStringEncoding)defaultTextEncoding
@@ -202,6 +238,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setUserStyleSheetEnabled:(BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitUserStyleSheetEnabledPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (NSString *)userStyleSheetLocation
@@ -212,9 +249,10 @@ static WebPreferences *_standardPreferences = nil;
- (void)setUserStyleSheetLocation:(NSString *)string
{
[[NSUserDefaults standardUserDefaults] setObject:string forKey:WebKitUserStyleSheetLocationPreferenceKey];
+ [self _updateWebCoreSettings];
}
-- (BOOL)javaEnabled
+- (BOOL)JavaEnabled
{
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJavaEnabledPreferenceKey];
}
@@ -222,9 +260,10 @@ static WebPreferences *_standardPreferences = nil;
- (void)setJavaEnabled:(BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitJavaEnabledPreferenceKey];
+ [self _updateWebCoreSettings];
}
-- (BOOL)javaScriptEnabled
+- (BOOL)JavaScriptEnabled
{
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJavaScriptEnabledPreferenceKey];
}
@@ -232,9 +271,10 @@ static WebPreferences *_standardPreferences = nil;
- (void)setJavaScriptEnabled:(BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitJavaScriptEnabledPreferenceKey];
+ [self _updateWebCoreSettings];
}
-- (BOOL)javaScriptCanOpenWindowsAutomatically
+- (BOOL)JavaScriptCanOpenWindowsAutomatically
{
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey];
}
@@ -242,6 +282,7 @@ static WebPreferences *_standardPreferences = nil;
- (void)setJavaScriptCanOpenWindowsAutomatically:(BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitJavaScriptCanOpenWindowsAutomaticallyPreferenceKey];
+ [self _updateWebCoreSettings];
}
- (BOOL)pluginsEnabled
@@ -252,9 +293,9 @@ static WebPreferences *_standardPreferences = nil;
- (void)setPluginsEnabled:(BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitPluginsEnabledPreferenceKey];
+ [self _updateWebCoreSettings];
}
-
- (NSTimeInterval)_initialTimedLayoutDelay
{
return (NSTimeInterval)[[NSUserDefaults standardUserDefaults] floatForKey:WebKitInitialTimedLayoutDelayPreferenceKey];
@@ -262,8 +303,7 @@ static WebPreferences *_standardPreferences = nil;
- (int)_initialTimedLayoutSize
{
- int size = [[NSUserDefaults standardUserDefaults] integerForKey:WebKitInitialTimedLayoutDelayPreferenceKey];
- return size;
+ return [[NSUserDefaults standardUserDefaults] integerForKey:WebKitInitialTimedLayoutDelayPreferenceKey];
}
- (BOOL)_initialTimedLayoutEnabled
@@ -271,7 +311,6 @@ static WebPreferences *_standardPreferences = nil;
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitInitialTimedLayoutEnabledPreferenceKey];
}
-
- (NSTimeInterval)_resourceTimedLayoutDelay
{
return [[NSUserDefaults standardUserDefaults] floatForKey:WebKitResourceTimedLayoutDelayPreferenceKey];
@@ -282,7 +321,6 @@ static WebPreferences *_standardPreferences = nil;
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitResourceTimedLayoutEnabledPreferenceKey];
}
-
- (BOOL)allowAnimatedImages
{
return [[NSUserDefaults standardUserDefaults] boolForKey:WebKitAllowAnimatedImagesPreferenceKey];
@@ -303,10 +341,10 @@ static WebPreferences *_standardPreferences = nil;
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitAllowAnimatedImageLoopingPreferenceKey];
}
-
- (void)setDisplayImages: (BOOL)flag
{
[[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebKitDisplayImagesKey];
+ [self _updateWebCoreSettings];
}
- (BOOL)displayImages
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list