| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 enum class NodeTraversalMode { EmitString, DoNotEmitString }; | 53 enum class NodeTraversalMode { EmitString, DoNotEmitString }; |
| 54 | 54 |
| 55 Node* serializeNodes(Node* startNode, Node* pastEnd); | 55 Node* serializeNodes(Node* startNode, Node* pastEnd); |
| 56 String takeResults(); | 56 String takeResults(); |
| 57 | 57 |
| 58 Node* traverseNodesForSerialization(Node* startNode, Node* pastEnd, NodeTrav
ersalMode); | 58 Node* traverseNodesForSerialization(Node* startNode, Node* pastEnd, NodeTrav
ersalMode); |
| 59 | 59 |
| 60 // TODO(hajimehoshi): These functions should be at the accumulator. | 60 // TODO(hajimehoshi): These functions should be at the accumulator. |
| 61 void wrapWithNode(ContainerNode&, StyledMarkupAccumulator::RangeFullySelects
Node = StyledMarkupAccumulator::DoesFullySelectNode); | 61 void wrapWithNode(ContainerNode&, RangeFullySelectsNode = RangeFullySelectsN
ode::DoesSelect); |
| 62 void wrapWithStyleNode(StylePropertySet*, bool isBlock = false); | 62 void wrapWithStyleNode(StylePropertySet*, StyleTagType = StyleTagType::Inlin
e); |
| 63 | 63 |
| 64 bool convertBlocksToInlines() const { return m_convertBlocksToInlines == Con
vertBlocksToInlines::Convert; } | 64 bool convertBlocksToInlines() const { return m_convertBlocksToInlines == Con
vertBlocksToInlines::Convert; } |
| 65 | 65 |
| 66 StyledMarkupAccumulator m_markupAccumulator; | 66 StyledMarkupAccumulator m_markupAccumulator; |
| 67 const PositionType m_start; | 67 const PositionType m_start; |
| 68 const PositionType m_end; | 68 const PositionType m_end; |
| 69 const EAnnotateForInterchange m_shouldAnnotate; | 69 const EAnnotateForInterchange m_shouldAnnotate; |
| 70 const RefPtrWillBeMember<Node> m_highestNodeToBeSerialized; | 70 const RefPtrWillBeMember<Node> m_highestNodeToBeSerialized; |
| 71 const ConvertBlocksToInlines m_convertBlocksToInlines; | 71 const ConvertBlocksToInlines m_convertBlocksToInlines; |
| 72 Vector<String> m_reversedPrecedingMarkup; | 72 Vector<String> m_reversedPrecedingMarkup; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 extern template class StyledMarkupSerializer<EditingStrategy>; | 75 extern template class StyledMarkupSerializer<EditingStrategy>; |
| 76 | 76 |
| 77 } // namespace blink | 77 } // namespace blink |
| 78 | 78 |
| 79 #endif // StyledMarkupSerializer_h | 79 #endif // StyledMarkupSerializer_h |
| OLD | NEW |