diff --git a/content/base/src/nsDocumentViewer.cpp b/content/base/src/nsDocumentViewer.cpp index 20653de7454a..e285537425ac 100644 --- a/content/base/src/nsDocumentViewer.cpp +++ b/content/base/src/nsDocumentViewer.cpp @@ -444,7 +444,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, getter_AddRefs(mPresShell)); NS_RELEASE(styleSet); if (NS_FAILED(rv)) return rv; - + mPresShell->BeginObservingDocument(); + // Initialize our view manager nsRect bounds; mWindow->GetBounds(bounds); @@ -459,7 +460,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, if (!makeCX) { // Make shell an observer for next time - mPresShell->BeginObservingDocument(); + // XXX - we observe the docuement always, see above after preshell is created + // mPresShell->BeginObservingDocument(); //XXX I don't think this should be done *here*; and why paint nothing //(which turns out to cause black flashes!)??? diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index 20653de7454a..e285537425ac 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -444,7 +444,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, getter_AddRefs(mPresShell)); NS_RELEASE(styleSet); if (NS_FAILED(rv)) return rv; - + mPresShell->BeginObservingDocument(); + // Initialize our view manager nsRect bounds; mWindow->GetBounds(bounds); @@ -459,7 +460,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, if (!makeCX) { // Make shell an observer for next time - mPresShell->BeginObservingDocument(); + // XXX - we observe the docuement always, see above after preshell is created + // mPresShell->BeginObservingDocument(); //XXX I don't think this should be done *here*; and why paint nothing //(which turns out to cause black flashes!)??? diff --git a/layout/base/src/nsDocumentViewer.cpp b/layout/base/src/nsDocumentViewer.cpp index 20653de7454a..e285537425ac 100644 --- a/layout/base/src/nsDocumentViewer.cpp +++ b/layout/base/src/nsDocumentViewer.cpp @@ -444,7 +444,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, getter_AddRefs(mPresShell)); NS_RELEASE(styleSet); if (NS_FAILED(rv)) return rv; - + mPresShell->BeginObservingDocument(); + // Initialize our view manager nsRect bounds; mWindow->GetBounds(bounds); @@ -459,7 +460,8 @@ DocumentViewerImpl::Init(nsNativeWidget aNativeParent, if (!makeCX) { // Make shell an observer for next time - mPresShell->BeginObservingDocument(); + // XXX - we observe the docuement always, see above after preshell is created + // mPresShell->BeginObservingDocument(); //XXX I don't think this should be done *here*; and why paint nothing //(which turns out to cause black flashes!)???