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

Side by Side Diff: Source/WebCore/xml/XMLErrors.cpp

Issue 9689032: Merge 110111 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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 | « no previous file | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 15 matching lines...) Expand all
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "config.h" 29 #include "config.h"
30 #include "XMLErrors.h" 30 #include "XMLErrors.h"
31 31
32 #include "Document.h" 32 #include "Document.h"
33 #include "Element.h" 33 #include "Element.h"
34 #include "Frame.h" 34 #include "Frame.h"
35 #include "HTMLNames.h" 35 #include "HTMLNames.h"
36 #include "ScopedEventQueue.h"
36 #include "Text.h" 37 #include "Text.h"
37 #include <wtf/text/WTFString.h> 38 #include <wtf/text/WTFString.h>
38 39
39 #if ENABLE(SVG) 40 #if ENABLE(SVG)
40 #include "SVGNames.h" 41 #include "SVGNames.h"
41 #endif 42 #endif
42 43
43 namespace WebCore { 44 namespace WebCore {
44 45
45 using namespace HTMLNames; 46 using namespace HTMLNames;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 109
109 return reportElement; 110 return reportElement;
110 } 111 }
111 112
112 void XMLErrors::insertErrorMessageBlock() 113 void XMLErrors::insertErrorMessageBlock()
113 { 114 {
114 // One or more errors occurred during parsing of the code. Display an error block to the user above 115 // One or more errors occurred during parsing of the code. Display an error block to the user above
115 // the normal content (the DOM tree is created manually and includes line/co l info regarding 116 // the normal content (the DOM tree is created manually and includes line/co l info regarding
116 // where the errors are located) 117 // where the errors are located)
117 118
119 EventQueueScope scope;
120
118 // Create elements for display 121 // Create elements for display
119 ExceptionCode ec = 0; 122 ExceptionCode ec = 0;
120 RefPtr<Element> documentElement = m_document->documentElement(); 123 RefPtr<Element> documentElement = m_document->documentElement();
121 if (!documentElement) { 124 if (!documentElement) {
122 RefPtr<Element> rootElement = m_document->createElement(htmlTag, false); 125 RefPtr<Element> rootElement = m_document->createElement(htmlTag, false);
123 m_document->appendChild(rootElement, ec); 126 m_document->appendChild(rootElement, ec);
124 RefPtr<Element> body = m_document->createElement(bodyTag, false); 127 RefPtr<Element> body = m_document->createElement(bodyTag, false);
125 rootElement->appendChild(body, ec); 128 rootElement->appendChild(body, ec);
126 documentElement = body.get(); 129 documentElement = body.get();
127 } 130 }
(...skipping 15 matching lines...) Expand all
143 RefPtr<Element> paragraph = m_document->createElement(pTag, false); 146 RefPtr<Element> paragraph = m_document->createElement(pTag, false);
144 paragraph->setAttribute(styleAttr, "white-space: normal"); 147 paragraph->setAttribute(styleAttr, "white-space: normal");
145 paragraph->appendChild(m_document->createTextNode("This document was cre ated as the result of an XSL transformation. The line and column numbers given a re from the transformed result."), ec); 148 paragraph->appendChild(m_document->createTextNode("This document was cre ated as the result of an XSL transformation. The line and column numbers given a re from the transformed result."), ec);
146 reportElement->appendChild(paragraph.release(), ec); 149 reportElement->appendChild(paragraph.release(), ec);
147 } 150 }
148 #endif 151 #endif
149 m_document->updateStyleIfNeeded(); 152 m_document->updateStyleIfNeeded();
150 } 153 }
151 154
152 } // namespace WebCore 155 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698