| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 if (zoomLevel != 1.0f) { | 908 if (zoomLevel != 1.0f) { |
| 909 inflatedRect.setWidth(inflatedRect.width() / zoomLevel); | 909 inflatedRect.setWidth(inflatedRect.width() / zoomLevel); |
| 910 inflatedRect.setHeight(inflatedRect.height() / zoomLevel); | 910 inflatedRect.setHeight(inflatedRect.height() / zoomLevel); |
| 911 paintInfo.context->translate(inflatedRect.x(), inflatedRect.y()); | 911 paintInfo.context->translate(inflatedRect.x(), inflatedRect.y()); |
| 912 paintInfo.context->scale(zoomLevel, zoomLevel); | 912 paintInfo.context->scale(zoomLevel, zoomLevel); |
| 913 paintInfo.context->translate(-inflatedRect.x(), -inflatedRect.y()); | 913 paintInfo.context->translate(-inflatedRect.x(), -inflatedRect.y()); |
| 914 } | 914 } |
| 915 | 915 |
| 916 NSView *view = documentViewFor(o); | 916 NSView *view = documentViewFor(o); |
| 917 [popupButton drawWithFrame:inflatedRect inView:view]; | 917 [popupButton drawWithFrame:inflatedRect inView:view]; |
| 918 #if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING | |
| 919 if (isFocused(o) && o->style()->outlineStyleIsAuto()) | 918 if (isFocused(o) && o->style()->outlineStyleIsAuto()) |
| 920 [popupButton _web_drawFocusRingWithFrame:inflatedRect inView:view]; | 919 [popupButton _web_drawFocusRingWithFrame:inflatedRect inView:view]; |
| 921 #endif | |
| 922 [popupButton setControlView:nil]; | 920 [popupButton setControlView:nil]; |
| 923 | 921 |
| 924 return false; | 922 return false; |
| 925 } | 923 } |
| 926 | 924 |
| 927 IntSize RenderThemeChromiumMac::meterSizeForBounds(const RenderMeter* renderMete
r, const IntRect& bounds) const | 925 IntSize RenderThemeChromiumMac::meterSizeForBounds(const RenderMeter* renderMete
r, const IntRect& bounds) const |
| 928 { | 926 { |
| 929 if (NoControlPart == renderMeter->style()->appearance()) | 927 if (NoControlPart == renderMeter->style()->appearance()) |
| 930 return bounds.size(); | 928 return bounds.size(); |
| 931 | 929 |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 NSPopUpButtonCell* popupButton = this->popupButton(); | 1261 NSPopUpButtonCell* popupButton = this->popupButton(); |
| 1264 | 1262 |
| 1265 // Set the control size based off the rectangle we're painting into. | 1263 // Set the control size based off the rectangle we're painting into. |
| 1266 setControlSize(popupButton, popupButtonSizes(), r.size(), o->style()->effect
iveZoom()); | 1264 setControlSize(popupButton, popupButtonSizes(), r.size(), o->style()->effect
iveZoom()); |
| 1267 | 1265 |
| 1268 // Update the various states we respond to. | 1266 // Update the various states we respond to. |
| 1269 updateActiveState(popupButton, o); | 1267 updateActiveState(popupButton, o); |
| 1270 updateCheckedState(popupButton, o); | 1268 updateCheckedState(popupButton, o); |
| 1271 updateEnabledState(popupButton, o); | 1269 updateEnabledState(popupButton, o); |
| 1272 updatePressedState(popupButton, o); | 1270 updatePressedState(popupButton, o); |
| 1273 #if BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING | |
| 1274 updateFocusedState(popupButton, o); | 1271 updateFocusedState(popupButton, o); |
| 1275 #endif | |
| 1276 } | 1272 } |
| 1277 | 1273 |
| 1278 const IntSize* RenderThemeChromiumMac::menuListSizes() const | 1274 const IntSize* RenderThemeChromiumMac::menuListSizes() const |
| 1279 { | 1275 { |
| 1280 static const IntSize sizes[3] = { IntSize(9, 0), IntSize(5, 0), IntSize(0, 0
) }; | 1276 static const IntSize sizes[3] = { IntSize(9, 0), IntSize(5, 0), IntSize(0, 0
) }; |
| 1281 return sizes; | 1277 return sizes; |
| 1282 } | 1278 } |
| 1283 | 1279 |
| 1284 int RenderThemeChromiumMac::minimumMenuListSize(RenderStyle* style) const | 1280 int RenderThemeChromiumMac::minimumMenuListSize(RenderStyle* style) const |
| 1285 { | 1281 { |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 | 1904 |
| 1909 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 1905 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |
| 1910 { | 1906 { |
| 1911 ControlPart part = style->appearance(); | 1907 ControlPart part = style->appearance(); |
| 1912 if (part == CheckboxPart || part == RadioPart) | 1908 if (part == CheckboxPart || part == RadioPart) |
| 1913 return style->effectiveZoom() != 1; | 1909 return style->effectiveZoom() != 1; |
| 1914 return false; | 1910 return false; |
| 1915 } | 1911 } |
| 1916 | 1912 |
| 1917 } // namespace blink | 1913 } // namespace blink |
| OLD | NEW |