[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:30:19 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c2ebb3f2d9e769ee94b1d7f65b15c360a4488d77
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Aug 8 10:22:13 2002 +0000
WebCore:
Added an SPI that can be used to get at the WebCore
charset-name/encoding table; this is useful for a couple of things
in WebKit.
* kwq/WebCoreEncodings.h: Added.
* kwq/WebCoreEncodings.mm: Added.
(+[WebCoreEncodings charsetNameForEncoding:]):
(+[WebCoreEncodings encodingForCharsetName:]):
* WebCore.exp: Export the new class.
* WebCore.pbproj/project.pbxproj: Add new files.
WebKit:
- fixed 2957197 - Need API for getting/setting default text encoding
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSourcePrivate init]): Set default encoding if no other is set.
* WebView.subproj/WebPreferences.h:
* WebView.subproj/WebPreferences.m:
(+[WebPreferences load]): Added support for default text encoding pref.
(-[WebPreferences defaultTextEncoding]): Likewise.
(-[WebPreferences setDefaultTextEncoding:]): Likewise.
WebBrowser:
- fixed 2896313 - Default text encoding preference is not yet implemented
* English.lproj/MainMenu.nib: Added separator after Default item
* Preferences.subproj/English.lproj/TextPreferences.nib: Made the
pop-up wider so it would fit the widest encoding
* Preferences.subproj/TextPreferences.h:
* Preferences.subproj/TextPreferences.m:
(-[TextPreferences updateDefaultCharacterSetPopup]): Implemented.
(-[TextPreferences takeDefaultCharacterSetFrom:]): Implemented.
(-[TextPreferences awakeFromNib]): Add encoding items to pop-up button,
remove empty dummy item.
(-[TextPreferences initializeFromDefaults]): Initialize pop-up too.
* TextEncodingMenu.h:
* TextEncodingMenu.m:
(-[NSMenu addStandardTextEncodingMenuItemsWithAction:]): Add a
selector parameter so we can use a different one for the real menu
and the default pop-up.
(_addItemToMenuForEncoding): Likewise.
* AppController.m:
(-[AppController applicationDidFinishLaunching:]): Pass selector
when adding encoding menu items.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index bef13ce..51769d8 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-08-08 Maciej Stachowiak <mjs at apple.com>
+
+ Added an SPI that can be used to get at the WebCore
+ charset-name/encoding table; this is useful for a couple of things
+ in WebKit.
+
+ * kwq/WebCoreEncodings.h: Added.
+ * kwq/WebCoreEncodings.mm: Added.
+ (+[WebCoreEncodings charsetNameForEncoding:]):
+ (+[WebCoreEncodings encodingForCharsetName:]):
+ * WebCore.exp: Export the new class.
+ * WebCore.pbproj/project.pbxproj: Add new files.
+
2002-08-08 Richard Williamson (Home) <rjw at apple.com>
Changes to coalesce all drawing calls of the same text
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index bef13ce..51769d8 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-08-08 Maciej Stachowiak <mjs at apple.com>
+
+ Added an SPI that can be used to get at the WebCore
+ charset-name/encoding table; this is useful for a couple of things
+ in WebKit.
+
+ * kwq/WebCoreEncodings.h: Added.
+ * kwq/WebCoreEncodings.mm: Added.
+ (+[WebCoreEncodings charsetNameForEncoding:]):
+ (+[WebCoreEncodings encodingForCharsetName:]):
+ * WebCore.exp: Export the new class.
+ * WebCore.pbproj/project.pbxproj: Add new files.
+
2002-08-08 Richard Williamson (Home) <rjw at apple.com>
Changes to coalesce all drawing calls of the same text
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index bef13ce..51769d8 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-08-08 Maciej Stachowiak <mjs at apple.com>
+
+ Added an SPI that can be used to get at the WebCore
+ charset-name/encoding table; this is useful for a couple of things
+ in WebKit.
+
+ * kwq/WebCoreEncodings.h: Added.
+ * kwq/WebCoreEncodings.mm: Added.
+ (+[WebCoreEncodings charsetNameForEncoding:]):
+ (+[WebCoreEncodings encodingForCharsetName:]):
+ * WebCore.exp: Export the new class.
+ * WebCore.pbproj/project.pbxproj: Add new files.
+
2002-08-08 Richard Williamson (Home) <rjw at apple.com>
Changes to coalesce all drawing calls of the same text
diff --git a/WebCore/WebCore.exp b/WebCore/WebCore.exp
index 4550712..f720175 100644
--- a/WebCore/WebCore.exp
+++ b/WebCore/WebCore.exp
@@ -1,6 +1,7 @@
.objc_class_name_WebCoreBridge
.objc_class_name_WebCoreCache
.objc_class_name_WebCoreCookieAdapter
+.objc_class_name_WebCoreEncodings
.objc_class_name_WebCoreImageRendererFactory
.objc_class_name_WebCoreJavaScript
.objc_class_name_WebCoreTextRendererFactory
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 0a1abc4..6373243 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -490,6 +490,7 @@
354F248B02EE28590ACA2ACA,
F5117BCD02F9FFEF018635CE,
F5117BCF02F9FFEF018635CE,
+ F56234E103026D7301629B47,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -718,6 +719,7 @@
354F248C02EE28590ACA2ACA,
F5117BCE02F9FFEF018635CE,
F5117BD002F9FFEF018635CE,
+ F56234E203026D7301629B47,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -3689,6 +3691,31 @@
settings = {
};
};
+ F56234DF03026D7301629B47 = {
+ isa = PBXFileReference;
+ path = WebCoreEncodings.h;
+ refType = 4;
+ };
+ F56234E003026D7301629B47 = {
+ isa = PBXFileReference;
+ path = WebCoreEncodings.mm;
+ refType = 4;
+ };
+ F56234E103026D7301629B47 = {
+ fileRef = F56234DF03026D7301629B47;
+ isa = PBXBuildFile;
+ settings = {
+ ATTRIBUTES = (
+ Private,
+ );
+ };
+ };
+ F56234E203026D7301629B47 = {
+ fileRef = F56234E003026D7301629B47;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
F565AE8502ECA583018635CA = {
isa = PBXFileReference;
path = WebCoreSettings.h;
@@ -5361,6 +5388,8 @@
F5B2A4FD02E2220F018635CB,
F587854902DE375901EA4122,
F587854A02DE375901EA4122,
+ F56234DF03026D7301629B47,
+ F56234E003026D7301629B47,
F587854C02DE375901EA4122,
F587854D02DE375901EA4122,
F587854E02DE375901EA4122,
diff --git a/WebCore/kwq/WebCoreJavaScript.h b/WebCore/kwq/WebCoreEncodings.h
similarity index 88%
copy from WebCore/kwq/WebCoreJavaScript.h
copy to WebCore/kwq/WebCoreEncodings.h
index 416378f..0005bfa 100644
--- a/WebCore/kwq/WebCoreJavaScript.h
+++ b/WebCore/kwq/WebCoreEncodings.h
@@ -25,16 +25,8 @@
#import <Foundation/Foundation.h>
- at interface WebCoreJavaScript : NSObject
-{
-}
-
-+ (int)interpreterCount;
-
-+ (int)objectCount;
-+ (int)noGCAllowedObjectCount;
-+ (int)referencedObjectCount;
-
-+ (void)garbageCollect;
+ at interface WebCoreEncodings : NSObject
++ (NSString *)charsetNameForEncoding:(CFStringEncoding)encoding;
++ (CFStringEncoding)encodingForCharsetName:(NSString *)charsetName;
@end
diff --git a/WebCore/kwq/WebCoreJavaScript.h b/WebCore/kwq/WebCoreEncodings.mm
similarity index 78%
copy from WebCore/kwq/WebCoreJavaScript.h
copy to WebCore/kwq/WebCoreEncodings.mm
index 416378f..c699715 100644
--- a/WebCore/kwq/WebCoreJavaScript.h
+++ b/WebCore/kwq/WebCoreEncodings.mm
@@ -23,18 +23,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <Foundation/Foundation.h>
+#import <WebCore/WebCoreEncodings.h>
+#import <KWQCharsets.h>
- at interface WebCoreJavaScript : NSObject
+ at implementation WebCoreEncodings
+
++ (NSString *)charsetNameForEncoding:(CFStringEncoding)encoding
{
+ return (NSString *)KWQCFStringEncodingToIANACharsetName(encoding);
}
-+ (int)interpreterCount;
-
-+ (int)objectCount;
-+ (int)noGCAllowedObjectCount;
-+ (int)referencedObjectCount;
-
-+ (void)garbageCollect;
++ (CFStringEncoding)encodingForCharsetName:(NSString *)charsetName
+{
+ return KWQCFStringEncodingFromIANACharsetName((CFStringRef)charsetName);
+}
@end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 444f181..a40f20f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2002-08-08 Maciej Stachowiak <mjs at apple.com>
+
+ - fixed 2957197 - Need API for getting/setting default text encoding
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate init]): Set default encoding if no other is set.
+ * WebView.subproj/WebPreferences.h:
+ * WebView.subproj/WebPreferences.m:
+ (+[WebPreferences load]): Added support for default text encoding pref.
+ (-[WebPreferences defaultTextEncoding]): Likewise.
+ (-[WebPreferences setDefaultTextEncoding:]): Likewise.
+
2002-08-08 Richard Williamson (Home) <rjw at apple.com>
Changes to coalesce all drawing calls of the same text
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 444f181..a40f20f 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,15 @@
+2002-08-08 Maciej Stachowiak <mjs at apple.com>
+
+ - fixed 2957197 - Need API for getting/setting default text encoding
+
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (-[WebDataSourcePrivate init]): Set default encoding if no other is set.
+ * WebView.subproj/WebPreferences.h:
+ * WebView.subproj/WebPreferences.m:
+ (+[WebPreferences load]): Added support for default text encoding pref.
+ (-[WebPreferences defaultTextEncoding]): Likewise.
+ (-[WebPreferences setDefaultTextEncoding:]): Likewise.
+
2002-08-08 Richard Williamson (Home) <rjw at apple.com>
Changes to coalesce all drawing calls of the same text
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 99d8a2b..e63ebbc 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -13,6 +13,7 @@
#import <WebKit/WebException.h>
#import <WebKit/WebHTMLRepresentation.h>
#import <WebKit/WebHTMLViewPrivate.h>
+#import <WebKit/WebPreferences.h>
#import <WebKit/WebIconLoader.h>
#import <WebKit/WebImageRepresentation.h>
#import <WebKit/WebLocationChangeHandler.h>
@@ -30,6 +31,8 @@
#import <WebFoundation/WebNSURLExtras.h>
#import <WebFoundation/WebResourceHandle.h>
+#import <WebCore/WebCoreEncodings.h>
+
@implementation WebDataSourcePrivate
- init
@@ -44,6 +47,7 @@
contentPolicy = WebContentPolicyNone;
+ encoding = [[WebCoreEncodings charsetNameForEncoding:[[WebPreferences standardPreferences] defaultTextEncoding]] retain];
overrideEncoding = kCFStringEncodingInvalidId;
return self;
diff --git a/WebKit/WebView.subproj/WebPreferences.h b/WebKit/WebView.subproj/WebPreferences.h
index b4613c6..51bd61e 100644
--- a/WebKit/WebView.subproj/WebPreferences.h
+++ b/WebKit/WebView.subproj/WebPreferences.h
@@ -38,6 +38,9 @@
- (int)minimumFontSize;
- (void)setMinimumFontSize:(int)size;
+- (CFStringEncoding)defaultTextEncoding;
+- (void)setDefaultTextEncoding:(CFStringEncoding)encoding;
+
- (BOOL)userStyleSheetEnabled;
- (void)setUserStyleSheetEnabled:(BOOL)flag;
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index 18edf7a..b94f93e 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -17,6 +17,7 @@
#define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
#define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"
#define WebKitFixedFontSizePreferenceKey @"WebKitFixedFontSize"
+#define WebKitDefaultTextEncodingPreferenceKey @"WebKitDefaultTextEncoding"
#define WebKitUserStyleSheetEnabledPreferenceKey @"WebKitUserStyleSheetEnabledPreferenceKey"
#define WebKitUserStyleSheetLocationPreferenceKey @"WebKitUserStyleSheetLocationPreferenceKey"
#define WebKitJavaEnabledPreferenceKey @"WebKitJavaEnabled"
@@ -58,6 +59,7 @@ static WebPreferences *_standardPreferences = nil;
NSNumber *resourceTimedLayoutEnabled = [NSNumber numberWithBool:TRUE];
NSNumber *allowAnimatedImages = [NSNumber numberWithBool:TRUE];
NSNumber *allowAnimatedImageLooping = [NSNumber numberWithBool:TRUE];
+ NSNumber *defaultTextEncoding = [NSNumber numberWithInt:(int)kCFStringEncodingWindowsLatin1];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
@"0x0", WebKitLogLevelPreferenceKey,
@@ -70,6 +72,7 @@ static WebPreferences *_standardPreferences = nil;
@"6", WebKitMinimumFontSizePreferenceKey,
@"14", WebKitDefaultFontSizePreferenceKey,
@"14", WebKitFixedFontSizePreferenceKey,
+ defaultTextEncoding, WebKitDefaultTextEncodingPreferenceKey,
@"1.85", WebKitInitialTimedLayoutDelayPreferenceKey,
@"4096", WebKitInitialTimedLayoutSizePreferenceKey,
@"1.85", WebKitResourceTimedLayoutDelayPreferenceKey,
@@ -180,6 +183,15 @@ static WebPreferences *_standardPreferences = nil;
[[NSUserDefaults standardUserDefaults] setInteger:size forKey:WebKitMinimumFontSizePreferenceKey];
}
+- (CFStringEncoding)defaultTextEncoding
+{
+ return (CFStringEncoding)[[NSUserDefaults standardUserDefaults] integerForKey:WebKitDefaultTextEncodingPreferenceKey];
+}
+
+- (void)setDefaultTextEncoding:(CFStringEncoding)encoding
+{
+ [[NSUserDefaults standardUserDefaults] setInteger:(int)encoding forKey:WebKitDefaultTextEncodingPreferenceKey];
+}
- (BOOL)userStyleSheetEnabled
{
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list