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

Side by Side Diff: third_party/WebKit/Source/core/page/PageSerializer.cpp

Issue 1365923002: Make Document.charset an alias of characterSet, as per spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/core/loader/FormSubmission.cpp ('k') | 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 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 void SerializerMarkupAccumulator::appendElement(StringBuilder& result, Element& element, Namespaces* namespaces) 157 void SerializerMarkupAccumulator::appendElement(StringBuilder& result, Element& element, Namespaces* namespaces)
158 { 158 {
159 if (!shouldIgnoreElement(element)) 159 if (!shouldIgnoreElement(element))
160 MarkupAccumulator::appendElement(result, element, namespaces); 160 MarkupAccumulator::appendElement(result, element, namespaces);
161 161
162 // TODO(tiger): Refactor MarkupAccumulator so it is easier to append an elem ent like this, without special cases for XHTML 162 // TODO(tiger): Refactor MarkupAccumulator so it is easier to append an elem ent like this, without special cases for XHTML
163 if (isHTMLHeadElement(element)) { 163 if (isHTMLHeadElement(element)) {
164 result.appendLiteral("<meta http-equiv=\"Content-Type\" content=\""); 164 result.appendLiteral("<meta http-equiv=\"Content-Type\" content=\"");
165 MarkupFormatter::appendAttributeValue(result, m_document->suggestedMIMET ype(), m_document->isHTMLDocument()); 165 MarkupFormatter::appendAttributeValue(result, m_document->suggestedMIMET ype(), m_document->isHTMLDocument());
166 result.appendLiteral("; charset="); 166 result.appendLiteral("; charset=");
167 MarkupFormatter::appendAttributeValue(result, m_document->charset(), m_d ocument->isHTMLDocument()); 167 MarkupFormatter::appendAttributeValue(result, m_document->characterSet() , m_document->isHTMLDocument());
168 if (m_document->isXHTMLDocument()) 168 if (m_document->isXHTMLDocument())
169 result.appendLiteral("\" />"); 169 result.appendLiteral("\" />");
170 else 170 else
171 result.appendLiteral("\">"); 171 result.appendLiteral("\">");
172 } 172 }
173 173
174 // FIXME: For object (plugins) tags and video tag we could replace them by a n image of their current contents. 174 // FIXME: For object (plugins) tags and video tag we could replace them by a n image of their current contents.
175 } 175 }
176 176
177 void SerializerMarkupAccumulator::appendCustomAttributes(StringBuilder& result, const Element& element, Namespaces* namespaces) 177 void SerializerMarkupAccumulator::appendCustomAttributes(StringBuilder& result, const Element& element, Namespaces* namespaces)
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 return fakeURL; 572 return fakeURL;
573 } 573 }
574 574
575 PageSerializer::Delegate* PageSerializer::delegate() 575 PageSerializer::Delegate* PageSerializer::delegate()
576 { 576 {
577 return m_delegate.get(); 577 return m_delegate.get();
578 } 578 }
579 579
580 } // namespace blink 580 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FormSubmission.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698