| Index: LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
 | 
| ===================================================================
 | 
| --- LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html	(revision 138737)
 | 
| +++ LayoutTests/platform/chromium/fast/events/touch/compositor-touch-hit-rects.html	(working copy)
 | 
| @@ -54,112 +54,15 @@
 | 
|  		<div>causes a</div>
 | 
|  		continuation</b>
 | 
|  	</div>
 | 
| -</div>
 | 
| -<script>
 | 
| -if (!window.testRunner)
 | 
| -	return;
 | 
| -
 | 
| -window.testRunner.dumpAsText();
 | 
| -
 | 
| -function listener() { }
 | 
| -
 | 
| -function log(msg) {
 | 
| -	var span = document.createElement("span");
 | 
| -	document.getElementById("console").appendChild(span);
 | 
| -    span.innerHTML = msg + '<br />';
 | 
| -}
 | 
| -
 | 
| -function sortRects(a, b) {
 | 
| -	return a.top - b.top;
 | 
| -}
 | 
| -
 | 
| -function logRects(id) {
 | 
| -	element = document.getElementById(id);
 | 
| -	element.addEventListener('touchstart', listener, false);
 | 
| -	rects = window.internals.touchEventTargetClientRects(document);
 | 
| -	var sortedRects = new Array();
 | 
| -	for (var i = 0; i < rects.length; ++i)
 | 
| -		sortedRects[i] = rects[i];
 | 
| -	sortedRects.sort(sortRects);
 | 
| -	for (var i = 0; i < rects.length; ++i)
 | 
| -		log(id + "[" + i + "]: (" + sortedRects[i].left + ", " + sortedRects[i].top + ", " + sortedRects[i].width + ", " + sortedRects[i].height + ")");
 | 
| -	element.removeEventListener('touchstart', listener, false);
 | 
| -}
 | 
| -
 | 
| -logRects("normalFlow");
 | 
| -logRects("absoluteChildContainer");
 | 
| -logRects("relativeChildContainer");
 | 
| -logRects("overhangingContainer");
 | 
| -logRects("transformedChildContainer");
 | 
| -logRects("continuation");
 | 
| -
 | 
| -var testContainer = document.getElementById("tests");
 | 
| -testContainer.parentNode.removeChild(testContainer);
 | 
| -
 | 
| -</script>
 | 
| -</body>
 | 
| -<!DOCTYPE html>
 | 
| -<html>
 | 
| -<head>
 | 
| -<style>
 | 
| -#transformedChild {
 | 
| -	-webkit-transform: rotate3d(0.2, 1, 0, 35grad);
 | 
| -}
 | 
| -#absoluteChild {
 | 
| -	position: absolute;
 | 
| -	top: 300px;
 | 
| -}
 | 
| -#relativeChild {
 | 
| -	position: relative;
 | 
| -	top: 200px;
 | 
| -}
 | 
| -#overhangingContainer {
 | 
| -	height: 10px;
 | 
| -}
 | 
| -#overhangingFloatingChild {
 | 
| -	width: 100px;
 | 
| -	float: left;
 | 
| -}
 | 
| -#tests {
 | 
| -	font: 10px Ahem;
 | 
| -}
 | 
| -</style>
 | 
| -</head>
 | 
| -<body>
 | 
| -<p id="description">This tests verifies the hit test regions given to the compositor. It can only be run in DumpRenderTree.
 | 
| -The outputted rects should cover the hit test regions of all the listed elements.</p>
 | 
| -<div id="console"></div>
 | 
| -
 | 
| -<div id="tests">
 | 
| -	<div id="normalFlow">
 | 
| -		Lorem ipsum
 | 
| -		<span>sum</span>.
 | 
| -	</div>
 | 
| -	<div id="absoluteChildContainer">
 | 
| -		Lorem ipsum
 | 
| -		<span id="absoluteChild">Absolute child</span>
 | 
| -	</div>
 | 
| -	<div id="relativeChildContainer">
 | 
| -		Lorem ipsum
 | 
| -		<span id="relativeChild">Relative child</span>
 | 
| -	</div>
 | 
| -	<div id="overhangingContainer">
 | 
| -		<div id="overhangingFloatingChild">Overhanging float overhanging float overhanging float overhanging float</div>
 | 
| -	</div>
 | 
| -	<div id="transformedChildContainer">
 | 
| -		<div id="transformedChild">Transformed</div>
 | 
| -	</div>
 | 
|  	<div>
 | 
| -		<b id="continuation">This b tag
 | 
| -		<div>causes a</div>
 | 
| -		continuation</b>
 | 
| +		<span id="inlineAbsoluteChildContainer">
 | 
| +			Inline with absolute child.
 | 
| +			<span id="absoluteChild">Absolute child in inline.</span>
 | 
| +		</span>
 | 
|  	</div>
 | 
|  </div>
 | 
|  <script>
 | 
| -if (!window.testRunner)
 | 
| -	return;
 | 
|  
 | 
| -window.testRunner.dumpAsText();
 | 
|  
 | 
|  function listener() { }
 | 
|  
 | 
| @@ -186,15 +89,23 @@
 | 
|  	element.removeEventListener('touchstart', listener, false);
 | 
|  }
 | 
|  
 | 
| -logRects("normalFlow");
 | 
| -logRects("absoluteChildContainer");
 | 
| -logRects("relativeChildContainer");
 | 
| -logRects("overhangingContainer");
 | 
| -logRects("transformedChildContainer");
 | 
| -logRects("continuation");
 | 
| +function runTest() {
 | 
| +	if (!window.testRunner)
 | 
| +		return;
 | 
|  
 | 
| -var testContainer = document.getElementById("tests");
 | 
| -testContainer.parentNode.removeChild(testContainer);
 | 
| +	window.testRunner.dumpAsText();
 | 
| +	logRects("normalFlow");
 | 
| +	logRects("absoluteChildContainer");
 | 
| +	logRects("relativeChildContainer");
 | 
| +	logRects("overhangingContainer");
 | 
| +	logRects("transformedChildContainer");
 | 
| +	logRects("continuation");
 | 
| +	logRects("inlineAbsoluteChildContainer");
 | 
|  
 | 
| +	var testContainer = document.getElementById("tests");
 | 
| +	testContainer.parentNode.removeChild(testContainer);
 | 
| +}
 | 
| +
 | 
| +runTest();
 | 
|  </script>
 | 
|  </body>
 | 
| 
 |