| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 size_t length = 0; | 44 size_t length = 0; |
| 45 for (const auto& string : strings) | 45 for (const auto& string : strings) |
| 46 length += string.length(); | 46 length += string.length(); |
| 47 return length; | 47 return length; |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace | 50 } // namespace |
| 51 | 51 |
| 52 using namespace HTMLNames; | 52 using namespace HTMLNames; |
| 53 | 53 |
| 54 StyledMarkupAccumulator::StyledMarkupAccumulator(EAbsoluteURLs shouldResolveURLs
, const TextOffset& start, const TextOffset& end, const PassRefPtrWillBeRawPtr<D
ocument> document, EAnnotateForInterchange shouldAnnotate) | 54 StyledMarkupAccumulator::StyledMarkupAccumulator(EAbsoluteURLs shouldResolveURLs
, const TextOffset& start, const TextOffset& end, const PassRefPtrWillBeRawPtr<D
ocument> document, EAnnotateForInterchange shouldAnnotate, ConvertBlocksToInline
s convertBlocksToInlines) |
| 55 : m_formatter(shouldResolveURLs) | 55 : m_formatter(shouldResolveURLs) |
| 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_convertBlocksToInlines(convertBlocksToInlines) |
| 60 { | 61 { |
| 61 } | 62 } |
| 62 | 63 |
| 63 void StyledMarkupAccumulator::appendEndTag(const Element& element) | 64 void StyledMarkupAccumulator::appendEndTag(const Element& element) |
| 64 { | 65 { |
| 65 appendEndMarkup(m_result, element); | 66 appendEndMarkup(m_result, element); |
| 66 } | 67 } |
| 67 | 68 |
| 68 void StyledMarkupAccumulator::appendStartMarkup(Node& node) | 69 void StyledMarkupAccumulator::appendStartMarkup(Node& node) |
| 69 { | 70 { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 m_reversedPrecedingMarkup.append(str); | 219 m_reversedPrecedingMarkup.append(str); |
| 219 } | 220 } |
| 220 | 221 |
| 221 void StyledMarkupAccumulator::appendInterchangeNewline() | 222 void StyledMarkupAccumulator::appendInterchangeNewline() |
| 222 { | 223 { |
| 223 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\""
AppleInterchangeNewline "\">")); | 224 DEFINE_STATIC_LOCAL(const String, interchangeNewlineString, ("<br class=\""
AppleInterchangeNewline "\">")); |
| 224 m_result.append(interchangeNewlineString); | 225 m_result.append(interchangeNewlineString); |
| 225 } | 226 } |
| 226 | 227 |
| 227 } // namespace blink | 228 } // namespace blink |
| OLD | NEW |