| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 paintInfo.context.clipOut(xPath); | 537 paintInfo.context.clipOut(xPath); |
| 538 paintInfo.context.rotate(deg2rad(-45.0)); | 538 paintInfo.context.rotate(deg2rad(-45.0)); |
| 539 paintInfo.context.translate(-centerX, -centerY); | 539 paintInfo.context.translate(-centerX, -centerY); |
| 540 | 540 |
| 541 paintInfo.context.setFillColor(fillColor); | 541 paintInfo.context.setFillColor(fillColor); |
| 542 paintInfo.context.fillEllipse(unzoomedRect); | 542 paintInfo.context.fillEllipse(unzoomedRect); |
| 543 | 543 |
| 544 return false; | 544 return false; |
| 545 } | 545 } |
| 546 | 546 |
| 547 bool ThemePainterMac::paintSearchFieldDecoration(const LayoutObject&, const Pain
tInfo&, const IntRect&) | |
| 548 { | |
| 549 return false; | |
| 550 } | |
| 551 | |
| 552 bool ThemePainterMac::paintSearchFieldResultsDecoration(const LayoutObject& o, c
onst PaintInfo& paintInfo, const IntRect& r) | |
| 553 { | |
| 554 if (!o.node()) | |
| 555 return false; | |
| 556 Node* input = o.node()->shadowHost(); | |
| 557 if (!input) | |
| 558 input = o.node(); | |
| 559 if (!input->layoutObject()->isBox()) | |
| 560 return false; | |
| 561 | |
| 562 GraphicsContextStateSaver stateSaver(paintInfo.context); | |
| 563 | |
| 564 float zoomLevel = o.styleRef().effectiveZoom(); | |
| 565 FloatRect unzoomedRect(r); | |
| 566 if (zoomLevel != 1) { | |
| 567 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel); | |
| 568 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel); | |
| 569 paintInfo.context.translate(unzoomedRect.x(), unzoomedRect.y()); | |
| 570 paintInfo.context.scale(zoomLevel, zoomLevel); | |
| 571 paintInfo.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); | |
| 572 } | |
| 573 | |
| 574 LocalCurrentGraphicsContext localContext(paintInfo.context, r); | |
| 575 | |
| 576 NSSearchFieldCell* search = m_layoutTheme.search(); | |
| 577 m_layoutTheme.setSearchCellState(*input->layoutObject(), r); | |
| 578 [search setControlSize:searchFieldControlSizeForFont(o.styleRef())]; | |
| 579 if ([search searchMenuTemplate] != nil) | |
| 580 [search setSearchMenuTemplate:nil]; | |
| 581 | |
| 582 m_layoutTheme.updateActiveState([search searchButtonCell], o); | |
| 583 | |
| 584 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d
ocumentViewFor(o)]; | |
| 585 [[search searchButtonCell] setControlView:nil]; | |
| 586 return false; | |
| 587 } | |
| 588 | |
| 589 } // namespace blink | 547 } // namespace blink |
| OLD | NEW |