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

Unified Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 657023006: GC::drawConvexPolygon() & friends cleanup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: speculative RenderThemeChromiumMac fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/paint/ObjectPainter.cpp ('k') | Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderThemeChromiumMac.mm
diff --git a/Source/core/rendering/RenderThemeChromiumMac.mm b/Source/core/rendering/RenderThemeChromiumMac.mm
index 1fe26fcc15bf1776ef36a393b478ffac730336a9..5d614c050a7b8bf3f14ef1f3e3cd69171387acd1 100644
--- a/Source/core/rendering/RenderThemeChromiumMac.mm
+++ b/Source/core/rendering/RenderThemeChromiumMac.mm
@@ -1098,10 +1098,7 @@ bool RenderThemeChromiumMac::paintMenuListButton(RenderObject* o, const PaintInf
if (bounds.width() < arrowWidth + arrowPaddingLeft * o->style()->effectiveZoom())
return false;
- GraphicsContextStateSaver stateSaver(*paintInfo.context);
-
- paintInfo.context->setFillColor(o->style()->visitedDependentColor(CSSPropertyColor));
- paintInfo.context->setStrokeStyle(NoStroke);
+ Color color = o->style()->visitedDependentColor(CSSPropertyColor);
FloatPoint arrow1[3];
arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0f);
@@ -1109,7 +1106,7 @@ bool RenderThemeChromiumMac::paintMenuListButton(RenderObject* o, const PaintInf
arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY - spaceBetweenArrows / 2.0f - arrowHeight);
// Draw the top arrow.
- paintInfo.context->drawConvexPolygon(3, arrow1, true);
+ paintInfo.context->fillPolygon(3, arrow1, color, true);
FloatPoint arrow2[3];
arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0f);
@@ -1117,7 +1114,7 @@ bool RenderThemeChromiumMac::paintMenuListButton(RenderObject* o, const PaintInf
arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0f, centerY + spaceBetweenArrows / 2.0f + arrowHeight);
// Draw the bottom arrow.
- paintInfo.context->drawConvexPolygon(3, arrow2, true);
+ paintInfo.context->fillPolygon(3, arrow2, color, true);
return false;
}
« no previous file with comments | « Source/core/paint/ObjectPainter.cpp ('k') | Source/platform/graphics/GraphicsContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698