[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 07:16:51 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 46c72fa8d3dcea45b6ce75dea6fb6601803b710f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 20 22:10:41 2002 +0000
Reviewed by John.
- fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)
* kwq/KWQTextArea.mm:
(-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
paragraph number along with the index within the paragraph. Also made it return a paragraph one
past the end with an index of 0 for cases where you are at the end of the text.
(-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
would also have prevented the exception.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index b6b25e7..c72f7f3 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-12-20 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)
+
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
+ paragraph number along with the index within the paragraph. Also made it return a paragraph one
+ past the end with an index of 0 for cases where you are at the end of the text.
+ (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
+ would also have prevented the exception.
+
=== Alexander-43 ===
2002-12-20 Darin Adler <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b6b25e7..c72f7f3 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-12-20 Darin Adler <darin at apple.com>
+
+ Reviewed by John.
+
+ - fixed 3129387 -- Stopped responding to controls while filling out form (exception in KWQTextArea)
+
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix code that was returning the wrong
+ paragraph number along with the index within the paragraph. Also made it return a paragraph one
+ past the end with an index of 0 for cases where you are at the end of the text.
+ (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Range check the passed-in index. This
+ would also have prevented the exception.
+
=== Alexander-43 ===
2002-12-20 Darin Adler <darin at apple.com>
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index d88b288..b08fd61 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -380,12 +380,14 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
for (i = 0; i < num; i++) {
range = RangeOfParagraph(text, i);
if (range.location + range.length > selectedRange.location) {
- break;
+ *paragraph = i;
+ *index = selectedRange.location - range.location;
+ return;
}
}
+ // Express the end of text as past the last paragraph.
*paragraph = num;
- *index = selectedRange.location - range.location;
}
- (void)setCursorPositionToIndex:(int)index inParagraph:(int)paragraph
@@ -395,6 +397,11 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
if (range.location == NSNotFound) {
[textView setSelectedRange:NSMakeRange([text length], 0)];
} else {
+ if (index < 0) {
+ index = 0;
+ } else if ((unsigned)index > range.length) {
+ index = range.length;
+ }
[textView setSelectedRange:NSMakeRange(range.location + index, 0)];
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list