| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 return style.hasAuthorBorder() || style.boxShadow(); | 451 return style.hasAuthorBorder() || style.boxShadow(); |
| 452 | 452 |
| 453 // FIXME: This is horrible, but there is not much else that can be done. | 453 // FIXME: This is horrible, but there is not much else that can be done. |
| 454 // Menu lists cannot draw properly when scaled. They can't really draw | 454 // Menu lists cannot draw properly when scaled. They can't really draw |
| 455 // properly when transformed either. We can't detect the transform case at | 455 // properly when transformed either. We can't detect the transform case at |
| 456 // style adjustment time so that will just have to stay broken. We can | 456 // style adjustment time so that will just have to stay broken. We can |
| 457 // however detect that we're zooming. If zooming is in effect we treat it | 457 // however detect that we're zooming. If zooming is in effect we treat it |
| 458 // like the control is styled. | 458 // like the control is styled. |
| 459 if (style.appearance() == MenulistPart && style.effectiveZoom() != 1.0f) | 459 if (style.appearance() == MenulistPart && style.effectiveZoom() != 1.0f) |
| 460 return true; | 460 return true; |
| 461 // FIXME: NSSearchFieldCell doesn't work well when scaled. | 461 // Some other cells don't work well when scaled. |
| 462 if (style.appearance() == SearchFieldPart && style.effectiveZoom() != 1) | 462 if (style.effectiveZoom() != 1) { |
| 463 return true; | 463 switch (style.appearance()) { |
| 464 | 464 case ButtonPart: |
| 465 case PushButtonPart: |
| 466 case SearchFieldPart: |
| 467 case SquareButtonPart: |
| 468 return true; |
| 469 default: |
| 470 break; |
| 471 } |
| 472 } |
| 465 return LayoutTheme::isControlStyled(style); | 473 return LayoutTheme::isControlStyled(style); |
| 466 } | 474 } |
| 467 | 475 |
| 468 void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect
) | 476 void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect
) |
| 469 { | 477 { |
| 470 ControlPart part = object.style()->appearance(); | 478 ControlPart part = object.style()->appearance(); |
| 471 | 479 |
| 472 #if USE(NEW_THEME) | 480 #if USE(NEW_THEME) |
| 473 switch (part) { | 481 switch (part) { |
| 474 case CheckboxPart: | 482 case CheckboxPart: |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 | 1173 |
| 1166 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const | 1174 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const |
| 1167 { | 1175 { |
| 1168 ControlPart part = style.appearance(); | 1176 ControlPart part = style.appearance(); |
| 1169 if (part == CheckboxPart || part == RadioPart) | 1177 if (part == CheckboxPart || part == RadioPart) |
| 1170 return style.effectiveZoom() != 1; | 1178 return style.effectiveZoom() != 1; |
| 1171 return false; | 1179 return false; |
| 1172 } | 1180 } |
| 1173 | 1181 |
| 1174 } // namespace blink | 1182 } // namespace blink |
| OLD | NEW |