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

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

Issue 1133243008: Refactoring: Remove StyledMarkupAccumulator::shouldAnnotate* methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupSerializer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { return m_shouldAnnotate == AnnotateForIntercha nge || m_shouldAnnotate == AnnotateForNavigationTransition; }
yosin_UTC9 2015/05/18 08:49:35 Let's implement this function in .cpp file: http:/
hajimehoshi 2015/05/18 09:46:25 Done.
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupSerializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698