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

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

Issue 1159033006: Refactoring: Replace boolean parameters with enum classes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename values 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupAccumulator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/StyledMarkupAccumulator.h
diff --git a/Source/core/editing/StyledMarkupAccumulator.h b/Source/core/editing/StyledMarkupAccumulator.h
index c2555acb08196f748f49b0e35e93e9565556726c..226a75db8f6a777cdbeb5f9753cddfad22903b49 100644
--- a/Source/core/editing/StyledMarkupAccumulator.h
+++ b/Source/core/editing/StyledMarkupAccumulator.h
@@ -40,12 +40,25 @@ class Document;
class StylePropertySet;
class Text;
+enum class RangeFullySelectsNode {
+ DoesSelect,
+ DoesNotSelect,
+};
+
+enum class StyleTagType {
+ Block,
+ Inline,
+};
+
+enum class AddDisplayInline {
+ DoesAdd,
+ DoesNotAdd,
+};
+
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*);
void appendString(const String&);
@@ -55,8 +68,8 @@ public:
void appendEndMarkup(StringBuilder&, const Element&);
void appendElement(StringBuilder&, Element&, Namespaces*);
- void appendElement(StringBuilder&, Element&, bool, RangeFullySelectsNode);
- void appendStyleNodeOpenTag(StringBuilder&, StylePropertySet*, bool isBlock = false);
+ void appendElement(StringBuilder&, Element&, AddDisplayInline, RangeFullySelectsNode);
+ void appendStyleNodeOpenTag(StringBuilder&, StylePropertySet*, StyleTagType = StyleTagType::Inline);
// TODO(hajimehoshi): These functions are called from the serializer, but
// should not.
« no previous file with comments | « no previous file | Source/core/editing/StyledMarkupAccumulator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698