mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
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:
parent
35ff46488c
commit
02423381a1
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user