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

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

Issue 1163673005: Refactoring: Remove StyledMarkupAccumulator::RangeFullySelectsNodes (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 side-by-side diff with in-line comments
Download patch
Index: Source/core/editing/StyledMarkupAccumulator.h
diff --git a/Source/core/editing/StyledMarkupAccumulator.h b/Source/core/editing/StyledMarkupAccumulator.h
index a4a87bece3f4025ad999d354ee5c62722eee9fc5..a03eb932a6d9d3b84bacb29f9f6fe35c2370fdeb 100644
--- a/Source/core/editing/StyledMarkupAccumulator.h
+++ b/Source/core/editing/StyledMarkupAccumulator.h
@@ -44,39 +44,39 @@ class StyledMarkupAccumulator final {
WTF_MAKE_NONCOPYABLE(StyledMarkupAccumulator);
STACK_ALLOCATED();
public:
- enum RangeFullySelectsNode { DoesFullySelectNode, DoesNotFullySelectNode };
-
- StyledMarkupAccumulator(EAbsoluteURLs, const TextOffset& start, const TextOffset& end, const PassRefPtrWillBeRawPtr<Document>, EAnnotateForInterchange, Node*, ConvertBlocksToInlines);
-
- bool convertBlocksToInlines() const { return m_convertBlocksToInlines == ConvertBlocksToInlines::Convert; }
+ StyledMarkupAccumulator(EAbsoluteURLs, const TextOffset& start, const TextOffset& end, const PassRefPtrWillBeRawPtr<Document>, EAnnotateForInterchange, Node*);
yosin_UTC9 2015/06/09 01:18:11 Do you also remove convertBlocksToInlines paramete
void appendString(const String&);
void appendStartTag(Node&);
void appendEndTag(const Element&);
+ void appendStartMarkup(StringBuilder&, Node&);
+ void appendText(Text&);
+ void appendElement(Element&, bool, PassRefPtrWillBeRawPtr<EditingStyle>);
yosin_UTC9 2015/06/09 01:18:11 Could you add parameter name for bool parameter?
hajimehoshi 2015/06/10 10:45:08 Done.
+ void appendElement(StringBuilder&, Element&, bool, PassRefPtrWillBeRawPtr<EditingStyle>);
yosin_UTC9 2015/06/09 01:18:11 Could you add parameter name for bool parameter?
hajimehoshi 2015/06/10 10:45:08 Done.
+
// TODO(hajimehoshi): These functions are called from the serializer, but
// should not.
Node* highestNodeToBeSerialized() { return m_highestNodeToBeSerialized.get(); }
void setHighestNodeToBeSerialized(Node* highestNodeToBeSerialized) { m_highestNodeToBeSerialized = highestNodeToBeSerialized; }
void setWrappingStyle(PassRefPtrWillBeRawPtr<EditingStyle> wrappingStyle) { m_wrappingStyle = wrappingStyle; }
- void wrapWithNode(ContainerNode&, RangeFullySelectsNode = DoesFullySelectNode);
void wrapWithStyleNode(StylePropertySet*);
String takeResults();
-private:
- void appendText(StringBuilder&, Text&);
+ void pushMarkup(const String&);
+ RefPtrWillBeMember<EditingStyle> createInlineStyle(Element&, bool);
yosin_UTC9 2015/06/09 01:18:11 Could you add parameter name for second bool param
hajimehoshi 2015/06/10 10:45:09 Done.
+private:
String renderedText(Text&);
String stringValueForRange(const Text&);
+ void appendText(StringBuilder&, Text&);
+
bool shouldApplyWrappingStyle(const Node&) const;
bool shouldAnnotate() const;
- void appendElement(StringBuilder&, Element&);
- void appendElement(StringBuilder&, Element&, bool, RangeFullySelectsNode);
- void appendStartMarkup(StringBuilder&, Node&);
void appendEndMarkup(StringBuilder&, const Element&);
MarkupFormatter m_formatter;
@@ -84,7 +84,6 @@ private:
const TextOffset m_end;
const RefPtrWillBeMember<Document> m_document;
const EAnnotateForInterchange m_shouldAnnotate;
- const ConvertBlocksToInlines m_convertBlocksToInlines;
RawPtrWillBeMember<Node> m_highestNodeToBeSerialized;
RefPtrWillBeMember<EditingStyle> m_wrappingStyle;
StringBuilder m_result;
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupAccumulator.cpp » ('j') | Source/core/editing/StyledMarkupSerializer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698