dom_docimpl.h
来自「最新Nokia手机浏览器全套源代码完美版。」· C头文件 代码 · 共 889 行 · 第 1/3 页
H
889 行
void applyXSLTransform(ProcessingInstructionImpl* pi);
void setTransformSource(void* doc) { m_transformSource = doc; }
const void* transformSource() { return m_transformSource; }
DocumentImpl* transformSourceDocument() { return m_transformSourceDocument; }
void setTransformSourceDocument(DocumentImpl* doc);
#endif
#ifndef KHTML_NO_XBL
// XBL methods
XBL::XBLBindingManager* bindingManager() const { return m_bindingManager; }
#endif
void incDOMTreeVersion() { ++m_domtree_version; }
unsigned int domTreeVersion() const { return m_domtree_version; }
signals:
void finishedParsing();
protected:
khtml::CSSStyleSelector *m_styleSelector;
KHTMLView *m_view;
QStringList m_state;
khtml::DocLoader *m_docLoader;
khtml::Tokenizer *m_tokenizer;
QString m_url;
QString m_baseURL;
QString m_baseTarget;
DocumentTypeImpl *m_doctype;
DOMImplementationImpl *m_implementation;
StyleSheetImpl *m_sheet;
QString m_usersheet;
QString m_printSheet;
QStringList m_availableSheets;
// Track the number of currently loading top-level stylesheets. Sheets
// loaded using the @import directive are not included in this count.
// We use this count of pending sheets to detect when we can begin attaching
// elements.
int m_pendingStylesheets;
// But sometimes you need to ignore pending stylesheet count to
// force an immediate layout when requested by JS.
bool m_ignorePendingStylesheets;
CSSStyleSheetImpl *m_elemSheet;
QPaintDevice *m_paintDevice;
QPaintDeviceMetrics *m_paintDeviceMetrics;
ParseMode pMode;
HTMLMode hMode;
#if NOKIA_CHANGES
bool m_xHtmlMobile;
#endif
QColor m_textColor;
NodeImpl *m_focusNode;
NodeImpl *m_hoverNode;
NodeImpl *m_activeNode;
unsigned int m_domtree_version;
// ### replace me with something more efficient
// in lookup and insertion.
DOMStringImpl **m_elementNames;
unsigned short m_elementNameAlloc;
unsigned short m_elementNameCount;
DOMStringImpl **m_attrNames;
unsigned short m_attrNameAlloc;
unsigned short m_attrNameCount;
DOMStringImpl** m_namespaceURIs;
unsigned short m_namespaceURIAlloc;
unsigned short m_namespaceURICount;
QPtrList<NodeIteratorImpl> m_nodeIterators;
AbstractViewImpl *m_defaultView;
unsigned short m_listenerTypes;
StyleSheetListImpl* m_styleSheets;
LocalStyleRefs m_localStyleRefs; // references to inlined style elements
QPtrList<RegisteredEventListener> m_windowEventListeners;
QPtrList<NodeImpl> m_maintainsState;
QColor m_linkColor;
QColor m_visitedLinkColor;
QColor m_activeLinkColor;
DOMString m_preferredStylesheetSet;
bool m_loadingSheet;
bool visuallyOrdered;
bool m_bParsing;
bool m_bAllDataReceived;
bool m_docChanged;
bool m_styleSelectorDirty;
bool m_inStyleRecalc;
bool m_closeAfterStyleRecalc;
bool m_usesDescendantRules;
bool m_usesSiblingRules;
DOMString m_title;
bool m_titleSetExplicitly;
NodeImpl *m_titleElement;
#ifdef NOKIA_CHANGES
khtml::SharedPtr<ElementImpl> m_documentElement;
#endif
RenderArena* m_renderArena;
QPtrDict< QValueList<DocumentMarker> > m_markers;
#if APPLE_CHANGES
KWQAccObjectCache* m_accCache;
#endif
QPtrList<HTMLImageLoader> m_imageLoadEventDispatchSoonList;
QPtrList<HTMLImageLoader> m_imageLoadEventDispatchingList;
int m_imageLoadEventTimer;
NodeImpl* m_cssTarget;
bool m_processingLoadEvent;
QTime m_startTime;
bool m_overMinimumLayoutThreshold;
#ifdef KHTML_XSLT
void* m_transformSource;
DocumentImpl* m_transformSourceDocument;
#endif
#ifndef KHTML_NO_XBL
XBL::XBLBindingManager* m_bindingManager; // The access point through which documents and elements communicate with XBL.
#endif
QMap<QString, HTMLMapElementImpl *> m_imageMapsByName;
DOMString m_policyBaseURL;
QPtrDict<NodeImpl> m_disconnectedNodesWithEventListeners;
int m_docID; // A unique document identifier used for things like document-specific mapped attributes.
#if APPLE_CHANGES
public:
KWQSignal m_finishedParsing;
static Document createInstance (DocumentImpl *impl);
bool inPageCache();
void setInPageCache(bool flag);
void restoreRenderer(khtml::RenderObject* render);
void passwordFieldAdded();
void passwordFieldRemoved();
bool hasPasswordField() const;
void secureFormAdded();
void secureFormRemoved();
bool hasSecureForm() const;
void setShouldCreateRenderers(bool f);
bool shouldCreateRenderers();
void setDecoder(khtml::Decoder *);
khtml::Decoder *decoder() const { return m_decoder; }
void setDashboardRegionsDirty(bool f) { m_dashboardRegionsDirty = f; }
bool dashboardRegionsDirty() const { return m_dashboardRegionsDirty; }
bool hasDashboardRegions () const { return m_hasDashboardRegions; }
void setHasDashboardRegions (bool f) { m_hasDashboardRegions = f; }
const QValueList<khtml::DashboardRegionValue> & dashboardRegions() const;
void setDashboardRegions (const QValueList<khtml::DashboardRegionValue>& regions);
void removeAllEventListenersFromAllNodes();
void registerDisconnectedNodeWithEventListeners(NodeImpl *node);
void unregisterDisconnectedNodeWithEventListeners(NodeImpl *node);
void setFastDisplayMode(bool f) { m_fastDisplayMode = f; }
bool fastDisplayMode() const { return m_fastDisplayMode; }
void radioButtonChecked(HTMLInputElementImpl *caller, HTMLFormElementImpl *form);
HTMLInputElementImpl* checkedRadioButtonForGroup(DOMString name, HTMLFormElementImpl *form);
void removeRadioButtonGroup(DOMString name, HTMLFormElementImpl *form);
private:
void updateTitle();
void removeAllDisconnectedNodeEventListeners();
JSEditor *jsEditor();
JSEditor *m_jsEditor;
bool relinquishesEditingFocus(NodeImpl *node);
bool acceptsEditingFocus(NodeImpl *node);
mutable DOMString m_domain;
bool m_inPageCache;
khtml::RenderObject *m_savedRenderer;
int m_passwordFields;
int m_secureForms;
khtml::Decoder *m_decoder;
QDict<ElementImpl> m_elementsById;
QDict<ElementImpl> m_elementsByAccessKey;
bool m_accessKeyDictValid;
bool m_createRenderers;
InheritedBool m_designMode;
QValueList<khtml::DashboardRegionValue> m_dashboardRegions;
bool m_hasDashboardRegions;
bool m_dashboardRegionsDirty;
bool m_fastDisplayMode;
QPtrDict< QDict<HTMLInputElementImpl> > *m_selectedRadioButtons;
#endif
};
class DocumentFragmentImpl : public NodeBaseImpl
{
public:
DocumentFragmentImpl(DocumentPtr *doc);
// DOM methods overridden from parent classes
virtual DOMString nodeName() const;
virtual unsigned short nodeType() const;
virtual NodeImpl *cloneNode ( bool deep );
// Other methods (not part of DOM)
virtual bool childTypeAllowed( unsigned short type );
virtual DOMString toString() const;
};
class DocumentTypeImpl : public NodeImpl
{
public:
DocumentTypeImpl(DOMImplementationImpl *_implementation, DocumentPtr *doc,
const DOMString &qualifiedName, const DOMString &publicId,
const DOMString &systemId);
~DocumentTypeImpl();
// DOM methods & attributes for DocumentType
NamedNodeMapImpl *entities() const { return m_entities; }
NamedNodeMapImpl *notations() const { return m_notations; }
DOMString name() const { return m_qualifiedName; }
DOMString publicId() const { return m_publicId; }
DOMString systemId() const { return m_systemId; }
DOMString internalSubset() const { return m_subset; }
// DOM methods overridden from parent classes
virtual DOMString nodeName() const;
virtual unsigned short nodeType() const;
virtual bool childTypeAllowed( unsigned short type );
virtual NodeImpl *cloneNode ( bool deep );
// Other methods (not part of DOM)
void setName(const DOMString& n) { m_qualifiedName = n; }
void setPublicId(const DOMString& publicId) { m_publicId = publicId; }
void setSystemId(const DOMString& systemId) { m_systemId = systemId; }
DOMImplementationImpl *implementation() const { return m_implementation; }
void copyFrom(const DocumentTypeImpl&);
virtual DOMString toString() const;
#if APPLE_CHANGES
static DocumentType createInstance (DocumentTypeImpl *impl);
#endif
protected:
DOMImplementationImpl *m_implementation;
NamedNodeMapImpl* m_entities;
NamedNodeMapImpl* m_notations;
DOMString m_qualifiedName;
DOMString m_publicId;
DOMString m_systemId;
DOMString m_subset;
};
}; //namespace
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?