Skip to content
Permalink
Browse files

Folded reflow functions into nsIFrame and eliminated nsIFrameReflow and

nsIHTMLReflow. This saves 4 bytes per frame and cleans things up
  • Loading branch information
troy%netscape.com
troy%netscape.com committed Oct 30, 1999
1 parent 1748f71 commit a12c3d6c5d1fa18ef018f40a2738bc2e8295416b
Showing with 1,927 additions and 1,734 deletions.
  1. +1 −1 content/xul/document/src/nsXULDocument.cpp
  2. +1 −1 docshell/base/nsWebShell.cpp
  3. +19 −28 layout/base/nsPresShell.cpp
  4. +582 −0 layout/base/public/nsIFrame.h
  5. +0 −263 layout/base/public/nsIFrameReflow.h
  6. +93 −97 layout/generic/nsAbsoluteContainingBlock.cpp
  7. +0 −1 layout/generic/nsAbsoluteContainingBlock.h
  8. +0 −1 layout/generic/nsBlockBandData.cpp
  9. +7 −14 layout/generic/nsBlockFrame.cpp
  10. +3 −8 layout/generic/nsBlockReflowContext.cpp
  11. +1 −1 layout/generic/nsBlockReflowContext.h
  12. +7 −14 layout/generic/nsBlockReflowState.cpp
  13. +7 −14 layout/generic/nsBlockReflowState.h
  14. +5 −16 layout/generic/nsContainerFrame.cpp
  15. +3 −12 layout/generic/nsFirstLetterFrame.cpp
  16. +1 −4 layout/generic/nsFrame.cpp
  17. +1 −2 layout/generic/nsFrame.h
  18. +5 −9 layout/generic/nsFrameFrame.cpp
  19. +11 −14 layout/generic/nsFrameSetFrame.cpp
  20. +64 −67 layout/generic/nsHTMLFrame.cpp
  21. +1 −6 layout/generic/nsHTMLReflowCommand.cpp
  22. +5 −6 layout/generic/nsHTMLReflowState.cpp
  23. +582 −0 layout/generic/nsIFrame.h
  24. +1 −8 layout/generic/nsInlineFrame.cpp
  25. +35 −40 layout/generic/nsLineLayout.cpp
  26. +20 −23 layout/generic/nsPageFrame.cpp
  27. +37 −44 layout/generic/nsViewportFrame.cpp
  28. +93 −97 layout/html/base/src/nsAbsoluteContainingBlock.cpp
  29. +0 −1 layout/html/base/src/nsAbsoluteContainingBlock.h
  30. +0 −1 layout/html/base/src/nsBlockBandData.cpp
  31. +7 −14 layout/html/base/src/nsBlockFrame.cpp
  32. +3 −8 layout/html/base/src/nsBlockReflowContext.cpp
  33. +1 −1 layout/html/base/src/nsBlockReflowContext.h
  34. +7 −14 layout/html/base/src/nsBlockReflowState.cpp
  35. +7 −14 layout/html/base/src/nsBlockReflowState.h
  36. +5 −16 layout/html/base/src/nsContainerFrame.cpp
  37. +3 −12 layout/html/base/src/nsFirstLetterFrame.cpp
  38. +1 −4 layout/html/base/src/nsFrame.cpp
  39. +1 −2 layout/html/base/src/nsFrame.h
  40. +64 −67 layout/html/base/src/nsHTMLFrame.cpp
  41. +0 −2 layout/html/base/src/nsHTMLIIDs.cpp
  42. +0 −1 layout/html/base/src/nsHTMLImageLoader.cpp
  43. +1 −6 layout/html/base/src/nsHTMLReflowCommand.cpp
  44. +5 −6 layout/html/base/src/nsHTMLReflowState.cpp
  45. +0 −440 layout/html/base/src/nsIHTMLReflow.h
  46. +1 −8 layout/html/base/src/nsInlineFrame.cpp
  47. +35 −40 layout/html/base/src/nsLineLayout.cpp
  48. +20 −23 layout/html/base/src/nsPageFrame.cpp
  49. +19 −28 layout/html/base/src/nsPresShell.cpp
  50. +1 −3 layout/html/base/src/nsScrollFrame.cpp
  51. +1 −3 layout/html/base/src/nsScrollPortFrame.cpp
  52. +37 −44 layout/html/base/src/nsViewportFrame.cpp
  53. +5 −9 layout/html/document/src/nsFrameFrame.cpp
  54. +11 −14 layout/html/document/src/nsFrameSetFrame.cpp
  55. +2 −2 layout/html/table/src/nsTableFrame.cpp
  56. +1 −2 layout/html/table/src/nsTableFrame.h
  57. +47 −63 layout/html/table/src/nsTableOuterFrame.cpp
  58. +1 −5 layout/html/table/src/nsTableRowGroupFrame.cpp
  59. +2 −2 layout/tables/nsTableFrame.cpp
  60. +1 −2 layout/tables/nsTableFrame.h
  61. +47 −63 layout/tables/nsTableOuterFrame.cpp
  62. +1 −5 layout/tables/nsTableRowGroupFrame.cpp
  63. +2 −7 layout/xul/base/src/nsBoxFrame.cpp
  64. +1 −7 layout/xul/base/src/nsMenuPopupFrame.cpp
  65. +0 −1 layout/xul/base/src/nsToolboxFrame.cpp
  66. +0 −1 layout/xul/base/src/nsTreeRowGroupFrame.cpp
  67. +1 −1 rdf/content/src/nsXULDocument.cpp
  68. +1 −1 webshell/src/nsWebShell.cpp
