Index: sky/engine/core/dom/Element.cpp |
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp |
index c6452401ce22d976196de8cb296406c52febfc17..61ac9eaa38ed11b280c34b84bfc7327bbe0c1dc8 100644 |
--- a/sky/engine/core/dom/Element.cpp |
+++ b/sky/engine/core/dom/Element.cpp |
@@ -78,6 +78,7 @@ |
#include "sky/engine/core/page/Page.h" |
#include "sky/engine/core/painting/PaintingCallback.h" |
#include "sky/engine/core/painting/PaintingTasks.h" |
+#include "sky/engine/core/painting/PictureRecorder.h" |
#include "sky/engine/core/rendering/RenderCustomLayout.h" |
#include "sky/engine/core/rendering/RenderLayer.h" |
#include "sky/engine/core/rendering/RenderView.h" |
@@ -1685,4 +1686,18 @@ bool Element::affectedByIdSelector(const AtomicString& idValue) const |
return false; |
} |
+void Element::paint(PictureRecorder* recorder) |
+{ |
+ if (!renderer() || !renderer()->isBox()) |
+ return; |
+ RenderBox* box = toRenderBox(renderer()); |
+ GraphicsContext context(recorder->skCanvas()); |
+ |
+ // Very simplified painting to allow painting an arbitrary (layer-less) subtree. |
+ Vector<RenderBox*> layers; |
+ PaintInfo paintInfo(&context, box->absoluteBoundingBoxRect(), box); |
+ box->paint(paintInfo, LayoutPoint(), layers); |
+ // Note we're ignoring any layers encountered. |
+} |
+ |
} // namespace blink |