[webkit-changes] cvs commit: WebCore/kwq KWQLineEdit.mm
KWQPainter.mm KWQTextEdit.mm
Darin
darin at opensource.apple.com
Sat Sep 24 04:05:35 PDT 2005
darin 05/09/24 04:05:35
Modified: . ChangeLog
kwq KWQLineEdit.mm KWQPainter.mm KWQTextEdit.mm
Log:
Reviewed by Eric.
Landed by Darin (after taking tabs out).
- worked around problems compiling with various versions of gcc 4
http://bugzilla.opendarwin.org/show_bug.cgi?id=5071
http://bugzilla.opendarwin.org/show_bug.cgi?id=5086
* kwq/KWQLineEdit.mm:
(QLineEdit::setCursorPosition): Don't use NSMakeRange.
(QLineEdit::setSelection): Ditto.
* kwq/KWQPainter.mm:
(QPainter::drawFloatPixmap): Rearrange things so we don't get a warning.
* kwq/KWQTextEdit.mm:
(QTextEdit::selectionEnd): Don't use NSMaxRange.
(QTextEdit::setSelectionRange): Don't use NSMakeRange.
Revision Changes Path
1.157 +18 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- ChangeLog 24 Sep 2005 10:07:07 -0000 1.156
+++ ChangeLog 24 Sep 2005 11:05:32 -0000 1.157
@@ -1,3 +1,21 @@
+2005-09-24 Justin Garcia <justin.garcia at apple.com>
+
+ Reviewed by Eric.
+ Landed by Darin (after taking tabs out).
+
+ - worked around problems compiling with various versions of gcc 4
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=5071
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=5086
+
+ * kwq/KWQLineEdit.mm:
+ (QLineEdit::setCursorPosition): Don't use NSMakeRange.
+ (QLineEdit::setSelection): Ditto.
+ * kwq/KWQPainter.mm:
+ (QPainter::drawFloatPixmap): Rearrange things so we don't get a warning.
+ * kwq/KWQTextEdit.mm:
+ (QTextEdit::selectionEnd): Don't use NSMaxRange.
+ (QTextEdit::setSelectionRange): Don't use NSMakeRange.
+
2005-09-24 Alexey Proskuryakov <ap at nypop.com>
Reviewed and landed by Darin.
1.71 +5 -3 WebCore/kwq/KWQLineEdit.mm
Index: KWQLineEdit.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQLineEdit.mm,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- KWQLineEdit.mm 30 Aug 2005 09:30:24 -0000 1.70
+++ KWQLineEdit.mm 24 Sep 2005 11:05:33 -0000 1.71
@@ -80,7 +80,8 @@
void QLineEdit::setCursorPosition(int pos)
{
KWQ_BLOCK_EXCEPTIONS;
- [m_controller setSelectedRange:NSMakeRange(pos, 0)];
+ NSRange tempRange = {pos, 0}; // 4213314
+ [m_controller setSelectedRange:tempRange];
KWQ_UNBLOCK_EXCEPTIONS;
}
@@ -215,7 +216,8 @@
void QLineEdit::setSelection(int start, int length)
{
KWQ_BLOCK_EXCEPTIONS;
- [m_controller setSelectedRange:NSMakeRange(start, length)];
+ NSRange tempRange = {start, length}; // 4213314
+ [m_controller setSelectedRange:tempRange];
KWQ_UNBLOCK_EXCEPTIONS;
}
@@ -376,7 +378,7 @@
if (!buttonCell)
[searchCell resetSearchButtonCell];
if (cellMenu && !maxResults)
- [searchCell setSearchMenuTemplate:nil];
+ [searchCell setSearchMenuTemplate:nil];
else if (!cellMenu && maxResults)
[searchCell setSearchMenuTemplate:[[WebCoreViewFactory sharedFactory] cellMenuForSearchField]];
}
1.141 +18 -12 WebCore/kwq/KWQPainter.mm
Index: KWQPainter.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQPainter.mm,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- KWQPainter.mm 23 Sep 2005 03:28:29 -0000 1.140
+++ KWQPainter.mm 24 Sep 2005 11:05:33 -0000 1.141
@@ -543,21 +543,27 @@
{
if (data->state.paintingDisabled)
return;
+
+ KWQ_BLOCK_EXCEPTIONS;
+
+ float tsw = sw;
+ float tsh = sh;
+ float tw = w;
+ float th = h;
- if (sw == -1)
- sw = pixmap.width();
- if (sh == -1)
- sh = pixmap.height();
-
- if (w == -1)
- w = pixmap.width();
- if (h == -1)
- h = pixmap.height();
+ if (tsw == -1)
+ tsw = pixmap.width();
+ if (tsh == -1)
+ tsh = pixmap.height();
+
+ if (tw == -1)
+ tw = pixmap.width();
+ if (th == -1)
+ th = pixmap.height();
- NSRect inRect = NSMakeRect(x, y, w, h);
- NSRect fromRect = NSMakeRect(sx, sy, sw, sh);
+ NSRect inRect = NSMakeRect(x, y, tw, th);
+ NSRect fromRect = NSMakeRect(sx, sy, tsw, tsh);
- KWQ_BLOCK_EXCEPTIONS;
[pixmap.imageRenderer drawImageInRect:inRect
fromRect:fromRect compositeOperator:(NSCompositingOperation)compositeOperator context:context];
KWQ_UNBLOCK_EXCEPTIONS;
1.52 +3 -2 WebCore/kwq/KWQTextEdit.mm
Index: KWQTextEdit.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQTextEdit.mm,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- KWQTextEdit.mm 16 Sep 2005 22:42:24 -0000 1.51
+++ KWQTextEdit.mm 24 Sep 2005 11:05:34 -0000 1.52
@@ -201,7 +201,7 @@
NSRange range = [textView selectedRange];
if (range.location == NSNotFound)
return 0;
- return NSMaxRange(range);
+ return range.location + range.length; // Use NSMaxRange when 4213314 is fixed
KWQ_UNBLOCK_EXCEPTIONS;
return 0;
@@ -314,7 +314,8 @@
if (newStart + newLength > maxlen) {
newLength = maxlen - newStart;
}
- [textView setSelectedRange:NSMakeRange(newStart, newLength)];
+ NSRange tempRange = {newStart, newLength}; // 4213314
+ [textView setSelectedRange:tempRange];
KWQ_UNBLOCK_EXCEPTIONS;
}
More information about the webkit-changes
mailing list