Bug 1294918 - Use helper method nsIFrame::IsFixedPosContainingBlock. r?dholbert draft
authorL. David Baron <dbaron@dbaron.org>
Fri, 12 Aug 2016 18:39:45 -0700
changeset 400324 537118d219819da215a7c9db2eeaab5a54a9ec9a
parent 400323 cd0c763c1fb4cb7f31113f621d7cb4eb56a6d59a
child 528194 82f556b4495f92c4d0edca96c26923cb8af93eed
push id26135
push userdbaron@mozilla.com
push dateSat, 13 Aug 2016 01:40:08 +0000
reviewersdholbert
bugs1294918
milestone51.0a1
Bug 1294918 - Use helper method nsIFrame::IsFixedPosContainingBlock. r?dholbert MozReview-Commit-ID: 5fdGqLSOjvs
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -1068,17 +1068,17 @@ nsFrameConstructorState::PushAbsoluteCon
 
   mAbsoluteItems =
     nsAbsoluteItems(AdjustAbsoluteContainingBlock(aNewAbsoluteContainingBlock));
 
   /* See if we're wiring the fixed-pos and abs-pos lists together.  This happens iff
    * we're a transformed element.
    */
   mFixedPosIsAbsPos = aPositionedFrame &&
-      aPositionedFrame->StyleDisplay()->IsFixedPosContainingBlock(aPositionedFrame);
+      aPositionedFrame->IsFixedPosContainingBlock();
 
   if (aNewAbsoluteContainingBlock) {
     aNewAbsoluteContainingBlock->MarkAsAbsoluteContainingBlock();
   }
 }
 
 void
 nsFrameConstructorState::PushFloatContainingBlock(nsContainerFrame* aNewFloatContainingBlock,
@@ -6148,17 +6148,17 @@ nsCSSFrameConstructor::GetAbsoluteContai
     // parent frame, unless we're dealing with a scrollframe.
     // Scrollframes are special since they're not positioned, but their
     // scrolledframe might be.  So, we need to check this special case to return
     // the correct containing block (the scrolledframe) in that case.
     // If we're looking for a fixed-pos containing block and the frame is
     // not transformed, skip it.
     if (!frame->IsAbsPosContainingBlock() ||
         (aType == FIXED_POS &&
-         !frame->StyleDisplay()->IsFixedPosContainingBlock(frame))) {
+         !frame->IsFixedPosContainingBlock())) {
       continue;
     }
     nsIFrame* absPosCBCandidate = frame;
     nsIAtom* type = absPosCBCandidate->GetType();
     if (type == nsGkAtoms::fieldSetFrame) {
       absPosCBCandidate = static_cast<nsFieldSetFrame*>(absPosCBCandidate)->GetInner();
       if (!absPosCBCandidate) {
         continue;