Bug 41818 - Calling layoutTestController.layerTreeAsText() should update layout
Summary: Calling layoutTestController.layerTreeAsText() should update layout
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-07 17:37 PDT by Simon Fraser (smfr)
Modified: 2010-07-09 18:18 PDT (History)
1 user (show)

See Also:


Attachments
Patch (13.71 KB, patch)
2010-07-08 17:34 PDT, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff
Patch (15.64 KB, patch)
2010-07-09 17:20 PDT, Simon Fraser (smfr)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-07-07 17:37:23 PDT
If a test calls layoutTestController.layerTreeAsText() to fetch the layer tree, we should do any pending layouts and make sure the layer tree is up-to-date.
Comment 1 Simon Fraser (smfr) 2010-07-08 17:34:57 PDT
Created attachment 60988 [details]
Patch
Comment 2 Simon Fraser (smfr) 2010-07-08 22:11:54 PDT
http://trac.webkit.org/changeset/62892
Comment 3 Simon Fraser (smfr) 2010-07-09 16:00:36 PDT
Fix was bad :(
Comment 4 Simon Fraser (smfr) 2010-07-09 16:00:42 PDT
diff --git a/WebCore/page/Frame.cpp b/WebCore/page/Frame.cpp
index b3c01eb..5c878b2 100644
--- a/WebCore/page/Frame.cpp
+++ b/WebCore/page/Frame.cpp
@@ -1602,6 +1602,8 @@ IntRect Frame::tiledBackingStoreVisibleRect()
 String Frame::layerTreeAsText() const
 {
 #if USE(ACCELERATED_COMPOSITING)
+    document()->updateLayout();
+
     if (!contentRenderer())
         return String();
 
@@ -1609,8 +1611,6 @@ String Frame::layerTreeAsText() const
     if (!rootLayer)
         return String();
 
-    document()->updateLayout();
-
     return rootLayer->layerTreeAsText();
 #else
     return String();
Comment 5 Simon Fraser (smfr) 2010-07-09 17:20:01 PDT
Created attachment 61117 [details]
Patch
Comment 6 Simon Fraser (smfr) 2010-07-09 18:18:24 PDT
http://trac.webkit.org/changeset/63022