| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 , m_start(start) | 56 , m_start(start) |
| 57 , m_end(end) | 57 , m_end(end) |
| 58 , m_document(document) | 58 , m_document(document) |
| 59 , m_shouldAnnotate(shouldAnnotate) | 59 , m_shouldAnnotate(shouldAnnotate) |
| 60 , m_highestNodeToBeSerialized(highestNodeToBeSerialized) | 60 , m_highestNodeToBeSerialized(highestNodeToBeSerialized) |
| 61 { | 61 { |
| 62 } | 62 } |
| 63 | 63 |
| 64 void StyledMarkupAccumulator::appendStartTag(Node& node) | 64 void StyledMarkupAccumulator::appendStartTag(Node& node) |
| 65 { | 65 { |
| 66 appendStartMarkup(m_result, node); | 66 appendStartMarkup(node); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void StyledMarkupAccumulator::appendEndTag(const Element& element) | 69 void StyledMarkupAccumulator::appendEndTag(const Element& element) |
| 70 { | 70 { |
| 71 appendEndMarkup(m_result, element); | 71 appendEndMarkup(m_result, element); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void StyledMarkupAccumulator::appendStartMarkup(StringBuilder& result, Node& nod
e) | 74 void StyledMarkupAccumulator::appendStartMarkup(Node& node) |
| 75 { | 75 { |
| 76 switch (node.nodeType()) { | 76 switch (node.nodeType()) { |
| 77 case Node::TEXT_NODE: | 77 case Node::TEXT_NODE: |
| 78 appendText(toText(node)); | 78 appendText(toText(node)); |
| 79 break; | 79 break; |
| 80 case Node::ELEMENT_NODE: { | 80 case Node::ELEMENT_NODE: { |
| 81 Element& element = toElement(node); | 81 Element& element = toElement(node); |
| 82 RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element); | 82 RefPtrWillBeRawPtr<EditingStyle> style = createInlineStyle(element); |
| 83 appendElement(element, style); | 83 appendElement(element, style); |
| 84 break; | 84 break; |
| 85 } | 85 } |
| 86 default: | 86 default: |
| 87 m_formatter.appendStartMarkup(result, node, nullptr); | 87 m_formatter.appendStartMarkup(m_result, node, nullptr); |
| 88 break; | 88 break; |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 | 91 |
| 92 void StyledMarkupAccumulator::appendEndMarkup(StringBuilder& result, const Eleme
nt& element) | 92 void StyledMarkupAccumulator::appendEndMarkup(StringBuilder& result, const Eleme
nt& element) |
| 93 { | 93 { |
| 94 m_formatter.appendEndMarkup(result, element); | 94 m_formatter.appendEndMarkup(result, element); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void StyledMarkupAccumulator::appendText(Text& text) | 97 void StyledMarkupAccumulator::appendText(Text& text) |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 m_reversedPrecedingMarkup.append(str); | 275 m_reversedPrecedingMarkup.append(str); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void StyledMarkupAccumulator::appendInterchangeNewline() | 278 void StyledMarkupAccumulator::appendInterchangeNewline() |
| 279 { | 279 { |
| 280 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\""
AppleInterchangeNewline "\">")); | 280 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\""
AppleInterchangeNewline "\">")); |
| 281 m_result.append(interchangeNewlineString); | 281 m_result.append(interchangeNewlineString); |
| 282 } | 282 } |
| 283 | 283 |
| 284 } // namespace blink | 284 } // namespace blink |
| OLD | NEW |