Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: LayoutTests/fast/table/table-different-overflow-values-2.html

Issue 1228373007: Compute the correct overflow-x and overflow-y values for table elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/table/table-different-overflow-values-2.html
diff --git a/LayoutTests/fast/table/table-different-overflow-values-2.html b/LayoutTests/fast/table/table-different-overflow-values-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..584a48c40d075639dc04329db5b3f99082d0b6e0
--- /dev/null
+++ b/LayoutTests/fast/table/table-different-overflow-values-2.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<!-- For tables. -->
+<table id="table1" class="test" style="overflow-y: visible; overflow-x: auto"/>
+<table id="table2" class="test" style="overflow-y: visible; overflow-x: scroll"/>
+<table id="table3" class="test" style="overflow-y: visible; overflow-x: hidden"/>
+<!-- For inline tables. -->
+<table id="inline_table1" class="test" style="overflow-y: visible; overflow-x: auto; display: inline-table;"/>
+<table id="inline_table2" class="test" style="overflow-y: visible; overflow-x: scroll; display: inline-table;"/>
+<table id="inline_table3" class="test" style="overflow-y: visible; overflow-x: hidden; display: inline-table;"/>
+<!-- For table row groups. -->
+<table>
+ <tbody id="tbody1" class="test" style="overflow-y: visible; overflow-x: auto"/>
+ <tbody id="tbody2" class="test" style="overflow-y: visible; overflow-x: scroll"/>
+ <tbody id="tbody3" class="test" style="overflow-y: visible; overflow-x: hidden"/>
+</table>
+<!-- For table rows. -->
+<table>
+ <tr id="tr1" class="test" style="overflow-y: visible; overflow-x: auto"/>
+ <tr id="tr2" class="test" style="overflow-y: visible; overflow-x: scroll"/>
+ <tr id="tr3" class="test" style="overflow-y: visible; overflow-x: hidden"/>
+</table>
+<script>
+description("This test checks for overflow equality. If overflow-x is visible then overflow-y should be visible as well.");
+var elements = document.getElementsByClassName("test");
+for (i = 0; i < elements.length; ++i)
+{
+ computedStyle = getComputedStyle(elements[i]);
+ overflowX = computedStyle.getPropertyValue('overflow-x');
+ overflowY = computedStyle.getPropertyValue('overflow-y');
+ if (overflowX == "visible" && overflowX != overflowY)
+ testFailed(elements[i].id + ": overflow-y should be visible. Was " + overflowY + ".");
+ else
+ testPassed(elements[i].id + ": overflow-x is either not visible or both overflow values are visible.");
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698