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

Side by Side Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 620673006: Fix progress bar regression on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | Source/platform/mac/LocalCurrentGraphicsContext.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 trackInfo.trackInfo.progress.phase = lround(renderProgress->animationProgres s() * nextafter(progressAnimationNumFrames, 0)); 1045 trackInfo.trackInfo.progress.phase = lround(renderProgress->animationProgres s() * nextafter(progressAnimationNumFrames, 0));
1046 trackInfo.attributes = kThemeTrackHorizontal; 1046 trackInfo.attributes = kThemeTrackHorizontal;
1047 trackInfo.enableState = isActive(renderObject) ? kThemeTrackActive : kThemeT rackInactive; 1047 trackInfo.enableState = isActive(renderObject) ? kThemeTrackActive : kThemeT rackInactive;
1048 trackInfo.reserved = 0; 1048 trackInfo.reserved = 0;
1049 trackInfo.filler1 = 0; 1049 trackInfo.filler1 = 0;
1050 1050
1051 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(inflatedRect.size()); 1051 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(inflatedRect.size());
1052 if (!imageBuffer) 1052 if (!imageBuffer)
1053 return true; 1053 return true;
1054 1054
1055 ContextContainer cgContextContainer(imageBuffer->context(), inflatedRect); 1055 LocalCurrentGraphicsContext localContext(imageBuffer->context(), IntRect(Int Point(), inflatedRect.size()));
1056 CGContextRef cgContext = cgContextContainer.context(); 1056 CGContextRef cgContext = localContext.cgContext();
1057 HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal); 1057 HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
1058 1058
1059 GraphicsContextStateSaver stateSaver(*paintInfo.context); 1059 GraphicsContextStateSaver stateSaver(*paintInfo.context);
1060 1060
1061 if (!renderProgress->style()->isLeftToRightDirection()) { 1061 if (!renderProgress->style()->isLeftToRightDirection()) {
1062 paintInfo.context->translate(2 * inflatedRect.x() + inflatedRect.width() , 0); 1062 paintInfo.context->translate(2 * inflatedRect.x() + inflatedRect.width() , 0);
1063 paintInfo.context->scale(-1, 1); 1063 paintInfo.context->scale(-1, 1);
1064 } 1064 }
1065 1065
1066 paintInfo.context->drawImageBuffer(imageBuffer.get(), 1066 paintInfo.context->drawImageBuffer(imageBuffer.get(),
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 1874
1875 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const 1875 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const
1876 { 1876 {
1877 ControlPart part = style->appearance(); 1877 ControlPart part = style->appearance();
1878 if (part == CheckboxPart || part == RadioPart) 1878 if (part == CheckboxPart || part == RadioPart)
1879 return style->effectiveZoom() != 1; 1879 return style->effectiveZoom() != 1;
1880 return false; 1880 return false;
1881 } 1881 }
1882 1882
1883 } // namespace blink 1883 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/mac/LocalCurrentGraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698