| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 void appendElement(StringBuilder&, Element&, Namespaces*); | 74 void appendElement(StringBuilder&, Element&, Namespaces*); |
| 75 void appendElement(StringBuilder&, Element&, bool, RangeFullySelectsNode); | 75 void appendElement(StringBuilder&, Element&, bool, RangeFullySelectsNode); |
| 76 void appendStyleNodeOpenTag(StringBuilder&, StylePropertySet*, bool isBlock
= false); | 76 void appendStyleNodeOpenTag(StringBuilder&, StylePropertySet*, bool isBlock
= false); |
| 77 | 77 |
| 78 // TODO(hajimehoshi): These functions are called from the serializer, but | 78 // TODO(hajimehoshi): These functions are called from the serializer, but |
| 79 // should not. | 79 // should not. |
| 80 Node* highestNodeToBeSerialized() { return m_highestNodeToBeSerialized.get()
; } | 80 Node* highestNodeToBeSerialized() { return m_highestNodeToBeSerialized.get()
; } |
| 81 void setHighestNodeToBeSerialized(Node* highestNodeToBeSerialized) { m_highe
stNodeToBeSerialized = highestNodeToBeSerialized; } | 81 void setHighestNodeToBeSerialized(Node* highestNodeToBeSerialized) { m_highe
stNodeToBeSerialized = highestNodeToBeSerialized; } |
| 82 void setWrappingStyle(PassRefPtrWillBeRawPtr<EditingStyle> wrappingStyle) {
m_wrappingStyle = wrappingStyle; } | 82 void setWrappingStyle(PassRefPtrWillBeRawPtr<EditingStyle> wrappingStyle) {
m_wrappingStyle = wrappingStyle; } |
| 83 bool shouldAnnotate() const { return m_shouldAnnotate == AnnotateForIntercha
nge || m_shouldAnnotate == AnnotateForNavigationTransition; } | |
| 84 bool shouldAnnotateForNavigationTransition() const { return m_shouldAnnotate
== AnnotateForNavigationTransition; } | |
| 85 bool shouldAnnotateForInterchange() const { return m_shouldAnnotate == Annot
ateForInterchange; } | |
| 86 | 83 |
| 87 size_t length() const { return m_accumulator.length(); } | 84 size_t length() const { return m_accumulator.length(); } |
| 88 void concatenateMarkup(StringBuilder&) const; | 85 void concatenateMarkup(StringBuilder&) const; |
| 89 | 86 |
| 90 private: | 87 private: |
| 91 void appendText(StringBuilder&, Text&); | 88 void appendText(StringBuilder&, Text&); |
| 92 | 89 |
| 93 String renderedText(Text&); | 90 String renderedText(Text&); |
| 94 String stringValueForRange(const Text&); | 91 String stringValueForRange(const Text&); |
| 95 | 92 |
| 96 bool shouldApplyWrappingStyle(const Node&) const; | 93 bool shouldApplyWrappingStyle(const Node&) const; |
| 97 | 94 |
| 95 bool shouldAnnotate() const; |
| 96 |
| 98 MarkupAccumulator m_accumulator; | 97 MarkupAccumulator m_accumulator; |
| 99 const TextOffset m_start; | 98 const TextOffset m_start; |
| 100 const TextOffset m_end; | 99 const TextOffset m_end; |
| 101 const RefPtrWillBeMember<Document> m_document; | 100 const RefPtrWillBeMember<Document> m_document; |
| 102 const EAnnotateForInterchange m_shouldAnnotate; | 101 const EAnnotateForInterchange m_shouldAnnotate; |
| 103 RawPtrWillBeMember<Node> m_highestNodeToBeSerialized; | 102 RawPtrWillBeMember<Node> m_highestNodeToBeSerialized; |
| 104 RefPtrWillBeMember<EditingStyle> m_wrappingStyle; | 103 RefPtrWillBeMember<EditingStyle> m_wrappingStyle; |
| 105 }; | 104 }; |
| 106 | 105 |
| 107 } // namespace blink | 106 } // namespace blink |
| 108 | 107 |
| 109 #endif // StyledMarkupAccumulator_h | 108 #endif // StyledMarkupAccumulator_h |
| OLD | NEW |