mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Bug 1549691 - nsLayoutUtils::GetRealPrimaryFrameFor makes no sense. r=jwatt
The primary frame is always the out of flow frame. Differential Revision: https://phabricator.services.mozilla.com/D30182 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0b6eabaf52
commit
98b4f62a61
@ -50,6 +50,7 @@ inline void nsIContent::SetPrimaryFrame(nsIFrame* aFrame) {
|
||||
"Losing track of existing primary frame");
|
||||
|
||||
if (aFrame) {
|
||||
MOZ_ASSERT(!aFrame->IsPlaceholderFrame());
|
||||
if (MOZ_LIKELY(!IsHTMLElement(nsGkAtoms::area)) ||
|
||||
aFrame->GetContent() == this) {
|
||||
aFrame->SetIsPrimaryFrame(true);
|
||||
|
@ -2420,8 +2420,7 @@ nsView* nsDocumentViewer::FindContainerView() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIFrame* subdocFrame =
|
||||
nsLayoutUtils::GetRealPrimaryFrameFor(containerElement);
|
||||
nsIFrame* subdocFrame = containerElement->GetPrimaryFrame();
|
||||
if (!subdocFrame) {
|
||||
// XXX Silenced by default in bug 1175289
|
||||
LAYOUT_WARNING("Subdocument container has no frame");
|
||||
|
@ -1579,16 +1579,6 @@ bool nsLayoutUtils::IsPrimaryStyleFrame(const nsIFrame* aFrame) {
|
||||
return aFrame->IsPrimaryFrame();
|
||||
}
|
||||
|
||||
/* static */
|
||||
nsIFrame* nsLayoutUtils::GetRealPrimaryFrameFor(const nsIContent* aContent) {
|
||||
nsIFrame* frame = aContent->GetPrimaryFrame();
|
||||
if (!frame) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return nsPlaceholderFrame::GetRealFrameFor(frame);
|
||||
}
|
||||
|
||||
nsIFrame* nsLayoutUtils::GetFloatFromPlaceholder(nsIFrame* aFrame) {
|
||||
NS_ASSERTION(aFrame->IsPlaceholderFrame(), "Must have a placeholder here");
|
||||
if (aFrame->GetStateBits() & PLACEHOLDER_FOR_FLOAT) {
|
||||
|
@ -434,15 +434,6 @@ class nsLayoutUtils {
|
||||
*/
|
||||
static bool IsPrimaryStyleFrame(const nsIFrame* aFrame);
|
||||
|
||||
/**
|
||||
* Gets the real primary frame associated with the content object.
|
||||
*
|
||||
* In the case of absolutely positioned elements and floated elements,
|
||||
* the real primary frame is the frame that is out of the flow and not the
|
||||
* placeholder frame.
|
||||
*/
|
||||
static nsIFrame* GetRealPrimaryFrameFor(const nsIContent* aContent);
|
||||
|
||||
#ifdef DEBUG
|
||||
// TODO: remove, see bug 598468.
|
||||
static bool gPreventAssertInCompareTreePosition;
|
||||
|
Loading…
Reference in New Issue
Block a user