Commit 24610a11 authored by darin's avatar darin
Browse files

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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@10532 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 79ec5083
2005-09-14 Darin Adler <darin@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@apple.com>
Reviewed by Maciej.
......
......@@ -176,6 +176,9 @@ const QBrush& QPainter::brush() const
void QPainter::save()
{
if (data->state.paintingDisabled)
return;
data->stack.push(new QPState(data->state));
CGContextSaveGState(currentContext());
......@@ -183,6 +186,9 @@ void QPainter::save()
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 @@ void QPainter::drawRect(int x, int y, int w, int h)
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));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment