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

Side by Side Diff: third_party/WebKit/WebCore/dom/Document.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
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 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * Copyright (C) 2008 David Levin (levin@chromium.org) 8 * Copyright (C) 2008 David Levin (levin@chromium.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 4001 matching lines...) Expand 10 before | Expand all | Expand 10 after
4012 ExceptionCode ec = 0; 4012 ExceptionCode ec = 0;
4013 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false) , ec); 4013 dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false) , ec);
4014 4014
4015 if (Frame* f = frame()) 4015 if (Frame* f = frame())
4016 f->loader()->finishedParsing(); 4016 f->loader()->finishedParsing();
4017 } 4017 }
4018 4018
4019 Vector<String> Document::formElementsState() const 4019 Vector<String> Document::formElementsState() const
4020 { 4020 {
4021 Vector<String> stateVector; 4021 Vector<String> stateVector;
4022 stateVector.reserveCapacity(m_formElementsWithState.size() * 3); 4022 stateVector.reserveInitialCapacity(m_formElementsWithState.size() * 3);
4023 typedef ListHashSet<FormControlElementWithState*>::const_iterator Iterator; 4023 typedef ListHashSet<FormControlElementWithState*>::const_iterator Iterator;
4024 Iterator end = m_formElementsWithState.end(); 4024 Iterator end = m_formElementsWithState.end();
4025 for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) { 4025 for (Iterator it = m_formElementsWithState.begin(); it != end; ++it) {
4026 FormControlElementWithState* e = *it; 4026 FormControlElementWithState* e = *it;
4027 String value; 4027 String value;
4028 if (e->saveState(value)) { 4028 if (e->saveState(value)) {
4029 FormControlElement* formControlElement = e->toFormControlElement(); 4029 FormControlElement* formControlElement = e->toFormControlElement();
4030 ASSERT(formControlElement); 4030 ASSERT(formControlElement);
4031 4031
4032 stateVector.append(formControlElement->name().string()); 4032 stateVector.append(formControlElement->name().string());
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
4411 if (equalIgnoringCase(dnsPrefetchControl, "on") && 4411 if (equalIgnoringCase(dnsPrefetchControl, "on") &&
4412 !m_haveExplicitlyDisabledDNSPrefetch) { 4412 !m_haveExplicitlyDisabledDNSPrefetch) {
4413 m_isDNSPrefetchEnabled = true; 4413 m_isDNSPrefetchEnabled = true;
4414 return; 4414 return;
4415 } 4415 }
4416 4416
4417 m_isDNSPrefetchEnabled = false; 4417 m_isDNSPrefetchEnabled = false;
4418 m_haveExplicitlyDisabledDNSPrefetch = true; 4418 m_haveExplicitlyDisabledDNSPrefetch = true;
4419 } 4419 }
4420 4420
4421 void Document::addTimeout(int timeoutId, DOMTimer* timer)
4422 {
4423 ASSERT(!m_timeouts.contains(timeoutId));
4424 m_timeouts.set(timeoutId, timer);
4425 }
4426
4427 void Document::removeTimeout(int timeoutId)
4428 {
4429 m_timeouts.remove(timeoutId);
4430 }
4431
4432 DOMTimer* Document::findTimeout(int timeoutId)
4433 {
4434 return m_timeouts.get(timeoutId);
4435 }
4436
4437 void Document::reportException(const String& errorMessage, int lineNumber, const String& sourceURL) 4421 void Document::reportException(const String& errorMessage, int lineNumber, const String& sourceURL)
4438 { 4422 {
4439 if (DOMWindow* window = domWindow()) 4423 if (DOMWindow* window = domWindow())
4440 window->console()->addMessage(JSMessageSource, ErrorMessageLevel, errorM essage, lineNumber, sourceURL); 4424 window->console()->addMessage(JSMessageSource, ErrorMessageLevel, errorM essage, lineNumber, sourceURL);
4441 } 4425 }
4442 4426
4443 void Document::addMessage(MessageDestination destination, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& so urceURL) 4427 void Document::addMessage(MessageDestination destination, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const String& so urceURL)
4444 { 4428 {
4445 switch (destination) { 4429 switch (destination) {
4446 case InspectorControllerDestination: 4430 case InspectorControllerDestination:
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
4528 } 4512 }
4529 } 4513 }
4530 } 4514 }
4531 return 0; 4515 return 0;
4532 } 4516 }
4533 4517
4534 } // namespace WebCore 4518 } // namespace WebCore
4535 4519
4536 4520
4537 4521
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/dom/Document.h ('k') | third_party/WebKit/WebCore/dom/GenericWorkerTask.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698