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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 tickRect.setY(floor(rect.y() + rect.height() / 2.0 + LayoutTheme::theme( ).sliderTickOffsetFromTrackCenter() * zoomFactor)); 293 tickRect.setY(floor(rect.y() + rect.height() / 2.0 + LayoutTheme::theme( ).sliderTickOffsetFromTrackCenter() * zoomFactor));
294 tickRegionSideMargin = trackBounds.x() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0; 294 tickRegionSideMargin = trackBounds.x() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0;
295 tickRegionWidth = trackBounds.width() - thumbSize.width(); 295 tickRegionWidth = trackBounds.width() - thumbSize.width();
296 } else { 296 } else {
297 tickRect.setWidth(floor(tickSize.height() * zoomFactor)); 297 tickRect.setWidth(floor(tickSize.height() * zoomFactor));
298 tickRect.setHeight(floor(tickSize.width() * zoomFactor)); 298 tickRect.setHeight(floor(tickSize.width() * zoomFactor));
299 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + LayoutTheme::theme() .sliderTickOffsetFromTrackCenter() * zoomFactor)); 299 tickRect.setX(floor(rect.x() + rect.width() / 2.0 + LayoutTheme::theme() .sliderTickOffsetFromTrackCenter() * zoomFactor));
300 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0; 300 tickRegionSideMargin = trackBounds.y() + (thumbSize.width() - tickSize.w idth() * zoomFactor) / 2.0;
301 tickRegionWidth = trackBounds.height() - thumbSize.width(); 301 tickRegionWidth = trackBounds.height() - thumbSize.width();
302 } 302 }
303 RefPtrWillBeRawPtr<HTMLDataListOptionsCollection> options = dataList->option s(); 303 RawPtr<HTMLDataListOptionsCollection> options = dataList->options();
304 for (unsigned i = 0; HTMLOptionElement* optionElement = options->item(i); i+ +) { 304 for (unsigned i = 0; HTMLOptionElement* optionElement = options->item(i); i+ +) {
305 String value = optionElement->value(); 305 String value = optionElement->value();
306 if (!input->isValidValue(value)) 306 if (!input->isValidValue(value))
307 continue; 307 continue;
308 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val ue)); 308 double parsedValue = parseToDoubleForNumberType(input->sanitizeValue(val ue));
309 double tickFraction = (parsedValue - min) / (max - min); 309 double tickFraction = (parsedValue - min) / (max - min);
310 double tickRatio = isHorizontal && o.styleRef().isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction; 310 double tickRatio = isHorizontal && o.styleRef().isLeftToRightDirection() ? tickFraction : 1.0 - tickFraction;
311 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio); 311 double tickPosition = round(tickRegionSideMargin + tickRegionWidth * tic kRatio);
312 if (isHorizontal) 312 if (isHorizontal)
313 tickRect.setX(tickPosition); 313 tickRect.setX(tickPosition);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); 369 i.context.translate(unzoomedRect.x(), unzoomedRect.y());
370 i.context.scale(zoomLevel, zoomLevel); 370 i.context.scale(zoomLevel, zoomLevel);
371 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); 371 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y());
372 } 372 }
373 373
374 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam s); 374 Platform::current()->fallbackThemeEngine()->paint(canvas, WebFallbackThemeEn gine::PartRadio, getWebFallbackThemeState(o), WebRect(unzoomedRect), &extraParam s);
375 return false; 375 return false;
376 } 376 }
377 377
378 } // namespace blink 378 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698