From f37851bcbd9643fedbf04162a6df1ee2209ead00 Mon Sep 17 00:00:00 2001 From: "jst%netscape.com" Date: Sat, 13 May 2000 18:10:24 +0000 Subject: [PATCH] In stead of throwing an exception when the user asks for the owner rule of style sheet we return null. git-svn-id: svn://10.0.0.236/trunk@69568 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/style/src/nsCSSStyleSheet.cpp | 8 +++++++- mozilla/layout/html/style/src/nsCSSStyleSheet.cpp | 8 +++++++- mozilla/layout/style/nsCSSStyleSheet.cpp | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp index 27edb71da85..3676fb2386d 100644 --- a/mozilla/content/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/content/html/style/src/nsCSSStyleSheet.cpp @@ -2331,7 +2331,13 @@ CSSStyleSheetImpl::GetMedia(nsIDOMMediaList** aMedia) NS_IMETHODIMP CSSStyleSheetImpl::GetOwnerRule(nsIDOMCSSRule** aOwnerRule) { - return NS_ERROR_NOT_IMPLEMENTED; + NS_ENSURE_ARG_POINTER(aOwnerRule); + *aOwnerRule = nsnull; + + // TBI: This should return the owner rule once the style system knows about + // owning rules... + + return NS_OK; } NS_IMETHODIMP diff --git a/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp b/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp index 27edb71da85..3676fb2386d 100644 --- a/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp +++ b/mozilla/layout/html/style/src/nsCSSStyleSheet.cpp @@ -2331,7 +2331,13 @@ CSSStyleSheetImpl::GetMedia(nsIDOMMediaList** aMedia) NS_IMETHODIMP CSSStyleSheetImpl::GetOwnerRule(nsIDOMCSSRule** aOwnerRule) { - return NS_ERROR_NOT_IMPLEMENTED; + NS_ENSURE_ARG_POINTER(aOwnerRule); + *aOwnerRule = nsnull; + + // TBI: This should return the owner rule once the style system knows about + // owning rules... + + return NS_OK; } NS_IMETHODIMP diff --git a/mozilla/layout/style/nsCSSStyleSheet.cpp b/mozilla/layout/style/nsCSSStyleSheet.cpp index 27edb71da85..3676fb2386d 100644 --- a/mozilla/layout/style/nsCSSStyleSheet.cpp +++ b/mozilla/layout/style/nsCSSStyleSheet.cpp @@ -2331,7 +2331,13 @@ CSSStyleSheetImpl::GetMedia(nsIDOMMediaList** aMedia) NS_IMETHODIMP CSSStyleSheetImpl::GetOwnerRule(nsIDOMCSSRule** aOwnerRule) { - return NS_ERROR_NOT_IMPLEMENTED; + NS_ENSURE_ARG_POINTER(aOwnerRule); + *aOwnerRule = nsnull; + + // TBI: This should return the owner rule once the style system knows about + // owning rules... + + return NS_OK; } NS_IMETHODIMP