| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 4375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4386 { | 4386 { |
| 4387 ASSERT(!scriptableDocumentParser() || !m_parser->isParsing()); | 4387 ASSERT(!scriptableDocumentParser() || !m_parser->isParsing()); |
| 4388 ASSERT(!scriptableDocumentParser() || m_readyState != Loading); | 4388 ASSERT(!scriptableDocumentParser() || m_readyState != Loading); |
| 4389 setParsing(false); | 4389 setParsing(false); |
| 4390 if (!m_documentTiming.domContentLoadedEventStart) | 4390 if (!m_documentTiming.domContentLoadedEventStart) |
| 4391 m_documentTiming.domContentLoadedEventStart = monotonicallyIncreasingTim
e(); | 4391 m_documentTiming.domContentLoadedEventStart = monotonicallyIncreasingTim
e(); |
| 4392 dispatchEvent(Event::createBubble(EventTypeNames::DOMContentLoaded)); | 4392 dispatchEvent(Event::createBubble(EventTypeNames::DOMContentLoaded)); |
| 4393 if (!m_documentTiming.domContentLoadedEventEnd) | 4393 if (!m_documentTiming.domContentLoadedEventEnd) |
| 4394 m_documentTiming.domContentLoadedEventEnd = monotonicallyIncreasingTime(
); | 4394 m_documentTiming.domContentLoadedEventEnd = monotonicallyIncreasingTime(
); |
| 4395 | 4395 |
| 4396 if (frame() && frame()->isMainFrame()) { |
| 4397 // Reset the text autosizing multipliers on main frame when DOM is loade
d. |
| 4398 // This is to allow for a fresh text autosizing pass when the page layou
t |
| 4399 // changes significantly in the end. |
| 4400 if (TextAutosizer* textAutosizer = this->textAutosizer()) |
| 4401 textAutosizer->recalculateMultipliers(); |
| 4402 } |
| 4403 |
| 4396 // The loader's finishedParsing() method may invoke script that causes this
object to | 4404 // The loader's finishedParsing() method may invoke script that causes this
object to |
| 4397 // be dereferenced (when this document is in an iframe and the onload causes
the iframe's src to change). | 4405 // be dereferenced (when this document is in an iframe and the onload causes
the iframe's src to change). |
| 4398 // Keep it alive until we are done. | 4406 // Keep it alive until we are done. |
| 4399 RefPtr<Document> protect(this); | 4407 RefPtr<Document> protect(this); |
| 4400 | 4408 |
| 4401 if (RefPtr<LocalFrame> f = frame()) { | 4409 if (RefPtr<LocalFrame> f = frame()) { |
| 4402 // FrameLoader::finishedParsing() might end up calling Document::implici
tClose() if all | 4410 // FrameLoader::finishedParsing() might end up calling Document::implici
tClose() if all |
| 4403 // resource loads are complete. HTMLObjectElements can start loading the
ir resources from | 4411 // resource loads are complete. HTMLObjectElements can start loading the
ir resources from |
| 4404 // post attach callbacks triggered by recalcStyle(). This means if we p
arse out an <object> | 4412 // post attach callbacks triggered by recalcStyle(). This means if we p
arse out an <object> |
| 4405 // tag and then reach the end of the document without updating styles, w
e might not have yet | 4413 // tag and then reach the end of the document without updating styles, w
e might not have yet |
| (...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5445 } | 5453 } |
| 5446 | 5454 |
| 5447 void Document::invalidateNodeListCaches(const QualifiedName* attrName) | 5455 void Document::invalidateNodeListCaches(const QualifiedName* attrName) |
| 5448 { | 5456 { |
| 5449 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); | 5457 HashSet<LiveNodeListBase*>::iterator end = m_listsInvalidatedAtDocument.end(
); |
| 5450 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) | 5458 for (HashSet<LiveNodeListBase*>::iterator it = m_listsInvalidatedAtDocument.
begin(); it != end; ++it) |
| 5451 (*it)->invalidateCache(attrName); | 5459 (*it)->invalidateCache(attrName); |
| 5452 } | 5460 } |
| 5453 | 5461 |
| 5454 } // namespace WebCore | 5462 } // namespace WebCore |
| OLD | NEW |