| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
#ifndef Document_h |
|---|
| 26 |
#define Document_h |
|---|
| 27 |
|
|---|
| 28 |
#include "Attr.h" |
|---|
| 29 |
#include "Color.h" |
|---|
| 30 |
#include "DeprecatedPtrList.h" |
|---|
| 31 |
#include "DocumentMarker.h" |
|---|
| 32 |
#include "HTMLCollection.h" |
|---|
| 33 |
#include "HTMLFormElement.h" |
|---|
| 34 |
#include "KURL.h" |
|---|
| 35 |
#include "StringHash.h" |
|---|
| 36 |
#include "Timer.h" |
|---|
| 37 |
#include <wtf/HashCountedSet.h> |
|---|
| 38 |
#include <wtf/ListHashSet.h> |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
#if PLATFORM(MAC) |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
namespace WebCore { |
|---|
| 50 |
|
|---|
| 51 |
class AXObjectCache; |
|---|
| 52 |
class Attr; |
|---|
| 53 |
class Attribute; |
|---|
| 54 |
class CDATASection; |
|---|
| 55 |
class CachedCSSStyleSheet; |
|---|
| 56 |
class CanvasRenderingContext2D; |
|---|
| 57 |
class CharacterData; |
|---|
| 58 |
class CSSStyleDeclaration; |
|---|
| 59 |
class CSSStyleSelector; |
|---|
| 60 |
class CSSStyleSheet; |
|---|
| 61 |
class Comment; |
|---|
| 62 |
class Database; |
|---|
| 63 |
class DOMImplementation; |
|---|
| 64 |
class DOMSelection; |
|---|
| 65 |
class DOMWindow; |
|---|
| 66 |
class DatabaseThread; |
|---|
| 67 |
class DocLoader; |
|---|
| 68 |
class DocumentFragment; |
|---|
| 69 |
class DocumentType; |
|---|
| 70 |
class EditingText; |
|---|
| 71 |
class Element; |
|---|
| 72 |
class EntityReference; |
|---|
| 73 |
class Event; |
|---|
| 74 |
class EventListener; |
|---|
| 75 |
class Frame; |
|---|
| 76 |
class FrameView; |
|---|
| 77 |
class HTMLCanvasElement; |
|---|
| 78 |
class HTMLDocument; |
|---|
| 79 |
class HTMLElement; |
|---|
| 80 |
class HTMLFormControlElementWithState; |
|---|
| 81 |
class HTMLFormElement; |
|---|
| 82 |
class HTMLHeadElement; |
|---|
| 83 |
class HTMLImageLoader; |
|---|
| 84 |
class HTMLInputElement; |
|---|
| 85 |
class HTMLMapElement; |
|---|
| 86 |
class IntPoint; |
|---|
| 87 |
class JSNode; |
|---|
| 88 |
class MouseEventWithHitTestResults; |
|---|
| 89 |
class NodeFilter; |
|---|
| 90 |
class NodeIterator; |
|---|
| 91 |
class Page; |
|---|
| 92 |
class PlatformMouseEvent; |
|---|
| 93 |
class ProcessingInstruction; |
|---|
| 94 |
class Range; |
|---|
| 95 |
class RegisteredEventListener; |
|---|
| 96 |
class RenderArena; |
|---|
| 97 |
class SecurityOrigin; |
|---|
| 98 |
class Settings; |
|---|
| 99 |
class StyleSheet; |
|---|
| 100 |
class StyleSheetList; |
|---|
| 101 |
class Text; |
|---|
| 102 |
class TextResourceDecoder; |
|---|
| 103 |
class Tokenizer; |
|---|
| 104 |
class TreeWalker; |
|---|
| 105 |
|
|---|
| 106 |
#if ENABLE(SVG) |
|---|
| 107 |
class SVGDocumentExtensions; |
|---|
| 108 |
#endif |
|---|
| 109 |
|
|---|
| 110 |
#if ENABLE(XBL) |
|---|
| 111 |
class XBLBindingManager; |
|---|
| 112 |
#endif |
|---|
| 113 |
|
|---|
| 114 |
#if ENABLE(XPATH) |
|---|
| 115 |
class XPathEvaluator; |
|---|
| 116 |
class XPathExpression; |
|---|
| 117 |
class XPathNSResolver; |
|---|
| 118 |
class XPathResult; |
|---|
| 119 |
#endif |
|---|
| 120 |
|
|---|
| 121 |
#if ENABLE(DASHBOARD_SUPPORT) |
|---|
| 122 |
struct DashboardRegionValue; |
|---|
| 123 |
#endif |
|---|
| 124 |
struct HitTestRequest; |
|---|
| 125 |
|
|---|
| 126 |
typedef int ExceptionCode; |
|---|
| 127 |
|
|---|
| 128 |
class FormElementKey { |
|---|
| 129 |
public: |
|---|
| 130 |
FormElementKey(AtomicStringImpl* = 0, AtomicStringImpl* = 0); |
|---|
| 131 |
~FormElementKey(); |
|---|
| 132 |
FormElementKey(const FormElementKey&); |
|---|
| 133 |
FormElementKey& operator=(const FormElementKey&); |
|---|
| 134 |
|
|---|
| 135 |
AtomicStringImpl* name() const { return m_name; } |
|---|
| 136 |
AtomicStringImpl* type() const { return m_type; } |
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 |
FormElementKey(WTF::HashTableDeletedValueType) : m_name(hashTableDeletedValue()) { } |
|---|
| 140 |
bool isHashTableDeletedValue() const { return m_name == hashTableDeletedValue(); } |
|---|
| 141 |
|
|---|
| 142 |
private: |
|---|
| 143 |
void ref() const; |
|---|
| 144 |
void deref() const; |
|---|
| 145 |
|
|---|
| 146 |
static AtomicStringImpl* hashTableDeletedValue() { return reinterpret_cast<AtomicStringImpl*>(-1); } |
|---|
| 147 |
|
|---|
| 148 |
AtomicStringImpl* m_name; |
|---|
| 149 |
AtomicStringImpl* m_type; |
|---|
| 150 |
}; |
|---|
| 151 |
|
|---|
| 152 |
inline bool operator==(const FormElementKey& a, const FormElementKey& b) |
|---|
| 153 |
{ |
|---|
| 154 |
return a.name() == b.name() && a.type() == b.type(); |
|---|
| 155 |
} |
|---|
| 156 |
|
|---|
| 157 |
struct FormElementKeyHash { |
|---|
| 158 |
static unsigned hash(const FormElementKey&); |
|---|
| 159 |
static bool equal(const FormElementKey& a, const FormElementKey& b) { return a == b; } |
|---|
| 160 |
static const bool safeToCompareToEmptyOrDeleted = true; |
|---|
| 161 |
}; |
|---|
| 162 |
|
|---|
| 163 |
struct FormElementKeyHashTraits : WTF::GenericHashTraits<FormElementKey> { |
|---|
| 164 |
static void constructDeletedValue(FormElementKey& slot) { new (&slot) FormElementKey(WTF::HashTableDeletedValue); } |
|---|
| 165 |
static bool isDeletedValue(const FormElementKey& value) { return value.isHashTableDeletedValue(); } |
|---|
| 166 |
}; |
|---|
| 167 |
|
|---|
| 168 |
class Document : public ContainerNode { |
|---|
| 169 |
public: |
|---|
| 170 |
static PassRefPtr<Document> create(Frame* frame) |
|---|
| 171 |
{ |
|---|
| 172 |
return new Document(frame, false); |
|---|
| 173 |
} |
|---|
| 174 |
static PassRefPtr<Document> createXHTML(Frame* frame) |
|---|
| 175 |
{ |
|---|
| 176 |
return new Document(frame, true); |
|---|
| 177 |
} |
|---|
| 178 |
virtual ~Document(); |
|---|
| 179 |
|
|---|
| 180 |
virtual void removedLastRef(); |
|---|
| 181 |
|
|---|
| 182 |
|
|---|
| 183 |
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|
| 187 |
|
|---|
| 188 |
void selfOnlyRef() |
|---|
| 189 |
{ |
|---|
| 190 |
ASSERT(!m_deletionHasBegun); |
|---|
| 191 |
++m_selfOnlyRefCount; |
|---|
| 192 |
} |
|---|
| 193 |
void selfOnlyDeref() |
|---|
| 194 |
{ |
|---|
| 195 |
ASSERT(!m_deletionHasBegun); |
|---|
| 196 |
--m_selfOnlyRefCount; |
|---|
| 197 |
if (!m_selfOnlyRefCount && !refCount()) { |
|---|
| 198 |
#ifndef NDEBUG |
|---|
| 199 |
m_deletionHasBegun = true; |
|---|
| 200 |
#endif |
|---|
| 201 |
delete this; |
|---|
| 202 |
} |
|---|
| 203 |
} |
|---|
| 204 |
|
|---|
| 205 |
|
|---|
| 206 |
|
|---|
| 207 |
DocumentType* doctype() const { return m_docType.get(); } |
|---|
| 208 |
|
|---|
| 209 |
DOMImplementation* implementation() const; |
|---|
| 210 |
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); |
|---|
| 211 |
Element* documentElement() const; |
|---|
| 212 |
virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&); |
|---|
| 213 |
PassRefPtr<DocumentFragment> createDocumentFragment (); |
|---|
| 214 |
PassRefPtr<Text> createTextNode(const String& data); |
|---|
| 215 |
PassRefPtr<Comment> createComment(const String& data); |
|---|
| 216 |
PassRefPtr<CDATASection> createCDATASection(const String& data, ExceptionCode&); |
|---|
| 217 |
PassRefPtr<ProcessingInstruction> createProcessingInstruction(const String& target, const String& data, ExceptionCode&); |
|---|
| 218 |
PassRefPtr<Attr> createAttribute(const String& name, ExceptionCode& ec) { return createAttributeNS(String(), name, ec, true); } |
|---|
| 219 |
PassRefPtr<Attr> createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&, bool shouldIgnoreNamespaceChecks = false); |
|---|
| 220 |
PassRefPtr<EntityReference> createEntityReference(const String& name, ExceptionCode&); |
|---|
| 221 |
PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionCode&); |
|---|
| 222 |
virtual PassRefPtr<Element> createElementNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&); |
|---|
| 223 |
PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser, ExceptionCode& ec); |
|---|
| 224 |
Element* getElementById(const AtomicString&) const; |
|---|
| 225 |
bool hasElementWithId(AtomicStringImpl* id) const; |
|---|
| 226 |
bool containsMultipleElementsWithId(const AtomicString& elementId) { return m_duplicateIds.contains(elementId.impl()); } |
|---|
| 227 |
|
|---|
| 228 |
Element* elementFromPoint(int x, int y) const; |
|---|
| 229 |
String readyState() const; |
|---|
| 230 |
String inputEncoding() const; |
|---|
| 231 |
String defaultCharset() const; |
|---|
| 232 |
|
|---|
| 233 |
String charset() const { return inputEncoding(); } |
|---|
| 234 |
String characterSet() const { return inputEncoding(); } |
|---|
| 235 |
|
|---|
| 236 |
void setCharset(const String&); |
|---|
| 237 |
|
|---|
| 238 |
String contentLanguage() const { return m_contentLanguage; } |
|---|
| 239 |
void setContentLanguage(const String& lang) { m_contentLanguage = lang; } |
|---|
| 240 |
|
|---|
| 241 |
String xmlEncoding() const { return m_xmlEncoding; } |
|---|
| 242 |
String xmlVersion() const { return m_xmlVersion; } |
|---|
| 243 |
bool xmlStandalone() const { return m_xmlStandalone; } |
|---|
| 244 |
|
|---|
| 245 |
void setXMLEncoding(const String& encoding) { m_xmlEncoding = encoding; } |
|---|
| 246 |
void setXMLVersion(const String&, ExceptionCode&); |
|---|
| 247 |
void setXMLStandalone(bool, ExceptionCode&); |
|---|
| 248 |
|
|---|
| 249 |
String documentURI() const { return m_documentURI; } |
|---|
| 250 |
void setDocumentURI(const String&); |
|---|
| 251 |
|
|---|
| 252 |
virtual KURL baseURI() const; |
|---|
| 253 |
|
|---|
| 254 |
PassRefPtr<Node> adoptNode(PassRefPtr<Node> source, ExceptionCode&); |
|---|
| 255 |
|
|---|
| 256 |
PassRefPtr<HTMLCollection> images(); |
|---|
| 257 |
PassRefPtr<HTMLCollection> embeds(); |
|---|
| 258 |
PassRefPtr<HTMLCollection> plugins(); |
|---|
| 259 |
PassRefPtr<HTMLCollection> applets(); |
|---|
| 260 |
PassRefPtr<HTMLCollection> links(); |
|---|
| 261 |
PassRefPtr<HTMLCollection> forms(); |
|---|
| 262 |
PassRefPtr<HTMLCollection> anchors(); |
|---|
| 263 |
PassRefPtr<HTMLCollection> all(); |
|---|
| 264 |
PassRefPtr<HTMLCollection> objects(); |
|---|
| 265 |
PassRefPtr<HTMLCollection> scripts(); |
|---|
| 266 |
PassRefPtr<HTMLCollection> windowNamedItems(const String& name); |
|---|
| 267 |
PassRefPtr<HTMLCollection> documentNamedItems(const String& name); |
|---|
| 268 |
|
|---|
| 269 |
HTMLCollection::CollectionInfo* collectionInfo(HTMLCollection::Type type) |
|---|
| 270 |
{ |
|---|
| 271 |
ASSERT(type >= HTMLCollection::FirstUnnamedDocumentCachedType); |
|---|
| 272 |
unsigned index = type - HTMLCollection::FirstUnnamedDocumentCachedType; |
|---|
| 273 |
ASSERT(index < HTMLCollection::NumUnnamedDocumentCachedTypes); |
|---|
| 274 |
return &m_collectionInfo[index]; |
|---|
| 275 |
} |
|---|
| 276 |
|
|---|
| 277 |
HTMLCollection::CollectionInfo* nameCollectionInfo(HTMLCollection::Type, const AtomicString& name); |
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
|
|---|
| 281 |
virtual String nodeName() const; |
|---|
| 282 |
virtual NodeType nodeType() const; |
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
virtual bool isDocumentNode() const { return true; } |
|---|
| 286 |
virtual bool isHTMLDocument() const { return false; } |
|---|
| 287 |
virtual bool isImageDocument() const { return false; } |
|---|
| 288 |
#if ENABLE(SVG) |
|---|
| 289 |
virtual bool isSVGDocument() const { return false; } |
|---|
| 290 |
#endif |
|---|
| 291 |
virtual bool isPluginDocument() const { return false; } |
|---|
| 292 |
virtual bool isMediaDocument() const { return false; } |
|---|
| 293 |
|
|---|
| 294 |
CSSStyleSelector* styleSelector() const { return m_styleSelector; } |
|---|
| 295 |
|
|---|
| 296 |
Element* getElementByAccessKey(const String& key) const; |
|---|
| 297 |
|
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 |
|
|---|
| 301 |
void removePendingSheet(); |
|---|
| 302 |
|
|---|
| 303 |
|
|---|
| 304 |
|
|---|
| 305 |
|
|---|
| 306 |
|
|---|
| 307 |
bool haveStylesheetsLoaded() const |
|---|
| 308 |
{ |
|---|
| 309 |
return m_pendingStylesheets <= 0 || m_ignorePendingStylesheets |
|---|
| 310 |
#if USE(LOW_BANDWIDTH_DISPLAY) |
|---|
| 311 |
|| m_inLowBandwidthDisplay |
|---|
| 312 |
#endif |
|---|
| 313 |
; |
|---|
| 314 |
} |
|---|
| 315 |
|
|---|
| 316 |
|
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 |
|
|---|
| 320 |
void addPendingSheet() { m_pendingStylesheets++; } |
|---|
| 321 |
|
|---|
| 322 |
void addStyleSheetCandidateNode(Node*, bool createdByParser); |
|---|
| 323 |
void removeStyleSheetCandidateNode(Node*); |
|---|
| 324 |
|
|---|
| 325 |
bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfterStylesheetsLoad; } |
|---|
| 326 |
void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAfterStylesheetsLoad = b; } |
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 |
|
|---|
| 331 |
|
|---|
| 332 |
|
|---|
| 333 |
|
|---|
| 334 |
|
|---|
| 335 |
|
|---|
| 336 |
|
|---|
| 337 |
void updateStyleSelector(); |
|---|
| 338 |
|
|---|
| 339 |
void recalcStyleSelector(); |
|---|
| 340 |
|
|---|
| 341 |
bool usesDescendantRules() const { return m_usesDescendantRules; } |
|---|
| 342 |
void setUsesDescendantRules(bool b) { m_usesDescendantRules = b; } |
|---|
| 343 |
bool usesSiblingRules() const { return m_usesSiblingRules; } |
|---|
| 344 |
void setUsesSiblingRules(bool b) { m_usesSiblingRules = b; } |
|---|
| 345 |
bool usesFirstLineRules() const { return m_usesFirstLineRules; } |
|---|
| 346 |
void setUsesFirstLineRules(bool b) { m_usesFirstLineRules = b; } |
|---|
| 347 |
bool usesFirstLetterRules() const { return m_usesFirstLetterRules; } |
|---|
| 348 |
void setUsesFirstLetterRules(bool b) { m_usesFirstLetterRules = b; } |
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
void registerFormElementWithState(HTMLFormControlElementWithState* e) { m_formElementsWithState.add(e); } |
|---|
| 352 |
void unregisterFormElementWithState(HTMLFormControlElementWithState* e) { m_formElementsWithState.remove(e); } |
|---|
| 353 |
Vector<String> formElementsState() const; |
|---|
| 354 |
void setStateForNewFormElements(const Vector<String>&); |
|---|
| 355 |
bool hasStateForNewFormElements() const; |
|---|
| 356 |
bool takeStateForFormElement(AtomicStringImpl* name, AtomicStringImpl* type, String& state); |
|---|
| 357 |
|
|---|
| 358 |
FrameView* view() const; |
|---|
| 359 |
Frame* frame() const { return m_frame; } |
|---|
| 360 |
Page* page() const; |
|---|
| 361 |
Settings* settings() const; |
|---|
| 362 |
|
|---|
| 363 |
PassRefPtr<Range> createRange(); |
|---|
| 364 |
|
|---|
| 365 |
PassRefPtr<NodeIterator> createNodeIterator(Node* root, unsigned whatToShow, |
|---|
| 366 |
PassRefPtr<NodeFilter>, bool expandEntityReferences, ExceptionCode&); |
|---|
| 367 |
|
|---|
| 368 |
PassRefPtr<TreeWalker> createTreeWalker(Node* root, unsigned whatToShow, |
|---|
| 369 |
PassRefPtr<NodeFilter>, bool expandEntityReferences, ExceptionCode&); |
|---|
| 370 |
|
|---|
| 371 |
|
|---|
| 372 |
PassRefPtr<CSSStyleDeclaration> createCSSStyleDeclaration(); |
|---|
| 373 |
PassRefPtr<EditingText> createEditingTextNode(const String&); |
|---|
| 374 |
|
|---|
| 375 |
virtual void recalcStyle( StyleChange = NoChange ); |
|---|
| 376 |
virtual void updateRendering(); |
|---|
| 377 |
void updateLayout(); |
|---|
| 378 |
void updateLayoutIgnorePendingStylesheets(); |
|---|
| 379 |
static void updateDocumentsRendering(); |
|---|
| 380 |
DocLoader* docLoader() { return m_docLoader; } |
|---|
| 381 |
|
|---|
| 382 |
virtual void attach(); |
|---|
| 383 |
virtual void detach(); |
|---|
| 384 |
|
|---|
| 385 |
void clearFramePointer(); |
|---|
| 386 |
|
|---|
| 387 |
RenderArena* renderArena() { return m_renderArena; } |
|---|
| 388 |
|
|---|
| 389 |
void clearAXObjectCache(); |
|---|
| 390 |
AXObjectCache* axObjectCache() const; |
|---|
| 391 |
|
|---|
| 392 |
|
|---|
| 393 |
void setVisuallyOrdered(); |
|---|
| 394 |
|
|---|
| 395 |
void open(Document* ownerDocument = 0); |
|---|
| 396 |
void implicitOpen(); |
|---|
| 397 |
void close(); |
|---|
| 398 |
void implicitClose(); |
|---|
| 399 |
void cancelParsing(); |
|---|
| 400 |
|
|---|
| 401 |
void write(const String& text, Document* ownerDocument = 0); |
|---|
| 402 |
void writeln(const String& text, Document* ownerDocument = 0); |
|---|
| 403 |
void finishParsing(); |
|---|
| 404 |
void clear(); |
|---|
| 405 |
|
|---|
| 406 |
bool wellFormed() const { return m_wellFormed; } |
|---|
| 407 |
|
|---|
| 408 |
const KURL& url() const { return m_url; } |
|---|
| 409 |
void setURL(const KURL&); |
|---|
| 410 |
|
|---|
| 411 |
const KURL& baseURL() const { return m_baseURL; } |
|---|
| 412 |
|
|---|
| 413 |
void setBaseElementURL(const KURL&); |
|---|
| 414 |
|
|---|
| 415 |
const String& baseTarget() const { return m_baseTarget; } |
|---|
| 416 |
|
|---|
| 417 |
void setBaseElementTarget(const String& baseTarget) { m_baseTarget = baseTarget; } |
|---|
| 418 |
|
|---|
| 419 |
KURL completeURL(const String&) const; |
|---|
| 420 |
|
|---|
| 421 |
unsigned visitedLinkHash(const AtomicString& attributeURL) const; |
|---|
| 422 |
|
|---|
| 423 |
|
|---|
| 424 |
virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*); |
|---|
| 425 |
|
|---|
| 426 |
#if FRAME_LOADS_USER_STYLESHEET |
|---|
| 427 |
void setUserStyleSheet(const String& sheet); |
|---|
| 428 |
#endif |
|---|
| 429 |
|
|---|
| 430 |
String userStyleSheet() const; |
|---|
| 431 |
|
|---|
| 432 |
CSSStyleSheet* elementSheet(); |
|---|
| 433 |
CSSStyleSheet* mappedElementSheet(); |
|---|
| 434 |
virtual Tokenizer* createTokenizer(); |
|---|
| 435 |
Tokenizer* tokenizer() { return m_tokenizer; } |
|---|
| 436 |
|
|---|
| 437 |
bool printing() const { return m_printing; } |
|---|
| 438 |
void setPrinting(bool p) { m_printing = p; } |
|---|
| 439 |
|
|---|
| 440 |
enum ParseMode { Compat, AlmostStrict, Strict }; |
|---|
| 441 |
|
|---|
| 442 |
private: |
|---|
| 443 |
virtual void determineParseMode() {} |
|---|
| 444 |
|
|---|
| 445 |
public: |
|---|
| 446 |
void setParseMode(ParseMode m) { m_parseMode = m; } |
|---|
| 447 |
ParseMode parseMode() const { return m_parseMode; } |
|---|
| 448 |
|
|---|
| 449 |
bool inCompatMode() const { return m_parseMode == Compat; } |
|---|
| 450 |
bool inAlmostStrictMode() const { return m_parseMode == AlmostStrict; } |
|---|
| 451 |
bool inStrictMode() const { return m_parseMode == Strict; } |
|---|
| 452 |
|
|---|
| 453 |
void setParsing(bool); |
|---|
| 454 |
bool parsing() const { return m_bParsing; } |
|---|
| 455 |
int minimumLayoutDelay(); |
|---|
| 456 |
bool shouldScheduleLayout(); |
|---|
| 457 |
int elapsedTime() const; |
|---|
| 458 |
|
|---|
| 459 |
void setTextColor(const Color& color) { m_textColor = color; } |
|---|
| 460 |
Color textColor() const { return m_textColor; } |
|---|
| 461 |
|
|---|
| 462 |
const Color& linkColor() const { return m_linkColor; } |
|---|
| 463 |
const Color& visitedLinkColor() const { return m_visitedLinkColor; } |
|---|
| 464 |
const Color& activeLinkColor() const { return m_activeLinkColor; } |
|---|
| 465 |
void setLinkColor(const Color& c) { m_linkColor = c; } |
|---|
| 466 |
void setVisitedLinkColor(const Color& c) { m_visitedLinkColor = c; } |
|---|
| 467 |
void setActiveLinkColor(const Color& c) { m_activeLinkColor = c; } |
|---|
| 468 |
void resetLinkColor(); |
|---|
| 469 |
void resetVisitedLinkColor(); |
|---|
| 470 |
void resetActiveLinkColor(); |
|---|
| 471 |
|
|---|
| 472 |
MouseEventWithHitTestResults prepareMouseEvent(const HitTestRequest&, const IntPoint&, const PlatformMouseEvent&); |
|---|
| 473 |
|
|---|
| 474 |
virtual bool childTypeAllowed(NodeType); |
|---|
| 475 |
virtual PassRefPtr<Node> cloneNode(bool deep); |
|---|
| 476 |
|
|---|
| 477 |
virtual bool canReplaceChild(Node* newChild, Node* oldChild); |
|---|
| 478 |
|
|---|
| 479 |
StyleSheetList* styleSheets(); |
|---|
| 480 |
|
|---|
| 481 |
|
|---|
| 482 |
|
|---|
| 483 |
|
|---|
| 484 |
|
|---|
| 485 |
String preferredStylesheetSet() const; |
|---|
| 486 |
String selectedStylesheetSet() const; |
|---|
| 487 |
void setSelectedStylesheetSet(const String&); |
|---|
| 488 |
|
|---|
| 489 |
bool setFocusedNode(PassRefPtr<Node>); |
|---|
| 490 |
Node* focusedNode() const { return m_focusedNode.get(); } |
|---|
| 491 |
|
|---|
| 492 |
|
|---|
| 493 |
|
|---|
| 494 |
|---|