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

Side by Side Diff: Source/core/paint/ThemePainterMac.mm

Issue 1093673002: Removing the dependency on GraphicsContext for drawing images in 2D canvas (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixup Created 5 years, 6 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 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 420 }
421 421
422 FloatRect borderBounds = unzoomedRect; 422 FloatRect borderBounds = unzoomedRect;
423 borderBounds.inflate(LayoutThemeMac::sliderThumbBorderWidth / 2.0); 423 borderBounds.inflate(LayoutThemeMac::sliderThumbBorderWidth / 2.0);
424 424
425 borderBounds.inflate(-LayoutThemeMac::sliderThumbBorderWidth); 425 borderBounds.inflate(-LayoutThemeMac::sliderThumbBorderWidth);
426 FloatSize shadowOffset(0, 1); 426 FloatSize shadowOffset(0, 1);
427 paintInfo.context->setShadow(shadowOffset, LayoutThemeMac::sliderThumbShadow Blur, shadowColor); 427 paintInfo.context->setShadow(shadowOffset, LayoutThemeMac::sliderThumbShadow Blur, shadowColor);
428 paintInfo.context->setFillColor(Color::black); 428 paintInfo.context->setFillColor(Color::black);
429 paintInfo.context->fillEllipse(borderBounds); 429 paintInfo.context->fillEllipse(borderBounds);
430 paintInfo.context->clearShadow(); 430 paintInfo.context->clearDrawLooper();
431 431
432 IntRect fillBounds = enclosedIntRect(unzoomedRect); 432 IntRect fillBounds = enclosedIntRect(unzoomedRect);
433 RefPtr<Gradient> fillGradient = Gradient::create(fillBounds.minXMinYCorner() , fillBounds.minXMaxYCorner()); 433 RefPtr<Gradient> fillGradient = Gradient::create(fillBounds.minXMinYCorner() , fillBounds.minXMaxYCorner());
434 fillGradient->addColorStop(0.0, fillGradientTopColor); 434 fillGradient->addColorStop(0.0, fillGradientTopColor);
435 fillGradient->addColorStop(0.52, fillGradientUpperMiddleColor); 435 fillGradient->addColorStop(0.52, fillGradientUpperMiddleColor);
436 fillGradient->addColorStop(0.52, fillGradientLowerMiddleColor); 436 fillGradient->addColorStop(0.52, fillGradientLowerMiddleColor);
437 fillGradient->addColorStop(1.0, fillGradientBottomColor); 437 fillGradient->addColorStop(1.0, fillGradientBottomColor);
438 paintInfo.context->setFillGradient(fillGradient); 438 paintInfo.context->setFillGradient(fillGradient);
439 paintInfo.context->fillEllipse(borderBounds); 439 paintInfo.context->fillEllipse(borderBounds);
440 440
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 [search setSearchMenuTemplate:nil]; 594 [search setSearchMenuTemplate:nil];
595 595
596 m_layoutTheme.updateActiveState([search searchButtonCell], o); 596 m_layoutTheme.updateActiveState([search searchButtonCell], o);
597 597
598 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)]; 598 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)];
599 [[search searchButtonCell] setControlView:nil]; 599 [[search searchButtonCell] setControlView:nil];
600 return false; 600 return false;
601 } 601 }
602 602
603 } // namespace blink 603 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698