зеркало из https://github.com/mozilla/pjs.git
Store maps as nsIDOMHTMLMapElement instead of the obsolete nsIImageMap
This commit is contained in:
Родитель
92ca700119
Коммит
668422fbe7
|
@ -26,7 +26,6 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIImageMap.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
#include "nsIDOMNode.h" // for Find
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -49,6 +48,7 @@
|
|||
#include "nsRepository.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
|
||||
#ifdef PCB_USE_PROTOCOL_CONNECTION
|
||||
|
@ -143,8 +143,7 @@ nsHTMLDocument::~nsHTMLDocument()
|
|||
}
|
||||
NS_IF_RELEASE(mParser);
|
||||
for (i = 0; i < mImageMaps.Count(); i++) {
|
||||
nsIImageMap* map = (nsIImageMap*)mImageMaps.ElementAt(i);
|
||||
|
||||
nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i);
|
||||
NS_RELEASE(map);
|
||||
}
|
||||
if (mForms) {
|
||||
|
@ -220,8 +219,7 @@ nsHTMLDocument::Reset(nsIURL *aURL)
|
|||
NS_IF_RELEASE(mAnchors);
|
||||
|
||||
for (i = 0; i < mImageMaps.Count(); i++) {
|
||||
nsIImageMap* map = (nsIImageMap*)mImageMaps.ElementAt(i);
|
||||
|
||||
nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i);
|
||||
NS_RELEASE(map);
|
||||
}
|
||||
if (mForms) {
|
||||
|
@ -352,7 +350,8 @@ NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::AddImageMap(nsIImageMap* aMap)
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::AddImageMap(nsIDOMHTMLMapElement* aMap)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aMap, "null ptr");
|
||||
if (nsnull == aMap) {
|
||||
|
@ -365,8 +364,9 @@ NS_IMETHODIMP nsHTMLDocument::AddImageMap(nsIImageMap* aMap)
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
||||
nsIImageMap** aResult)
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
||||
nsIDOMHTMLMapElement** aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
|
@ -376,7 +376,7 @@ NS_IMETHODIMP nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
|||
nsAutoString name;
|
||||
PRInt32 i, n = mImageMaps.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
nsIImageMap* map = (nsIImageMap*) mImageMaps.ElementAt(i);
|
||||
nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i);
|
||||
if (NS_OK == map->GetName(name)) {
|
||||
if (name.EqualsIgnoreCase(aMapName)) {
|
||||
*aResult = map;
|
||||
|
|
|
@ -27,14 +27,19 @@
|
|||
#include "nsIHTMLContentContainer.h"
|
||||
#include "plhash.h"
|
||||
|
||||
class nsIHTMLStyleSheet;
|
||||
class nsIHTMLCSSStyleSheet;
|
||||
class nsContentList;
|
||||
class nsIContentViewerContainer;
|
||||
class nsIHTMLStyleSheet;
|
||||
class nsIHTMLCSSStyleSheet;
|
||||
class nsIParser;
|
||||
class BlockText;
|
||||
|
||||
class nsHTMLDocument : public nsMarkupDocument, public nsIHTMLDocument, public nsIDOMHTMLDocument, public nsIDOMNSHTMLDocument, public nsIHTMLContentContainer {
|
||||
class nsHTMLDocument : public nsMarkupDocument,
|
||||
public nsIHTMLDocument,
|
||||
public nsIDOMHTMLDocument,
|
||||
public nsIDOMNSHTMLDocument,
|
||||
public nsIHTMLContentContainer
|
||||
{
|
||||
public:
|
||||
nsHTMLDocument();
|
||||
virtual ~nsHTMLDocument();
|
||||
|
@ -51,9 +56,10 @@ public:
|
|||
|
||||
NS_IMETHOD EndLoad();
|
||||
|
||||
NS_IMETHOD AddImageMap(nsIImageMap* aMap);
|
||||
NS_IMETHOD AddImageMap(nsIDOMHTMLMapElement* aMap);
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult);
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName,
|
||||
nsIDOMHTMLMapElement** aResult);
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet);
|
||||
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aStyleSheet);
|
||||
|
|
|
@ -23,6 +23,7 @@ class nsIImageMap;
|
|||
class nsString;
|
||||
class nsIDOMHTMLCollection;
|
||||
class nsIDOMHTMLFormElement;
|
||||
class nsIDOMHTMLMapElement;
|
||||
class nsIHTMLStyleSheet;
|
||||
|
||||
/* b2a848b0-d0a9-11d1-89b1-006008911b81 */
|
||||
|
@ -42,10 +43,11 @@ class nsIHTMLDocument : public nsISupports {
|
|||
public:
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle) = 0;
|
||||
|
||||
NS_IMETHOD AddImageMap(nsIImageMap* aMap) = 0;
|
||||
NS_IMETHOD AddImageMap(nsIDOMHTMLMapElement* aMap) = 0;
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName,
|
||||
nsIDOMHTMLMapElement** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult) = 0;
|
||||
|
||||
NS_IMETHOD AddForm(nsIDOMHTMLFormElement* aForm) = 0;
|
||||
|
||||
NS_IMETHOD GetForms(nsIDOMHTMLCollection** aForms) = 0;
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "nsHTMLAtoms.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIImageMap.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
#include "nsIDOMNode.h" // for Find
|
||||
#include "nsIDOMElement.h"
|
||||
|
@ -49,6 +48,7 @@
|
|||
#include "nsRepository.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDOMHTMLMapElement.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
|
||||
#ifdef PCB_USE_PROTOCOL_CONNECTION
|
||||
|
@ -143,8 +143,7 @@ nsHTMLDocument::~nsHTMLDocument()
|
|||
}
|
||||
NS_IF_RELEASE(mParser);
|
||||
for (i = 0; i < mImageMaps.Count(); i++) {
|
||||
nsIImageMap* map = (nsIImageMap*)mImageMaps.ElementAt(i);
|
||||
|
||||
nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i);
|
||||
NS_RELEASE(map);
|
||||
}
|
||||
if (mForms) {
|
||||
|
@ -220,8 +219,7 @@ nsHTMLDocument::Reset(nsIURL *aURL)
|
|||
NS_IF_RELEASE(mAnchors);
|
||||
|
||||
for (i = 0; i < mImageMaps.Count(); i++) {
|
||||
nsIImageMap* map = (nsIImageMap*)mImageMaps.ElementAt(i);
|
||||
|
||||
nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i);
|
||||
NS_RELEASE(map);
|
||||
}
|
||||
if (mForms) {
|
||||
|
@ -352,7 +350,8 @@ NS_IMETHODIMP nsHTMLDocument::SetTitle(const nsString& aTitle)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::AddImageMap(nsIImageMap* aMap)
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::AddImageMap(nsIDOMHTMLMapElement* aMap)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aMap, "null ptr");
|
||||
if (nsnull == aMap) {
|
||||
|
@ -365,8 +364,9 @@ NS_IMETHODIMP nsHTMLDocument::AddImageMap(nsIImageMap* aMap)
|
|||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
||||
nsIImageMap** aResult)
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
||||
nsIDOMHTMLMapElement** aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
|
@ -376,7 +376,7 @@ NS_IMETHODIMP nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
|||
nsAutoString name;
|
||||
PRInt32 i, n = mImageMaps.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
nsIImageMap* map = (nsIImageMap*) mImageMaps.ElementAt(i);
|
||||
nsIDOMHTMLMapElement* map = (nsIDOMHTMLMapElement*)mImageMaps.ElementAt(i);
|
||||
if (NS_OK == map->GetName(name)) {
|
||||
if (name.EqualsIgnoreCase(aMapName)) {
|
||||
*aResult = map;
|
||||
|
|
|
@ -27,14 +27,19 @@
|
|||
#include "nsIHTMLContentContainer.h"
|
||||
#include "plhash.h"
|
||||
|
||||
class nsIHTMLStyleSheet;
|
||||
class nsIHTMLCSSStyleSheet;
|
||||
class nsContentList;
|
||||
class nsIContentViewerContainer;
|
||||
class nsIHTMLStyleSheet;
|
||||
class nsIHTMLCSSStyleSheet;
|
||||
class nsIParser;
|
||||
class BlockText;
|
||||
|
||||
class nsHTMLDocument : public nsMarkupDocument, public nsIHTMLDocument, public nsIDOMHTMLDocument, public nsIDOMNSHTMLDocument, public nsIHTMLContentContainer {
|
||||
class nsHTMLDocument : public nsMarkupDocument,
|
||||
public nsIHTMLDocument,
|
||||
public nsIDOMHTMLDocument,
|
||||
public nsIDOMNSHTMLDocument,
|
||||
public nsIHTMLContentContainer
|
||||
{
|
||||
public:
|
||||
nsHTMLDocument();
|
||||
virtual ~nsHTMLDocument();
|
||||
|
@ -51,9 +56,10 @@ public:
|
|||
|
||||
NS_IMETHOD EndLoad();
|
||||
|
||||
NS_IMETHOD AddImageMap(nsIImageMap* aMap);
|
||||
NS_IMETHOD AddImageMap(nsIDOMHTMLMapElement* aMap);
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult);
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName,
|
||||
nsIDOMHTMLMapElement** aResult);
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet);
|
||||
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aStyleSheet);
|
||||
|
|
|
@ -23,6 +23,7 @@ class nsIImageMap;
|
|||
class nsString;
|
||||
class nsIDOMHTMLCollection;
|
||||
class nsIDOMHTMLFormElement;
|
||||
class nsIDOMHTMLMapElement;
|
||||
class nsIHTMLStyleSheet;
|
||||
|
||||
/* b2a848b0-d0a9-11d1-89b1-006008911b81 */
|
||||
|
@ -42,10 +43,11 @@ class nsIHTMLDocument : public nsISupports {
|
|||
public:
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle) = 0;
|
||||
|
||||
NS_IMETHOD AddImageMap(nsIImageMap* aMap) = 0;
|
||||
NS_IMETHOD AddImageMap(nsIDOMHTMLMapElement* aMap) = 0;
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName,
|
||||
nsIDOMHTMLMapElement** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult) = 0;
|
||||
|
||||
NS_IMETHOD AddForm(nsIDOMHTMLFormElement* aForm) = 0;
|
||||
|
||||
NS_IMETHOD GetForms(nsIDOMHTMLCollection** aForms) = 0;
|
||||
|
|
|
@ -456,6 +456,12 @@ APPLET {
|
|||
AREA {
|
||||
display: none;
|
||||
}
|
||||
BASE {
|
||||
display: none;
|
||||
}
|
||||
BASEFONT {
|
||||
display: none;
|
||||
}
|
||||
HEAD {
|
||||
display: none;
|
||||
}
|
||||
|
@ -489,6 +495,10 @@ NOFRAMES {
|
|||
|
||||
/* Pseudo-element style */
|
||||
|
||||
:IB-PSEUDO {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:SCROLLBAR-LOOK {
|
||||
background-color: #c0c0c0;
|
||||
/* border-color: inherit; */
|
||||
|
|
|
@ -456,6 +456,12 @@ APPLET {
|
|||
AREA {
|
||||
display: none;
|
||||
}
|
||||
BASE {
|
||||
display: none;
|
||||
}
|
||||
BASEFONT {
|
||||
display: none;
|
||||
}
|
||||
HEAD {
|
||||
display: none;
|
||||
}
|
||||
|
@ -489,6 +495,10 @@ NOFRAMES {
|
|||
|
||||
/* Pseudo-element style */
|
||||
|
||||
:IB-PSEUDO {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:SCROLLBAR-LOOK {
|
||||
background-color: #c0c0c0;
|
||||
/* border-color: inherit; */
|
||||
|
|
Загрузка…
Ссылка в новой задаче