зеркало из https://github.com/mozilla/gecko-dev.git
Bug 904178 - Part d: Use nsIDocument in nsMenuItemIconX::GetIconURI; r=smichaud
This commit is contained in:
Родитель
75303ff8f0
Коммит
b33cd2bd32
|
@ -176,15 +176,11 @@ nsMenuItemIconX::GetIconURI(nsIURI** aIconURI)
|
|||
if (!hasImageAttr) {
|
||||
// If the content node has no "image" attribute, get the
|
||||
// "list-style-image" property from CSS.
|
||||
nsCOMPtr<nsIDOMDocument> domDocument =
|
||||
do_QueryInterface(mContent->GetDocument());
|
||||
if (!domDocument)
|
||||
nsCOMPtr<nsIDocument> document = mContent->GetDocument();
|
||||
if (!document)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> window;
|
||||
rv = domDocument->GetDefaultView(getter_AddRefs(window));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
nsCOMPtr<nsPIDOMWindow> window = document->GetWindow();
|
||||
if (!window)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче