mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Bug 1368802 - nsFrameIterator::GetPlaceholderFrame should only try to get the placeholder for out-of-flow frames, because in-flow frames never have a placeholder
Tag #1375
This commit is contained in:
parent
3b2a22f085
commit
854827bd83
1 changed files with 9 additions and 11 deletions
|
|
@ -82,6 +82,10 @@ protected:
|
|||
virtual nsIFrame* GetNextSiblingInner(nsIFrame* aFrame);
|
||||
virtual nsIFrame* GetPrevSiblingInner(nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* Return the placeholder frame for aFrame if it has one, otherwise return
|
||||
* aFrame itself.
|
||||
*/
|
||||
nsIFrame* GetPlaceholderFrame(nsIFrame* aFrame);
|
||||
bool IsPopupFrame(nsIFrame* aFrame);
|
||||
|
||||
|
|
@ -486,18 +490,12 @@ nsFrameIterator::GetPrevSiblingInner(nsIFrame* aFrame) {
|
|||
nsIFrame*
|
||||
nsFrameIterator::GetPlaceholderFrame(nsIFrame* aFrame)
|
||||
{
|
||||
nsIFrame* result = aFrame;
|
||||
nsIPresShell *presShell = mPresContext->GetPresShell();
|
||||
if (presShell) {
|
||||
nsIFrame* placeholder = presShell->GetPlaceholderFrameFor(aFrame);
|
||||
if (placeholder)
|
||||
result = placeholder;
|
||||
if (MOZ_LIKELY(!aFrame || !aFrame->HasAnyStateBits(NS_FRAME_OUT_OF_FLOW))) {
|
||||
return aFrame;
|
||||
}
|
||||
|
||||
if (result != aFrame)
|
||||
result = GetPlaceholderFrame(result);
|
||||
|
||||
return result;
|
||||
nsIFrame* placeholder =
|
||||
aFrame->PresContext()->PresShell()->GetPlaceholderFrameFor(aFrame);
|
||||
return placeholder ? placeholder : aFrame;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue