look into wrapper frames for inputs with :after and :before bug 15597 r/sr=dbaron

This commit is contained in:
bmlk%gmx.de 2003-12-20 12:15:48 +00:00
Родитель 4cb432b168
Коммит 60303543bc
1 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -2707,9 +2707,24 @@ nsGenericHTMLElement::GetFormControlFrameFor(nsIContent* aContent,
if (frame) {
nsIFormControlFrame* form_frame = nsnull;
CallQueryInterface(frame, &form_frame);
if (form_frame) {
return form_frame;
}
// If we have generated content, the primary frame will be a
// wrapper frame.. out real frame will be in its child list.
for (frame->FirstChild(frame->GetPresContext(), nsnull, &frame);
frame;
frame = frame->GetNextSibling()) {
CallQueryInterface(frame, &form_frame);
if (form_frame) {
return form_frame;
}
}
NS_ERROR("Form control has a frame, but it's not a form frame");
}
return nsnull;
}