~ubuntu-branches/ubuntu/gutsy/firefox/gutsy

« back to all changes in this revision

Viewing changes to layout/generic/nsBlockFrame.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Ian Jackson
  • Date: 2006-10-10 18:49:32 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20061010184932-da75izt7y0e59afq
Tags: 1.99+2.0rc2+dfsg-0ubuntu1
* New upstream version 2.0rc2.
* Fix/workaround for epiphany GtkSocket lifetype crash:
  apply patch id=241087 from Mozilla Bugzilla #241535 to fix LP #63814.
* Change application name to `Firefox', as requested by mdz.
  Files changed:
    - browser/locales/en-US/chrome/branding/brand.dtd
    - browser/locales/en-US/chrome/branding/brand.properties;
  New values:
    - brandShortName and brandFullName: `Bon Echo' => `Firefox'
    - vendorShortName: `Mozilla' => `Ubuntu'
* Make preferences dialogue fit again (bah!).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1640
1640
  // Now fix the iterator, keeping track of how many lines we walk
1641
1641
  // back through.
1642
1642
  PRInt32 lineCount = 0;
 
1643
  const line_iterator begin = begin_lines();
1643
1644
  do {
1644
1645
    // XXX this might happen if the block is split; e.g.,
1645
 
    // printing or print preview. For now, panic.
1646
 
    NS_ASSERTION(aLine != begin_lines(),
1647
 
                 "ran out of lines before we ran out of prev-in-flows");
1648
 
 
 
1646
    // printing or print preview.
 
1647
    if (aLine == begin) {
 
1648
#ifdef NS_DEBUG
 
1649
      if (GetParent() == aPrevInFlow->GetParent()) {
 
1650
        NS_ERROR("ran out of lines before we ran out of prev-in-flows");
 
1651
      }
 
1652
      else {
 
1653
        NS_ERROR("not yet implemented: retarget incremental reflow to"
 
1654
                 " prev-in-flow with different parent");
 
1655
      }
 
1656
#endif
 
1657
      break;
 
1658
    }
1649
1659
    // Is the previous line a ``hard'' break? If so, stop: these
1650
1660
    // continuations will be preserved during an unconstrained reflow.
1651
1661
    // XXXwaterson should this be `!= NS_STYLE_CLEAR_NONE'?
4782
4792
  nsBlockReflowState& aState, nsIFrame* aFrame)
4783
4793
{
4784
4794
  if (nsLayoutAtoms::placeholderFrame != aFrame->GetType()) {
4785
 
    // Check the in-flow inline children. We should encounter only
4786
 
    // first-in-flow placeholders, so the frame subtree rooted at
4787
 
    // aFrame should not change.
4788
 
    if (!aFrame->GetStyleDisplay()->IsBlockLevel()) {
 
4795
    // Descend into children that are not float containing blocks.
 
4796
    // We should encounter only first-in-flow placeholders, so the
 
4797
    // frame subtree rooted at aFrame should not change.
 
4798
    if (!aFrame->IsFloatContainingBlock()) {
4789
4799
      for (nsIFrame* f = aFrame->GetFirstChild(nsnull); f; f = f->GetNextSibling()) {
4790
4800
#ifdef DEBUG
4791
4801
        PRBool changed =
5771
5781
    printf(" prevSibling=%p deletedNextInFlow=%p\n", prevSibling, deletedNextInFlow);
5772
5782
#endif
5773
5783
 
5774
 
    if (!aDeletedFrame->IsFloatContainingBlock()) {
5775
 
      // Clear the float cache from placeholders that are descendants
5776
 
      // of aDeletedFrame (bug 337883).
5777
 
      line->RemovePlaceholderDescendantsOf(aDeletedFrame);
5778
 
    }
5779
 
 
5780
5784
    if (aDestroyFrames) {
5781
5785
      aDeletedFrame->Destroy(presContext);
5782
5786
    } else {
7511
7515
void nsBlockFrame::CollectFloats(nsIFrame* aFrame, nsFrameList& aList, nsIFrame** aTail,
7512
7516
                                 PRBool aFromOverflow) {
7513
7517
  while (aFrame) {
7514
 
    // Don't descend into block children
7515
 
    if (!aFrame->GetStyleDisplay()->IsBlockLevel()) {
 
7518
    // Don't descend into float containing blocks.
 
7519
    if (!aFrame->IsFloatContainingBlock()) {
7516
7520
      nsIFrame *outOfFlowFrame = nsLayoutUtils::GetFloatFromPlaceholder(aFrame);
7517
7521
      if (outOfFlowFrame) {
7518
7522
        // Make sure that its parent is us. Otherwise we don't want