Index: third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
index 5e77682a1afda0015ad8e817002838db3d982bf8..629a62af1db8178e8381b43132399a86f3ff0c94 100644 |
--- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp |
@@ -14,6 +14,7 @@ |
#include "core/style/BorderEdge.h" |
#include "core/style/ComputedStyle.h" |
#include "platform/geometry/LayoutPoint.h" |
+#include "platform/graphics/GraphicsContextStateSaver.h" |
namespace blink { |
@@ -415,8 +416,7 @@ void ObjectPainter::drawDashedOrDottedBoxSide(GraphicsContext& graphicsContext, |
bool antialias) { |
DCHECK_GT(thickness, 0); |
- bool wasAntialiased = graphicsContext.shouldAntialias(); |
- StrokeStyle oldStrokeStyle = graphicsContext.getStrokeStyle(); |
+ GraphicsContextStateSaver stateSaver(graphicsContext); |
graphicsContext.setShouldAntialias(antialias); |
graphicsContext.setStrokeColor(color); |
graphicsContext.setStrokeThickness(thickness); |
@@ -437,8 +437,6 @@ void ObjectPainter::drawDashedOrDottedBoxSide(GraphicsContext& graphicsContext, |
break; |
} |
} |
- graphicsContext.setShouldAntialias(wasAntialiased); |
- graphicsContext.setStrokeStyle(oldStrokeStyle); |
} |
void ObjectPainter::drawDoubleBoxSide(GraphicsContext& graphicsContext, |