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

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

Issue 7190015: Merge 89067 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
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 4261 matching lines...) Expand 10 before | Expand all | Expand 10 after
4272 { 4272 {
4273 ASSERT(!scriptableDocumentParser() || !m_parser->isParsing()); 4273 ASSERT(!scriptableDocumentParser() || !m_parser->isParsing());
4274 ASSERT(!scriptableDocumentParser() || m_readyState != Loading); 4274 ASSERT(!scriptableDocumentParser() || m_readyState != Loading);
4275 setParsing(false); 4275 setParsing(false);
4276 if (!m_documentTiming.domContentLoadedEventStart) 4276 if (!m_documentTiming.domContentLoadedEventStart)
4277 m_documentTiming.domContentLoadedEventStart = currentTime(); 4277 m_documentTiming.domContentLoadedEventStart = currentTime();
4278 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false) ); 4278 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false) );
4279 if (!m_documentTiming.domContentLoadedEventEnd) 4279 if (!m_documentTiming.domContentLoadedEventEnd)
4280 m_documentTiming.domContentLoadedEventEnd = currentTime(); 4280 m_documentTiming.domContentLoadedEventEnd = currentTime();
4281 4281
4282 if (Frame* f = frame()) { 4282 if (RefPtr<Frame> f = frame()) {
4283 // FrameLoader::finishedParsing() might end up calling Document::implici tClose() if all 4283 // FrameLoader::finishedParsing() might end up calling Document::implici tClose() if all
4284 // resource loads are complete. HTMLObjectElements can start loading the ir resources from 4284 // resource loads are complete. HTMLObjectElements can start loading the ir resources from
4285 // post attach callbacks triggered by recalcStyle(). This means if we p arse out an <object> 4285 // post attach callbacks triggered by recalcStyle(). This means if we p arse out an <object>
4286 // tag and then reach the end of the document without updating styles, w e might not have yet 4286 // tag and then reach the end of the document without updating styles, w e might not have yet
4287 // started the resource load and might fire the window load event too ea rly. To avoid this 4287 // started the resource load and might fire the window load event too ea rly. To avoid this
4288 // we force the styles to be up to date before calling FrameLoader::fini shedParsing(). 4288 // we force the styles to be up to date before calling FrameLoader::fini shedParsing().
4289 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com ment 35. 4289 // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around com ment 35.
4290 updateStyleIfNeeded(); 4290 updateStyleIfNeeded();
4291 4291
4292 f->loader()->finishedParsing(); 4292 f->loader()->finishedParsing();
4293 4293
4294 InspectorInstrumentation::domContentLoadedEventFired(f, url()); 4294 InspectorInstrumentation::domContentLoadedEventFired(f.get(), url());
4295 } 4295 }
4296 } 4296 }
4297 4297
4298 Vector<String> Document::formElementsState() const 4298 Vector<String> Document::formElementsState() const
4299 { 4299 {
4300 Vector<String> stateVector; 4300 Vector<String> stateVector;
4301 stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 3); 4301 stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 3);
4302 typedef FormElementListHashSet::const_iterator Iterator; 4302 typedef FormElementListHashSet::const_iterator Iterator;
4303 Iterator end = m_formElementsWithState.end(); 4303 Iterator end = m_formElementsWithState.end();
4304 for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) { 4304 for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) {
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
5159 if (!loader) 5159 if (!loader)
5160 return 0; 5160 return 0;
5161 5161
5162 if (m_frame->document() != this) 5162 if (m_frame->document() != this)
5163 return 0; 5163 return 0;
5164 5164
5165 return loader; 5165 return loader;
5166 } 5166 }
5167 5167
5168 } // namespace WebCore 5168 } // 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