Created attachment 137029 [details]
A test case demonstrating the visual artifacts caused by scrolling fieldsets
When a <fieldset> element with a <legend> is made scrollable (with the CSS overflow property), scrolling results in severe visual artifacts: the <legend> element itself can be scrolled out and elements inside the <fieldset> can overlap the top border.
Scroll down the <fieldset> element of the file I've attached to get a glimpse.
This is happening because scroll-bar height is including not only fieldset height, but also legend height. I would like to fix it.
After little more debugging, it is found that it is not scroll-bar height, but its LayoutRect(Y-co-ordinate and Height) is including LEGEND+FIELDSET LayouRects. But if it is treated as a bug, then we have to make Scroll-bar LayoutRect independent of LEGEND being present or not in FIELDSET.
FIELDSET spec does'nt really say anything about how LEGEND should be treated if overflow is present in FIELDSET. But, going by general LEGEND element purpose, it need not be part of scroll, as it only names the FIELDSET. Only the content should of FIELDSET should be scrollable, but not LEGEND.
Also, FF and IE9 are behaving more worse w.r.t to this Testcase. So, there is no fixed reference to follow. So, this should be WEBKIT specific implementation, on the basis of reasoning give in 2nd para.
This seems to have been fixed by now?