| 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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 4996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5007 Document* Document::contextDocument() { | 5007 Document* Document::contextDocument() { |
| 5008 if (m_contextDocument) | 5008 if (m_contextDocument) |
| 5009 return m_contextDocument; | 5009 return m_contextDocument; |
| 5010 if (m_frame) | 5010 if (m_frame) |
| 5011 return this; | 5011 return this; |
| 5012 return nullptr; | 5012 return nullptr; |
| 5013 } | 5013 } |
| 5014 | 5014 |
| 5015 Attr* Document::createAttribute(const AtomicString& name, | 5015 Attr* Document::createAttribute(const AtomicString& name, |
| 5016 ExceptionState& exceptionState) { | 5016 ExceptionState& exceptionState) { |
| 5017 if (isHTMLDocument() && name != name.lower()) | 5017 return createAttributeNS(nullAtom, convertLocalName(name), exceptionState, |
| 5018 UseCounter::count(*this, | 5018 true); |
| 5019 UseCounter::HTMLDocumentCreateAttributeNameNotLowercase); | |
| 5020 return createAttributeNS(nullAtom, name, exceptionState, true); | |
| 5021 } | 5019 } |
| 5022 | 5020 |
| 5023 Attr* Document::createAttributeNS(const AtomicString& namespaceURI, | 5021 Attr* Document::createAttributeNS(const AtomicString& namespaceURI, |
| 5024 const AtomicString& qualifiedName, | 5022 const AtomicString& qualifiedName, |
| 5025 ExceptionState& exceptionState, | 5023 ExceptionState& exceptionState, |
| 5026 bool shouldIgnoreNamespaceChecks) { | 5024 bool shouldIgnoreNamespaceChecks) { |
| 5027 AtomicString prefix, localName; | 5025 AtomicString prefix, localName; |
| 5028 if (!parseQualifiedName(qualifiedName, prefix, localName, exceptionState)) | 5026 if (!parseQualifiedName(qualifiedName, prefix, localName, exceptionState)) |
| 5029 return nullptr; | 5027 return nullptr; |
| 5030 | 5028 |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6438 } | 6436 } |
| 6439 | 6437 |
| 6440 void showLiveDocumentInstances() { | 6438 void showLiveDocumentInstances() { |
| 6441 WeakDocumentSet& set = liveDocumentSet(); | 6439 WeakDocumentSet& set = liveDocumentSet(); |
| 6442 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6440 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6443 for (Document* document : set) | 6441 for (Document* document : set) |
| 6444 fprintf(stderr, "- Document %p URL: %s\n", document, | 6442 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6445 document->url().getString().utf8().data()); | 6443 document->url().getString().utf8().data()); |
| 6446 } | 6444 } |
| 6447 #endif | 6445 #endif |
| OLD | NEW |