Title: [150067] trunk/LayoutTests
Revision
150067
Author
abu...@adobe.com
Date
2013-05-14 05:51:59 -0700 (Tue, 14 May 2013)

Log Message

Modify checkLayout to receive the log container as an optional parameter
https://bugs.webkit.org/show_bug.cgi?id=112793

Reviewed by Darin Adler.

Add a way to specify the container manually for checkLayout. This is helpful to measure regions for nested
named flows (and probably other cases as well).

* resources/check-layout.js: Added an optional parameter to window.checkLayout.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (150066 => 150067)


--- trunk/LayoutTests/ChangeLog	2013-05-14 12:49:06 UTC (rev 150066)
+++ trunk/LayoutTests/ChangeLog	2013-05-14 12:51:59 UTC (rev 150067)
@@ -1,3 +1,15 @@
+2013-05-14  Andrei Bucur  <abu...@adobe.com>
+
+        Modify checkLayout to receive the log container as an optional parameter
+        https://bugs.webkit.org/show_bug.cgi?id=112793
+
+        Reviewed by Darin Adler.
+
+        Add a way to specify the container manually for checkLayout. This is helpful to measure regions for nested
+        named flows (and probably other cases as well).
+
+        * resources/check-layout.js: Added an optional parameter to window.checkLayout.
+
 2013-04-30  Balazs Kelemen  <b.kele...@sisa.samsung.com>
 
         [GStreamer] cannot seek after video finished

Modified: trunk/LayoutTests/resources/check-layout.js (150066 => 150067)


--- trunk/LayoutTests/resources/check-layout.js	2013-05-14 12:49:06 UTC (rev 150066)
+++ trunk/LayoutTests/resources/check-layout.js	2013-05-14 12:51:59 UTC (rev 150067)
@@ -179,7 +179,7 @@
     return output.checked;
 }
 
-window.checkLayout = function(selectorList)
+window.checkLayout = function(selectorList, overrideContainer)
 {
     if (!selectorList) {
         console.error("You must provide a CSS selector of nodes to check.");
@@ -194,7 +194,7 @@
         checkedLayout |= checkExpectedValues(node.parentNode, failures);
         checkedLayout |= checkSubtreeExpectedValues(node, failures);
 
-        var container = node.parentNode.className == 'container' ? node.parentNode : node;
+        var container = overrideContainer || (node.parentNode.className == 'container' ? node.parentNode : node);
 
         var pre = document.createElement('pre');
         if (failures.length)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to