DeCOMtaminate nsIFrame::GetView and SetView, and add HasView, GetClosestView, and AreAncestorViewsVisible to consolidate common patterns. b=208004 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2006-05-17 02:37:59 +00:00
parent 35ff46488c
commit 02423381a1
2 changed files with 4 additions and 6 deletions

View File

@ -151,9 +151,8 @@ inFlasher::RepaintElement(nsIDOMElement* aElement)
nsIFrame* parentWithView = nsnull;
frame->GetParentWithView(pcontext, &parentWithView);
if (parentWithView) {
nsIView* view = nsnull;
nsresult rv= parentWithView->GetView(pcontext, &view);
if (NS_SUCCEEDED(rv) && view) {
nsIView* view = parentWithView->GetViewExternal(pcontext);
if (view) {
nsCOMPtr<nsIViewManager> viewManager;
view->GetViewManager(*getter_AddRefs(viewManager));
if (viewManager) {

View File

@ -199,9 +199,8 @@ inLayoutUtils::GetScreenOrigin(nsIDOMElement* aElement)
while (frame) {
// Look for a widget so we can get screen coordinates
nsIView* view = nsnull;
rv = frame->GetView(presContext, &view);
if (NS_SUCCEEDED(rv) && view) {
nsIView* view = frame->GetViewExternal(presContext);
if (view) {
rv = view->GetWidget(*getter_AddRefs(widget));
if (widget)
break;