Tor Arne Vestbø <tavestbo@trolltech.com>
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2008 12:37:32 +0000 (12:37 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2008 12:37:32 +0000 (12:37 +0000)
Respect antialiasing hint when drawing focus rects.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@32572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/qt/GraphicsContextQt.cpp

index d1d4934..1acb7d9 100644 (file)
@@ -1,3 +1,12 @@
+2008-04-25  Tor Arne Vestbø  <tavestbo@trolltech.com>
+
+        Reviewed by Simon.
+
+        Respect antialiasing hint when drawing focus rects.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::drawFocusRing):
+
 2008-04-25  Holger Hans Peter Freyther  <zecke@selfish.org>
 
         Reviewed by Simon.
index 215b882..6db4c72 100644 (file)
@@ -570,6 +570,8 @@ void GraphicsContext::drawFocusRing(const Color& color)
         return;
 
     QPainter *p = m_data->p();
+    const bool antiAlias = p->testRenderHint(QPainter::Antialiasing);
+    p->setRenderHint(QPainter::Antialiasing, m_data->antiAliasingForRectsAndLines);
 
     const QPen oldPen = p->pen();
     const QBrush oldBrush = p->brush();
@@ -593,6 +595,8 @@ void GraphicsContext::drawFocusRing(const Color& color)
 #endif
     p->setPen(oldPen);
     p->setBrush(oldBrush);
+
+    p->setRenderHint(QPainter::Antialiasing, antiAlias);
 }
 
 void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool printing)
@@ -821,7 +825,7 @@ void GraphicsContext::clipOut(const IntRect& rect)
 {
     if (paintingDisabled())
         return;
-        
+
     QPainter *p = m_data->p();
     QRectF clipBounds = p->clipPath().boundingRect();
     QPainterPath newClip;
@@ -836,7 +840,7 @@ void GraphicsContext::clipOutEllipseInRect(const IntRect& rect)
 {
     if (paintingDisabled())
         return;
-    
+
     QPainter *p = m_data->p();
     QRectF clipBounds = p->clipPath().boundingRect();
     QPainterPath newClip;
@@ -898,7 +902,7 @@ void GraphicsContext::setPlatformStrokeColor(const Color& color)
 }
 
 void GraphicsContext::setPlatformStrokeStyle(const StrokeStyle& strokeStyle)
-{   
+{
     if (paintingDisabled())
         return;
     QPainter *p = m_data->p();