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

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

Issue 1188693005: Introduce StyledMarkupTraverser to StyledMarkupSerializer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: yosin's review 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 52cc41e408451e00f347f3a76c5afa44f53bc199..a5ae215fc81e58f2534269ef65fd433964fb423f 100644
--- a/Source/core/editing/StyledMarkupAccumulator.h
+++ b/Source/core/editing/StyledMarkupAccumulator.h
@@ -44,7 +44,7 @@ class StyledMarkupAccumulator final {
WTF_MAKE_NONCOPYABLE(StyledMarkupAccumulator);
STACK_ALLOCATED();
public:
- StyledMarkupAccumulator(EAbsoluteURLs, const TextOffset& start, const TextOffset& end, const PassRefPtrWillBeRawPtr<Document>, EAnnotateForInterchange);
+ StyledMarkupAccumulator(EAbsoluteURLs, const TextOffset& start, const TextOffset& end, const PassRefPtrWillBeRawPtr<Document>, EAnnotateForInterchange, ConvertBlocksToInlines);
void appendEndTag(const Element&);
void appendInterchangeNewline();
@@ -63,10 +63,12 @@ public:
void appendElementWithInlineStyle(StringBuilder&, const Element&, PassRefPtrWillBeRawPtr<EditingStyle>);
void appendStartMarkup(Node&);
+ bool shouldAnnotate() const;
+ bool convertBlocksToInlines() const { return m_convertBlocksToInlines == ConvertBlocksToInlines::Convert; }
+
private:
String renderedText(Text&);
String stringValueForRange(const Text&);
- bool shouldAnnotate() const;
void appendEndMarkup(StringBuilder&, const Element&);
@@ -77,6 +79,7 @@ private:
const EAnnotateForInterchange m_shouldAnnotate;
StringBuilder m_result;
Vector<String> m_reversedPrecedingMarkup;
+ const ConvertBlocksToInlines m_convertBlocksToInlines;
};
} // namespace blink
« 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