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

Unified Diff: Source/core/testing/Internals.cpp

Issue 13467028: Add an intermediate function to generate 2 paint-order lists. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix rebase mistake Created 7 years, 8 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: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 15d1d3ffe345cb8a806c76a6812c608d5fa43e75..f8231193674a86667f16c204503392505660193a 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1542,6 +1542,54 @@ String Internals::layerTreeAsText(Document* document, ExceptionCode& ec) const
return layerTreeAsText(document, 0, ec);
}
+PassRefPtr<NodeList> Internals::paintOrderListBeforePromote(Element* element, ExceptionCode& ec)
+{
+ if (!element) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ element->document()->updateLayout();
+
+ RenderObject* renderer = element->renderer();
+ if (!renderer || !renderer->isBox()) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ RenderLayer* layer = toRenderBox(renderer)->layer();
+ if (!layer) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ return layer->paintOrderListBeforePromote();
+}
+
+PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, ExceptionCode& ec)
+{
+ if (!element) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ element->document()->updateLayout();
+
+ RenderObject* renderer = element->renderer();
+ if (!renderer || !renderer->isBox()) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ RenderLayer* layer = toRenderBox(renderer)->layer();
+ if (!layer) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ return layer->paintOrderListAfterPromote();
+}
+
String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode& ec) const
{
if (!document || !document->frame()) {

Powered by Google App Engine
This is Rietveld 408576698