mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 518114 part 1. Don't force a virtual GetType call in GetFloatFromPlaceholder. r=roc
This commit is contained in:
parent
84a1bad070
commit
cac46ff131
@ -229,9 +229,8 @@ nsLayoutUtils::GetClosestFrameOfType(nsIFrame* aFrame, nsIAtom* aFrameType)
|
||||
|
||||
nsIFrame*
|
||||
nsLayoutUtils::GetFloatFromPlaceholder(nsIFrame* aFrame) {
|
||||
if (nsGkAtoms::placeholderFrame != aFrame->GetType()) {
|
||||
return nsnull;
|
||||
}
|
||||
NS_ASSERTION(nsGkAtoms::placeholderFrame == aFrame->GetType(),
|
||||
"Must have a placeholder here");
|
||||
|
||||
nsIFrame *outOfFlowFrame =
|
||||
nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
|
||||
|
@ -341,9 +341,9 @@ public:
|
||||
|
||||
/**
|
||||
* If this frame is a placeholder for a float, then return the float,
|
||||
* otherwise return nsnull.
|
||||
* otherwise return nsnull. aPlaceholder must be a placeholder frame.
|
||||
*/
|
||||
static nsIFrame* GetFloatFromPlaceholder(nsIFrame* aPossiblePlaceholder);
|
||||
static nsIFrame* GetFloatFromPlaceholder(nsIFrame* aPlaceholder);
|
||||
|
||||
// Combine aNewBreakType with aOrigBreakType, but limit the break types
|
||||
// to NS_STYLE_CLEAR_LEFT, RIGHT, LEFT_AND_RIGHT.
|
||||
|
@ -6644,7 +6644,9 @@ void nsBlockFrame::CollectFloats(nsIFrame* aFrame, nsFrameList& aList,
|
||||
while (aFrame) {
|
||||
// Don't descend into float containing blocks.
|
||||
if (!aFrame->IsFloatContainingBlock()) {
|
||||
nsIFrame *outOfFlowFrame = nsLayoutUtils::GetFloatFromPlaceholder(aFrame);
|
||||
nsIFrame *outOfFlowFrame =
|
||||
aFrame->GetType() == nsGkAtoms::placeholderFrame ?
|
||||
nsLayoutUtils::GetFloatFromPlaceholder(aFrame) : nsnull;
|
||||
if (outOfFlowFrame) {
|
||||
// Make sure that its parent is us. Otherwise we don't want
|
||||
// to mess around with it because it belongs to someone
|
||||
|
Loading…
Reference in New Issue
Block a user