[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:01:11 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 56fdc7dc9cb2e611d86ef1004c56f029b670eaaa
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 15 16:46:01 2002 +0000
Tools:
* Scripts/update-alex-localizable-strings: Fix it so that the line
numbers in error messages will be accurate.
WebCore:
- fixed 3027460 -- text areas don't have focus rectangles
- fixed 2937204 -- text areas have solid black borders
* kwq/KWQSignal.mm: (KWQSignal::disconnect):
Add a special case so we don't hear about finishedParsing all the time.
* kwq/KWQTextArea.mm:
(-[KWQTextArea initWithFrame:]): Use a bezel border, not a line border.
(-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix bug where it would
return a bogus value for an empty text area.
(-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Use setSelectedRange:
ratherr than setMarkedText:selectedRange:.
(-[KWQTextArea drawRect:]): Draw a focus ring if our text view is first responder.
(-[KWQTextArea _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
(-[KWQTextAreaTextView becomeFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
(-[KWQTextAreaTextView resignFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
(-[NSView _KWQ_setKeyboardFocusRingNeedsDisplay]): Calls the same thing on parent.
* WebCore.pbproj/project.pbxproj: PB is a cruel master.
WebBrowser:
- fixed problem I introduced where text would get too close to the right button
* LocationTextField.m: (-[LocationTextField didShowOrHideRightButton]):
Add back logic to adjust the right border. I removed this because it was incompatible
with my changes, but now I made a new compatible version by adding a new method.
* TextFieldWithControls.h: Rename showRightButton: to setIsShowingRightButton:,
and added isShowingRightButton, and didShowOrHideRightButton methods.
* TextFieldWithControls.m:
(-[TextFieldWithControls isShowingRightButton]): Added.
(-[TextFieldWithControls didShowOrHideRightButton]): Added.
(-[TextFieldWithControls setIsShowingRightButton:]): Call didShowOrHideRightButton at
the right moment so we can properly respond to any changes it makes to the cell.
* BrowserWindowController.m: (-[BrowserWindowController updateSnapBackButtons]):
Update for method name change.
* WebBrowser.pbproj/project.pbxproj: PB is a cruel master.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 8be5b17..017ecb5 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-11-15 Darin Adler <darin at apple.com>
+
+ - fixed 3027460 -- text areas don't have focus rectangles
+ - fixed 2937204 -- text areas have solid black borders
+
+ * kwq/KWQSignal.mm: (KWQSignal::disconnect):
+ Add a special case so we don't hear about finishedParsing all the time.
+
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextArea initWithFrame:]): Use a bezel border, not a line border.
+ (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix bug where it would
+ return a bogus value for an empty text area.
+ (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Use setSelectedRange:
+ ratherr than setMarkedText:selectedRange:.
+ (-[KWQTextArea drawRect:]): Draw a focus ring if our text view is first responder.
+ (-[KWQTextArea _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
+ (-[KWQTextAreaTextView becomeFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
+ (-[KWQTextAreaTextView resignFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
+ (-[NSView _KWQ_setKeyboardFocusRingNeedsDisplay]): Calls the same thing on parent.
+
+ * WebCore.pbproj/project.pbxproj: PB is a cruel master.
+
2002-11-15 Maciej Stachowiak <mjs at apple.com>
* khtml/html/html_formimpl.cpp:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8be5b17..017ecb5 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,25 @@
+2002-11-15 Darin Adler <darin at apple.com>
+
+ - fixed 3027460 -- text areas don't have focus rectangles
+ - fixed 2937204 -- text areas have solid black borders
+
+ * kwq/KWQSignal.mm: (KWQSignal::disconnect):
+ Add a special case so we don't hear about finishedParsing all the time.
+
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextArea initWithFrame:]): Use a bezel border, not a line border.
+ (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix bug where it would
+ return a bogus value for an empty text area.
+ (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Use setSelectedRange:
+ ratherr than setMarkedText:selectedRange:.
+ (-[KWQTextArea drawRect:]): Draw a focus ring if our text view is first responder.
+ (-[KWQTextArea _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
+ (-[KWQTextAreaTextView becomeFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
+ (-[KWQTextAreaTextView resignFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
+ (-[NSView _KWQ_setKeyboardFocusRingNeedsDisplay]): Calls the same thing on parent.
+
+ * WebCore.pbproj/project.pbxproj: PB is a cruel master.
+
2002-11-15 Maciej Stachowiak <mjs at apple.com>
* khtml/html/html_formimpl.cpp:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8be5b17..017ecb5 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,25 @@
+2002-11-15 Darin Adler <darin at apple.com>
+
+ - fixed 3027460 -- text areas don't have focus rectangles
+ - fixed 2937204 -- text areas have solid black borders
+
+ * kwq/KWQSignal.mm: (KWQSignal::disconnect):
+ Add a special case so we don't hear about finishedParsing all the time.
+
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextArea initWithFrame:]): Use a bezel border, not a line border.
+ (-[KWQTextArea getCursorPositionAsIndex:inParagraph:]): Fix bug where it would
+ return a bogus value for an empty text area.
+ (-[KWQTextArea setCursorPositionToIndex:inParagraph:]): Use setSelectedRange:
+ ratherr than setMarkedText:selectedRange:.
+ (-[KWQTextArea drawRect:]): Draw a focus ring if our text view is first responder.
+ (-[KWQTextArea _KWQ_setKeyboardFocusRingNeedsDisplay]): Added.
+ (-[KWQTextAreaTextView becomeFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
+ (-[KWQTextAreaTextView resignFirstResponder]): Call _KWQ_setKeyboardFocusRingNeedsDisplay.
+ (-[NSView _KWQ_setKeyboardFocusRingNeedsDisplay]): Calls the same thing on parent.
+
+ * WebCore.pbproj/project.pbxproj: PB is a cruel master.
+
2002-11-15 Maciej Stachowiak <mjs at apple.com>
* khtml/html/html_formimpl.cpp:
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index e5fe98f..83de1b3 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -72,6 +72,7 @@
F58C8A07025BD3BC018635CA,
F531DDEC02F0C34D018635CA,
);
+ hasScannedForEncodings = 1;
isa = PBXProject;
knownRegions = (
English,
diff --git a/WebCore/kwq/KWQSignal.mm b/WebCore/kwq/KWQSignal.mm
index 8f7e05e..3bc02ff 100644
--- a/WebCore/kwq/KWQSignal.mm
+++ b/WebCore/kwq/KWQSignal.mm
@@ -65,7 +65,8 @@ void KWQSignal::connect(const KWQSlot &slot)
void KWQSignal::disconnect(const KWQSlot &slot)
{
#if !ERROR_DISABLED
- if (!_slots.contains(slot)) {
+ if (!_slots.contains(slot)
+ && !KWQNamesMatch(_name, SIGNAL(finishedParsing()))) {
ERROR("disconnecting a signal that wasn't connected, %s", _name);
}
#endif
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index ce9e050..d88b288 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -49,6 +49,10 @@
to construct the text with inserted \n.
*/
+ at interface NSView (KWQTextArea)
+- (void)_KWQ_setKeyboardFocusRingNeedsDisplay;
+ at end
+
@interface KWQTextAreaTextView : NSTextView
{
}
@@ -97,7 +101,7 @@ const float LargeNumberForText = 1.0e7;
[self setHasVerticalScroller:YES];
[self setHasHorizontalScroller:NO];
- [self setBorderType:NSLineBorder];
+ [self setBorderType:NSBezelBorder];
[self _createTextView];
@@ -163,7 +167,6 @@ const float LargeNumberForText = 1.0e7;
wrap = f;
}
-
- (BOOL)wordWrap
{
return wrap;
@@ -171,7 +174,9 @@ const float LargeNumberForText = 1.0e7;
- (void)setText:(NSString *)s
{
+ //NSLog(@"extraLineFragmentTextContainer before setString: is %@", [[textView layoutManager] extraLineFragmentTextContainer]);
[textView setString:s];
+ //NSLog(@"extraLineFragmentTextContainer after setString: is %@", [[textView layoutManager] extraLineFragmentTextContainer]);
}
- (NSString *)text
@@ -187,7 +192,7 @@ const float LargeNumberForText = 1.0e7;
unsigned numberOfGlyphs = [layoutManager numberOfGlyphs];
while (NSMaxRange(glyphRange) < numberOfGlyphs) {
- (void)[layoutManager lineFragmentRectForGlyphAtIndex:NSMaxRange(glyphRange) effectiveRange:&glyphRange];
+ [layoutManager lineFragmentRectForGlyphAtIndex:NSMaxRange(glyphRange) effectiveRange:&glyphRange];
characterRange = [layoutManager characterRangeForGlyphRange:glyphRange actualGlyphRange:NULL];
if (line == lineCount) {
return [[[textView textStorage] attributedSubstringFromRange:characterRange] string];
@@ -205,7 +210,7 @@ const float LargeNumberForText = 1.0e7;
int lineCount = 0;
while (NSMaxRange(glyphRange) < numberOfGlyphs) {
- (void)[layoutManager lineFragmentRectForGlyphAtIndex:NSMaxRange(glyphRange) effectiveRange:&glyphRange];
+ [layoutManager lineFragmentRectForGlyphAtIndex:NSMaxRange(glyphRange) effectiveRange:&glyphRange];
lineCount++;
}
return lineCount;
@@ -228,21 +233,16 @@ const float LargeNumberForText = 1.0e7;
- (void)setFrame:(NSRect)frameRect
{
- NSRect textFrame;
- NSSize contentSize;
-
[super setFrame:frameRect];
- if ([self wordWrap]){
- contentSize = [NSScrollView contentSizeForFrameSize:frameRect.size hasHorizontalScroller:[self hasHorizontalScroller] hasVerticalScroller:[self hasVerticalScroller] borderType:[self borderType]];
- textFrame = [textView frame];
+ if ([self wordWrap]) {
+ NSSize contentSize = [NSScrollView contentSizeForFrameSize:frameRect.size hasHorizontalScroller:[self hasHorizontalScroller] hasVerticalScroller:[self hasVerticalScroller] borderType:[self borderType]];
+ NSRect textFrame = [textView frame];
textFrame.size.width = contentSize.width;
contentSize.height = LargeNumberForText;
- [textView setFrame: textFrame];
- [[textView textContainer] setContainerSize: contentSize];
+ [textView setFrame:textFrame];
+ [[textView textContainer] setContainerSize:contentSize];
}
- //if (frameRect.size.width > 0 && frameRect.size.height > 0 && textView == nil)
- // [self _createTextView];
}
- (int)paragraphs
@@ -350,7 +350,7 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
int lineCount = 0;
while (NSMaxRange(glyphRange) < numberOfGlyphs) {
- (void)[layoutManager lineFragmentRectForGlyphAtIndex:NSMaxRange(glyphRange) effectiveRange:&glyphRange];
+ [layoutManager lineFragmentRectForGlyphAtIndex:NSMaxRange(glyphRange) effectiveRange:&glyphRange];
lineCount++;
}
@@ -362,24 +362,30 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
NSString *text = [textView string];
NSRange selectedRange = [textView selectedRange];
- if (selectedRange.location == NSNotFound) {
- *index = 0;
- *paragraph = 0;
- } else {
- int num = [self paragraphs];
- int i;
- NSRange range;
-
- for (i = 0; i < num; i++) {
- range = RangeOfParagraph(text, i);
- if (range.location + range.length > selectedRange.location) {
- break;
- }
- }
+ *index = 0;
+ *paragraph = 0;
- *paragraph = num;
- *index = selectedRange.location - range.location;
+ if (selectedRange.location == NSNotFound) {
+ return;
}
+
+ int num = [self paragraphs];
+ if (num == 0) {
+ return;
+ }
+
+ int i;
+ NSRange range;
+
+ for (i = 0; i < num; i++) {
+ range = RangeOfParagraph(text, i);
+ if (range.location + range.length > selectedRange.location) {
+ break;
+ }
+ }
+
+ *paragraph = num;
+ *index = selectedRange.location - range.location;
}
- (void)setCursorPositionToIndex:(int)index inParagraph:(int)paragraph
@@ -387,15 +393,17 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
NSString *text = [textView string];
NSRange range = RangeOfParagraph(text, paragraph);
if (range.location == NSNotFound) {
- [textView setMarkedText:@"" selectedRange:NSMakeRange([text length], 0)];
+ [textView setSelectedRange:NSMakeRange([text length], 0)];
} else {
- [textView setMarkedText:@"" selectedRange:NSMakeRange(range.location + index, 0)];
+ [textView setSelectedRange:NSMakeRange(range.location + index, 0)];
}
}
- (void)setFont:(NSFont *)font
{
+ //NSLog(@"extraLineFragmentTextContainer before setFont: is %@", [[textView layoutManager] extraLineFragmentTextContainer]);
[textView setFont:font];
+ //NSLog(@"extraLineFragmentTextContainer after setFont: is %@", [[textView layoutManager] extraLineFragmentTextContainer]);
}
- (BOOL)becomeFirstResponder
@@ -440,6 +448,20 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
return YES;
}
+- (void)drawRect:(NSRect)rect
+{
+ [super drawRect:rect];
+ if ([[self window] firstResponder] == textView) {
+ NSSetFocusRingStyle(NSFocusRingOnly);
+ NSRectFill([self bounds]);
+ }
+}
+
+- (void)_KWQ_setKeyboardFocusRingNeedsDisplay
+{
+ [self setKeyboardFocusRingNeedsDisplayInRect:[self bounds]];
+}
+
@end
@implementation KWQTextAreaTextView
@@ -464,6 +486,14 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
{
[super becomeFirstResponder];
[self selectAll:nil];
+ [self _KWQ_setKeyboardFocusRingNeedsDisplay];
+ return YES;
+}
+
+- (BOOL)resignFirstResponder
+{
+ [super resignFirstResponder];
+ [self _KWQ_setKeyboardFocusRingNeedsDisplay];
return YES;
}
@@ -498,3 +528,12 @@ static NSRange RangeOfParagraph(NSString *text, int paragraph)
}
@end
+
+ at implementation NSView (KWQTextArea)
+
+- (void)_KWQ_setKeyboardFocusRingNeedsDisplay
+{
+ [[self superview] _KWQ_setKeyboardFocusRingNeedsDisplay];
+}
+
+ at end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list