[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:10:10 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 9ab8fab8bdfc6feb5e6771446eda496caa22c5c2
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Apr 26 19:23:30 2002 +0000
* kwq/make-mac-encodings.c: (main): One more place that needed a workaround
for Radar 2912404 (kCFStringEncodingInvalidId is negative even though
CFStringEncoding is unsigned).
* kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Do this
ourselves so we don't rely on WebFoundation.
* kwq/Makefile.am: Don't do a -I for WebFoundation.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index efea9df..67cfa2d 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,15 @@
2002-04-26 Darin Adler <darin at apple.com>
+ * kwq/make-mac-encodings.c: (main): One more place that needed a workaround
+ for Radar 2912404 (kCFStringEncodingInvalidId is negative even though
+ CFStringEncoding is unsigned).
+
+ * kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Do this
+ ourselves so we don't rely on WebFoundation.
+ * kwq/Makefile.am: Don't do a -I for WebFoundation.
+
+2002-04-26 Darin Adler <darin at apple.com>
+
Pay no attention to the man who is not supposed to be working.
* khtml/Makefile.am:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index efea9df..67cfa2d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,15 @@
2002-04-26 Darin Adler <darin at apple.com>
+ * kwq/make-mac-encodings.c: (main): One more place that needed a workaround
+ for Radar 2912404 (kCFStringEncodingInvalidId is negative even though
+ CFStringEncoding is unsigned).
+
+ * kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Do this
+ ourselves so we don't rely on WebFoundation.
+ * kwq/Makefile.am: Don't do a -I for WebFoundation.
+
+2002-04-26 Darin Adler <darin at apple.com>
+
Pay no attention to the man who is not supposed to be working.
* khtml/Makefile.am:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index efea9df..67cfa2d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,15 @@
2002-04-26 Darin Adler <darin at apple.com>
+ * kwq/make-mac-encodings.c: (main): One more place that needed a workaround
+ for Radar 2912404 (kCFStringEncodingInvalidId is negative even though
+ CFStringEncoding is unsigned).
+
+ * kwq/KWQTextArea.mm: (-[KWQTextArea paragraphs]): Do this
+ ourselves so we don't rely on WebFoundation.
+ * kwq/Makefile.am: Don't do a -I for WebFoundation.
+
+2002-04-26 Darin Adler <darin at apple.com>
+
Pay no attention to the man who is not supposed to be working.
* khtml/Makefile.am:
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index 3dbb6e2..2cf89ad 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -25,7 +25,6 @@
#import <qwidget.h>
#import <KWQTextArea.h>
-#import <IFNSStringExtensions.h>
/*
This widget is used to implement the <TEXTAREA> element.
@@ -259,7 +258,27 @@ const float LargeNumberForText = 1.0e7;
- (int)paragraphs
{
- return [[textView string] _IF_countOfString:@"\n"] + 1;
+ NSString *text = [textView string];
+ int paragraphSoFar = 0;
+ NSRange searchRange = NSMakeRange(0, [text length]);
+ NSRange newlineRange;
+ int advance;
+
+ while (true) {
+ newlineRange = [text rangeOfString:@"\n" options:NSLiteralSearch range:searchRange];
+ if (newlineRange.location == NSNotFound) {
+ break;
+ }
+
+ paragraphSoFar++;
+
+ advance = newlineRange.location + 1 - searchRange.location;
+
+ searchRange.length -= advance;
+ searchRange.location += advance;
+ }
+
+ return paragraphSoFar;
}
static NSRange RangeOfParagraph(NSString *text, int paragraph)
diff --git a/WebCore/kwq/Makefile.am b/WebCore/kwq/Makefile.am
index 9ed5547..1de973a 100644
--- a/WebCore/kwq/Makefile.am
+++ b/WebCore/kwq/Makefile.am
@@ -141,28 +141,21 @@ INCLUDES = \
$(KWQ_INCLUDES) \
$(KDELIBS_INCLUDES) \
$(WEBCORE_INCLUDES) \
- -I$(top_srcdir)/WebFoundation/Misc.subproj \
-I/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks \
-I/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/PrivateHeaders \
-F$(SYMROOTS) \
$(NULL)
-noinst_PROGRAMS = \
- make-mac-encodings \
- $(NULL)
-
+noinst_PROGRAMS = make-mac-encodings
make_mac_encodings_SOURCES = make-mac-encodings.c
-
-make_mac_encodings_LDFLAGS = \
- -framework CoreFoundation \
- $(NULL)
+make_mac_encodings_LDFLAGS = -framework CoreFoundation
mac-encodings.txt: make-mac-encodings
- ./make-mac-encodings $@
+ $(<D)/$(<F) $@
KWQCharsetData.c: make-charset-table.pl character-sets.txt mac-encodings.txt
- ./make-charset-table.pl character-sets.txt mac-encodings.txt KWQCharsetData.c
+ perl $^ $@
BUILT_SOURCES = \
make-mac-encodings \
diff --git a/WebCore/kwq/make-mac-encodings.c b/WebCore/kwq/make-mac-encodings.c
index a07888b..68103b8 100644
--- a/WebCore/kwq/make-mac-encodings.c
+++ b/WebCore/kwq/make-mac-encodings.c
@@ -1,8 +1,5 @@
-
-
#include <CoreFoundation/CoreFoundation.h>
-
static void
usage(const char *program)
{
@@ -26,19 +23,21 @@ main (int argc, char **argv)
output = fopen (argv[1], "w");
if (output == NULL) {
- printf ("Cannot open file `%s'\n", argv[1]);
+ printf ("Cannot open file \"%s\"\n", argv[1]);
+ exit(1);
}
all_encodings = CFStringGetListOfAvailableEncodings();
- for (p = all_encodings; *p != kCFStringEncodingInvalidId; p++) {
+ // FIXME: This cast to CFStringEncoding is a workaround for Radar 2912404.
+ for (p = all_encodings; *p != (CFStringEncoding) kCFStringEncodingInvalidId; p++) {
name = CFStringConvertEncodingToIANACharSetName(*p);
/* All IANA encoding names must be US-ASCII */
if (name != NULL) {
CFStringGetCString(name, cname, 2048, kCFStringEncodingASCII);
- fprintf(output,"%ld:%s\n", *p, cname);
+ fprintf(output, "%ld:%s\n", *p, cname);
} else {
- printf("Warning: nameless encoding %ld\n", *p);
+ printf("Warning: encoding %ld does not have an IANA chararacter set name\n", *p);
}
}
return 0;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list