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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 InvalidCharacterError, | 990 InvalidCharacterError, |
991 "The target provided ('" + target + "') is not a valid name."); | 991 "The target provided ('" + target + "') is not a valid name."); |
992 return nullptr; | 992 return nullptr; |
993 } | 993 } |
994 if (data.contains("?>")) { | 994 if (data.contains("?>")) { |
995 exceptionState.throwDOMException( | 995 exceptionState.throwDOMException( |
996 InvalidCharacterError, | 996 InvalidCharacterError, |
997 "The data provided ('" + data + "') contains '?>'."); | 997 "The data provided ('" + data + "') contains '?>'."); |
998 return nullptr; | 998 return nullptr; |
999 } | 999 } |
| 1000 if (isHTMLDocument()) { |
| 1001 UseCounter::count(*this, |
| 1002 UseCounter::HTMLDocumentCreateProcessingInstruction); |
| 1003 } |
1000 return ProcessingInstruction::create(*this, target, data); | 1004 return ProcessingInstruction::create(*this, target, data); |
1001 } | 1005 } |
1002 | 1006 |
1003 Text* Document::createEditingTextNode(const String& text) { | 1007 Text* Document::createEditingTextNode(const String& text) { |
1004 return Text::createEditingText(*this, text); | 1008 return Text::createEditingText(*this, text); |
1005 } | 1009 } |
1006 | 1010 |
1007 bool Document::importContainerNodeChildren(ContainerNode* oldContainerNode, | 1011 bool Document::importContainerNodeChildren(ContainerNode* oldContainerNode, |
1008 ContainerNode* newContainerNode, | 1012 ContainerNode* newContainerNode, |
1009 ExceptionState& exceptionState) { | 1013 ExceptionState& exceptionState) { |
(...skipping 5588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6598 } | 6602 } |
6599 | 6603 |
6600 void showLiveDocumentInstances() { | 6604 void showLiveDocumentInstances() { |
6601 WeakDocumentSet& set = liveDocumentSet(); | 6605 WeakDocumentSet& set = liveDocumentSet(); |
6602 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6606 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6603 for (blink::Document* document : set) | 6607 for (blink::Document* document : set) |
6604 fprintf(stderr, "- Document %p URL: %s\n", document, | 6608 fprintf(stderr, "- Document %p URL: %s\n", document, |
6605 document->url().getString().utf8().data()); | 6609 document->url().getString().utf8().data()); |
6606 } | 6610 } |
6607 #endif | 6611 #endif |
OLD | NEW |