Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: Source/WebCore/dom/Document.cpp

Issue 7189020: Merge 89067 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights 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 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 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 * 10 *
(...skipping 4191 matching lines...) Expand 10 before | Expand all | Expand 10 after
4202 { 4202 {
4203 ASSERT(!scriptableDocumentParser() || !m_parser->isParsing()); 4203 ASSERT(!scriptableDocumentParser() || !m_parser->isParsing());
4204 ASSERT(!scriptableDocumentParser() || m_readyState != Loading); 4204 ASSERT(!scriptableDocumentParser() || m_readyState != Loading);
4205 setParsing(false); 4205 setParsing(false);
4206 if (!m_documentTiming.domContentLoadedEventStart) 4206 if (!m_documentTiming.domContentLoadedEventStart)
4207 m_documentTiming.domContentLoadedEventStart = currentTime(); 4207 m_documentTiming.domContentLoadedEventStart = currentTime();
4208 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false) ); 4208 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false) );
4209 if (!m_documentTiming.domContentLoadedEventEnd) 4209 if (!m_documentTiming.domContentLoadedEventEnd)
4210 m_documentTiming.domContentLoadedEventEnd = currentTime(); 4210 m_documentTiming.domContentLoadedEventEnd = currentTime();
4211 4211
4212 if (Frame* f = frame()) { 4212 if (RefPtr<Frame> f = frame()) {
4213 // FrameLoader::finishedParsing() might end up calling Document::implici tClose() if all 4213 // FrameLoader::finishedParsing() might end up calling Document::implici tClose() if all
4214 // resource loads are complete. HTMLObjectElements can start loading the ir resources from 4214 // resource loads are complete. HTMLObjectElements can start loading the ir resources from
4215 // post attach callbacks triggered by recalcStyle(). This means if we p arse out an <object> 4215 // post attach callbacks triggered by recalcStyle(). This means if we p arse out an <object>
4216 // tag and then reach the end of the document without updating styles, w e might not have yet 4216 // tag and then reach the end of the document without updating styles, w e might not have yet
4217 // started the resource load and might fire the window load event too ea rly. To avoid this 4217 // started the resource load and might fire the window load event too ea rly. To avoid this
4218 // we force the styles to be up to date before calling FrameLoader::fini shedParsing(). 4218 // we force the styles to be up to date before calling FrameLoader::fini shedParsing().
4219 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com ment 35. 4219 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com ment 35.
4220 updateStyleIfNeeded(); 4220 updateStyleIfNeeded();
4221 4221
4222 f->loader()->finishedParsing(); 4222 f->loader()->finishedParsing();
4223 4223
4224 InspectorInstrumentation::domContentLoadedEventFired(f, url()); 4224 InspectorInstrumentation::domContentLoadedEventFired(f.get(), url());
4225 } 4225 }
4226 } 4226 }
4227 4227
4228 Vector<String> Document::formElementsState() const 4228 Vector<String> Document::formElementsState() const
4229 { 4229 {
4230 Vector<String> stateVector; 4230 Vector<String> stateVector;
4231 stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 3); 4231 stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 3);
4232 typedef FormElementListHashSet::const_iterator Iterator; 4232 typedef FormElementListHashSet::const_iterator Iterator;
4233 Iterator end = m_formElementsWithState.end(); 4233 Iterator end = m_formElementsWithState.end();
4234 for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) { 4234 for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) {
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
4996 if (!loader) 4996 if (!loader)
4997 return 0; 4997 return 0;
4998 4998
4999 if (m_frame->document() != this) 4999 if (m_frame->document() != this)
5000 return 0; 5000 return 0;
5001 5001
5002 return loader; 5002 return loader;
5003 } 5003 }
5004 5004
5005 } // namespace WebCore 5005 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698