Sprinkle null-checks in an attempt to "fix" the orange so I can get answers.

This commit is contained in:
bzbarsky%mit.edu 2007-04-27 00:47:34 +00:00
Родитель 53c8e25776
Коммит cf00908c24
2 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -4681,7 +4681,7 @@ PresShell::StyleSheetAdded(nsIDocument *aDocument,
aStyleSheet->GetApplicable(applicable);
if (applicable && aStyleSheet->HasRules()) {
if (mDidInitialReflow) {
if (mDidInitialReflow && mDocument && mDocument->GetDocumentURI()) {
nsCAutoString uri;
mDocument->GetDocumentURI()->GetSpec(uri);
printf("Sheet added after StartLayout on %s\n", uri.get());
@ -4700,7 +4700,7 @@ PresShell::StyleSheetRemoved(nsIDocument *aDocument,
PRBool applicable;
aStyleSheet->GetApplicable(applicable);
if (applicable && aStyleSheet->HasRules()) {
if (mDidInitialReflow) {
if (mDidInitialReflow && mDocument && mDocument->GetDocumentURI()) {
nsCAutoString uri;
mDocument->GetDocumentURI()->GetSpec(uri);
printf("Sheet removed after StartLayout on %s\n", uri.get());
@ -4715,7 +4715,7 @@ PresShell::StyleSheetApplicableStateChanged(nsIDocument *aDocument,
PRBool aApplicable)
{
if (aStyleSheet->HasRules()) {
if (mDidInitialReflow) {
if (mDidInitialReflow && mDocument && mDocument->GetDocumentURI()) {
nsCAutoString uri;
mDocument->GetDocumentURI()->GetSpec(uri);
printf("Sheet state toggled after StartLayout on %s\n", uri.get());

Просмотреть файл

@ -612,11 +612,13 @@ CanvasFrame::Reflow(nsPresContext* aPresContext,
FinishAndStoreOverflow(&aDesiredSize);
}
if (mContent && mContent->GetOwnerDoc() && mContent->GetOwnerDoc()->GetDocumentURI()) {
nsCAutoString uri;
mContent->GetDocument()->GetDocumentURI()->GetSpec(uri);
mContent->GetOwnerDoc()->GetDocumentURI()->GetSpec(uri);
printf("Finished canvas reflow for %s:\n"
"Height: %d, overflow height: %d\n",
uri.get(), aDesiredSize.height, aDesiredSize.mOverflowArea.height);
}
NS_FRAME_TRACE_REFLOW_OUT("CanvasFrame::Reflow", aStatus);
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);