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

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

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Added 2 changes in mac files Created 4 years 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) 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 CGPathAddLineToPoint(shape, NULL, 6.25, 14.25); 128 CGPathAddLineToPoint(shape, NULL, 6.25, 14.25);
129 CGPathAddLineToPoint(shape, NULL, 10.75, 14.25); 129 CGPathAddLineToPoint(shape, NULL, 10.75, 14.25);
130 CGPathAddLineToPoint(shape, NULL, 10.75, 12); 130 CGPathAddLineToPoint(shape, NULL, 10.75, 12);
131 131
132 // Scale and translate the shape. 132 // Scale and translate the shape.
133 CGRect cgr = r; 133 CGRect cgr = r;
134 CGFloat maxX = CGRectGetMaxX(cgr); 134 CGFloat maxX = CGRectGetMaxX(cgr);
135 CGFloat minX = CGRectGetMinX(cgr); 135 CGFloat minX = CGRectGetMinX(cgr);
136 CGFloat minY = CGRectGetMinY(cgr); 136 CGFloat minY = CGRectGetMinY(cgr);
137 CGFloat heightScale = r.height() / kSquareSize; 137 CGFloat heightScale = r.height() / kSquareSize;
138 bool isRTL = o.styleRef().direction() == RTL; 138 const bool isRTL = o.styleRef().direction() == TextDirection::Rtl;
sashab 2016/12/07 05:40:26 here
139 CGAffineTransform transform = 139 CGAffineTransform transform =
140 CGAffineTransformMake(heightScale, 0, // A B 140 CGAffineTransformMake(heightScale, 0, // A B
141 0, heightScale, // C D 141 0, heightScale, // C D
142 isRTL ? minX : maxX - r.height(), minY); // Tx Ty 142 isRTL ? minX : maxX - r.height(), minY); // Tx Ty
143 143
144 CGMutablePathRef paintPath = CGPathCreateMutable(); 144 CGMutablePathRef paintPath = CGPathCreateMutable();
145 CGPathAddPath(paintPath, &transform, shape); 145 CGPathAddPath(paintPath, &transform, shape);
146 CGPathRelease(shape); 146 CGPathRelease(shape);
147 147
148 CGContextSetRGBFillColor(c, 0, 0, 0, 0.4); 148 CGContextSetRGBFillColor(c, 0, 0, 0, 0.4);
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1; 802 backgroundBounds.origin.y = bounds.origin.y + (heightDiff / 2) + 1;
803 } 803 }
804 804
805 LocalCurrentGraphicsContext localContext(paintInfo.context, rect); 805 LocalCurrentGraphicsContext localContext(paintInfo.context, rect);
806 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(), 806 HIThemeDrawButton(&backgroundBounds, &drawInfo, localContext.cgContext(),
807 kHIThemeOrientationNormal, 0); 807 kHIThemeOrientationNormal, 0);
808 return false; 808 return false;
809 } 809 }
810 810
811 } // namespace blink 811 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698