mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Remove nsIPresContext::GetXBLBindingURL (bug 253141). r=bzbarsky.
This commit is contained in:
parent
87c6329d60
commit
1274ae3451
@ -109,4 +109,6 @@ FORCE_STATIC_LIB = 1
|
||||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../events
|
||||
|
||||
DEFINES += -D_IMPL_NS_LAYOUT
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -176,7 +176,9 @@
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMCSSStyleDeclaration.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
||||
#include "nsStyleSet.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
// includes needed for the prototype chain interfaces
|
||||
#include "nsIDOMNavigator.h"
|
||||
@ -4883,12 +4885,11 @@ nsElementSH::PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
shell->GetPresContext(getter_AddRefs(pctx));
|
||||
NS_ENSURE_TRUE(pctx, NS_ERROR_UNEXPECTED);
|
||||
|
||||
// XXX this is a hack so that we don't take a performance hit by using
|
||||
// the DOM computed style API. We can get rid of this hack if we merge
|
||||
// the jsdom library with layout.
|
||||
nsRefPtr<nsStyleContext> sc = pctx->StyleSet()->ResolveStyleFor(content,
|
||||
nsnull);
|
||||
NS_ENSURE_TRUE(sc, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIURI> bindingURL;
|
||||
pctx->GetXBLBindingURL(content, getter_AddRefs(bindingURL));
|
||||
nsIURI *bindingURL = sc->GetStyleDisplay()->mBinding;
|
||||
if (!bindingURL) {
|
||||
// No binding, nothing left to do here.
|
||||
return NS_OK;
|
||||
|
@ -856,18 +856,6 @@ nsPresContext::SetImageAnimationMode(PRUint16 aMode)
|
||||
mImageAnimationMode = aMode;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPresContext::GetXBLBindingURL(nsIContent* aContent, nsIURI** aResult)
|
||||
{
|
||||
nsRefPtr<nsStyleContext> sc;
|
||||
sc = StyleSet()->ResolveStyleFor(aContent, nsnull);
|
||||
NS_ENSURE_TRUE(sc, NS_ERROR_FAILURE);
|
||||
|
||||
*aResult = sc->GetStyleDisplay()->mBinding;
|
||||
NS_IF_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::GetMetricsFor(const nsFont& aFont, nsIFontMetrics** aResult)
|
||||
{
|
||||
|
@ -78,8 +78,8 @@ class nsIRenderingContext;
|
||||
#endif
|
||||
|
||||
#define NS_IPRESCONTEXT_IID \
|
||||
{ 0x2820eeff, 0x7e66, 0x43df, \
|
||||
{0xae, 0x19, 0xee, 0xf6, 0x09, 0xc1, 0xcf, 0xfe} }
|
||||
{ 0xa394329f, 0x3b10, 0x49ac, \
|
||||
{0x8f, 0xf2, 0xeb, 0x0b, 0x66, 0x93, 0x82, 0x38} }
|
||||
|
||||
enum nsWidgetType {
|
||||
eWidgetType_Button = 1,
|
||||
@ -175,13 +175,6 @@ public:
|
||||
*/
|
||||
virtual void ClearStyleDataAndReflow() = 0;
|
||||
|
||||
/**
|
||||
* Resolve a new style context for a content node and return the URL
|
||||
* for its XBL binding, or null if it has no binding specified in CSS.
|
||||
*/
|
||||
virtual nsresult GetXBLBindingURL(nsIContent* aContent,
|
||||
nsIURI** aResult) = 0;
|
||||
|
||||
void* AllocateFromShell(size_t aSize)
|
||||
{
|
||||
if (mShell)
|
||||
|
@ -78,8 +78,8 @@ class nsIRenderingContext;
|
||||
#endif
|
||||
|
||||
#define NS_IPRESCONTEXT_IID \
|
||||
{ 0x2820eeff, 0x7e66, 0x43df, \
|
||||
{0xae, 0x19, 0xee, 0xf6, 0x09, 0xc1, 0xcf, 0xfe} }
|
||||
{ 0xa394329f, 0x3b10, 0x49ac, \
|
||||
{0x8f, 0xf2, 0xeb, 0x0b, 0x66, 0x93, 0x82, 0x38} }
|
||||
|
||||
enum nsWidgetType {
|
||||
eWidgetType_Button = 1,
|
||||
@ -175,13 +175,6 @@ public:
|
||||
*/
|
||||
virtual void ClearStyleDataAndReflow() = 0;
|
||||
|
||||
/**
|
||||
* Resolve a new style context for a content node and return the URL
|
||||
* for its XBL binding, or null if it has no binding specified in CSS.
|
||||
*/
|
||||
virtual nsresult GetXBLBindingURL(nsIContent* aContent,
|
||||
nsIURI** aResult) = 0;
|
||||
|
||||
void* AllocateFromShell(size_t aSize)
|
||||
{
|
||||
if (mShell)
|
||||
|
@ -78,8 +78,8 @@ class nsIRenderingContext;
|
||||
#endif
|
||||
|
||||
#define NS_IPRESCONTEXT_IID \
|
||||
{ 0x2820eeff, 0x7e66, 0x43df, \
|
||||
{0xae, 0x19, 0xee, 0xf6, 0x09, 0xc1, 0xcf, 0xfe} }
|
||||
{ 0xa394329f, 0x3b10, 0x49ac, \
|
||||
{0x8f, 0xf2, 0xeb, 0x0b, 0x66, 0x93, 0x82, 0x38} }
|
||||
|
||||
enum nsWidgetType {
|
||||
eWidgetType_Button = 1,
|
||||
@ -175,13 +175,6 @@ public:
|
||||
*/
|
||||
virtual void ClearStyleDataAndReflow() = 0;
|
||||
|
||||
/**
|
||||
* Resolve a new style context for a content node and return the URL
|
||||
* for its XBL binding, or null if it has no binding specified in CSS.
|
||||
*/
|
||||
virtual nsresult GetXBLBindingURL(nsIContent* aContent,
|
||||
nsIURI** aResult) = 0;
|
||||
|
||||
void* AllocateFromShell(size_t aSize)
|
||||
{
|
||||
if (mShell)
|
||||
|
@ -856,18 +856,6 @@ nsPresContext::SetImageAnimationMode(PRUint16 aMode)
|
||||
mImageAnimationMode = aMode;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsPresContext::GetXBLBindingURL(nsIContent* aContent, nsIURI** aResult)
|
||||
{
|
||||
nsRefPtr<nsStyleContext> sc;
|
||||
sc = StyleSet()->ResolveStyleFor(aContent, nsnull);
|
||||
NS_ENSURE_TRUE(sc, NS_ERROR_FAILURE);
|
||||
|
||||
*aResult = sc->GetStyleDisplay()->mBinding;
|
||||
NS_IF_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPresContext::GetMetricsFor(const nsFont& aFont, nsIFontMetrics** aResult)
|
||||
{
|
||||
|
@ -71,7 +71,6 @@ public:
|
||||
virtual void SetImageAnimationMode(PRUint16 aMode);
|
||||
virtual void ClearStyleDataAndReflow();
|
||||
|
||||
virtual nsresult GetXBLBindingURL(nsIContent* aContent, nsIURI** aResult);
|
||||
NS_IMETHOD GetMetricsFor(const nsFont& aFont, nsIFontMetrics** aResult);
|
||||
virtual const nsFont* GetDefaultFont(PRUint8 aFontID) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user