Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: Source/core/editing/StyledMarkupSerializer.h

Issue 1148873009: Refactoring: Remove enum class NodeTraversalMode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 template<typename Strategy> 43 template<typename Strategy>
44 class StyledMarkupSerializer final { 44 class StyledMarkupSerializer final {
45 STACK_ALLOCATED(); 45 STACK_ALLOCATED();
46 using PositionType = typename Strategy::PositionType; 46 using PositionType = typename Strategy::PositionType;
47 public: 47 public:
48 StyledMarkupSerializer(EAbsoluteURLs, EAnnotateForInterchange, const Positio nType& start, const PositionType& end, Node* highestNodeToBeSerialized, ConvertB locksToInlines); 48 StyledMarkupSerializer(EAbsoluteURLs, EAnnotateForInterchange, const Positio nType& start, const PositionType& end, Node* highestNodeToBeSerialized, ConvertB locksToInlines);
49 49
50 String createMarkup(); 50 String createMarkup();
51 51
52 private: 52 private:
53 enum class NodeTraversalMode { EmitString, DoNotEmitString }; 53 Node* serializeNodes(Node* startNode, Node* pastEnd, StyledMarkupAccumulator *);
54 54
55 Node* serializeNodes(Node* startNode, Node* pastEnd); 55 Node* traverseNodesForSerialization(Node* startNode, Node* pastEnd, StyledMa rkupAccumulator*);
56 56
57 Node* traverseNodesForSerialization(Node* startNode, Node* pastEnd, NodeTrav ersalMode);
58
59 StyledMarkupAccumulator m_markupAccumulator;
60 const PositionType m_start; 57 const PositionType m_start;
61 const PositionType m_end; 58 const PositionType m_end;
59 const EAbsoluteURLs m_shouldResolveURLs;
62 const EAnnotateForInterchange m_shouldAnnotate; 60 const EAnnotateForInterchange m_shouldAnnotate;
63 const RefPtrWillBeMember<Node> m_highestNodeToBeSerialized; 61 const RefPtrWillBeMember<Node> m_highestNodeToBeSerialized;
62 const ConvertBlocksToInlines m_convertBlocksToInlines;
64 }; 63 };
65 64
66 extern template class StyledMarkupSerializer<EditingStrategy>; 65 extern template class StyledMarkupSerializer<EditingStrategy>;
67 66
68 } // namespace blink 67 } // namespace blink
69 68
70 #endif // StyledMarkupSerializer_h 69 #endif // StyledMarkupSerializer_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | Source/core/editing/StyledMarkupSerializer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698