Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: Source/core/rendering/RenderTheme.cpp

Issue 19697011: Change rendering code to use RenderObject::resolveColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 tickRegionWidth = trackBounds.width() - thumbSize.width(); 1008 tickRegionWidth = trackBounds.width() - thumbSize.width();
1009 } else { 1009 } else {
1010 tickRect.setWidth(floor(tickSize.height() * zoomFactor)); 1010 tickRect.setWidth(floor(tickSize.height() * zoomFactor));
1011 tickRect.setHeight(floor(tickSize.width() * zoomFactor)); 1011 tickRect.setHeight(floor(tickSize.width() * zoomFactor));
1012 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + sliderTickOffsetFrom TrackCenter() * zoomFactor)); 1012 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + sliderTickOffsetFrom TrackCenter() * zoomFactor));
1013 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0; 1013 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0;
1014 tickRegionWidth = trackBounds.height() - thumbSize.width(); 1014 tickRegionWidth = trackBounds.height() - thumbSize.width();
1015 } 1015 }
1016 RefPtr<HTMLCollection> options = dataList->options(); 1016 RefPtr<HTMLCollection> options = dataList->options();
1017 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1017 GraphicsContextStateSaver stateSaver(*paintInfo.context);
1018 paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropert yColor)); 1018 paintInfo.context->setFillColor(o->resolveColor(CSSPropertyColor));
1019 for (unsigned i = 0; Node* node = options->item(i); i++) { 1019 for (unsigned i = 0; Node* node = options->item(i); i++) {
1020 ASSERT(node->hasTagName(optionTag)); 1020 ASSERT(node->hasTagName(optionTag));
1021 HTMLOptionElement* optionElement = toHTMLOptionElement(node); 1021 HTMLOptionElement* optionElement = toHTMLOptionElement(node);
1022 String value = optionElement->value(); 1022 String value = optionElement->value();
1023 if (!input->isValidValue(value)) 1023 if (!input->isValidValue(value))
1024 continue; 1024 continue;
1025 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val ue)); 1025 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val ue));
1026 double tickFraction = (parsedValue - min) / (max - min); 1026 double tickFraction = (parsedValue - min) / (max - min);
1027 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction; 1027 double tickRatio = isHorizontal && o->style()->isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction;
1028 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio); 1028 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 1381
1382 // padding - not honored by WinIE, needs to be removed. 1382 // padding - not honored by WinIE, needs to be removed.
1383 style->resetPadding(); 1383 style->resetPadding();
1384 1384
1385 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme) 1385 // border - honored by WinIE, but looks terrible (just paints in the control box and turns off the Windows XP theme)
1386 // for now, we will not honor it. 1386 // for now, we will not honor it.
1387 style->resetBorder(); 1387 style->resetBorder();
1388 } 1388 }
1389 1389
1390 } // namespace WebCore 1390 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableCell.cpp ('k') | Source/core/rendering/RenderThemeChromiumDefault.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698