зеркало из https://github.com/mozilla/pjs.git
look into wrapper frames for inputs with :after and :before bug 15597 r/sr=dbaron
This commit is contained in:
Родитель
4cb432b168
Коммит
60303543bc
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче