[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8

weinig at apple.com weinig at apple.com
Wed Feb 10 22:11:29 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit a57b44b96273f687ad420bc9c16426d350367564
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 3 22:23:38 2010 +0000

    Fix drawing buttons in viewless WebKit.
    
    Reviewed by Anders Carlsson.
    
    * platform/mac/ThemeMac.mm:
    (WebCore::paintButton): If there is no view, make sure to flip the
    context so that the button is drawn correctly.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54299 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b485ac3..6be8a5e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-03  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Anders Carlsson.
+
+        Fix drawing buttons in viewless WebKit.
+
+        * platform/mac/ThemeMac.mm:
+        (WebCore::paintButton): If there is no view, make sure to flip the
+        context so that the button is drawn correctly.
+
 2010-02-03  Yael Aharon  <yael.aharon at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/mac/ThemeMac.mm b/WebCore/platform/mac/ThemeMac.mm
index 2812607..b71a651 100644
--- a/WebCore/platform/mac/ThemeMac.mm
+++ b/WebCore/platform/mac/ThemeMac.mm
@@ -415,9 +415,20 @@ static void paintButton(ControlPart part, ControlStates states, GraphicsContext*
     } else if ([previousDefaultButtonCell isEqual:buttonCell])
         [window setDefaultButtonCell:nil];
 
+    if (!view) {
+        context->save();
+        context->translate(inflatedRect.x(), inflatedRect.y());
+        context->scale(FloatSize(1, -1));
+        context->translate(0, -inflatedRect.height());
+        inflatedRect.setLocation(IntPoint());
+    }
+
     [buttonCell drawWithFrame:NSRect(inflatedRect) inView:view];
     [buttonCell setControlView:nil];
 
+    if (!view)
+        context->restore();
+
     if (![previousDefaultButtonCell isEqual:buttonCell])
         [window setDefaultButtonCell:previousDefaultButtonCell];
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list