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

Side by Side Diff: Source/core/editing/markup.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | Source/core/fileapi/FileReader.cpp » ('j') | 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) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2008, 2009, 2010, 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Igalia S.L. 4 * Copyright (C) 2011 Igalia S.L.
5 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 5 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 Document* document = contextElement->hasTagName(templateTag) ? contextElemen t->document()->ensureTemplateDocument() : contextElement->document(); 948 Document* document = contextElement->hasTagName(templateTag) ? contextElemen t->document()->ensureTemplateDocument() : contextElement->document();
949 RefPtr<DocumentFragment> fragment = DocumentFragment::create(document); 949 RefPtr<DocumentFragment> fragment = DocumentFragment::create(document);
950 950
951 if (document->isHTMLDocument()) { 951 if (document->isHTMLDocument()) {
952 fragment->parseHTML(markup, contextElement, parserContentPolicy); 952 fragment->parseHTML(markup, contextElement, parserContentPolicy);
953 return fragment; 953 return fragment;
954 } 954 }
955 955
956 bool wasValid = fragment->parseXML(markup, contextElement, parserContentPoli cy); 956 bool wasValid = fragment->parseXML(markup, contextElement, parserContentPoli cy);
957 if (!wasValid) { 957 if (!wasValid) {
958 ec = SYNTAX_ERR; 958 ec = SyntaxError;
959 return 0; 959 return 0;
960 } 960 }
961 return fragment.release(); 961 return fragment.release();
962 } 962 }
963 963
964 PassRefPtr<DocumentFragment> createFragmentForTransformToFragment(const String& sourceString, const String& sourceMIMEType, Document* outputDoc) 964 PassRefPtr<DocumentFragment> createFragmentForTransformToFragment(const String& sourceString, const String& sourceMIMEType, Document* outputDoc)
965 { 965 {
966 RefPtr<DocumentFragment> fragment = outputDoc->createDocumentFragment(); 966 RefPtr<DocumentFragment> fragment = outputDoc->createDocumentFragment();
967 967
968 if (sourceMIMEType == "text/html") { 968 if (sourceMIMEType == "text/html") {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 if (hasOneChild(containerNode.get())) { 1083 if (hasOneChild(containerNode.get())) {
1084 containerNode->replaceChild(textNode.release(), containerNode->firstChil d(), ec); 1084 containerNode->replaceChild(textNode.release(), containerNode->firstChil d(), ec);
1085 return; 1085 return;
1086 } 1086 }
1087 1087
1088 containerNode->removeChildren(); 1088 containerNode->removeChildren();
1089 containerNode->appendChild(textNode.release(), ec); 1089 containerNode->appendChild(textNode.release(), ec);
1090 } 1090 }
1091 1091
1092 } 1092 }
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698