diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-27 09:28:46 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-27 09:28:46 +0200 |
commit | 6668b07fcd51f86be243b9e08e667224e30c0cf8 (patch) | |
tree | 64f466e09b68a77ae1156c0d35cd5b95e18a34ca /Source/WebCore/dom/Document.cpp | |
parent | e7923d9de38974f0c6fb7646c898a6ea618261e8 (diff) | |
download | qtwebkit-6668b07fcd51f86be243b9e08e667224e30c0cf8.tar.gz |
Imported WebKit commit 26cd9bd8ab0471ffe987c9b60368f63dc0f1f31b (http://svn.webkit.org/repository/webkit/trunk@121325)
New snapshot with more Windows build fixes
Diffstat (limited to 'Source/WebCore/dom/Document.cpp')
-rw-r--r-- | Source/WebCore/dom/Document.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 132680ab0..7f190b269 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -3401,14 +3401,11 @@ void Document::removeStyleSheetCandidateNode(Node* node) void Document::collectActiveStylesheets(Vector<RefPtr<StyleSheet> >& sheets) { - bool matchAuthorAndUserStyles = true; - if (Settings* settings = this->settings()) - matchAuthorAndUserStyles = settings->authorAndUserStylesEnabled(); + if (settings() && !settings()->authorAndUserStylesEnabled()) + return; StyleSheetCandidateListHashSet::iterator begin = m_styleSheetCandidateNodes.begin(); StyleSheetCandidateListHashSet::iterator end = m_styleSheetCandidateNodes.end(); - if (!matchAuthorAndUserStyles) - end = begin; for (StyleSheetCandidateListHashSet::iterator it = begin; it != end; ++it) { Node* n = *it; StyleSheet* sheet = 0; @@ -4581,7 +4578,7 @@ KURL Document::openSearchDescriptionURL() return KURL(); HTMLCollection* children = head()->children(); - for (Node* child = children->firstItem(); child; child = children->nextItem()) { + for (unsigned i = 0; Node* child = children->item(i); i++) { if (!child->hasTagName(linkTag)) continue; HTMLLinkElement* linkElement = static_cast<HTMLLinkElement*>(child); @@ -5928,7 +5925,7 @@ PassRefPtr<NodeList> Document::getItems(const String& typeNames) { // Since documet.getItem() is allowed for microdata, typeNames will be null string. // In this case we need to create an unique string identifier to map such request in the cache. - String localTypeNames = typeNames.isNull() ? String("http://webkit.org/microdata/undefinedItemType") : typeNames; + String localTypeNames = typeNames.isNull() ? MicroDataItemList::undefinedItemType() : typeNames; return ensureRareData()->ensureNodeLists(this)->addCacheWithName<MicroDataItemList>(this, DynamicNodeList::MicroDataItemListType, localTypeNames); } |