mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 07:07:30 +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* GetNextSiblingInner(nsIFrame* aFrame);
|
||||||
virtual nsIFrame* GetPrevSiblingInner(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);
|
nsIFrame* GetPlaceholderFrame(nsIFrame* aFrame);
|
||||||
bool IsPopupFrame(nsIFrame* aFrame);
|
bool IsPopupFrame(nsIFrame* aFrame);
|
||||||
|
|
||||||
|
|
@ -486,18 +490,12 @@ nsFrameIterator::GetPrevSiblingInner(nsIFrame* aFrame) {
|
||||||
nsIFrame*
|
nsIFrame*
|
||||||
nsFrameIterator::GetPlaceholderFrame(nsIFrame* aFrame)
|
nsFrameIterator::GetPlaceholderFrame(nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
nsIFrame* result = aFrame;
|
if (MOZ_LIKELY(!aFrame || !aFrame->HasAnyStateBits(NS_FRAME_OUT_OF_FLOW))) {
|
||||||
nsIPresShell *presShell = mPresContext->GetPresShell();
|
return aFrame;
|
||||||
if (presShell) {
|
|
||||||
nsIFrame* placeholder = presShell->GetPlaceholderFrameFor(aFrame);
|
|
||||||
if (placeholder)
|
|
||||||
result = placeholder;
|
|
||||||
}
|
}
|
||||||
|
nsIFrame* placeholder =
|
||||||
if (result != aFrame)
|
aFrame->PresContext()->PresShell()->GetPlaceholderFrameFor(aFrame);
|
||||||
result = GetPlaceholderFrame(result);
|
return placeholder ? placeholder : aFrame;
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue