[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:39:56 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 93bd832e29d37cff5554ac367d0dd1880290a176
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 6 11:27:47 2009 +0000

    2009-10-06  Fumitoshi Ukai  <ukai at chromium.org>
    
            Reviewed by Ariya Hidayat.
    
            Qt build fix.
            https://bugs.webkit.org/show_bug.cgi?id=29362.
    
            In Qt 4.5, a new function QPainter::fillRect(QRect, QColor) is
            introduced to avoid the expensive construction of QBrush.
            By casting WebCore::Color to QColor, we can compile on Qt 4.4
            and use optimization for solid color fill in Qt 4.5.
    
            * platform/graphics/qt/GraphicsContextQt.cpp:
            (WebCore::GraphicsContext::drawRect):
            (WebCore::GraphicsContext::drawLine):
            (WebCore::drawBorderlessRectShadow):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49165 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f446711..eda200c 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,20 @@
+2009-10-06  Fumitoshi Ukai  <ukai at chromium.org>
+
+        Reviewed by Ariya Hidayat.
+
+        Qt build fix.
+        https://bugs.webkit.org/show_bug.cgi?id=29362.
+
+        In Qt 4.5, a new function QPainter::fillRect(QRect, QColor) is
+        introduced to avoid the expensive construction of QBrush.
+        By casting WebCore::Color to QColor, we can compile on Qt 4.4
+        and use optimization for solid color fill in Qt 4.5.
+
+        * platform/graphics/qt/GraphicsContextQt.cpp:
+        (WebCore::GraphicsContext::drawRect):
+        (WebCore::GraphicsContext::drawLine):
+        (WebCore::drawBorderlessRectShadow):
+
 2009-10-05  Andrei Popescu  <andreip at google.com>
 
         Reviewed by Eric Carlson.
diff --git a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 094054b..aace4be 100644
--- a/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -422,7 +422,7 @@ void GraphicsContext::drawRect(const IntRect& rect)
         IntRect shadowRect = rect;
         shadowRect.move(shadowSize.width(), shadowSize.height());
         shadowRect.inflate(static_cast<int>(p->pen().widthF()));
-        p->fillRect(shadowRect, shadowColor);
+        p->fillRect(shadowRect, QColor(shadowColor));
     }
 
     p->drawRect(rect);
@@ -482,11 +482,11 @@ void GraphicsContext::drawLine(const IntPoint& point1, const IntPoint& point2)
         // Do a rect fill of our endpoints.  This ensures we always have the
         // appearance of being a border.  We then draw the actual dotted/dashed line.
         if (isVerticalLine) {
-            p->fillRect(FloatRect(p1.x() - width / 2, p1.y() - width, width, width), color);
-            p->fillRect(FloatRect(p2.x() - width / 2, p2.y(), width, width), color);
+            p->fillRect(FloatRect(p1.x() - width / 2, p1.y() - width, width, width), QColor(color));
+            p->fillRect(FloatRect(p2.x() - width / 2, p2.y(), width, width), QColor(color));
         } else {
-            p->fillRect(FloatRect(p1.x() - width, p1.y() - width / 2, width, width), color);
-            p->fillRect(FloatRect(p2.x(), p2.y() - width / 2, width, width), color);
+            p->fillRect(FloatRect(p1.x() - width, p1.y() - width / 2, width, width), QColor(color));
+            p->fillRect(FloatRect(p2.x(), p2.y() - width / 2, width, width), QColor(color));
         }
 
         // Example: 80 pixels with a width of 30 pixels.
@@ -718,7 +718,7 @@ static inline void drawBorderlessRectShadow(GraphicsContext* context, QPainter*
     if (context->getShadow(shadowSize, shadowBlur, shadowColor)) {
         FloatRect shadowRect(rect);
         shadowRect.move(shadowSize.width(), shadowSize.height());
-        p->fillRect(shadowRect, shadowColor);
+        p->fillRect(shadowRect, QColor(shadowColor));
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list