Commit f6728b76 authored by weinig@apple.com's avatar weinig@apple.com

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: svn://svn.chromium.org/blink/trunk@54299 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent ebc78759
2010-02-03 Sam Weinig <sam@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@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -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];
......
Markdown is supported
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