Title: [159640] trunk/LayoutTests
Revision
159640
Author
stav...@adobe.com
Date
2013-11-21 12:03:05 -0800 (Thu, 21 Nov 2013)

Log Message

Added test for :hover and _javascript_ events on the visual overflow of a region.

[CSS Regions] Content in a region's visible overflow does not trigger :hover state, nor _javascript_ events
https://bugs.webkit.org/show_bug.cgi?id=112010

Reviewed by Antti Koivisto.

* fast/regions/hover-and-js-in-visual-overflow-expected.html: Added.
* fast/regions/hover-and-js-in-visual-overflow.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (159639 => 159640)


--- trunk/LayoutTests/ChangeLog	2013-11-21 20:00:13 UTC (rev 159639)
+++ trunk/LayoutTests/ChangeLog	2013-11-21 20:03:05 UTC (rev 159640)
@@ -1,3 +1,15 @@
+2013-11-21  Radu Stavila  <stav...@adobe.com>
+
+        Added test for :hover and _javascript_ events on the visual overflow of a region.
+
+        [CSS Regions] Content in a region's visible overflow does not trigger :hover state, nor _javascript_ events
+        https://bugs.webkit.org/show_bug.cgi?id=112010
+
+        Reviewed by Antti Koivisto.
+
+        * fast/regions/hover-and-js-in-visual-overflow-expected.html: Added.
+        * fast/regions/hover-and-js-in-visual-overflow.html: Added.
+
 2013-11-21  Alexey Proskuryakov  <a...@apple.com>
 
         Implement WebCrypto unwrapKey

Added: trunk/LayoutTests/fast/regions/hover-and-js-in-visual-overflow-expected.html (0 => 159640)


--- trunk/LayoutTests/fast/regions/hover-and-js-in-visual-overflow-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/regions/hover-and-js-in-visual-overflow-expected.html	2013-11-21 20:03:05 UTC (rev 159640)
@@ -0,0 +1,68 @@
+<!doctype html>
+<html lang="en">
+<head>
+	<meta charset="UTF-8">
+	<title>Mouse selection in visible overflow of a region</title>
+	<style>
+	body, p, ol {
+		margin: 0;
+		padding: 0;
+	}
+	input {
+		width: 100px;
+	}
+	#content {
+		font-family: monospace;
+		font-size: 20px;
+		line-height: 1em;
+	}
+	.spacer {
+		width: 100%;
+		height: 80px;
+		display: block;
+	}
+	.highlite {
+		background-color: green;
+		color: white;
+	}
+	#region {
+		border: 2px solid black;
+		background-color: lightgray;
+		width: 100px;
+		height: 100px;
+	}
+	#parent {
+		float: left;
+		height: 200px;
+	}
+	#region p {
+		background-color: red;
+		width: 100%;
+		height: 50%;
+	}
+	#result {
+		color: green;
+		font-weight: bold;
+	}
+	ol {
+    	list-style:none;
+	}
+	</style>
+</head>
+<body>
+	<div id="parent">
+		<div id="region">
+			<div id="content"><span class="spacer"></span>This text has <span class="highlite">overflow</span></div>
+		</div>
+	</div>
+	<!-- <span class="highlite">test</span> -->
+	<ol>
+		<li>You should not see any red before or during this test.</li>
+		<li>Move the mouse over the blue word (<em>overflow</em>) outside the gray square.</li>
+		<li>The word should become white on a green background.</li>
+		<li>You should see the word "PASS" displayed below, in green.</li>
+	</ol>
+	
+	<div id="result">PASS</div>
+</body>
+</html>
\ No newline at end of file

Added: trunk/LayoutTests/fast/regions/hover-and-js-in-visual-overflow.html (0 => 159640)


--- trunk/LayoutTests/fast/regions/hover-and-js-in-visual-overflow.html	                        (rev 0)
+++ trunk/LayoutTests/fast/regions/hover-and-js-in-visual-overflow.html	2013-11-21 20:03:05 UTC (rev 159640)
@@ -0,0 +1,94 @@
+<!doctype html>
+<html lang="en">
+<head>
+	<meta charset="UTF-8">
+	<title>Mouse selection in visible overflow of a region</title>
+	<style>
+	body, p, ol {
+		margin: 0;
+		padding: 0;
+	}
+	input {
+		width: 100px;
+	}
+	#content {
+		font-family: monospace;
+		font-size: 20px;
+		line-height: 1em;
+		-webkit-flow-into: f;
+	}
+	.spacer {
+		width: 100%;
+		height: 80px;
+		display: block;
+	}
+	.highlite {
+		color: deepskyblue;
+	}
+	.highlite:hover {
+		background-color: green;
+		color: white;
+	}
+	#region {
+		border: 2px solid black;
+		background-color: lightgray;
+		width: 100px;
+		height: 100px;
+		-webkit-flow-from: f;
+	}
+	#parent {
+		float: left;
+		height: 200px;
+	}
+	#region p {
+		background-color: red;
+		width: 100%;
+		height: 50%;
+	}
+	#result {
+		color: green;
+		font-weight: bold;
+	}
+	</style>
+</head>
+
+<script type="text/_javascript_">
+	if (window.testRunner)
+		testRunner.waitUntilDone();
+
+	function beginTest() {
+		if (window.eventSender) {
+			var obj  = document.querySelector(".highlite");
+
+			// move mouse on the hover test object
+			eventSender.mouseMoveTo(obj.offsetLeft + 5, obj.offsetTop + 5);
+			eventSender.mouseDown(0);
+
+			testRunner.notifyDone();
+		}
+	}
+</script>
+
+<body _onload_="beginTest()">
+	<div id="parent">
+		<div id="region">
+			<p></p>
+		</div>
+	</div>
+	<ol>
+		<li>You should not see any red before or during this test.</li>
+		<li>Move the mouse over the blue word (<em>overflow</em>) outside the gray square.</li>
+		<li>The word should become white on a green background.</li>
+		<li>You should see the word "PASS" displayed below, in green.</li>
+	</ol>
+	<div id="content"><span class="spacer"></span>This text has <span class="highlite">overflow</span></div>
+	<div id="result">&nbsp;</div>
+	<script>
+		var word = document.querySelector(".highlite");
+		word.addEventListener("mouseover", function(evt) 
+		{
+			document.getElementById("result").innerHTML = "PASS";
+		});
+	</script>
+</body>
+</html>
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to