Bug 83855 - Visual artifacts when scrolling a <fieldset> with a legend
Summary: Visual artifacts when scrolling a <fieldset> with a legend
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: SravanKumar S(:sravan)
Depends on:
Blocks: 188643
  Show dependency treegraph
Reported: 2012-04-12 19:42 PDT by Félix Cloutier
Modified: 2018-08-16 12:19 PDT (History)
4 users (show)

See Also:

A test case demonstrating the visual artifacts caused by scrolling fieldsets (1.58 KB, text/html)
2012-04-12 19:42 PDT, Félix Cloutier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Félix Cloutier 2012-04-12 19:42:01 PDT
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.
Comment 1 SravanKumar S(:sravan) 2012-05-08 02:59:38 PDT
This is happening because scroll-bar height is including not only fieldset height, but also legend height. I would like to fix it.
Comment 2 SravanKumar S(:sravan) 2012-05-10 02:11:32 PDT
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.
Comment 3 Simon Pieters (:zcorpan) 2018-08-16 12:17:58 PDT
This seems to have been fixed by now?