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

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

Issue 2392443009: reflow comments in core/paint (Closed)
Patch Set: Created 4 years, 2 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 case TextAreaPart: 157 case TextAreaPart:
158 return true; 158 return true;
159 case SearchFieldPart: 159 case SearchFieldPart:
160 return paintSearchField(o, paintInfo, r); 160 return paintSearchField(o, paintInfo, r);
161 case SearchFieldCancelButtonPart: 161 case SearchFieldCancelButtonPart:
162 return paintSearchFieldCancelButton(o, paintInfo, r); 162 return paintSearchFieldCancelButton(o, paintInfo, r);
163 default: 163 default:
164 break; 164 break;
165 } 165 }
166 166
167 return true; // We don't support the appearance, so let the normal background /border paint. 167 return true; // We don't support the appearance, so let the normal
168 // background/border paint.
168 } 169 }
169 170
170 bool ThemePainter::paintBorderOnly(const LayoutObject& o, 171 bool ThemePainter::paintBorderOnly(const LayoutObject& o,
171 const PaintInfo& paintInfo, 172 const PaintInfo& paintInfo,
172 const IntRect& r) { 173 const IntRect& r) {
173 // Call the appropriate paint method based off the appearance value. 174 // Call the appropriate paint method based off the appearance value.
174 switch (o.styleRef().appearance()) { 175 switch (o.styleRef().appearance()) {
175 case TextFieldPart: 176 case TextFieldPart:
176 UseCounter::count(o.document(), 177 UseCounter::count(o.document(),
177 UseCounter::CSSValueAppearanceTextFieldRendered); 178 UseCounter::CSSValueAppearanceTextFieldRendered);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 IntSize tickSize = LayoutTheme::theme().sliderTickSize(); 283 IntSize tickSize = LayoutTheme::theme().sliderTickSize();
283 float zoomFactor = o.styleRef().effectiveZoom(); 284 float zoomFactor = o.styleRef().effectiveZoom();
284 FloatRect tickRect; 285 FloatRect tickRect;
285 int tickRegionSideMargin = 0; 286 int tickRegionSideMargin = 0;
286 int tickRegionWidth = 0; 287 int tickRegionWidth = 0;
287 IntRect trackBounds; 288 IntRect trackBounds;
288 LayoutObject* trackLayoutObject = 289 LayoutObject* trackLayoutObject =
289 input->userAgentShadowRoot() 290 input->userAgentShadowRoot()
290 ->getElementById(ShadowElementNames::sliderTrack()) 291 ->getElementById(ShadowElementNames::sliderTrack())
291 ->layoutObject(); 292 ->layoutObject();
292 // We can ignoring transforms because transform is handled by the graphics con text. 293 // We can ignoring transforms because transform is handled by the graphics
294 // context.
293 if (trackLayoutObject) 295 if (trackLayoutObject)
294 trackBounds = 296 trackBounds =
295 trackLayoutObject->absoluteBoundingBoxRectIgnoringTransforms(); 297 trackLayoutObject->absoluteBoundingBoxRectIgnoringTransforms();
296 IntRect sliderBounds = o.absoluteBoundingBoxRectIgnoringTransforms(); 298 IntRect sliderBounds = o.absoluteBoundingBoxRectIgnoringTransforms();
297 299
298 // Make position relative to the transformed ancestor element. 300 // Make position relative to the transformed ancestor element.
299 trackBounds.setX(trackBounds.x() - sliderBounds.x() + rect.x()); 301 trackBounds.setX(trackBounds.x() - sliderBounds.x() + rect.x());
300 trackBounds.setY(trackBounds.y() - sliderBounds.y() + rect.y()); 302 trackBounds.setY(trackBounds.y() - sliderBounds.y() + rect.y());
301 303
302 if (isHorizontal) { 304 if (isHorizontal) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); 403 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y());
402 } 404 }
403 405
404 Platform::current()->fallbackThemeEngine()->paint( 406 Platform::current()->fallbackThemeEngine()->paint(
405 canvas, WebFallbackThemeEngine::PartRadio, getWebFallbackThemeState(o), 407 canvas, WebFallbackThemeEngine::PartRadio, getWebFallbackThemeState(o),
406 WebRect(unzoomedRect), &extraParams); 408 WebRect(unzoomedRect), &extraParams);
407 return false; 409 return false;
408 } 410 }
409 411
410 } // namespace blink 412 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainter.h ('k') | third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698