~ubuntu-branches/ubuntu/karmic/xulrunner-1.9/karmic

« back to all changes in this revision

Viewing changes to mozilla/layout/base/nsCSSFrameConstructor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-03-05 17:19:38 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20090305171938-em56xsox7j2mfqdq
Tags: 1.9.0.7+nobinonly-0ubuntu1
* security/stability v1.9.0.7 (FIREFOX_3_0_7_RELEASE)
  - USN-728-1
* bump required soft-depends on nspr to >= 4.7.3
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
9027
9027
  else {
9028
9028
    // No previous or next sibling, so treat this like an appended frame.
9029
9029
    isAppend = PR_TRUE;
 
9030
    // Get continuation that parents the last child
 
9031
    parentFrame = nsLayoutUtils::GetLastContinuationWithChild(parentFrame);
9030
9032
    // Deal with fieldsets
9031
9033
    parentFrame = ::GetAdjustedParentFrame(parentFrame, parentFrame->GetType(),
9032
9034
                                           aContainer, aIndexInContainer);
10675
10677
      // Set the fieldset's initial child list
10676
10678
      newFrame->SetInitialChildList(nsnull, continuingAreaFrame);
10677
10679
    }
 
10680
  } else if (nsGkAtoms::legendFrame == frameType) {
 
10681
    newFrame = NS_NewLegendFrame(shell, styleContext);
 
10682
 
 
10683
    if (newFrame) {
 
10684
      newFrame->Init(content, aParentFrame, aFrame);
 
10685
      // XXXbz should we be passing in a non-null aContentParentFrame?
 
10686
      nsHTMLContainerFrame::CreateViewForFrame(newFrame, nsnull, PR_FALSE);
 
10687
    }
10678
10688
  } else {
10679
10689
    NS_NOTREACHED("unexpected frame type");
10680
10690
    *aContinuingFrame = nsnull;
13475
13485
  }
13476
13486
  
13477
13487
  NS_PRECONDITION(mDocument, "No document?  Pshaw!\n");
 
13488
  NS_PRECONDITION(!nsContentUtils::IsSafeToRunScript(),
 
13489
                  "Missing a script blocker!");
13478
13490
 
13479
13491
  // Use the stack if we can, otherwise fall back on heap-allocation.
13480
13492
  nsAutoTArray<RestyleEnumerateData, RESTYLE_ARRAY_STACKSIZE> restyleArr;
13603
13615
    menuPopupFrame->SetGeneratedChildren();
13604
13616
#endif
13605
13617
 
13606
 
    nsCSSFrameConstructor* fc = mPresShell->FrameConstructor();
13607
 
    fc->BeginUpdate();
13608
 
 
13609
 
    nsFrameItems childItems;
13610
 
    nsFrameConstructorState state(mPresShell, nsnull, nsnull, nsnull);
13611
 
    nsresult rv = fc->ProcessChildren(state, mContent, frame, PR_FALSE,
13612
 
                                      childItems, PR_FALSE);
13613
 
    if (NS_FAILED(rv))
13614
 
      return rv;
13615
 
 
13616
 
    fc->CreateAnonymousFrames(mContent->Tag(), state, mContent, frame,
13617
 
                              PR_FALSE, childItems);
13618
 
    frame->SetInitialChildList(nsnull, childItems.childList);
13619
 
 
13620
 
    fc->EndUpdate();
 
13618
   {
 
13619
      nsAutoScriptBlocker scriptBlocker;
 
13620
      nsCSSFrameConstructor* fc = mPresShell->FrameConstructor();
 
13621
      fc->BeginUpdate();
 
13622
 
 
13623
      nsFrameItems childItems;
 
13624
      nsFrameConstructorState state(mPresShell, nsnull, nsnull, nsnull);
 
13625
      nsresult rv = fc->ProcessChildren(state, mContent, frame, PR_FALSE,
 
13626
                                        childItems, PR_FALSE);
 
13627
      if (NS_FAILED(rv))
 
13628
        return rv;
 
13629
 
 
13630
      fc->CreateAnonymousFrames(mContent->Tag(), state, mContent, frame,
 
13631
                                PR_FALSE, childItems);
 
13632
      frame->SetInitialChildList(nsnull, childItems.childList);
 
13633
 
 
13634
      fc->EndUpdate();
 
13635
    }
13621
13636
 
13622
13637
    if (mCallback)
13623
13638
      mCallback(mContent, frame, mArg);