Closed Bug 115113 Opened 23 years ago Closed 23 years ago

de-comify nsHTMLReflowCommand

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9.8

People

(Reporter: waterson, Assigned: waterson)

References

Details

Attachments

(1 file, 1 obsolete file)

There is no reason to have nsIReflowCommand, since this class is not used
outside the layout engine. I'd also like to eliminate the interface class so I
could mutate the reflow command directly (see

  <http://bugzilla.mozilla.org/show_bug.cgi?id=91423#c38>).
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.8
Pretty rote. The only interesting changes are in:

. nsHTMLReflowCommand.h, where I added the doc-comments from nsIReflowCommand,
  and de-virtualized all the methods.

. nsPresShell.cpp, which now assumes direct ownership of reflow commands once
  appended to the queue.

. nsBlockFrame.cpp, which adds some debugging stuff that I had sitting around
  in my tree.

Since nsHTMLReflowCommand is no longer an nsIReflowCommand (and hence no longer
an nsISupports), places that had addressed it with a comptr now use a bare
pointer instead.
Keywords: patch
Blocks: 91423
Comment on attachment 61632 [details] [diff] [review]
remove nsIReflowCommand.h, fix users to use nsHTMLReflowCommand directly

r=karnaze
Attachment #61632 - Flags: review+
Oops. I jumped the gun: Several files outside the layout directory included
nsIPresShell or nsHTMLParts.h, which meant that they couldn't see
nsHTMLReflowCommand.h header.

They don't really _need_ to see the nsHTMLReflowCommand class, so I've just
added an anonymous

  class nsHTMLReflowCommand;

declaration; however, you can't have anonymous enum declarations, so I broke
the reflow types out into nsReflowType.h, and exported it.

Still look okay?
Attachment #61632 - Attachment is obsolete: true
Comment on attachment 61754 [details] [diff] [review]
patch that compiles outside the mozilla/layout directory

It looks like only nsIPresShell::CancelReflowCommand bit you. r=karnaze
Attachment #61754 - Flags: review+
Comment on attachment 61754 [details] [diff] [review]
patch that compiles outside the mozilla/layout directory

NITS:
* spacing not lining up on 
+	 nsReflowType.h 		 

* does nsReflowType.h need a newline at the end of the file?

otherwise, looks great, much better this way. sr=attinasi
Attachment #61754 - Flags: superreview+
Thanks: fixed those problems in my tree. I'll check it in when mozilla-0.9.8 opens.
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Depends on: 115738
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: