[webkit-changes] cvs commit: WebCore/kwq KWQTextArea.h
KWQTextArea.mm KWQTextField.h KWQTextField.mm KWQWidget.h
KWQWidget.mm
Adele
adele at opensource.apple.com
Tue Oct 11 12:16:47 PDT 2005
adele 05/10/11 12:16:46
Modified: . ChangeLog
fast/clip 014-expected.checksum 014-expected.png
. ChangeLog
kwq KWQTextArea.h KWQTextArea.mm KWQTextField.h
KWQTextField.mm KWQWidget.h KWQWidget.mm
Log:
LayoutTests:
Rolling out Darin's previous change.
* fast/clip/014-expected.checksum: Updated.
* fast/clip/014-expected.png: Updated.
WebCore:
Rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
since it caused:
REGRESSION text areas draw focus ring around each glyph, no caret in text fields
http://bugzilla.opendarwin.org/show_bug.cgi?id=5335
And updated expected results.
* fast/clip/014-expected.checksum: Updated.
* fast/clip/014-expected.png: Updated.
* kwq/KWQTextArea.h:
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView displayRectIgnoringOpacity:]):
(-[KWQTextAreaTextView textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
* kwq/KWQTextField.h:
* kwq/KWQTextField.mm:
(-[KWQTextFieldController setInDrawingMachinery:]):
(-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
(-[KWQTextField displayRectIgnoringOpacity:]):
(-[KWQSecureTextField displayRectIgnoringOpacity:]):
(-[KWQSearchField displayRectIgnoringOpacity:]):
* kwq/KWQWidget.h:
* kwq/KWQWidget.mm:
(QWidget::QWidget):
(QWidget::~QWidget):
(QWidget::paint):
(QWidget::setDeferFirstResponderChanges):
Revision Changes Path
1.29 +7 -0 LayoutTests/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/LayoutTests/ChangeLog,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ChangeLog 11 Oct 2005 03:45:15 -0000 1.28
+++ ChangeLog 11 Oct 2005 19:16:40 -0000 1.29
@@ -1,3 +1,10 @@
+2005-10-11 Adele Peterson <adele at apple.com>
+
+ Rolling out Darin's previous change.
+
+ * fast/clip/014-expected.checksum: Updated.
+ * fast/clip/014-expected.png: Updated.
+
2005-10-10 Darin Adler <darin at apple.com>
- updated expected results due to fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
1.3 +1 -1 LayoutTests/fast/clip/014-expected.checksum
Index: 014-expected.checksum
===================================================================
RCS file: /cvs/root/LayoutTests/fast/clip/014-expected.checksum,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 014-expected.checksum 11 Oct 2005 03:45:15 -0000 1.2
+++ 014-expected.checksum 11 Oct 2005 19:16:41 -0000 1.3
@@ -1 +1 @@
-82108b82a6e5b93eee3757c2572d77c2
\ No newline at end of file
+7325e4590acdd6151e4318dc98638fcb
\ No newline at end of file
1.3 +31 -49 LayoutTests/fast/clip/014-expected.png
<<Binary file>>
1.232 +30 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -r1.231 -r1.232
--- ChangeLog 11 Oct 2005 09:19:21 -0000 1.231
+++ ChangeLog 11 Oct 2005 19:16:41 -0000 1.232
@@ -1,3 +1,33 @@
+2005-10-11 Adele Peterson <adele at apple.com>
+
+ Rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5195
+ since it caused:
+
+ REGRESSION text areas draw focus ring around each glyph, no caret in text fields
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=5335
+
+ And updated expected results.
+ * fast/clip/014-expected.checksum: Updated.
+ * fast/clip/014-expected.png: Updated.
+
+ * kwq/KWQTextArea.h:
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextAreaTextView displayRectIgnoringOpacity:]):
+ (-[KWQTextAreaTextView textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
+ * kwq/KWQTextField.h:
+ * kwq/KWQTextField.mm:
+ (-[KWQTextFieldController setInDrawingMachinery:]):
+ (-[KWQTextFieldController textView:shouldDrawInsertionPointInRect:color:turnedOn:]):
+ (-[KWQTextField displayRectIgnoringOpacity:]):
+ (-[KWQSecureTextField displayRectIgnoringOpacity:]):
+ (-[KWQSearchField displayRectIgnoringOpacity:]):
+ * kwq/KWQWidget.h:
+ * kwq/KWQWidget.mm:
+ (QWidget::QWidget):
+ (QWidget::~QWidget):
+ (QWidget::paint):
+ (QWidget::setDeferFirstResponderChanges):
+
2005-10-11 Rob Buis <rwlbuis at xs4all.nl>>
Reviewed by eseidel.
1.25 +1 -0 WebCore/kwq/KWQTextArea.h
Index: KWQTextArea.h
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQTextArea.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- KWQTextArea.h 11 Oct 2005 02:49:34 -0000 1.24
+++ KWQTextArea.h 11 Oct 2005 19:16:44 -0000 1.25
@@ -37,6 +37,7 @@
float _lineHeight;
BOOL wrap;
BOOL inNextValidKeyView;
+ BOOL inDrawingMachinery;
BOOL inInitWithFrame;
BOOL resizableByUser;
BOOL resizableByUserComputed;
1.95 +12 -1 WebCore/kwq/KWQTextArea.mm
Index: KWQTextArea.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQTextArea.mm,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- KWQTextArea.mm 11 Oct 2005 02:49:34 -0000 1.94
+++ KWQTextArea.mm 11 Oct 2005 19:16:44 -0000 1.95
@@ -818,13 +818,24 @@
[textView setNeedsDisplay:YES];
}
+// This is the only one of the display family of calls that we use, and the way we do
+// displaying in WebCore means this is called on this NSView explicitly, so this catches
+// all cases where we are inside the normal display machinery. (Used only by the insertion
+// point method below.)
+- (void)displayRectIgnoringOpacity:(NSRect)rect
+{
+ inDrawingMachinery = YES;
+ [super displayRectIgnoringOpacity:rect];
+ inDrawingMachinery = NO;
+}
+
// Use the "needs display" mechanism to do all insertion point drawing in the web view.
- (BOOL)textView:(NSTextView *)view shouldDrawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)drawInsteadOfErase
{
// We only need to take control of the cases where we are being asked to draw by something
// outside the normal display machinery, and when we are being asked to draw the insertion
// point, not erase it.
- if ((widget && widget->isPainting()) || !drawInsteadOfErase) {
+ if (inDrawingMachinery || !drawInsteadOfErase) {
return YES;
}
1.24 +1 -0 WebCore/kwq/KWQTextField.h
Index: KWQTextField.h
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQTextField.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- KWQTextField.h 11 Oct 2005 02:49:35 -0000 1.23
+++ KWQTextField.h 11 Oct 2005 19:16:45 -0000 1.24
@@ -39,6 +39,7 @@
BOOL hasFocusAndSelectionSet;
BOOL edited;
NSRange lastSelectedRange;
+ BOOL inDrawingMachinery;
NSWritingDirection baseWritingDirection;
}
1.92 +40 -1 WebCore/kwq/KWQTextField.mm
Index: KWQTextField.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQTextField.mm,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- KWQTextField.mm 11 Oct 2005 02:49:35 -0000 1.91
+++ KWQTextField.mm 11 Oct 2005 19:16:45 -0000 1.92
@@ -72,6 +72,7 @@
- (id)initWithTextField:(NSTextField *)f QLineEdit:(QLineEdit *)w;
- (QWidget *)widget;
- (void)textChanged;
+- (void)setInDrawingMachinery:(BOOL)inDrawing;
- (BOOL)textView:(NSTextView *)view shouldDrawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)drawInsteadOfErase;
- (BOOL)textView:(NSTextView *)view shouldHandleEvent:(NSEvent *)event;
- (void)textView:(NSTextView *)view didHandleEvent:(NSEvent *)event;
@@ -241,13 +242,18 @@
widget->textChanged();
}
+- (void)setInDrawingMachinery:(BOOL)inDrawing
+{
+ inDrawingMachinery = inDrawing;
+}
+
// Use the "needs display" mechanism to do all insertion point drawing in the web view.
- (BOOL)textView:(NSTextView *)view shouldDrawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)drawInsteadOfErase
{
// We only need to take control of the cases where we are being asked to draw by something
// outside the normal display machinery, and when we are being asked to draw the insertion
// point, not erase it.
- if ((widget && widget->isPainting()) || !drawInsteadOfErase)
+ if (inDrawingMachinery || !drawInsteadOfErase)
return YES;
// NSTextView's insertion-point drawing code sets the rect width to 1.
@@ -575,6 +581,17 @@
[self setNeedsDisplay:YES];
}
+// This is the only one of the display family of calls that we use, and the way we do
+// displaying in WebCore means this is called on this NSView explicitly, so this catches
+// all cases where we are inside the normal display machinery. (Used only by the insertion
+// point method below.)
+- (void)displayRectIgnoringOpacity:(NSRect)rect
+{
+ [controller setInDrawingMachinery:YES];
+ [super displayRectIgnoringOpacity:rect];
+ [controller setInDrawingMachinery:NO];
+}
+
- (BOOL)textView:(NSTextView *)view shouldDrawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)drawInsteadOfErase
{
return [controller textView:view shouldDrawInsertionPointInRect:rect color:color turnedOn:drawInsteadOfErase];
@@ -730,6 +747,17 @@
[self setNeedsDisplay:YES];
}
+// This is the only one of the display family of calls that we use, and the way we do
+// displaying in WebCore means this is called on this NSView explicitly, so this catches
+// all cases where we are inside the normal display machinery. (Used only by the insertion
+// point method below.)
+- (void)displayRectIgnoringOpacity:(NSRect)rect
+{
+ [controller setInDrawingMachinery:YES];
+ [super displayRectIgnoringOpacity:rect];
+ [controller setInDrawingMachinery:NO];
+}
+
- (BOOL)textView:(NSTextView *)view shouldDrawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)drawInsteadOfErase
{
return [controller textView:view shouldDrawInsertionPointInRect:rect color:color turnedOn:drawInsteadOfErase];
@@ -947,6 +975,17 @@
[self setNeedsDisplay:YES];
}
+// This is the only one of the display family of calls that we use, and the way we do
+// displaying in WebCore means this is called on this NSView explicitly, so this catches
+// all cases where we are inside the normal display machinery. (Used only by the insertion
+// point method below.)
+- (void)displayRectIgnoringOpacity:(NSRect)rect
+{
+ [controller setInDrawingMachinery:YES];
+ [super displayRectIgnoringOpacity:rect];
+ [controller setInDrawingMachinery:NO];
+}
+
- (BOOL)textView:(NSTextView *)view shouldDrawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)drawInsteadOfErase
{
return [controller textView:view shouldDrawInsertionPointInRect:rect color:color turnedOn:drawInsteadOfErase];
1.68 +1 -2 WebCore/kwq/KWQWidget.h
Index: KWQWidget.h
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQWidget.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- KWQWidget.h 11 Oct 2005 02:49:35 -0000 1.67
+++ KWQWidget.h 11 Oct 2005 19:16:45 -0000 1.68
@@ -87,8 +87,7 @@
void move(int, int);
void move(const QPoint &);
- void paint(QPainter *, const QRect &);
- bool isPainting() const;
+ virtual void paint(QPainter *, const QRect &);
virtual QRect frameGeometry() const;
virtual void setFrameGeometry(const QRect &);
1.113 +3 -25 WebCore/kwq/KWQWidget.mm
Index: KWQWidget.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQWidget.mm,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- KWQWidget.mm 11 Oct 2005 02:49:35 -0000 1.112
+++ KWQWidget.mm 11 Oct 2005 19:16:45 -0000 1.113
@@ -41,15 +41,6 @@
#import "render_replaced.h"
#import "render_style.h"
- at interface NSWindow (KWQWidgetAppKitSecrets)
-- (void)_lockViewHierarchyForModification;
-- (void)_unlockViewHierarchyForModification;
- at end
-
- at interface NSView (KWQWidgetAppKitSecrets)
-- (void)_recursiveDisplayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)context topView:(BOOL)topView;
- at end
-
using khtml::RenderWidget;
static bool deferFirstResponderChanges;
@@ -71,7 +62,6 @@
bool visible;
bool mustStayInWindow;
bool removeFromSuperviewSoon;
- unsigned painting;
};
QWidget::QWidget() : data(new KWQWidgetPrivate)
@@ -82,7 +72,6 @@
data->visible = true;
data->mustStayInWindow = false;
data->removeFromSuperviewSoon = false;
- data->painting = 0;
}
QWidget::QWidget(NSView *view) : data(new KWQWidgetPrivate)
@@ -93,13 +82,10 @@
data->visible = true;
data->mustStayInWindow = false;
data->removeFromSuperviewSoon = false;
- data->painting = 0;
}
QWidget::~QWidget()
{
- ASSERT(data->painting == 0);
-
KWQ_BLOCK_EXCEPTIONS;
KWQRelease(data->view);
KWQ_UNBLOCK_EXCEPTIONS;
@@ -542,14 +528,11 @@
return;
}
NSView *view = getOuterView();
- ++data->painting;
+ // KWQTextArea and KWQTextField both rely on the fact that we use this particular
+ // NSView display method. If you change this, be sure to update them as well.
KWQ_BLOCK_EXCEPTIONS;
- NSWindow *window = [view window];
- [window _lockViewHierarchyForModification];
- [view _recursiveDisplayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]] inContext:[NSGraphicsContext currentContext] topView:NO];
- [window _unlockViewHierarchyForModification];
+ [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]]];
KWQ_UNBLOCK_EXCEPTIONS;
- --data->painting;
}
void QWidget::sendConsumedMouseUp()
@@ -631,8 +614,3 @@
}
}
}
-
-bool QWidget::isPainting() const
-{
- return data->painting;
-}
More information about the webkit-changes
mailing list