Bug 1140579 - Make <legend>s have a legend frame when nearest ancestor frame is a fieldset frame. r=roc
IOW, drop the requirement that the parent *content* is a <fieldset>, thus allowing a <legend> to become the fieldset legend also when it's wrapped in one or more nodes that are styled with display:contents.
This commit is contained in:
@@ -3471,8 +3471,6 @@ nsCSSFrameConstructor::FindHTMLData(Element* aElement,
|
||||
if (aTag == nsGkAtoms::legend &&
|
||||
(!aParentFrame ||
|
||||
!IsFrameForFieldSet(aParentFrame, aParentFrame->GetType()) ||
|
||||
!aElement->GetParent() ||
|
||||
!aElement->GetParent()->IsHTMLElement(nsGkAtoms::fieldset) ||
|
||||
aStyleContext->StyleDisplay()->IsFloatingStyle() ||
|
||||
aStyleContext->StyleDisplay()->IsAbsolutelyPositionedStyle())) {
|
||||
// <legend> is only special inside fieldset, check both the frame tree
|
||||
|
||||
Reference in New Issue
Block a user