[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:43:46 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4a49c9f287fb9b9798d8dd83b43ced55adfcf8b4
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 24 17:24:14 2002 +0000

    	Remove the focus border hack, which was no longer doing us any good.
    
            * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
            * kwq/KWQNSTextField.mm: Remove KWQTextFieldCell.
            (-[KWQNSTextField updateSecureFieldFrame]): Don't inset by FOCUS_BORDER_SIZE.
            * kwq/qt/qlineedit.h: Don't override frameGeometry and setFrameGeometry any more.
            * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Don't subtract
    	the focus border size.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2140 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 488c772..397763c 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,16 @@
 2002-09-24  Darin Adler  <darin at apple.com>
 
+	Remove the focus border hack, which was no longer doing us any good.
+
+        * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
+        * kwq/KWQNSTextField.mm: Remove KWQTextFieldCell.
+        (-[KWQNSTextField updateSecureFieldFrame]): Don't inset by FOCUS_BORDER_SIZE.
+        * kwq/qt/qlineedit.h: Don't override frameGeometry and setFrameGeometry any more.
+        * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Don't subtract
+	the focus border size.
+
+2002-09-24  Darin Adler  <darin at apple.com>
+
         * kwq/mac-encodings.txt: Remove constant for Japanese auto-detect.
 
 2002-09-24  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 488c772..397763c 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,16 @@
 2002-09-24  Darin Adler  <darin at apple.com>
 
+	Remove the focus border hack, which was no longer doing us any good.
+
+        * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
+        * kwq/KWQNSTextField.mm: Remove KWQTextFieldCell.
+        (-[KWQNSTextField updateSecureFieldFrame]): Don't inset by FOCUS_BORDER_SIZE.
+        * kwq/qt/qlineedit.h: Don't override frameGeometry and setFrameGeometry any more.
+        * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Don't subtract
+	the focus border size.
+
+2002-09-24  Darin Adler  <darin at apple.com>
+
         * kwq/mac-encodings.txt: Remove constant for Japanese auto-detect.
 
 2002-09-24  Darin Adler  <darin at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 488c772..397763c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,16 @@
 2002-09-24  Darin Adler  <darin at apple.com>
 
+	Remove the focus border hack, which was no longer doing us any good.
+
+        * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
+        * kwq/KWQNSTextField.mm: Remove KWQTextFieldCell.
+        (-[KWQNSTextField updateSecureFieldFrame]): Don't inset by FOCUS_BORDER_SIZE.
+        * kwq/qt/qlineedit.h: Don't override frameGeometry and setFrameGeometry any more.
+        * kwq/KWQLineEdit.mm: (QLineEdit::sizeForCharacterWidth): Don't subtract
+	the focus border size.
+
+2002-09-24  Darin Adler  <darin at apple.com>
+
         * kwq/mac-encodings.txt: Remove constant for Japanese auto-detect.
 
 2002-09-24  Darin Adler  <darin at apple.com>
diff --git a/WebCore/kwq/KWQLineEdit.h b/WebCore/kwq/KWQLineEdit.h
index dc002b5..a748ca2 100644
--- a/WebCore/kwq/KWQLineEdit.h
+++ b/WebCore/kwq/KWQLineEdit.h
@@ -55,8 +55,6 @@ public:
     void setFont(const QFont &font);
     
     QSize sizeForCharacterWidth(int numCharacters) const;
-    QRect frameGeometry() const;
-    void setFrameGeometry(const QRect &);
     int baselinePosition() const;
     
     void returnPressed() { m_returnPressed.call(); }
diff --git a/WebCore/kwq/KWQLineEdit.mm b/WebCore/kwq/KWQLineEdit.mm
index 49c503f..bd351dc 100644
--- a/WebCore/kwq/KWQLineEdit.mm
+++ b/WebCore/kwq/KWQLineEdit.mm
@@ -138,25 +138,9 @@ QSize QLineEdit::sizeForCharacterWidth(int numCharacters) const
     NSSize size = [[textField cell] cellSize];
     [textField setStringValue:value];
     
-    size.width -= FOCUS_BORDER_SIZE * 2;
-    size.height -= FOCUS_BORDER_SIZE * 2;
-    
     return QSize(size);
 }
 
