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

Unified Diff: Source/core/editing/StyledMarkupSerializer.h

Issue 1092573003: Refactoring: Move a part of creteMarkupInternal to StyledMarkupSerializer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nit Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/StyledMarkupSerializer.h
diff --git a/Source/core/editing/StyledMarkupSerializer.h b/Source/core/editing/StyledMarkupSerializer.h
index 604e3b9b6c14f1cb55ec7b8310654df3492293e7..d06e7041295fab84158002564f719353638c74f0 100644
--- a/Source/core/editing/StyledMarkupSerializer.h
+++ b/Source/core/editing/StyledMarkupSerializer.h
@@ -61,6 +61,7 @@ public:
void setHighestNodeToBeSerialized(Node* node) { m_highestNodeToBeSerialized = node; }
bool shouldAnnotate() const { return m_shouldAnnotate == AnnotateForInterchange || m_shouldAnnotate == AnnotateForNavigationTransition; }
bool shouldAnnotateForNavigationTransition() const { return m_shouldAnnotate == AnnotateForNavigationTransition; }
+ bool shouldAnnotateForInterchange() const { return m_shouldAnnotate == AnnotateForInterchange; }
private:
String renderedText(Text&);
@@ -86,15 +87,11 @@ class StyledMarkupSerializer final {
public:
StyledMarkupSerializer(EAbsoluteURLs, EAnnotateForInterchange, const Position& start, const Position& end, Node* highestNodeToBeSerialized = nullptr);
+ String createMarkup(bool convertBlocksToInlines, Node* specialCommonAncestor);
+
template<typename Strategy>
Node* serializeNodes(Node* startNode, Node* pastEnd);
- // TODO(hajimehoshi): These functions should be at the accumulator, but are
- // used at markup.cpp. Move those usages to here.
- void appendString(const String& s) { return m_markupAccumulator.appendString(s); }
- void wrapWithNode(ContainerNode&, bool convertBlocksToInlines = false, StyledMarkupAccumulator::RangeFullySelectsNode = StyledMarkupAccumulator::DoesFullySelectNode);
- void wrapWithStyleNode(StylePropertySet*, bool isBlock = false);
-
String takeResults();
// TODO(hajimehoshi): This is called by StyledMarkupAccumulator but should
@@ -107,7 +104,13 @@ private:
template<typename Strategy>
Node* traverseNodesForSerialization(Node* startNode, Node* pastEnd, NodeTraversalMode);
+ // TODO(hajimehoshi): These functions should be at the accumulator.
+ void wrapWithNode(ContainerNode&, bool convertBlocksToInlines = false, StyledMarkupAccumulator::RangeFullySelectsNode = StyledMarkupAccumulator::DoesFullySelectNode);
+ void wrapWithStyleNode(StylePropertySet*, bool isBlock = false);
+
StyledMarkupAccumulator m_markupAccumulator;
+ const Position m_start;
+ const Position m_end;
Vector<String> m_reversedPrecedingMarkup;
RefPtrWillBeMember<EditingStyle> m_wrappingStyle;
};
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698