Fixes for bugs 2620 and 3482.
git-svn-id: svn://10.0.0.236/trunk@26965 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e2381c69d2
commit
ef3e70d2a4
@ -2619,13 +2619,19 @@ RDFElementImpl::GetID(nsIAtom*& aResult) const
|
||||
NS_IMETHODIMP
|
||||
RDFElementImpl::GetClasses(nsVoidArray& aArray) const
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
if (mAttributes != nsnull)
|
||||
rv = mAttributes->GetClasses(aArray);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RDFElementImpl::HasClass(nsIAtom* aClass) const
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
if (mAttributes != nsnull)
|
||||
rv = mAttributes->HasClass(aClass);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsIURLGroup.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIXULContentSink.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIXULParentDocument.h"
|
||||
@ -3151,7 +3152,29 @@ XULDocumentImpl::StartLayout(void)
|
||||
// Resize-reflow this time
|
||||
nsCOMPtr<nsIPresContext> cx;
|
||||
shell->GetPresContext(getter_AddRefs(cx));
|
||||
nsRect r;
|
||||
|
||||
if (cx) {
|
||||
nsCOMPtr<nsISupports> container;
|
||||
cx->GetContainer(getter_AddRefs(container));
|
||||
if (container) {
|
||||
nsCOMPtr<nsIWebShell> webShell;
|
||||
webShell = do_QueryInterface(container);
|
||||
if (webShell) {
|
||||
nsCOMPtr<nsIStyleContext> styleContext;
|
||||
if (NS_SUCCEEDED(cx->ResolveStyleContextFor(mRootContent, nsnull,
|
||||
PR_FALSE,
|
||||
getter_AddRefs(styleContext)))) {
|
||||
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
styleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
webShell->SetScrolling(disp->mOverflow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsRect r;
|
||||
cx->GetVisibleArea(r);
|
||||
shell->InitialReflow(r.width, r.height);
|
||||
|
||||
|
||||
@ -2619,13 +2619,19 @@ RDFElementImpl::GetID(nsIAtom*& aResult) const
|
||||
NS_IMETHODIMP
|
||||
RDFElementImpl::GetClasses(nsVoidArray& aArray) const
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
if (mAttributes != nsnull)
|
||||
rv = mAttributes->GetClasses(aArray);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RDFElementImpl::HasClass(nsIAtom* aClass) const
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
if (mAttributes != nsnull)
|
||||
rv = mAttributes->HasClass(aClass);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
#include "nsIURL.h"
|
||||
#include "nsIURLGroup.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIXULContentSink.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
#include "nsIXULParentDocument.h"
|
||||
@ -3151,7 +3152,29 @@ XULDocumentImpl::StartLayout(void)
|
||||
// Resize-reflow this time
|
||||
nsCOMPtr<nsIPresContext> cx;
|
||||
shell->GetPresContext(getter_AddRefs(cx));
|
||||
nsRect r;
|
||||
|
||||
if (cx) {
|
||||
nsCOMPtr<nsISupports> container;
|
||||
cx->GetContainer(getter_AddRefs(container));
|
||||
if (container) {
|
||||
nsCOMPtr<nsIWebShell> webShell;
|
||||
webShell = do_QueryInterface(container);
|
||||
if (webShell) {
|
||||
nsCOMPtr<nsIStyleContext> styleContext;
|
||||
if (NS_SUCCEEDED(cx->ResolveStyleContextFor(mRootContent, nsnull,
|
||||
PR_FALSE,
|
||||
getter_AddRefs(styleContext)))) {
|
||||
|
||||
const nsStyleDisplay* disp = (const nsStyleDisplay*)
|
||||
styleContext->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
webShell->SetScrolling(disp->mOverflow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsRect r;
|
||||
cx->GetVisibleArea(r);
|
||||
shell->InitialReflow(r.width, r.height);
|
||||
|
||||
|
||||
@ -2619,13 +2619,19 @@ RDFElementImpl::GetID(nsIAtom*& aResult) const
|
||||
NS_IMETHODIMP
|
||||
RDFElementImpl::GetClasses(nsVoidArray& aArray) const
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
if (mAttributes != nsnull)
|
||||
rv = mAttributes->GetClasses(aArray);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RDFElementImpl::HasClass(nsIAtom* aClass) const
|
||||
{
|
||||
return NS_OK;
|
||||
nsresult rv = NS_ERROR_NULL_POINTER;
|
||||
if (mAttributes != nsnull)
|
||||
rv = mAttributes->HasClass(aClass);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user