2015-05-12 09:30:00 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-09-16 04:07:07 +04:00
|
|
|
|
|
|
|
#include "nsContextMenuInfo.h"
|
|
|
|
|
2003-03-19 06:47:09 +03:00
|
|
|
#include "nsIImageLoadingContent.h"
|
2012-10-12 16:43:01 +04:00
|
|
|
#include "imgLoader.h"
|
2004-02-28 05:00:23 +03:00
|
|
|
#include "nsIDOMDocument.h"
|
2002-09-16 04:07:07 +04:00
|
|
|
#include "nsIDOMHTMLDocument.h"
|
|
|
|
#include "nsIDOMHTMLElement.h"
|
2004-02-28 05:00:23 +03:00
|
|
|
#include "nsIDOMHTMLHtmlElement.h"
|
2002-09-16 04:07:07 +04:00
|
|
|
#include "nsIDOMHTMLAnchorElement.h"
|
|
|
|
#include "nsIDOMHTMLImageElement.h"
|
|
|
|
#include "nsIDOMHTMLAreaElement.h"
|
|
|
|
#include "nsIDOMHTMLLinkElement.h"
|
2011-04-24 10:54:25 +04:00
|
|
|
#include "nsIDOMWindow.h"
|
2015-10-27 00:37:32 +03:00
|
|
|
#include "nsICSSDeclaration.h"
|
2004-02-28 05:00:23 +03:00
|
|
|
#include "nsIDOMCSSValue.h"
|
|
|
|
#include "nsIDOMCSSPrimitiveValue.h"
|
2002-09-16 04:07:07 +04:00
|
|
|
#include "nsNetUtil.h"
|
2004-02-19 05:44:03 +03:00
|
|
|
#include "nsUnicharUtils.h"
|
2010-05-21 00:08:02 +04:00
|
|
|
#include "nsIDocument.h"
|
|
|
|
#include "nsIPrincipal.h"
|
|
|
|
#include "nsIContentSecurityPolicy.h"
|
|
|
|
#include "nsIContentPolicy.h"
|
2012-10-12 16:43:01 +04:00
|
|
|
#include "imgRequestProxy.h"
|
2002-09-16 04:07:07 +04:00
|
|
|
|
2015-10-27 00:37:32 +03:00
|
|
|
using mozilla::dom::Element;
|
|
|
|
using mozilla::ErrorResult;
|
|
|
|
|
2014-04-27 11:06:00 +04:00
|
|
|
NS_IMPL_ISUPPORTS(nsContextMenuInfo, nsIContextMenuInfo)
|
2002-09-16 04:07:07 +04:00
|
|
|
|
2004-02-28 05:00:23 +03:00
|
|
|
nsContextMenuInfo::nsContextMenuInfo()
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
nsContextMenuInfo::~nsContextMenuInfo()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2003-11-19 04:20:56 +03:00
|
|
|
NS_IMETHODIMP
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetMouseEvent(nsIDOMEvent** aEvent)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aEvent);
|
|
|
|
NS_IF_ADDREF(*aEvent = mMouseEvent);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2003-11-19 04:20:56 +03:00
|
|
|
NS_IMETHODIMP
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetTargetNode(nsIDOMNode** aNode)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aNode);
|
|
|
|
NS_IF_ADDREF(*aNode = mDOMNode);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsContextMenuInfo::GetAssociatedLink(nsAString& aHRef)
|
|
|
|
{
|
|
|
|
NS_ENSURE_STATE(mAssociatedLink);
|
|
|
|
aHRef.Truncate(0);
|
2015-05-11 22:35:13 +03:00
|
|
|
|
2002-09-16 04:07:07 +04:00
|
|
|
nsCOMPtr<nsIDOMElement> content(do_QueryInterface(mAssociatedLink));
|
|
|
|
nsAutoString localName;
|
2015-05-11 22:35:13 +03:00
|
|
|
if (content) {
|
2002-09-16 04:07:07 +04:00
|
|
|
content->GetLocalName(localName);
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMElement> linkContent;
|
|
|
|
ToLowerCase(localName);
|
2004-05-23 02:15:22 +04:00
|
|
|
if (localName.EqualsLiteral("a") ||
|
|
|
|
localName.EqualsLiteral("area") ||
|
|
|
|
localName.EqualsLiteral("link")) {
|
2011-09-29 10:19:26 +04:00
|
|
|
bool hasAttr;
|
2002-09-16 04:07:07 +04:00
|
|
|
content->HasAttribute(NS_LITERAL_STRING("href"), &hasAttr);
|
|
|
|
if (hasAttr) {
|
|
|
|
linkContent = content;
|
|
|
|
nsCOMPtr<nsIDOMHTMLAnchorElement> anchor(do_QueryInterface(linkContent));
|
2015-05-11 22:35:13 +03:00
|
|
|
if (anchor) {
|
2002-09-16 04:07:07 +04:00
|
|
|
anchor->GetHref(aHRef);
|
2015-05-11 22:35:13 +03:00
|
|
|
} else {
|
2002-09-16 04:07:07 +04:00
|
|
|
nsCOMPtr<nsIDOMHTMLAreaElement> area(do_QueryInterface(linkContent));
|
2015-05-11 22:35:13 +03:00
|
|
|
if (area) {
|
2002-09-16 04:07:07 +04:00
|
|
|
area->GetHref(aHRef);
|
2015-05-11 22:35:13 +03:00
|
|
|
} else {
|
2002-09-16 04:07:07 +04:00
|
|
|
nsCOMPtr<nsIDOMHTMLLinkElement> link(do_QueryInterface(linkContent));
|
2015-05-11 22:35:13 +03:00
|
|
|
if (link) {
|
2002-09-16 04:07:07 +04:00
|
|
|
link->GetHref(aHRef);
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-05-11 22:35:13 +03:00
|
|
|
} else {
|
2002-09-16 04:07:07 +04:00
|
|
|
nsCOMPtr<nsIDOMNode> curr;
|
|
|
|
mAssociatedLink->GetParentNode(getter_AddRefs(curr));
|
|
|
|
while (curr) {
|
|
|
|
content = do_QueryInterface(curr);
|
2015-05-11 22:35:13 +03:00
|
|
|
if (!content) {
|
2002-09-16 04:07:07 +04:00
|
|
|
break;
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
content->GetLocalName(localName);
|
|
|
|
ToLowerCase(localName);
|
2004-05-23 02:15:22 +04:00
|
|
|
if (localName.EqualsLiteral("a")) {
|
2011-09-29 10:19:26 +04:00
|
|
|
bool hasAttr;
|
2002-09-16 04:07:07 +04:00
|
|
|
content->HasAttribute(NS_LITERAL_STRING("href"), &hasAttr);
|
|
|
|
if (hasAttr) {
|
|
|
|
linkContent = content;
|
2015-05-11 22:35:13 +03:00
|
|
|
nsCOMPtr<nsIDOMHTMLAnchorElement> anchor(
|
|
|
|
do_QueryInterface(linkContent));
|
|
|
|
if (anchor) {
|
2002-09-16 04:07:07 +04:00
|
|
|
anchor->GetHref(aHRef);
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
|
|
|
} else {
|
2012-07-30 18:20:58 +04:00
|
|
|
linkContent = nullptr; // Links can't be nested.
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMNode> temp = curr;
|
|
|
|
temp->GetParentNode(getter_AddRefs(curr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2003-11-19 04:20:56 +03:00
|
|
|
NS_IMETHODIMP
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetImageContainer(imgIContainer** aImageContainer)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aImageContainer);
|
|
|
|
NS_ENSURE_STATE(mDOMNode);
|
2015-05-11 22:35:13 +03:00
|
|
|
|
2002-09-16 04:07:07 +04:00
|
|
|
nsCOMPtr<imgIRequest> request;
|
|
|
|
GetImageRequest(mDOMNode, getter_AddRefs(request));
|
2015-05-11 22:35:13 +03:00
|
|
|
if (request) {
|
2002-09-16 04:07:07 +04:00
|
|
|
return request->GetImage(aImageContainer);
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
2003-11-19 04:20:56 +03:00
|
|
|
NS_IMETHODIMP
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetImageSrc(nsIURI** aURI)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aURI);
|
|
|
|
NS_ENSURE_STATE(mDOMNode);
|
2015-05-11 22:35:13 +03:00
|
|
|
|
2006-08-28 06:15:56 +04:00
|
|
|
nsCOMPtr<nsIImageLoadingContent> content(do_QueryInterface(mDOMNode));
|
|
|
|
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
|
|
|
return content->GetCurrentURI(aURI);
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetBackgroundImageContainer(imgIContainer** aImageContainer)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aImageContainer);
|
|
|
|
NS_ENSURE_STATE(mDOMNode);
|
2015-05-11 22:35:13 +03:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<imgRequestProxy> request;
|
2002-09-16 04:07:07 +04:00
|
|
|
GetBackgroundImageRequest(mDOMNode, getter_AddRefs(request));
|
2015-05-11 22:35:13 +03:00
|
|
|
if (request) {
|
2002-09-16 04:07:07 +04:00
|
|
|
return request->GetImage(aImageContainer);
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetBackgroundImageSrc(nsIURI** aURI)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG_POINTER(aURI);
|
|
|
|
NS_ENSURE_STATE(mDOMNode);
|
2015-05-11 22:35:13 +03:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<imgRequestProxy> request;
|
2002-09-16 04:07:07 +04:00
|
|
|
GetBackgroundImageRequest(mDOMNode, getter_AddRefs(request));
|
2015-05-11 22:35:13 +03:00
|
|
|
if (request) {
|
2002-09-16 04:07:07 +04:00
|
|
|
return request->GetURI(aURI);
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetImageRequest(nsIDOMNode* aDOMNode, imgIRequest** aRequest)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
NS_ENSURE_ARG(aDOMNode);
|
|
|
|
NS_ENSURE_ARG_POINTER(aRequest);
|
|
|
|
|
|
|
|
// Get content
|
2004-02-28 05:00:23 +03:00
|
|
|
nsCOMPtr<nsIImageLoadingContent> content(do_QueryInterface(aDOMNode));
|
2002-09-16 04:07:07 +04:00
|
|
|
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
|
|
|
|
2015-05-11 22:35:13 +03:00
|
|
|
return content->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, aRequest);
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::HasBackgroundImage(nsIDOMNode* aDOMNode)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
2011-10-17 18:59:28 +04:00
|
|
|
NS_ENSURE_TRUE(aDOMNode, false);
|
2002-09-16 04:07:07 +04:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<imgRequestProxy> request;
|
2002-09-16 04:07:07 +04:00
|
|
|
GetBackgroundImageRequest(aDOMNode, getter_AddRefs(request));
|
2015-05-11 22:35:13 +03:00
|
|
|
|
2012-07-30 18:20:58 +04:00
|
|
|
return (request != nullptr);
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetBackgroundImageRequest(nsIDOMNode* aDOMNode,
|
|
|
|
imgRequestProxy** aRequest)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
|
|
|
|
|
|
|
NS_ENSURE_ARG(aDOMNode);
|
|
|
|
NS_ENSURE_ARG_POINTER(aRequest);
|
|
|
|
|
2004-02-28 05:00:23 +03:00
|
|
|
nsCOMPtr<nsIDOMNode> domNode = aDOMNode;
|
|
|
|
|
|
|
|
// special case for the <html> element: if it has no background-image
|
|
|
|
// we'll defer to <body>
|
|
|
|
nsCOMPtr<nsIDOMHTMLHtmlElement> htmlElement = do_QueryInterface(domNode);
|
|
|
|
if (htmlElement) {
|
2013-08-08 00:23:08 +04:00
|
|
|
nsCOMPtr<nsIDOMHTMLElement> element = do_QueryInterface(domNode);
|
2004-02-28 05:00:23 +03:00
|
|
|
nsAutoString nameSpace;
|
2013-08-08 00:23:08 +04:00
|
|
|
element->GetNamespaceURI(nameSpace);
|
2004-02-28 05:00:23 +03:00
|
|
|
if (nameSpace.IsEmpty()) {
|
|
|
|
nsresult rv = GetBackgroundImageRequestInternal(domNode, aRequest);
|
2015-05-11 22:35:13 +03:00
|
|
|
if (NS_SUCCEEDED(rv) && *aRequest) {
|
2004-02-28 05:00:23 +03:00
|
|
|
return NS_OK;
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2004-02-28 05:00:23 +03:00
|
|
|
|
|
|
|
// no background-image found
|
|
|
|
nsCOMPtr<nsIDOMDocument> document;
|
|
|
|
domNode->GetOwnerDocument(getter_AddRefs(document));
|
|
|
|
nsCOMPtr<nsIDOMHTMLDocument> htmlDocument(do_QueryInterface(document));
|
|
|
|
NS_ENSURE_TRUE(htmlDocument, NS_ERROR_FAILURE);
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMHTMLElement> body;
|
|
|
|
htmlDocument->GetBody(getter_AddRefs(body));
|
|
|
|
domNode = do_QueryInterface(body);
|
2006-09-29 02:34:33 +04:00
|
|
|
NS_ENSURE_TRUE(domNode, NS_ERROR_FAILURE);
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
}
|
2004-02-28 05:00:23 +03:00
|
|
|
return GetBackgroundImageRequestInternal(domNode, aRequest);
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
|
2003-11-19 04:20:56 +03:00
|
|
|
nsresult
|
2015-05-11 22:35:13 +03:00
|
|
|
nsContextMenuInfo::GetBackgroundImageRequestInternal(nsIDOMNode* aDOMNode,
|
|
|
|
imgRequestProxy** aRequest)
|
2002-09-16 04:07:07 +04:00
|
|
|
{
|
2006-04-06 14:56:57 +04:00
|
|
|
NS_ENSURE_ARG_POINTER(aDOMNode);
|
2004-02-28 05:00:23 +03:00
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMNode> domNode = aDOMNode;
|
|
|
|
nsCOMPtr<nsIDOMNode> parentNode;
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMDocument> document;
|
|
|
|
domNode->GetOwnerDocument(getter_AddRefs(document));
|
2011-04-24 10:54:25 +04:00
|
|
|
NS_ENSURE_TRUE(document, NS_ERROR_FAILURE);
|
2004-02-28 05:00:23 +03:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
nsCOMPtr<mozIDOMWindowProxy> window;
|
2011-04-24 10:54:25 +04:00
|
|
|
document->GetDefaultView(getter_AddRefs(window));
|
|
|
|
NS_ENSURE_TRUE(window, NS_ERROR_FAILURE);
|
2004-02-28 05:00:23 +03:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
auto* piWindow = nsPIDOMWindowOuter::From(window);
|
|
|
|
nsPIDOMWindowInner* innerWindow = piWindow->GetCurrentInnerWindow();
|
|
|
|
MOZ_ASSERT(innerWindow);
|
2015-10-27 00:37:32 +03:00
|
|
|
|
2004-02-28 05:00:23 +03:00
|
|
|
nsCOMPtr<nsIDOMCSSPrimitiveValue> primitiveValue;
|
|
|
|
nsAutoString bgStringValue;
|
|
|
|
|
2010-05-21 00:08:02 +04:00
|
|
|
nsCOMPtr<nsIDocument> doc(do_QueryInterface(document));
|
2016-06-14 14:43:21 +03:00
|
|
|
nsCOMPtr<nsIPrincipal> principal = doc ? doc->NodePrincipal() : nullptr;
|
2014-10-16 06:11:45 +04:00
|
|
|
|
2011-10-17 18:59:28 +04:00
|
|
|
while (true) {
|
2015-10-27 00:37:32 +03:00
|
|
|
nsCOMPtr<Element> domElement(do_QueryInterface(domNode));
|
2004-02-28 05:00:23 +03:00
|
|
|
// bail for the parent node of the root element or null argument
|
2015-05-11 22:35:13 +03:00
|
|
|
if (!domElement) {
|
2004-02-28 05:00:23 +03:00
|
|
|
break;
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2014-08-20 01:49:38 +04:00
|
|
|
|
2015-10-27 00:37:32 +03:00
|
|
|
ErrorResult dummy;
|
|
|
|
nsCOMPtr<nsICSSDeclaration> computedStyle =
|
2016-01-30 20:05:36 +03:00
|
|
|
innerWindow->GetComputedStyle(*domElement, EmptyString(), dummy);
|
2015-10-27 00:37:32 +03:00
|
|
|
dummy.SuppressException();
|
2004-02-28 05:00:23 +03:00
|
|
|
if (computedStyle) {
|
|
|
|
nsCOMPtr<nsIDOMCSSValue> cssValue;
|
|
|
|
computedStyle->GetPropertyCSSValue(NS_LITERAL_STRING("background-image"),
|
|
|
|
getter_AddRefs(cssValue));
|
|
|
|
primitiveValue = do_QueryInterface(cssValue);
|
|
|
|
if (primitiveValue) {
|
|
|
|
primitiveValue->GetStringValue(bgStringValue);
|
2004-05-23 02:15:22 +04:00
|
|
|
if (!bgStringValue.EqualsLiteral("none")) {
|
2004-02-28 05:00:23 +03:00
|
|
|
nsCOMPtr<nsIURI> bgUri;
|
|
|
|
NS_NewURI(getter_AddRefs(bgUri), bgStringValue);
|
|
|
|
NS_ENSURE_TRUE(bgUri, NS_ERROR_FAILURE);
|
|
|
|
|
2016-05-19 15:31:15 +03:00
|
|
|
imgLoader* il = imgLoader::NormalLoader();
|
2004-02-28 05:00:23 +03:00
|
|
|
NS_ENSURE_TRUE(il, NS_ERROR_FAILURE);
|
|
|
|
|
2014-11-18 16:46:53 +03:00
|
|
|
return il->LoadImage(bgUri, nullptr, nullptr,
|
|
|
|
doc->GetReferrerPolicy(), principal, nullptr,
|
2016-04-11 11:58:03 +03:00
|
|
|
nullptr, nullptr, nullptr, nsIRequest::LOAD_NORMAL,
|
2015-09-21 00:55:59 +03:00
|
|
|
nullptr, nsIContentPolicy::TYPE_INTERNAL_IMAGE,
|
2017-04-25 04:17:38 +03:00
|
|
|
EmptyString(),
|
|
|
|
/* aUseUrgentStartForChannel */ false, aRequest);
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
2004-02-28 05:00:23 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// bail if we encounter non-transparent background-color
|
|
|
|
computedStyle->GetPropertyCSSValue(NS_LITERAL_STRING("background-color"),
|
|
|
|
getter_AddRefs(cssValue));
|
|
|
|
primitiveValue = do_QueryInterface(cssValue);
|
|
|
|
if (primitiveValue) {
|
|
|
|
primitiveValue->GetStringValue(bgStringValue);
|
2015-05-11 22:35:13 +03:00
|
|
|
if (!bgStringValue.EqualsLiteral("transparent")) {
|
2004-02-28 05:00:23 +03:00
|
|
|
return NS_ERROR_FAILURE;
|
2015-05-11 22:35:13 +03:00
|
|
|
}
|
2004-02-28 05:00:23 +03:00
|
|
|
}
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
2004-02-28 05:00:23 +03:00
|
|
|
|
|
|
|
domNode->GetParentNode(getter_AddRefs(parentNode));
|
|
|
|
domNode = parentNode;
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|
|
|
|
|
2004-02-28 05:00:23 +03:00
|
|
|
return NS_ERROR_FAILURE;
|
2002-09-16 04:07:07 +04:00
|
|
|
}
|