| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |