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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 start = m_start.offset(); | 90 start = m_start.offset(); |
91 length -= start; | 91 length -= start; |
92 } | 92 } |
93 } | 93 } |
94 MarkupFormatter::appendCharactersReplacingEntities(m_result, str, start, len
gth, m_formatter.entityMaskForText(text)); | 94 MarkupFormatter::appendCharactersReplacingEntities(m_result, str, start, len
gth, m_formatter.entityMaskForText(text)); |
95 } | 95 } |
96 | 96 |
97 void StyledMarkupAccumulator::appendTextWithInlineStyle(Text& text, PassRefPtrWi
llBeRawPtr<EditingStyle> inlineStyle) | 97 void StyledMarkupAccumulator::appendTextWithInlineStyle(Text& text, PassRefPtrWi
llBeRawPtr<EditingStyle> inlineStyle) |
98 { | 98 { |
99 if (inlineStyle) { | 99 if (inlineStyle) { |
100 // wrappingStyleForSerialization should have removed -webkit-text-decora
tions-in-effect | 100 // wrappingStyleForAnnotatedSerialization should have removed -webkit-te
xt-decorations-in-effect |
101 ASSERT(propertyMissingOrEqualToNone(inlineStyle->style(), CSSPropertyWeb
kitTextDecorationsInEffect)); | 101 ASSERT(!shouldAnnotate() || propertyMissingOrEqualToNone(inlineStyle->st
yle(), CSSPropertyWebkitTextDecorationsInEffect)); |
102 ASSERT(m_document); | 102 ASSERT(m_document); |
103 | 103 |
104 m_result.appendLiteral("<span style=\""); | 104 m_result.appendLiteral("<span style=\""); |
105 MarkupFormatter::appendAttributeValue(m_result, inlineStyle->style()->as
Text(), m_document->isHTMLDocument()); | 105 MarkupFormatter::appendAttributeValue(m_result, inlineStyle->style()->as
Text(), m_document->isHTMLDocument()); |
106 m_result.appendLiteral("\">"); | 106 m_result.appendLiteral("\">"); |
107 } | 107 } |
108 if (!shouldAnnotate()) { | 108 if (!shouldAnnotate()) { |
109 appendText(text); | 109 appendText(text); |
110 } else { | 110 } else { |
111 const bool useRenderedText = !enclosingElementWithTag(firstPositionInNod
e(&text), selectTag); | 111 const bool useRenderedText = !enclosingElementWithTag(firstPositionInNod
e(&text), selectTag); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 m_reversedPrecedingMarkup.append(str); | 219 m_reversedPrecedingMarkup.append(str); |
220 } | 220 } |
221 | 221 |
222 void StyledMarkupAccumulator::appendInterchangeNewline() | 222 void StyledMarkupAccumulator::appendInterchangeNewline() |
223 { | 223 { |
224 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\""
AppleInterchangeNewline "\">")); | 224 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\""
AppleInterchangeNewline "\">")); |
225 m_result.append(interchangeNewlineString); | 225 m_result.append(interchangeNewlineString); |
226 } | 226 } |
227 | 227 |
228 } // namespace blink | 228 } // namespace blink |
OLD | NEW |