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 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4373 | 4373 |
4374 ParseQualifiedNameResult returnValue; | 4374 ParseQualifiedNameResult returnValue; |
4375 if (qualifiedName.is8Bit()) | 4375 if (qualifiedName.is8Bit()) |
4376 returnValue = parseQualifiedNameInternal(qualifiedName, qualifiedName.ch
aracters8(), length, prefix, localName); | 4376 returnValue = parseQualifiedNameInternal(qualifiedName, qualifiedName.ch
aracters8(), length, prefix, localName); |
4377 else | 4377 else |
4378 returnValue = parseQualifiedNameInternal(qualifiedName, qualifiedName.ch
aracters16(), length, prefix, localName); | 4378 returnValue = parseQualifiedNameInternal(qualifiedName, qualifiedName.ch
aracters16(), length, prefix, localName); |
4379 if (returnValue.status == QNValid) | 4379 if (returnValue.status == QNValid) |
4380 return true; | 4380 return true; |
4381 | 4381 |
4382 StringBuilder message; | 4382 StringBuilder message; |
4383 message.appendLiteral("The qualified name provided ('"); | 4383 message.append("The qualified name provided ('"); |
4384 message.append(qualifiedName); | 4384 message.append(qualifiedName); |
4385 message.appendLiteral("') "); | 4385 message.append("') "); |
4386 | 4386 |
4387 if (returnValue.status == QNMultipleColons) { | 4387 if (returnValue.status == QNMultipleColons) { |
4388 message.appendLiteral("contains multiple colons."); | 4388 message.append("contains multiple colons."); |
4389 } else if (returnValue.status == QNInvalidStartChar) { | 4389 } else if (returnValue.status == QNInvalidStartChar) { |
4390 message.appendLiteral("contains the invalid name-start character '"); | 4390 message.append("contains the invalid name-start character '"); |
4391 message.append(returnValue.character); | 4391 message.append(returnValue.character); |
4392 message.appendLiteral("'."); | 4392 message.append("'."); |
4393 } else if (returnValue.status == QNInvalidChar) { | 4393 } else if (returnValue.status == QNInvalidChar) { |
4394 message.appendLiteral("contains the invalid character '"); | 4394 message.append("contains the invalid character '"); |
4395 message.append(returnValue.character); | 4395 message.append(returnValue.character); |
4396 message.appendLiteral("'."); | 4396 message.append("'."); |
4397 } else if (returnValue.status == QNEmptyPrefix) { | 4397 } else if (returnValue.status == QNEmptyPrefix) { |
4398 message.appendLiteral("has an empty namespace prefix."); | 4398 message.append("has an empty namespace prefix."); |
4399 } else { | 4399 } else { |
4400 DCHECK_EQ(returnValue.status, QNEmptyLocalName); | 4400 DCHECK_EQ(returnValue.status, QNEmptyLocalName); |
4401 message.appendLiteral("has an empty local name."); | 4401 message.append("has an empty local name."); |
4402 } | 4402 } |
4403 | 4403 |
4404 if (returnValue.status == QNInvalidStartChar || returnValue.status == QNInva
lidChar) | 4404 if (returnValue.status == QNInvalidStartChar || returnValue.status == QNInva
lidChar) |
4405 exceptionState.throwDOMException(InvalidCharacterError, message.toString
()); | 4405 exceptionState.throwDOMException(InvalidCharacterError, message.toString
()); |
4406 else | 4406 else |
4407 exceptionState.throwDOMException(NamespaceError, message.toString()); | 4407 exceptionState.throwDOMException(NamespaceError, message.toString()); |
4408 return false; | 4408 return false; |
4409 } | 4409 } |
4410 | 4410 |
4411 void Document::setEncodingData(const DocumentEncodingData& newData) | 4411 void Document::setEncodingData(const DocumentEncodingData& newData) |
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6033 #ifndef NDEBUG | 6033 #ifndef NDEBUG |
6034 using namespace blink; | 6034 using namespace blink; |
6035 void showLiveDocumentInstances() | 6035 void showLiveDocumentInstances() |
6036 { | 6036 { |
6037 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6037 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
6038 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6038 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6039 for (Document* document : set) | 6039 for (Document* document : set) |
6040 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6040 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
6041 } | 6041 } |
6042 #endif | 6042 #endif |
OLD | NEW |