diff options
Diffstat (limited to 'WebCore/dom/Document.cpp')
-rw-r--r-- | WebCore/dom/Document.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index 7fc7aa9..d8905c5 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -29,6 +29,7 @@ #include "AXObjectCache.h" #include "AnimationController.h" #include "Attr.h" +#include "Attribute.h" #include "CDATASection.h" #include "CSSHelper.h" #include "CSSStyleSelector.h" @@ -88,7 +89,6 @@ #include "InspectorTimelineAgent.h" #include "KeyboardEvent.h" #include "Logging.h" -#include "MappedAttribute.h" #include "MessageEvent.h" #include "MouseEvent.h" #include "MouseEventWithHitTestResults.h" @@ -477,7 +477,7 @@ Document::Document(Frame* frame, bool isXHTML, bool isHTML) static int docID = 0; m_docID = docID++; #if ENABLE(XHTMLMP) - m_shouldProcessNoScriptElement = m_frame->script()->canExecuteScripts(NotAboutToExecuteScript); + m_shouldProcessNoScriptElement = m_frame && m_frame->script()->canExecuteScripts(NotAboutToExecuteScript); #endif } @@ -2439,11 +2439,12 @@ void Document::processViewport(const String& features) if (!frame) return; - ViewportArguments arguments; - processArguments(features, (void*)&arguments, &setViewportFeature); + if (frame->page()) { + ViewportArguments arguments; + processArguments(features, (void*)&arguments, &setViewportFeature); - if (frame->page()) frame->page()->chrome()->client()->didReceiveViewportArguments(frame, arguments); + } } MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& request, const IntPoint& documentPoint, const PlatformMouseEvent& event) @@ -2679,9 +2680,9 @@ void Document::addStyleSheetCandidateNode(Node* node, bool createdByParser) } // Determine an appropriate insertion point. - ListHashSet<Node*>::iterator begin = m_styleSheetCandidateNodes.begin(); - ListHashSet<Node*>::iterator end = m_styleSheetCandidateNodes.end(); - ListHashSet<Node*>::iterator it = end; + StyleSheetCandidateListHashSet::iterator begin = m_styleSheetCandidateNodes.begin(); + StyleSheetCandidateListHashSet::iterator end = m_styleSheetCandidateNodes.end(); + StyleSheetCandidateListHashSet::iterator it = end; Node* followingNode = 0; do { --it; @@ -2713,11 +2714,11 @@ void Document::recalcStyleSelector() if (Settings* settings = this->settings()) matchAuthorAndUserStyles = settings->authorAndUserStylesEnabled(); - ListHashSet<Node*>::iterator begin = m_styleSheetCandidateNodes.begin(); - ListHashSet<Node*>::iterator end = m_styleSheetCandidateNodes.end(); + StyleSheetCandidateListHashSet::iterator begin = m_styleSheetCandidateNodes.begin(); + StyleSheetCandidateListHashSet::iterator end = m_styleSheetCandidateNodes.end(); if (!matchAuthorAndUserStyles) end = begin; - for (ListHashSet<Node*>::iterator it = begin; it != end; ++it) { + for (StyleSheetCandidateListHashSet::iterator it = begin; it != end; ++it) { Node* n = *it; StyleSheet* sheet = 0; @@ -4298,7 +4299,7 @@ PassRefPtr<Attr> Document::createAttributeNS(const String& namespaceURI, const S // FIXME: Assume this is a mapped attribute, since createAttribute isn't namespace-aware. There's no harm to XML // documents if we're wrong. - return Attr::create(0, this, MappedAttribute::create(qName, StringImpl::empty())); + return Attr::create(0, this, Attribute::createMapped(qName, StringImpl::empty())); } #if ENABLE(SVG) @@ -4421,7 +4422,7 @@ Vector<String> Document::formElementsState() const { Vector<String> stateVector; stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 3); - typedef ListHashSet<Element*>::const_iterator Iterator; + typedef FormElementListHashSet::const_iterator Iterator; Iterator end = m_formElementsWithState.end(); for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) { Element* elementWithState = *it; |