Checking in Fabian's <hidday@geocities.com> patch for bug 105640. Add support for IE's document.compatMode property. r=sicking@bigfoot.com, sr=jst@netscape.com
git-svn-id: svn://10.0.0.236/trunk@107824 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -3051,6 +3051,26 @@ nsHTMLDocument::RouteEvent(nsIDOMEvent* aEvt)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// readonly attribute DOMString compatMode;
|
||||
// Returns "BackCompat" if we are in quirks mode,
|
||||
// "CSS1Compat" if we are in strict mode. See bug 105640.
|
||||
// This was implemented to match MSIE's compatMode property
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetCompatMode(nsAWritableString& aCompatMode)
|
||||
{
|
||||
aCompatMode.Truncate();
|
||||
NS_ASSERTION((mDTDMode == eDTDMode_quirks) || (mDTDMode == eDTDMode_strict),
|
||||
"mDTDMode is neither quirks nor strict for this document");
|
||||
|
||||
if (mDTDMode == eDTDMode_quirks) {
|
||||
aCompatMode.Assign(NS_LITERAL_STRING("BackCompat"));
|
||||
} else {
|
||||
aCompatMode.Assign(NS_LITERAL_STRING("CSS1Compat"));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static PRBool PR_CALLBACK
|
||||
NameHashCleanupEnumeratorCallback(nsHashKey *aKey, void *aData, void* closure)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user