| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 return &domWindow()->location(); | 408 return &domWindow()->location(); |
| 409 } | 409 } |
| 410 | 410 |
| 411 PassRefPtr<Element> Document::createElement(const AtomicString& name, ExceptionS
tate& exceptionState) | 411 PassRefPtr<Element> Document::createElement(const AtomicString& name, ExceptionS
tate& exceptionState) |
| 412 { | 412 { |
| 413 if (!isValidName(name)) { | 413 if (!isValidName(name)) { |
| 414 exceptionState.ThrowDOMException(InvalidCharacterError, "The tag name pr
ovided ('" + name + "') is not a valid name."); | 414 exceptionState.ThrowDOMException(InvalidCharacterError, "The tag name pr
ovided ('" + name + "') is not a valid name."); |
| 415 return nullptr; | 415 return nullptr; |
| 416 } | 416 } |
| 417 | 417 |
| 418 return HTMLElementFactory::createHTMLElement(name, *this, false); | 418 return HTMLElementFactory::createElement(name, *this, false); |
| 419 } | 419 } |
| 420 | 420 |
| 421 PassRefPtr<DartValue> Document::registerElement(DartState*, const AtomicString&
name, ExceptionState& exceptionState) | 421 PassRefPtr<DartValue> Document::registerElement(DartState*, const AtomicString&
name, ExceptionState& exceptionState) |
| 422 { | 422 { |
| 423 // TODO(abarth): Add back custom elment registration. | 423 // TODO(abarth): Add back custom elment registration. |
| 424 return DartValue::Create(); | 424 return DartValue::Create(); |
| 425 } | 425 } |
| 426 | 426 |
| 427 CustomElementMicrotaskRunQueue* Document::customElementMicrotaskRunQueue() | 427 CustomElementMicrotaskRunQueue* Document::customElementMicrotaskRunQueue() |
| 428 { | 428 { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 | 578 |
| 579 this->adoptIfNeeded(*source); | 579 this->adoptIfNeeded(*source); |
| 580 | 580 |
| 581 return source; | 581 return source; |
| 582 } | 582 } |
| 583 | 583 |
| 584 // FIXME: This should really be in a possible ElementFactory class | 584 // FIXME: This should really be in a possible ElementFactory class |
| 585 PassRefPtr<Element> Document::createElement(const QualifiedName& qName, bool cre
atedByParser) | 585 PassRefPtr<Element> Document::createElement(const QualifiedName& qName, bool cre
atedByParser) |
| 586 { | 586 { |
| 587 // FIXME(sky): This should only take a local name. | 587 // FIXME(sky): This should only take a local name. |
| 588 return HTMLElementFactory::createHTMLElement(qName.localName(), *this, creat
edByParser); | 588 return HTMLElementFactory::createElement(qName.localName(), *this, createdBy
Parser); |
| 589 } | 589 } |
| 590 | 590 |
| 591 String Document::readyState() const | 591 String Document::readyState() const |
| 592 { | 592 { |
| 593 DEFINE_STATIC_LOCAL(const String, loading, ("loading")); | 593 DEFINE_STATIC_LOCAL(const String, loading, ("loading")); |
| 594 DEFINE_STATIC_LOCAL(const String, interactive, ("interactive")); | 594 DEFINE_STATIC_LOCAL(const String, interactive, ("interactive")); |
| 595 DEFINE_STATIC_LOCAL(const String, complete, ("complete")); | 595 DEFINE_STATIC_LOCAL(const String, complete, ("complete")); |
| 596 | 596 |
| 597 switch (m_readyState) { | 597 switch (m_readyState) { |
| 598 case Loading: | 598 case Loading: |
| (...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2224 using namespace blink; | 2224 using namespace blink; |
| 2225 void showLiveDocumentInstances() | 2225 void showLiveDocumentInstances() |
| 2226 { | 2226 { |
| 2227 WeakDocumentSet& set = liveDocumentSet(); | 2227 WeakDocumentSet& set = liveDocumentSet(); |
| 2228 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 2228 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 2229 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 2229 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 2230 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 2230 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 2231 } | 2231 } |
| 2232 } | 2232 } |
| 2233 #endif | 2233 #endif |
| OLD | NEW |