summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/manual-tests/nested-plug-ins.html
blob: 20a11fa65de2b687976aae2055ead4d04a01bf68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script>
    function toggleDisplay(element, button)
    {
        if (element.style.display == "none")
            element.style.display = "";
        else
            element.style.display = "none";
    }

    function toggleVisibility(element, button)
    {
        if (element.style.visibility == "hidden")
            element.style.visibility = "";
        else
            element.style.visibility = "hidden";
    }

</script>
<p>
    Play with the display and visibility toggles. Make sure that turning an inner element visible does not show it if it has a hidden or
       non-displaying ancestor, and that making an ancestor visible and displaying shows only its descendants the are visible and displaying.
</p>
<table>
    <tr>
        <td>
            <input type="checkbox" checked="true" onclick="toggleDisplay(document.getElementById('middle'))"> Outer frame display
        </td>
        <td>
            <input type="checkbox" checked="true" onclick="toggleDisplay(document.getElementById('middle').contentDocument.getElementById('inner'))"> Inner frame display
        </td>
    </tr>
    <tr>
        <td>
            <input type="checkbox" checked="true" onclick="toggleVisibility(document.getElementById('middle'))"> Outer frame visibility
            </td>
        <td>
            <input type="checkbox" checked="true" onclick="toggleVisibility(document.getElementById('middle').contentDocument.getElementById('inner'))"> Inner frame visibility
        </td>
        <td>
            <input type="checkbox" checked="true" onclick="toggleVisibility(document.getElementById('middle').contentDocument.getElementById('inner').contentDocument.getElementById('plugin'))"> Inner plug-in visibility
        </td>
    </tr>
</table>

<iframe id="middle" style="height: 400px; width: 400px;" src="resources/nested-plug-ins-outer-frame.html"></iframe>