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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2841393003: createElementNS() should now throw only InvalidCharacterError, not NamespaceError (Closed)
Patch Set: rebased Created 3 years, 7 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 | « third_party/WebKit/LayoutTests/http/tests/misc/acid3.html ('k') | 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, 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 5065 matching lines...) Expand 10 before | Expand all | Expand 10 after
5076 message.Append("contains the invalid character '"); 5076 message.Append("contains the invalid character '");
5077 message.Append(return_value.character); 5077 message.Append(return_value.character);
5078 message.Append("'."); 5078 message.Append("'.");
5079 } else if (return_value.status == kQNEmptyPrefix) { 5079 } else if (return_value.status == kQNEmptyPrefix) {
5080 message.Append("has an empty namespace prefix."); 5080 message.Append("has an empty namespace prefix.");
5081 } else { 5081 } else {
5082 DCHECK_EQ(return_value.status, kQNEmptyLocalName); 5082 DCHECK_EQ(return_value.status, kQNEmptyLocalName);
5083 message.Append("has an empty local name."); 5083 message.Append("has an empty local name.");
5084 } 5084 }
5085 5085
5086 if (return_value.status == kQNInvalidStartChar || 5086 exception_state.ThrowDOMException(kInvalidCharacterError, message.ToString());
5087 return_value.status == kQNInvalidChar)
5088 exception_state.ThrowDOMException(kInvalidCharacterError,
5089 message.ToString());
5090 else
5091 exception_state.ThrowDOMException(kNamespaceError, message.ToString());
5092 return false; 5087 return false;
5093 } 5088 }
5094 5089
5095 void Document::SetEncodingData(const DocumentEncodingData& new_data) { 5090 void Document::SetEncodingData(const DocumentEncodingData& new_data) {
5096 // It's possible for the encoding of the document to change while we're 5091 // It's possible for the encoding of the document to change while we're
5097 // decoding data. That can only occur while we're processing the <head> 5092 // decoding data. That can only occur while we're processing the <head>
5098 // portion of the document. There isn't much user-visible content in the 5093 // portion of the document. There isn't much user-visible content in the
5099 // <head>, but there is the <title> element. This function detects that 5094 // <head>, but there is the <title> element. This function detects that
5100 // situation and re-decodes the document's title so that the user doesn't see 5095 // situation and re-decodes the document's title so that the user doesn't see
5101 // an incorrectly decoded title in the title bar. 5096 // an incorrectly decoded title in the title bar.
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
6735 } 6730 }
6736 6731
6737 void showLiveDocumentInstances() { 6732 void showLiveDocumentInstances() {
6738 WeakDocumentSet& set = liveDocumentSet(); 6733 WeakDocumentSet& set = liveDocumentSet();
6739 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6734 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6740 for (blink::Document* document : set) 6735 for (blink::Document* document : set)
6741 fprintf(stderr, "- Document %p URL: %s\n", document, 6736 fprintf(stderr, "- Document %p URL: %s\n", document,
6742 document->Url().GetString().Utf8().data()); 6737 document->Url().GetString().Utf8().data());
6743 } 6738 }
6744 #endif 6739 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/misc/acid3.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698