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

Unified Diff: third_party/WebKit/Source/core/paint/ObjectPainter.cpp

Issue 2711983002: Paint dotted borders using circular dots (Closed)
Patch Set: Refactor isDashedStroke Created 3 years, 9 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
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,

Powered by Google App Engine
This is Rietveld 408576698