Closed Bug 237091 Opened 20 years ago Closed 20 years ago

Remove unused WindowOffset and RootWidget functionality from nsViewManager

Categories

(Core :: Web Painting, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file, 1 obsolete file)

This is very simple cleanup.

nsIViewManager exports a SetWindowOffset/GetWindowOffset pair. SetWindowOffset
is called by nsDocumentViewer. GetWindowOffset is never called. The mX/mY values
are never used by anything except these two functions. I don't know what this
was supposed to be for. It's dead code. Let's just get rid of it.

nsIViewManager::SetRootView allows you to set a widget along with the root view.
This extra parameter is always null in all callers. Removing it eliminates any
need for special handling of mRootWindow; the root widget is now always the
widget associated with the root view, if any. I don't know what the general
functionality was supposed to be but it confuses me and probably doesn't work,
since it's never tested. We don't need to store mRootWindow at all.

I think the above functions might have been supposed to be used by embedders. I
don't think embedders are using them and embedders can probably just wrap a
Gecko widget in an outer wrapper widget to get whatever effects they're looking for.

I also rearranged the fields of nsViewManager to pack booleans.
Attached patch complete fixSplinter Review
Forgot to include diff of nsDocumentViewer.cpp
Attachment #143568 - Attachment is obsolete: true
Comment on attachment 143683 [details] [diff] [review]
complete fix

This is 1.8a stuff, David. So no hurry.
Attachment #143683 - Flags: superreview?(dbaron)
Attachment #143683 - Flags: review?(dbaron)
Attachment #143683 - Flags: superreview?(dbaron)
Attachment #143683 - Flags: superreview+
Attachment #143683 - Flags: review?(dbaron)
Attachment #143683 - Flags: review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I'm getting this assertion:

###!!! ASSERTION: Must have a root view: 'view', file nsViewManager.cpp, line 578
Break: at file nsViewManager.cpp, line 578

on every page I load with my Linux gtk1 trunk build from this morning. Is it
really necessary?
Probably not. I will track it down.
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: