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

Side by Side Diff: third_party/WebKit/Source/core/paint/ThemePainter.cpp

Issue 1853743005: Oilpan: Remove WillBe types (part 13) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 tickRect.setY(floor(rect.y() + rect.height() / 2.0 + LayoutTheme::theme( ).sliderTickOffsetFromTrackCenter() * zoomFactor)); 275 tickRect.setY(floor(rect.y() + rect.height() / 2.0 + LayoutTheme::theme( ).sliderTickOffsetFromTrackCenter() * zoomFactor));
276 tickRegionSideMargin = trackBounds.x() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0; 276 tickRegionSideMargin = trackBounds.x() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0;
277 tickRegionWidth = trackBounds.width() - thumbSize.width(); 277 tickRegionWidth = trackBounds.width() - thumbSize.width();
278 } else { 278 } else {
279 tickRect.setWidth(floor(tickSize.height() * zoomFactor)); 279 tickRect.setWidth(floor(tickSize.height() * zoomFactor));
280 tickRect.setHeight(floor(tickSize.width() * zoomFactor)); 280 tickRect.setHeight(floor(tickSize.width() * zoomFactor));
281 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + LayoutTheme::theme() .sliderTickOffsetFromTrackCenter() * zoomFactor)); 281 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + LayoutTheme::theme() .sliderTickOffsetFromTrackCenter() * zoomFactor));
282 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0; 282 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0;
283 tickRegionWidth = trackBounds.height() - thumbSize.width(); 283 tickRegionWidth = trackBounds.height() - thumbSize.width();
284 } 284 }
285 RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->option s(); 285 RawPtr<HTMLDataListOptionsCollection> options = dataList->options();
286 for (unsigned i = 0; HTMLOptionElement* optionElement = options->item(i); i+ +) { 286 for (unsigned i = 0; HTMLOptionElement* optionElement = options->item(i); i+ +) {
287 String value = optionElement->value(); 287 String value = optionElement->value();
288 if (!input->isValidValue(value)) 288 if (!input->isValidValue(value))
289 continue; 289 continue;
290 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val ue)); 290 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val ue));
291 double tickFraction = (parsedValue - min) / (max - min); 291 double tickFraction = (parsedValue - min) / (max - min);
292 double tickRatio = isHorizontal && o.styleRef().isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction; 292 double tickRatio = isHorizontal && o.styleRef().isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction;
293 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio); 293 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio);
294 if (isHorizontal) 294 if (isHorizontal)
295 tickRect.setX(tickPosition); 295 tickRect.setX(tickPosition);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); 351 i.context.translate(unzoomedRect.x(), unzoomedRect.y());
352 i.context.scale(zoomLevel, zoomLevel); 352 i.context.scale(zoomLevel, zoomLevel);
353 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); 353 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y());
354 } 354 }
355 355
356 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam s); 356 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam s);
357 return false; 357 return false;
358 } 358 }
359 359
360 } // namespace blink 360 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698