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

Side by Side Diff: Source/core/dom/DecodedDataDocumentParser.cpp

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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/ContainerNode.cpp ('k') | Source/core/dom/Document.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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 { 68 {
69 RefPtr<Element> titleElement = m_document->titleElement(); 69 RefPtr<Element> titleElement = m_document->titleElement();
70 if (!titleElement 70 if (!titleElement
71 || titleElement->firstElementChild() 71 || titleElement->firstElementChild()
72 || m_firstEncoding != Latin1Encoding() 72 || m_firstEncoding != Latin1Encoding()
73 || !titleElement->textContent().containsOnlyLatin1()) 73 || !titleElement->textContent().containsOnlyLatin1())
74 return; // Either we don't have a title yet or something bizzare as happ ened and we give up. 74 return; // Either we don't have a title yet or something bizzare as happ ened and we give up.
75 CString originalBytes = titleElement->textContent().latin1(); 75 CString originalBytes = titleElement->textContent().latin1();
76 OwnPtr<TextCodec> codec = newTextCodec(m_document->decoder()->encoding()); 76 OwnPtr<TextCodec> codec = newTextCodec(m_document->decoder()->encoding());
77 String correctlyDecodedTitle = codec->decode(originalBytes.data(), originalB ytes.length(), true); 77 String correctlyDecodedTitle = codec->decode(originalBytes.data(), originalB ytes.length(), true);
78 titleElement->setTextContent(correctlyDecodedTitle, IGNORE_EXCEPTION_STATE); 78 titleElement->setTextContent(correctlyDecodedTitle, IGNORE_EXCEPTION);
79 } 79 }
80 80
81 } 81 }
82 82
83 DecodedDataDocumentParser::DecodedDataDocumentParser(Document* document) 83 DecodedDataDocumentParser::DecodedDataDocumentParser(Document* document)
84 : DocumentParser(document) 84 : DocumentParser(document)
85 { 85 {
86 } 86 }
87 87
88 size_t DecodedDataDocumentParser::appendBytes(const char* data, size_t length) 88 size_t DecodedDataDocumentParser::appendBytes(const char* data, size_t length)
(...skipping 27 matching lines...) Expand all
116 if (remainingData.isEmpty()) 116 if (remainingData.isEmpty())
117 return 0; 117 return 0;
118 118
119 size_t consumedChars = remainingData.length(); 119 size_t consumedChars = remainingData.length();
120 append(remainingData.releaseImpl()); 120 append(remainingData.releaseImpl());
121 121
122 return consumedChars; 122 return consumedChars;
123 } 123 }
124 124
125 }; 125 };
OLDNEW
« no previous file with comments | « Source/core/dom/ContainerNode.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698