| OLD | NEW |
| 1 /** | 1 /** |
| 2 * This file is part of the theme implementation for form controls in WebCore. | 2 * This file is part of the theme implementation for form controls in WebCore. |
| 3 * | 3 * |
| 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. | 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 tickRegionWidth = trackBounds.width() - thumbSize.width(); | 1003 tickRegionWidth = trackBounds.width() - thumbSize.width(); |
| 1004 } else { | 1004 } else { |
| 1005 tickRect.setWidth(floor(tickSize.height() * zoomFactor)); | 1005 tickRect.setWidth(floor(tickSize.height() * zoomFactor)); |
| 1006 tickRect.setHeight(floor(tickSize.width() * zoomFactor)); | 1006 tickRect.setHeight(floor(tickSize.width() * zoomFactor)); |
| 1007 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + sliderTickOffsetFrom
TrackCenter() * zoomFactor)); | 1007 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + sliderTickOffsetFrom
TrackCenter() * zoomFactor)); |
| 1008 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w
idth() * zoomFactor) / 2.0; | 1008 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w
idth() * zoomFactor) / 2.0; |
| 1009 tickRegionWidth = trackBounds.height() - thumbSize.width(); | 1009 tickRegionWidth = trackBounds.height() - thumbSize.width(); |
| 1010 } | 1010 } |
| 1011 RefPtr<HTMLCollection> options = dataList->options(); | 1011 RefPtr<HTMLCollection> options = dataList->options(); |
| 1012 GraphicsContextStateSaver stateSaver(*paintInfo.context); | 1012 GraphicsContextStateSaver stateSaver(*paintInfo.context); |
| 1013 paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropert
yColor), ColorSpaceDeviceRGB); | 1013 paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropert
yColor)); |
| 1014 for (unsigned i = 0; Node* node = options->item(i); i++) { | 1014 for (unsigned i = 0; Node* node = options->item(i); i++) { |
| 1015 ASSERT(node->hasTagName(optionTag)); | 1015 ASSERT(node->hasTagName(optionTag)); |
| 1016 HTMLOptionElement* optionElement = toHTMLOptionElement(node); | 1016 HTMLOptionElement* optionElement = toHTMLOptionElement(node); |
| 1017 String value = optionElement->value(); | 1017 String value = optionElement->value(); |
| 1018 if (!input->isValidValue(value)) | 1018 if (!input->isValidValue(value)) |
| 1019 continue; | 1019 continue; |
| 1020 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val
ue)); | 1020 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val
ue)); |
| 1021 double tickFraction = (parsedValue - min) / (max - min); | 1021 double tickFraction = (parsedValue - min) / (max - min); |
| 1022 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection()
? tickFraction : 1.0 - tickFraction; | 1022 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection()
? tickFraction : 1.0 - tickFraction; |
| 1023 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic
kRatio); | 1023 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic
kRatio); |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 | 1386 |
| 1387 // padding - not honored by WinIE, needs to be removed. | 1387 // padding - not honored by WinIE, needs to be removed. |
| 1388 style->resetPadding(); | 1388 style->resetPadding(); |
| 1389 | 1389 |
| 1390 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1390 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 1391 // for now, we will not honor it. | 1391 // for now, we will not honor it. |
| 1392 style->resetBorder(); | 1392 style->resetBorder(); |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 } // namespace WebCore | 1395 } // namespace WebCore |
| OLD | NEW |