| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 [search setControlView:nil]; | 486 [search setControlView:nil]; |
| 487 [search resetSearchButtonCell]; | 487 [search resetSearchButtonCell]; |
| 488 | 488 |
| 489 return false; | 489 return false; |
| 490 } | 490 } |
| 491 | 491 |
| 492 bool ThemePainterMac::paintSearchFieldCancelButton(const LayoutObject& o, const
PaintInfo& paintInfo, const IntRect& r) | 492 bool ThemePainterMac::paintSearchFieldCancelButton(const LayoutObject& o, const
PaintInfo& paintInfo, const IntRect& r) |
| 493 { | 493 { |
| 494 if (!o.node()) | 494 if (!o.node()) |
| 495 return false; | 495 return false; |
| 496 Element* input = o.node()->shadowHost(); | 496 Element* input = o.node()->ownerShadowHost(); |
| 497 if (!input) | 497 if (!input) |
| 498 input = toElement(o.node()); | 498 input = toElement(o.node()); |
| 499 | 499 |
| 500 if (!input->layoutObject()->isBox()) | 500 if (!input->layoutObject()->isBox()) |
| 501 return false; | 501 return false; |
| 502 | 502 |
| 503 GraphicsContextStateSaver stateSaver(paintInfo.context); | 503 GraphicsContextStateSaver stateSaver(paintInfo.context); |
| 504 | 504 |
| 505 float zoomLevel = o.styleRef().effectiveZoom(); | 505 float zoomLevel = o.styleRef().effectiveZoom(); |
| 506 FloatRect unzoomedRect(r); | 506 FloatRect unzoomedRect(r); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; | 720 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; |
| 721 } | 721 } |
| 722 | 722 |
| 723 LocalCurrentGraphicsContext localContext(paintInfo.context, rect); | 723 LocalCurrentGraphicsContext localContext(paintInfo.context, rect); |
| 724 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), kH
IThemeOrientationNormal, 0); | 724 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), kH
IThemeOrientationNormal, 0); |
| 725 return false; | 725 return false; |
| 726 } | 726 } |
| 727 | 727 |
| 728 | 728 |
| 729 } // namespace blink | 729 } // namespace blink |
| OLD | NEW |