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:
Mats Palmgren
2015-03-07 14:53:46 +00:00
parent 5e38fcd7c9
commit 0bcfb0110f
2 changed files with 7 additions and 8 deletions

View File

@@ -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