mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 11:45:37 +00:00
3f6dead134
The first node of |iter| in Selection::SelectFrames() may be different from the start parent of given range. Therefore, if they are different, it shouldn't skip first item of |iter|. MozReview-Commit-ID: DgE2dSziaxo --HG-- extra : rebase_source : b35f52d194bf437cc79d1917ad497ebb1a8c27f0
22 lines
539 B
HTML
22 lines
539 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<head>
|
|
<body>
|
|
<p id="first">f<span>o</span>o</p>
|
|
<p id="second">bar</p>
|
|
<script>
|
|
document.body.offsetTop;
|
|
var p1 = document.getElementById("first");
|
|
var p2 = document.getElementById("second");
|
|
var selection = window.getSelection();
|
|
selection.setBaseAndExtent(p1.firstChild, 0, p1.firstChild, 1);
|
|
|
|
function doTest() {
|
|
selection.extend(p2.firstChild, 2);
|
|
document.documentElement.removeAttribute('class');
|
|
}
|
|
document.addEventListener("MozReftestInvalidate", doTest);
|
|
</script>
|
|
</body>
|
|
</html>
|