| 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 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 style->setPaddingBottom(Length(padding, Fixed)); | 1536 style->setPaddingBottom(Length(padding, Fixed)); |
| 1537 | 1537 |
| 1538 NSControlSize controlSize = controlSizeForFont(style); | 1538 NSControlSize controlSize = controlSizeForFont(style); |
| 1539 setFontFromControlSize(styleResolver, style, controlSize); | 1539 setFontFromControlSize(styleResolver, style, controlSize); |
| 1540 | 1540 |
| 1541 style->setBoxShadow(nullptr); | 1541 style->setBoxShadow(nullptr); |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 bool RenderThemeChromiumMac::paintSearchFieldCancelButton(RenderObject* o, const
PaintInfo& paintInfo, const IntRect& r) | 1544 bool RenderThemeChromiumMac::paintSearchFieldCancelButton(RenderObject* o, const
PaintInfo& paintInfo, const IntRect& r) |
| 1545 { | 1545 { |
| 1546 const Handle<Element>& input = o->node()->shadowHost(); | 1546 Handle<Element> input = adoptRawResult(o->node()->shadowHost()); |
| 1547 if (!input) | 1547 if (!input) |
| 1548 input = toElement(o->node()); | 1548 input = toElement(o->node()); |
| 1549 | 1549 |
| 1550 if (!input->renderer()->isBox()) | 1550 if (!input->renderer()->isBox()) |
| 1551 return false; | 1551 return false; |
| 1552 | 1552 |
| 1553 LocalCurrentGraphicsContext localContext(paintInfo.context); | 1553 LocalCurrentGraphicsContext localContext(paintInfo.context); |
| 1554 setSearchCellState(input->renderer(), r); | 1554 setSearchCellState(input->renderer(), r); |
| 1555 | 1555 |
| 1556 NSSearchFieldCell* search = this->search(); | 1556 NSSearchFieldCell* search = this->search(); |
| 1557 | 1557 |
| 1558 if (!input->isDisabledFormControl() && (input->isTextFormControl() && !toHTM
LTextFormControlElement(input)->isReadOnly())) { | 1558 if (!input->isDisabledFormControl() && (input->isTextFormControl() && !toHTM
LTextFormControlElement(input.raw())->isReadOnly())) { |
| 1559 updateActiveState([search cancelButtonCell], o); | 1559 updateActiveState([search cancelButtonCell], o); |
| 1560 updatePressedState([search cancelButtonCell], o); | 1560 updatePressedState([search cancelButtonCell], o); |
| 1561 } | 1561 } |
| 1562 else if ([[search cancelButtonCell] isHighlighted]) | 1562 else if ([[search cancelButtonCell] isHighlighted]) |
| 1563 [[search cancelButtonCell] setHighlighted:NO]; | 1563 [[search cancelButtonCell] setHighlighted:NO]; |
| 1564 | 1564 |
| 1565 GraphicsContextStateSaver stateSaver(*paintInfo.context); | 1565 GraphicsContextStateSaver stateSaver(*paintInfo.context); |
| 1566 | 1566 |
| 1567 float zoomLevel = o->style()->effectiveZoom(); | 1567 float zoomLevel = o->style()->effectiveZoom(); |
| 1568 | 1568 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 void RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle(StyleResolv
er*, RenderStyle* style, const Handle<Element>&) const | 1630 void RenderThemeChromiumMac::adjustSearchFieldResultsDecorationStyle(StyleResolv
er*, RenderStyle* style, const Handle<Element>&) const |
| 1631 { | 1631 { |
| 1632 IntSize size = sizeForSystemFont(style, resultsButtonSizes()); | 1632 IntSize size = sizeForSystemFont(style, resultsButtonSizes()); |
| 1633 style->setWidth(Length(size.width(), Fixed)); | 1633 style->setWidth(Length(size.width(), Fixed)); |
| 1634 style->setHeight(Length(size.height(), Fixed)); | 1634 style->setHeight(Length(size.height(), Fixed)); |
| 1635 style->setBoxShadow(nullptr); | 1635 style->setBoxShadow(nullptr); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 bool RenderThemeChromiumMac::paintSearchFieldResultsDecoration(RenderObject* o,
const PaintInfo& paintInfo, const IntRect& r) | 1638 bool RenderThemeChromiumMac::paintSearchFieldResultsDecoration(RenderObject* o,
const PaintInfo& paintInfo, const IntRect& r) |
| 1639 { | 1639 { |
| 1640 Node* input = o->node()->shadowHost(); | 1640 Handle<Node> input = adoptRawResult(o->node()->shadowHost()); |
| 1641 if (!input) | 1641 if (!input) |
| 1642 input = o->node(); | 1642 input = o->node(); |
| 1643 if (!input->renderer()->isBox()) | 1643 if (!input->renderer()->isBox()) |
| 1644 return false; | 1644 return false; |
| 1645 | 1645 |
| 1646 LocalCurrentGraphicsContext localContext(paintInfo.context); | 1646 LocalCurrentGraphicsContext localContext(paintInfo.context); |
| 1647 setSearchCellState(input->renderer(), r); | 1647 setSearchCellState(input->renderer(), r); |
| 1648 | 1648 |
| 1649 NSSearchFieldCell* search = this->search(); | 1649 NSSearchFieldCell* search = this->search(); |
| 1650 | 1650 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1665 void RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle(StyleResolver*,
RenderStyle* style, const Handle<Element>&) const | 1665 void RenderThemeChromiumMac::adjustSearchFieldResultsButtonStyle(StyleResolver*,
RenderStyle* style, const Handle<Element>&) const |
| 1666 { | 1666 { |
| 1667 IntSize size = sizeForSystemFont(style, resultsButtonSizes()); | 1667 IntSize size = sizeForSystemFont(style, resultsButtonSizes()); |
| 1668 style->setWidth(Length(size.width() + resultsArrowWidth, Fixed)); | 1668 style->setWidth(Length(size.width() + resultsArrowWidth, Fixed)); |
| 1669 style->setHeight(Length(size.height(), Fixed)); | 1669 style->setHeight(Length(size.height(), Fixed)); |
| 1670 style->setBoxShadow(nullptr); | 1670 style->setBoxShadow(nullptr); |
| 1671 } | 1671 } |
| 1672 | 1672 |
| 1673 bool RenderThemeChromiumMac::paintSearchFieldResultsButton(RenderObject* o, cons
t PaintInfo& paintInfo, const IntRect& r) | 1673 bool RenderThemeChromiumMac::paintSearchFieldResultsButton(RenderObject* o, cons
t PaintInfo& paintInfo, const IntRect& r) |
| 1674 { | 1674 { |
| 1675 Node* input = o->node()->shadowHost(); | 1675 Handle<Node> input = adoptRawResult(o->node()->shadowHost()); |
| 1676 if (!input) | 1676 if (!input) |
| 1677 input = o->node(); | 1677 input = o->node(); |
| 1678 if (!input->renderer()->isBox()) | 1678 if (!input->renderer()->isBox()) |
| 1679 return false; | 1679 return false; |
| 1680 | 1680 |
| 1681 LocalCurrentGraphicsContext localContext(paintInfo.context); | 1681 LocalCurrentGraphicsContext localContext(paintInfo.context); |
| 1682 setSearchCellState(input->renderer(), r); | 1682 setSearchCellState(input->renderer(), r); |
| 1683 | 1683 |
| 1684 NSSearchFieldCell* search = this->search(); | 1684 NSSearchFieldCell* search = this->search(); |
| 1685 | 1685 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1969 { | 1969 { |
| 1970 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr
eenButton, object, paintInfo, rect); | 1970 return RenderMediaControlsChromium::paintMediaControlsPart(MediaEnterFullscr
eenButton, object, paintInfo, rect); |
| 1971 } | 1971 } |
| 1972 | 1972 |
| 1973 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject*
object, const PaintInfo& paintInfo, const IntRect& rect) | 1973 bool RenderThemeChromiumMac::paintMediaToggleClosedCaptionsButton(RenderObject*
object, const PaintInfo& paintInfo, const IntRect& rect) |
| 1974 { | 1974 { |
| 1975 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa
ptionsButton, object, paintInfo, rect); | 1975 return RenderMediaControlsChromium::paintMediaControlsPart(MediaShowClosedCa
ptionsButton, object, paintInfo, rect); |
| 1976 } | 1976 } |
| 1977 | 1977 |
| 1978 } // namespace WebCore | 1978 } // namespace WebCore |
| OLD | NEW |