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

Unified Diff: Source/core/dom/Document.cpp

Issue 739433003: Remove CDATASection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 922487e26cebd25b1626c6c36508d8b54749d645..a629a5eb30005f53c0c41345a0657848562ce69b 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -60,7 +60,6 @@
#include "core/dom/AXObjectCache.h"
#include "core/dom/AddConsoleMessageTask.h"
#include "core/dom/Attr.h"
-#include "core/dom/CDATASection.h"
#include "core/dom/ClientRect.h"
#include "core/dom/Comment.h"
#include "core/dom/ContextFeatures.h"
@@ -94,6 +93,7 @@
#include "core/dom/SelectorQuery.h"
#include "core/dom/StaticNodeList.h"
#include "core/dom/StyleEngine.h"
+#include "core/dom/Text.h"
#include "core/dom/TouchList.h"
#include "core/dom/TransformSource.h"
#include "core/dom/TreeWalker.h"
@@ -885,19 +885,6 @@ PassRefPtrWillBeRawPtr<Comment> Document::createComment(const String& data)
return Comment::create(*this, data);
}
-PassRefPtrWillBeRawPtr<CDATASection> Document::createCDATASection(const String& data, ExceptionState& exceptionState)
-{
- if (isHTMLDocument()) {
- exceptionState.throwDOMException(NotSupportedError, "This operation is not supported for HTML documents.");
- return nullptr;
- }
- if (data.contains("]]>")) {
- exceptionState.throwDOMException(InvalidCharacterError, "String cannot contain ']]>' since that is the end delimiter of a CData section.");
- return nullptr;
- }
- return CDATASection::create(*this, data);
-}
-
PassRefPtrWillBeRawPtr<ProcessingInstruction> Document::createProcessingInstruction(const String& target, const String& data, ExceptionState& exceptionState)
{
if (!isValidName(target)) {
@@ -935,8 +922,6 @@ PassRefPtrWillBeRawPtr<Node> Document::importNode(Node* importedNode, bool deep,
switch (importedNode->nodeType()) {
case TEXT_NODE:
return createTextNode(importedNode->nodeValue());
- case CDATA_SECTION_NODE:
- return CDATASection::create(*this, importedNode->nodeValue());
case PROCESSING_INSTRUCTION_NODE:
return createProcessingInstruction(importedNode->nodeName(), importedNode->nodeValue(), exceptionState);
case COMMENT_NODE:
@@ -3148,7 +3133,6 @@ bool Document::childTypeAllowed(NodeType type) const
{
switch (type) {
case ATTRIBUTE_NODE:
- case CDATA_SECTION_NODE:
case DOCUMENT_FRAGMENT_NODE:
case DOCUMENT_NODE:
case TEXT_NODE:
@@ -3199,7 +3183,6 @@ bool Document::canAcceptChild(const Node& newChild, const Node* oldChild, Except
for (Node& child : NodeTraversal::childrenOf(toDocumentFragment(newChild))) {
switch (child.nodeType()) {
case ATTRIBUTE_NODE:
- case CDATA_SECTION_NODE:
case DOCUMENT_FRAGMENT_NODE:
case DOCUMENT_NODE:
case TEXT_NODE:
@@ -3220,7 +3203,6 @@ bool Document::canAcceptChild(const Node& newChild, const Node* oldChild, Except
} else {
switch (newChild.nodeType()) {
case ATTRIBUTE_NODE:
- case CDATA_SECTION_NODE:
case DOCUMENT_FRAGMENT_NODE:
case DOCUMENT_NODE:
case TEXT_NODE:
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698