servo/tests/wpt/css-tests/css-regions-1_dev/xhtml1/regions-selection-025.xht

94 lines
No EOL
3.7 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSS Regions Test: DOM order is different than the linear selection</title>
<link href="mailto:rhauck@adobe.com" rel="author" title="Rebecca Hauck" />
<link href="http://www.w3.org/TR/css3-regions/#the-flow-into-property" rel="help" />
<link href="http://www.w3.org/TR/css3-regions/#flow-from" rel="help" />
<link href="http://www.w3.org/TR/css3-regions/#relation-to-document-events" rel="help" />
<meta content="CSS regions module does not alter the normal processing of events in the document
tree. Therefore, mouse selection should capture content in DOM order as it would without a named flow." name="assert" />
<meta content="dom interact" name="flags" />
<link href="/resources/testharness.css" type="text/css" rel="stylesheet" />
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/js/selection-test-helper.js"></script>
<style>
#source
{
position: absolute;
flow-into: content;
}
.region
{
flow-from: content;
width: 150px;
height: 150px;
margin: 15px;
}
#region
{
position: absolute;
left: 0px;
color: red;
}
#region-2
{
position: absolute;
left: 330px;
}
#region-3
{
position: absolute;
left: 165px;
}
#start-select
{
background-color: orange;
}
#end-select
{
background-color: blue;
}
.select-point
{
width: 15px;
height: 15px;
display: inline-block;
}
#log {
position: relative;
top: 175px;
clear: both;
}
</style>
</head>
<body>
<p id="msg">
Click on the orange square, keep the mouse button down and drag it to the blue square,
release the mouse over the blue square.
</p>
<!-- This text will only appear if regions are not enabled -->
<div class="region" id="region">REGIONS ARE NOT ENABLED</div>
<div class="region" id="region-2"></div>
<div class="region" id="region-3"></div>
<div id="source">
<span id="two-regions">
<div class="select-point" id="start-select"></div>
between the squares between the squares between the squares between the squares between the squares
between the squares between the squares between the squares between the squares between the squares
between the squares between the squares between the squares
<div class="select-point" id="end-select"></div>
</span>
<span id="one-region">
after the squares after the squares after the squares after the squares after the squares
after the squares after the squares after the squares after the squares after the squares
after the squares after the squares
</span>
</div>
<div id="log"></div>
<script>
runSelectionTest( [ { string: "after the squares", expected: false }], true);
</script>
</body></html>