Commit f1fef132 authored by andersca@apple.com's avatar andersca@apple.com

2008-06-23 Anders Carlsson <andersca@apple.com>

        Reviewed by Geoff.

        Make changedDocuments a HashSet.

        * dom/Document.cpp:
        (WebCore::Document::setDocumentChanged):
        (WebCore::Document::updateDocumentsRendering):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 810ae40e
2008-06-23 Anders Carlsson <andersca@apple.com>
Reviewed by Geoff.
Make changedDocuments a HashSet.
* dom/Document.cpp:
(WebCore::Document::setDocumentChanged):
(WebCore::Document::updateDocumentsRendering):
2008-06-23 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Mark Rowe.
......@@ -255,7 +255,7 @@ static bool acceptsEditingFocus(Node *node)
return frame->editor()->shouldBeginEditing(rangeOfContents(root).get());
}
static DeprecatedPtrList<Document>* changedDocuments = 0;
static HashSet<Document*>* changedDocuments = 0;
Document::Document(Frame* frame, bool isXHTML)
: ContainerNode(0)
......@@ -1063,8 +1063,8 @@ void Document::setDocumentChanged(bool b)
if (b) {
if (!m_docChanged) {
if (!changedDocuments)
changedDocuments = new DeprecatedPtrList<Document>;
changedDocuments->append(this);
changedDocuments = new HashSet<Document*>;
changedDocuments->add(this);
}
if (m_accessKeyMapValid) {
m_accessKeyMapValid = false;
......@@ -1174,7 +1174,11 @@ void Document::updateDocumentsRendering()
if (!changedDocuments)
return;
while (Document* doc = changedDocuments->take()) {
while (changedDocuments->size()) {
HashSet<Document*>::iterator it = changedDocuments->begin();
Document* doc = *it;
changedDocuments->remove(it);
doc->m_docChanged = false;
doc->updateRendering();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment