[webkit-changes] cvs commit: WebCore/kwq KWQPainter.mm
Darin
darin at opensource.apple.com
Wed Sep 14 14:06:55 PDT 2005
darin 05/09/14 14:06:55
Modified: . ChangeLog
kwq KWQPainter.mm
Log:
Reviewed by John.
No easy way to test this in layout tests, so no test added.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4984
REGRESSION placeholder border left behind after image finishes loading
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4985
REGRESSION assertion failure in KWQPainter.mm:841
* kwq/KWQPainter.mm:
(QPainter::save): Do nothing if painting is disabled.
(QPainter::restore): Ditto.
(QPainter::drawRect): Inset so that we "frame" the rectangle rather than "stroking" the
rectangle. The former draws inside the rectangle but the latter draws centered on the
edge of the rectangle.
Revision Changes Path
1.120 +19 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- ChangeLog 14 Sep 2005 16:21:25 -0000 1.119
+++ ChangeLog 14 Sep 2005 21:06:54 -0000 1.120
@@ -1,5 +1,24 @@
2005-09-14 Darin Adler <darin at apple.com>
+ Reviewed by John.
+
+ No easy way to test this in layout tests, so no test added.
+
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4984
+ REGRESSION placeholder border left behind after image finishes loading
+
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4985
+ REGRESSION assertion failure in KWQPainter.mm:841
+
+ * kwq/KWQPainter.mm:
+ (QPainter::save): Do nothing if painting is disabled.
+ (QPainter::restore): Ditto.
+ (QPainter::drawRect): Inset so that we "frame" the rectangle rather than "stroking" the
+ rectangle. The former draws inside the rectangle but the latter draws centered on the
+ edge of the rectangle.
+
+2005-09-14 Darin Adler <darin at apple.com>
+
Reviewed by Maciej.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4924
1.138 +10 -1 WebCore/kwq/KWQPainter.mm
Index: KWQPainter.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQPainter.mm,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- KWQPainter.mm 14 Sep 2005 16:21:26 -0000 1.137
+++ KWQPainter.mm 14 Sep 2005 21:06:55 -0000 1.138
@@ -176,6 +176,9 @@
void QPainter::save()
{
+ if (data->state.paintingDisabled)
+ return;
+
data->stack.push(new QPState(data->state));
CGContextSaveGState(currentContext());
@@ -183,6 +186,9 @@
void QPainter::restore()
{
+ if (data->state.paintingDisabled)
+ return;
+
if (data->stack.isEmpty()) {
ERROR("ERROR void QPainter::restore() stack is empty");
return;
@@ -209,7 +215,10 @@
if (data->state.pen.style() != NoPen) {
setStrokeColorAndLineWidthFromCurrentPen();
- CGContextStrokeRect(context, CGRectMake(x, y, w, h));
+ float width = data->state.pen.width();
+ if (width < 1)
+ width = 1;
+ CGContextStrokeRect(context, CGRectInset(CGRectMake(x, y, w, h), width / 2, width / 2));
}
}
More information about the webkit-changes
mailing list