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

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

Issue 2942123002: Break LayoutObject dependency for NinePieceImagePainter (Closed)
Patch Set: Pass document explicitly Created 3 years, 6 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/BoxPainterBase.cpp
diff --git a/third_party/WebKit/Source/core/paint/BoxPainterBase.cpp b/third_party/WebKit/Source/core/paint/BoxPainterBase.cpp
index b059b5a701f3424f5ba88ab0a9eddbcbd48d25c9..ffde753d072264e0c235a95589fdd5d498a29367 100644
--- a/third_party/WebKit/Source/core/paint/BoxPainterBase.cpp
+++ b/third_party/WebKit/Source/core/paint/BoxPainterBase.cpp
@@ -6,6 +6,8 @@
#include "core/dom/Document.h"
#include "core/frame/Settings.h"
+#include "core/paint/BoxBorderPainter.h"
+#include "core/paint/NinePieceImagePainter.h"
#include "core/paint/PaintInfo.h"
#include "core/style/BorderEdge.h"
#include "core/style/ComputedStyle.h"
@@ -378,4 +380,25 @@ FloatRoundedRect BoxPainterBase::RoundedBorderRectForClip(
return border;
}
+void BoxPainterBase::PaintBorder(const ImageResourceObserver& obj,
+ const Document& document,
+ Node* node,
+ const PaintInfo& info,
+ const LayoutRect& rect,
+ const ComputedStyle& style,
+ BackgroundBleedAvoidance bleed_avoidance,
+ bool include_logical_left_edge,
+ bool include_logical_right_edge) {
+ // border-image is not affected by border-radius.
+ if (NinePieceImagePainter::Paint(info.context, obj, document, node, rect,
+ style, style.BorderImage())) {
+ return;
+ }
+
+ const BoxBorderPainter border_painter(rect, style, bleed_avoidance,
+ include_logical_left_edge,
+ include_logical_right_edge);
+ border_painter.PaintBorder(info, rect);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/BoxPainterBase.h ('k') | third_party/WebKit/Source/core/paint/BoxReflectionUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698