-QRect QLineEdit::frameGeometry() const
-{
-    QRect r = QWidget::frameGeometry();
-    return QRect(r.x() + FOCUS_BORDER_SIZE, r.y() + FOCUS_BORDER_SIZE,
-        r.width() - FOCUS_BORDER_SIZE * 2, r.height() - FOCUS_BORDER_SIZE * 2);
-}
-
-void QLineEdit::setFrameGeometry(const QRect &r)
-{
-    QWidget::setFrameGeometry(QRect(r.x() - FOCUS_BORDER_SIZE, r.y() - FOCUS_BORDER_SIZE,
-        r.width() + FOCUS_BORDER_SIZE * 2, r.height() + FOCUS_BORDER_SIZE * 2));
-}
-
 int QLineEdit::baselinePosition() const
 {
     KWQNSTextField *textField = (KWQNSTextField *)getView();
diff --git a/WebCore/kwq/KWQNSTextField.h b/WebCore/kwq/KWQNSTextField.h
index fbe9bcc..e190b24 100644
--- a/WebCore/kwq/KWQNSTextField.h
+++ b/WebCore/kwq/KWQNSTextField.h
@@ -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,8 +28,6 @@
 class QLineEdit;
 @class KWQTextFieldFormatter;
 
-#define FOCUS_BORDER_SIZE 4
-
 @interface KWQNSTextField : NSTextField
 {
 @private
diff --git a/WebCore/kwq/KWQNSTextField.mm b/WebCore/kwq/KWQNSTextField.mm
index 6a4471d..3aed0fd 100644
--- a/WebCore/kwq/KWQNSTextField.mm
+++ b/WebCore/kwq/KWQNSTextField.mm
@@ -29,14 +29,6 @@
 #import <KWQKHTMLPartImpl.h>
 #import <KWQNSViewExtras.h>
 
-// KWQTextFieldCell is larger than a normal text field cell, so it includes
-// the focus border as well as the rest of the text field.
-
- at interface KWQTextFieldCell : NSTextFieldCell
-{
-}
- at end
-
 // KWQTextFieldFormatter enforces a maximum length.
 
 @interface KWQTextFieldFormatter : NSFormatter
@@ -66,13 +58,6 @@
 
 @implementation KWQNSTextField
 
-+ (void)initialize
-{
-    if (self == [KWQNSTextField class]) {
-        [self setCellClass:[KWQTextFieldCell class]];
-    }
-}
-
 - (void)setUpTextField:(NSTextField *)field
 {
     // This is initialization that's shared by both self and the secure text field.
@@ -120,7 +105,7 @@
 
 - (void)updateSecureFieldFrame
 {
-    [secureField setFrame:NSInsetRect([self bounds], FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE)];
+    [secureField setFrame:[self bounds]];
 }
 
 - (void)setFrameSize:(NSSize)size
@@ -293,42 +278,6 @@
 
 @end
 
-// This cell is used so that our frame includes the place where the focus rectangle is drawn.
-// We account for this at the QWidget level so the placement of the text field is still correct,
-// just as we account for the margins in NSButton and other AppKit controls.
-
- at implementation KWQTextFieldCell
-
-- (BOOL)isOpaque
-{
-    return NO;
-}
-
-- (NSSize)cellSizeForBounds:(NSRect)bounds
-{
-    NSSize size = [super cellSizeForBounds:bounds];
-    size.width += FOCUS_BORDER_SIZE * 2;
-    size.height += FOCUS_BORDER_SIZE * 2;
-    return size;
-}
-
-- (void)drawWithFrame:(NSRect)frame inView:(NSView *)view
-{
-    [super drawWithFrame:NSInsetRect(frame, FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE) inView:view];
-}
-
-- (void)editWithFrame:(NSRect)frame inView:(NSView *)view editor:(NSText *)editor delegate:(id)delegate event:(NSEvent *)event
-{
-    [super editWithFrame:NSInsetRect(frame, FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE) inView:view editor:editor delegate:delegate event:event];
-}
-
-- (void)selectWithFrame:(NSRect)frame inView:(NSView *)view editor:(NSText *)editor delegate:(id)delegate start:(int)start length:(int)length
-{
-    [super selectWithFrame:NSInsetRect(frame, FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE) inView:view editor:editor delegate:delegate start:start length:length];
-}
-
- at end
-
 @implementation KWQTextFieldFormatter
 
 - init
diff --git a/WebCore/kwq/KWQTextField.h b/WebCore/kwq/KWQTextField.h
index fbe9bcc..e190b24 100644
--- a/WebCore/kwq/KWQTextField.h
+++ b/WebCore/kwq/KWQTextField.h
@@ -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,8 +28,6 @@
 class QLineEdit;
 @class KWQTextFieldFormatter;
 
-#define FOCUS_BORDER_SIZE 4
-
 @interface KWQNSTextField : NSTextField
 {
 @private
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index 6a4471d..3aed0fd 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -29,14 +29,6 @@
 #import <KWQKHTMLPartImpl.h>
 #import <KWQNSViewExtras.h>
 
-// KWQTextFieldCell is larger than a normal text field cell, so it includes
-// the focus border as well as the rest of the text field.
-
- at interface KWQTextFieldCell : NSTextFieldCell
-{
-}
- at end
-
 // KWQTextFieldFormatter enforces a maximum length.
 
 @interface KWQTextFieldFormatter : NSFormatter
@@ -66,13 +58,6 @@
 
 @implementation KWQNSTextField
 
-+ (void)initialize
-{
-    if (self == [KWQNSTextField class]) {
-        [self setCellClass:[KWQTextFieldCell class]];
-    }
-}
-
 - (void)setUpTextField:(NSTextField *)field
 {
     // This is initialization that's shared by both self and the secure text field.
@@ -120,7 +105,7 @@
 
 - (void)updateSecureFieldFrame
 {
-    [secureField setFrame:NSInsetRect([self bounds], FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE)];
+    [secureField setFrame:[self bounds]];
 }
 
 - (void)setFrameSize:(NSSize)size
@@ -293,42 +278,6 @@
 
 @end
 
-// This cell is used so that our frame includes the place where the focus rectangle is drawn.
-// We account for this at the QWidget level so the placement of the text field is still correct,
-// just as we account for the margins in NSButton and other AppKit controls.
-
- at implementation KWQTextFieldCell
-
-- (BOOL)isOpaque
-{
-    return NO;
-}
-
-- (NSSize)cellSizeForBounds:(NSRect)bounds
-{
-    NSSize size = [super cellSizeForBounds:bounds];
-    size.width += FOCUS_BORDER_SIZE * 2;
-    size.height += FOCUS_BORDER_SIZE * 2;
-    return size;
-}
-
-- (void)drawWithFrame:(NSRect)frame inView:(NSView *)view
-{
-    [super drawWithFrame:NSInsetRect(frame, FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE) inView:view];
-}
-
-- (void)editWithFrame:(NSRect)frame inView:(NSView *)view editor:(NSText *)editor delegate:(id)delegate event:(NSEvent *)event
-{
-    [super editWithFrame:NSInsetRect(frame, FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE) inView:view editor:editor delegate:delegate event:event];
-}
-
-- (void)selectWithFrame:(NSRect)frame inView:(NSView *)view editor:(NSText *)editor delegate:(id)delegate start:(int)start length:(int)length
-{
-    [super selectWithFrame:NSInsetRect(frame, FOCUS_BORDER_SIZE, FOCUS_BORDER_SIZE) inView:view editor:editor delegate:delegate start:start length:length];
-}
-
- at end
-
 @implementation KWQTextFieldFormatter
 
 - init
diff --git a/WebCore/kwq/qt/qlineedit.h b/WebCore/kwq/qt/qlineedit.h
index dc002b5..a748ca2 100644
--- a/WebCore/kwq/qt/qlineedit.h
+++ b/WebCore/kwq/qt/qlineedit.h
@@ -55,8 +55,6 @@ public:
     void setFont(const QFont &font);
     
     QSize sizeForCharacterWidth(int numCharacters) const;
-    QRect frameGeometry() const;
-    void setFrameGeometry(const QRect &);
     int baselinePosition() const;
     
     void returnPressed() { m_returnPressed.call(); }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list