@@ -63,7 +63,6 @@
#include "nsIDTD.h"
#include "nsIDocumentObserver.h"
#include "nsIFormControl.h"
#include "nsIFrameReflow.h"
#include "nsIHTMLContent.h"
#include "nsIHTMLElementFactory.h"
#include "nsIInputStream.h"
@@ -112,6 +111,7 @@
#include "prlog.h"
#include "rdf.h"
#include "rdfutil.h"
#include "nsIFrame.h"

//----------------------------------------------------------------------
//
@@ -47,6 +47,7 @@
#include "prprf.h"
#include "nsIPluginHost.h"
#include "nsplugin.h"
#include "nsIFrame.h"
//#include "nsPluginsCID.h"
#include "nsIPluginManager.h"
#include "nsIPref.h"
@@ -65,7 +66,6 @@
#include "nsIDOMHTMLDocument.h"
#include "nsLayoutCID.h"
#include "nsIDOMRange.h"
#include "nsIFrameReflow.h"
#include "stopwatch.h"

#include "nsILocaleService.h"
@@ -939,26 +939,23 @@ PresShell::InitialReflow(nscoord aWidth, nscoord aHeight)
nsSize maxSize(bounds.width, bounds.height);
nsHTMLReflowMetrics desiredSize(nsnull);
nsReflowStatus status;
nsIHTMLReflow* htmlReflow;
nsIRenderingContext* rcx = nsnull;

CreateRenderingContext(rootFrame, &rcx);

nsHTMLReflowState reflowState(*mPresContext, rootFrame,
eReflowReason_Initial, rcx, maxSize);

if (NS_OK == rootFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
htmlReflow->Reflow(*mPresContext, desiredSize, reflowState, status);
rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height);
mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height));
rootFrame->Reflow(*mPresContext, desiredSize, reflowState, status);
rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height);
mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height));

#ifdef NS_DEBUG
if (nsIFrame::GetVerifyTreeEnable()) {
rootFrame->VerifyTree();
}
#endif
VERIFY_STYLE_TREE;
if (nsIFrame::GetVerifyTreeEnable()) {
rootFrame->VerifyTree();
}
#endif
VERIFY_STYLE_TREE;
NS_IF_RELEASE(rcx);
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::InitialReflow"));
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: Reflow: PresShell::InitialReflow(), this=%p\n", this));
@@ -1019,24 +1016,21 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
nsSize maxSize(bounds.width, bounds.height);
nsHTMLReflowMetrics desiredSize(nsnull);
nsReflowStatus status;
nsIHTMLReflow* htmlReflow;
nsIRenderingContext* rcx = nsnull;

CreateRenderingContext(rootFrame, &rcx);

nsHTMLReflowState reflowState(*mPresContext, rootFrame,
eReflowReason_Resize, rcx, maxSize);

if (NS_OK == rootFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
htmlReflow->Reflow(*mPresContext, desiredSize, reflowState, status);
rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height);
rootFrame->Reflow(*mPresContext, desiredSize, reflowState, status);
rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height);
#ifdef NS_DEBUG
if (nsIFrame::GetVerifyTreeEnable()) {
rootFrame->VerifyTree();
}
#endif
VERIFY_STYLE_TREE;
if (nsIFrame::GetVerifyTreeEnable()) {
rootFrame->VerifyTree();
}
#endif
VERIFY_STYLE_TREE;
NS_IF_RELEASE(rcx);
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::ResizeReflow"));

@@ -1198,7 +1192,6 @@ PresShell::StyleChangeReflow()
nsSize maxSize(bounds.width, bounds.height);
nsHTMLReflowMetrics desiredSize(nsnull);
nsReflowStatus status;
nsIHTMLReflow* htmlReflow;
nsIRenderingContext* rcx = nsnull;

CreateRenderingContext(rootFrame, &rcx);
@@ -1207,16 +1200,14 @@ PresShell::StyleChangeReflow()
nsHTMLReflowState reflowState(*mPresContext, rootFrame,
eReflowReason_Resize, rcx, maxSize);

if (NS_OK == rootFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
htmlReflow->Reflow(*mPresContext, desiredSize, reflowState, status);
rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height);
rootFrame->Reflow(*mPresContext, desiredSize, reflowState, status);
rootFrame->SizeTo(mPresContext, desiredSize.width, desiredSize.height);
#ifdef NS_DEBUG
if (nsIFrame::GetVerifyTreeEnable()) {
rootFrame->VerifyTree();
}
#endif
VERIFY_STYLE_TREE;
if (nsIFrame::GetVerifyTreeEnable()) {
rootFrame->VerifyTree();
}
#endif
VERIFY_STYLE_TREE;
NS_IF_RELEASE(rcx);
NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::StyleChangeReflow"));
}

0 comments on commit a12c3d6

Please sign in to comment.
You can’t perform that action at this time.