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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 3 years, 12 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 * Copyright (C) 2007 Apple Inc. 2 * Copyright (C) 2007 Apple Inc.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2008 Collabora Ltd. 4 * Copyright (C) 2008 Collabora Ltd.
5 * Copyright (C) 2008, 2009 Google Inc. 5 * Copyright (C) 2008, 2009 Google Inc.
6 * Copyright (C) 2009 Kenneth Rohde Christiansen 6 * Copyright (C) 2009 Kenneth Rohde Christiansen
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel); 335 unzoomedRect.setWidth(unzoomedRect.width() / zoomLevel);
336 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel); 336 unzoomedRect.setHeight(unzoomedRect.height() / zoomLevel);
337 i.context.translate(unzoomedRect.x(), unzoomedRect.y()); 337 i.context.translate(unzoomedRect.x(), unzoomedRect.y());
338 i.context.scale(zoomLevel, zoomLevel); 338 i.context.scale(zoomLevel, zoomLevel);
339 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y()); 339 i.context.translate(-unzoomedRect.x(), -unzoomedRect.y());
340 } 340 }
341 341
342 Platform::current()->themeEngine()->paint( 342 Platform::current()->themeEngine()->paint(
343 canvas, WebThemeEngine::PartSliderTrack, getWebThemeState(o), 343 canvas, WebThemeEngine::PartSliderTrack, getWebThemeState(o),
344 WebRect(unzoomedRect), &extraParams); 344 WebRect(unzoomedRect), &extraParams);
345
346 return false; 345 return false;
347 } 346 }
348 347
349 bool ThemePainterDefault::paintSliderThumb(const LayoutObject& o, 348 bool ThemePainterDefault::paintSliderThumb(const LayoutObject& o,
350 const PaintInfo& i, 349 const PaintInfo& i,
351 const IntRect& rect) { 350 const IntRect& rect) {
352 WebThemeEngine::ExtraParams extraParams; 351 WebThemeEngine::ExtraParams extraParams;
353 WebCanvas* canvas = i.context.canvas(); 352 WebCanvas* canvas = i.context.canvas();
354 extraParams.slider.vertical = 353 extraParams.slider.vertical =
355 o.styleRef().appearance() == SliderThumbVerticalPart; 354 o.styleRef().appearance() == SliderThumbVerticalPart;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 DEFINE_STATIC_REF(Image, cancelPressedImage, 460 DEFINE_STATIC_REF(Image, cancelPressedImage,
462 (Image::loadPlatformResource("searchCancelPressed"))); 461 (Image::loadPlatformResource("searchCancelPressed")));
463 paintInfo.context.drawImage(LayoutTheme::isPressed(cancelButtonObject) 462 paintInfo.context.drawImage(LayoutTheme::isPressed(cancelButtonObject)
464 ? cancelPressedImage 463 ? cancelPressedImage
465 : cancelImage, 464 : cancelImage,
466 paintingRect); 465 paintingRect);
467 return false; 466 return false;
468 } 467 }
469 468
470 } // namespace blink 469 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainter.cpp ('k') | third_party/WebKit/Source/core/paint/ThemePainterMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698