Bug 931464. Part 1: GetFieldSetBlockFrame needs to drill down through a scrollframe if necessary. r=mats

--HG--
extra : rebase_source : 858213f65b5bd7d8872afd8205424c3bfdfe1e98
This commit is contained in:
Robert O'Callahan 2013-11-05 23:04:00 -08:00
parent 1ca3b651c4
commit efc5938659
6 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
function boom()
{
var fieldset = document.getElementById("f");
for (var i = 0; i < 2; ++i)
fieldset.appendChild(document.createElement("span"));
}
</script>
<body onload="boom();">
<fieldset id="f" style="overflow: auto;"></fieldset>
</body>
</html>

View File

@ -415,3 +415,4 @@ pref(layers.force-active,true) load 859630-1.html
load 866588.html
load 897852.html
asserts(4-6) load 898913.html # bug 847368
load 931464.html

View File

@ -322,7 +322,8 @@ GetFieldSetBlockFrame(nsIFrame* aFieldsetFrame)
{
// Depends on the fieldset child frame order - see ConstructFieldSetFrame() below.
nsIFrame* firstChild = aFieldsetFrame->GetFirstPrincipalChild();
return firstChild && firstChild->GetNextSibling() ? firstChild->GetNextSibling() : firstChild;
nsIFrame* inner = firstChild && firstChild->GetNextSibling() ? firstChild->GetNextSibling() : firstChild;
return inner ? inner->GetContentInsertionFrame() : nullptr;
}
#define FCDATA_DECL(_flags, _func) \

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<fieldset style="overflow: auto;">Hello Kitty</fieldset>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html class="reftest-wait">
<body>
<fieldset id="f" style="overflow: auto;"></fieldset>
<script>
function boom()
{
var f = document.getElementById("f");
var s = document.createElement("span");
s.textContent = "Hello Kitty";
f.appendChild(s);
document.documentElement.removeAttribute("class");
}
window.addEventListener("MozReftestInvalidate", boom);
</script>
</body>
</html>

View File

@ -1780,3 +1780,4 @@ fuzzy(1,10000) fuzzy-if(Android&&AndroidVersion>=15,5,10000) == 902330-1.html 90
fuzzy-if(Android,8,400) == 906199-1.html 906199-1-ref.html
== 921716-1.html 921716-1-ref.html
fuzzy-if(cocoaWidget,1,40) == 928607-1.html 928607-1-ref.html
== 931464-1.html 931464-1-ref.html