Title: [199086] trunk/LayoutTests
Revision
199086
Author
[email protected]
Date
2016-04-05 18:17:20 -0700 (Tue, 05 Apr 2016)

Log Message

Test listbox clipping to contents rect
https://bugs.webkit.org/show_bug.cgi?id=156265

Reviewed by Simon Fraser.

These tests create some <select><option></option></select>s with padding.
These list boxes use the zapfino "f" character (because it draws wildly
far outside of its layout box) to create a case where text inside the list
box would naturally intersect with the padding. This overflow should be
clipped so that the padding is undisturbed.

* fast/forms/listbox-padding-clip-expected.html: Added.
* fast/forms/listbox-padding-clip-overlay-expected.html: Added.
* fast/forms/listbox-padding-clip-overlay.html: Added.
* fast/forms/listbox-padding-clip.html: Added.
* platform/ios-simulator/TestExpectations: Skip on iOS

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (199085 => 199086)


--- trunk/LayoutTests/ChangeLog	2016-04-05 23:56:48 UTC (rev 199085)
+++ trunk/LayoutTests/ChangeLog	2016-04-06 01:17:20 UTC (rev 199086)
@@ -1,3 +1,22 @@
+2016-04-05  Myles C. Maxfield  <[email protected]>
+
+        Test listbox clipping to contents rect
+        https://bugs.webkit.org/show_bug.cgi?id=156265
+
+        Reviewed by Simon Fraser.
+
+        These tests create some <select><option></option></select>s with padding.
+        These list boxes use the zapfino "f" character (because it draws wildly
+        far outside of its layout box) to create a case where text inside the list
+        box would naturally intersect with the padding. This overflow should be
+        clipped so that the padding is undisturbed.
+
+        * fast/forms/listbox-padding-clip-expected.html: Added.
+        * fast/forms/listbox-padding-clip-overlay-expected.html: Added.
+        * fast/forms/listbox-padding-clip-overlay.html: Added.
+        * fast/forms/listbox-padding-clip.html: Added.
+        * platform/ios-simulator/TestExpectations: Skip on iOS
+
 2016-03-19  Filip Pizlo  <[email protected]>
 
         DFG and FTL should constant-fold RegExpExec

Added: trunk/LayoutTests/fast/forms/listbox-padding-clip-expected.html (0 => 199086)


--- trunk/LayoutTests/fast/forms/listbox-padding-clip-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-padding-clip-expected.html	2016-04-06 01:17:20 UTC (rev 199086)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<p>This test makes sure that the contents of list boxes do not intrude upon their padding. The test passes if you see a tall green box below (and not a single black pixel anywhere inside it)<p>
+<div style="display: inline-block; width: 100px; height: 400px; background: green;"></div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/listbox-padding-clip-overlay-expected.html (0 => 199086)


--- trunk/LayoutTests/fast/forms/listbox-padding-clip-overlay-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-padding-clip-overlay-expected.html	2016-04-06 01:17:20 UTC (rev 199086)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+<p>This test makes sure that the contents of list boxes do not intrude upon their padding. The test passes if you see a tall green box below (and not a single black pixel anywhere inside it)<p>
+<div style="display: inline-block; width: 100px; height: 400px; background: green;"></div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/listbox-padding-clip-overlay.html (0 => 199086)


--- trunk/LayoutTests/fast/forms/listbox-padding-clip-overlay.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-padding-clip-overlay.html	2016-04-06 01:17:20 UTC (rev 199086)
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.item {
+	position: relative;
+	display: inline-block;
+	width: 50px;
+	height: 400px;
+	overflow: hidden;
+}
+
+.listBox {
+	font: 50px Zapfino;
+	margin: 0px;
+	border: 0px solid black;
+	padding: 0px;
+	padding-left: 50px;
+	background: green;
+}
+</style>
+<script>
+if (window.internals)
+	internals.setUsesOverlayScrollbars(true);
+</script>
+</head>
+<body>
+<p>This test makes sure that the contents of list boxes do not intrude upon their padding. The test passes if you see a tall green box below (and not a single black pixel anywhere inside it)<p>
+<div class="item">
+    <select multiple="multiple" class="listBox">
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+    </select>
+</div><div class="item">
+    <select multiple="multiple" class="listBox" style="padding-right: 50px; position: absolute; right: 0px; top: 0px;">
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+    </select>
+</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/forms/listbox-padding-clip.html (0 => 199086)


--- trunk/LayoutTests/fast/forms/listbox-padding-clip.html	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/listbox-padding-clip.html	2016-04-06 01:17:20 UTC (rev 199086)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.item {
+	position: relative;
+	display: inline-block;
+	width: 50px;
+	height: 400px;
+	overflow: hidden;
+}
+
+.listBox {
+	font: 50px Zapfino;
+	margin: 0px;
+	border: 0px solid black;
+	padding: 0px;
+	padding-left: 50px;
+	background: green;
+}
+</style>
+</head>
+<body>
+<p>This test makes sure that the contents of list boxes do not intrude upon their padding. The test passes if you see a tall green box below (and not a single black pixel anywhere inside it)<p>
+
+<div class="item">
+    <select multiple="multiple" class="listBox">
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+    </select>
+</div><div class="item">
+    <select multiple="multiple" class="listBox" style="padding-right: 65px; position: absolute; right: -15px; top: 0px;">
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+        <option>f</option>
+    </select>
+</div>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (199085 => 199086)


--- trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-04-05 23:56:48 UTC (rev 199085)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations	2016-04-06 01:17:20 UTC (rev 199086)
@@ -3020,3 +3020,7 @@
 fast/scrolling/rtl-scrollbars-sticky-document.html [ ImageOnlyFailure ]
 fast/scrolling/rtl-scrollbars-sticky-iframe-2.html [ ImageOnlyFailure ]
 fast/scrolling/rtl-scrollbars-sticky-iframe.html [ ImageOnlyFailure ]
+
+# iOS list box controls are not drawn in the standard way.
+fast/forms/listbox-padding-clip.html [ ImageOnlyFailure ]
+fast/forms/listbox-padding-clip-overlay.html [ ImageOnlyFailure ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to