Missing *explicit* keyword in editing.
authorgyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2012 06:33:55 +0000 (06:33 +0000)
committergyuyoung.kim@samsung.com <gyuyoung.kim@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2012 06:33:55 +0000 (06:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92055

Reviewed by Ryosuke Niwa.

Some constructors missed to use *explicit* keyword. They need to be added
*explicit* keyword to contructor which has a parameter in order to avoid
implicit type conversion.

No new tests. Covered by existing tests.

* editing/AlternativeTextController.h:
(WebCore::AlternativeTextController::UNLESS_ENABLED):
* editing/BreakBlockquoteCommand.h:
(BreakBlockquoteCommand):
* editing/DeleteButton.h:
(DeleteButton):
* editing/DeleteButtonController.h:
(DeleteButtonController):
* editing/EditCommand.h:
(EditCommand):
(WebCore::SimpleEditCommand::SimpleEditCommand):
* editing/EditingBehavior.h:
(WebCore::EditingBehavior::EditingBehavior):
* editing/EditingStyle.h:
(EditingStyle):
* editing/Editor.h:
(Editor):
* editing/FrameSelection.h:
(FrameSelection):
* editing/InsertLineBreakCommand.h:
(InsertLineBreakCommand):
* editing/ModifySelectionListLevel.h:
(ModifySelectionListLevelCommand):
(DecreaseSelectionListLevelCommand):
* editing/RemoveFormatCommand.h:
(RemoveFormatCommand):
* editing/RemoveNodeCommand.h:
(RemoveNodeCommand):
* editing/RemoveNodePreservingChildrenCommand.h:
(RemoveNodePreservingChildrenCommand):
* editing/ReplaceNodeWithSpanCommand.h:
(ReplaceNodeWithSpanCommand):
* editing/TextInsertionBaseCommand.h:
(TextInsertionBaseCommand):
* editing/UndoManager.h:
(UndoManager):
* editing/UnlinkCommand.h:
(UnlinkCommand):
* editing/WrapContentsInDummySpanCommand.h:
(WrapContentsInDummySpanCommand):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@123429 268f45cc-cd09-0410-ab3c-d52691b4dbfc

20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/editing/AlternativeTextController.h
Source/WebCore/editing/BreakBlockquoteCommand.h
Source/WebCore/editing/DeleteButton.h
Source/WebCore/editing/DeleteButtonController.h
Source/WebCore/editing/EditCommand.h
Source/WebCore/editing/EditingBehavior.h
Source/WebCore/editing/EditingStyle.h
Source/WebCore/editing/Editor.h
Source/WebCore/editing/FrameSelection.h
Source/WebCore/editing/InsertLineBreakCommand.h
Source/WebCore/editing/ModifySelectionListLevel.h
Source/WebCore/editing/RemoveFormatCommand.h
Source/WebCore/editing/RemoveNodeCommand.h
Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h
Source/WebCore/editing/ReplaceNodeWithSpanCommand.h
Source/WebCore/editing/TextInsertionBaseCommand.h
Source/WebCore/editing/UndoManager.h
Source/WebCore/editing/UnlinkCommand.h
Source/WebCore/editing/WrapContentsInDummySpanCommand.h

index 0bb732b..7aa316e 100644 (file)
@@ -1,3 +1,57 @@
+2012-07-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
+
+        Missing *explicit* keyword in editing.
+        https://bugs.webkit.org/show_bug.cgi?id=92055
+
+        Reviewed by Ryosuke Niwa.
+
+        Some constructors missed to use *explicit* keyword. They need to be added
+        *explicit* keyword to contructor which has a parameter in order to avoid
+        implicit type conversion.
+
+        No new tests. Covered by existing tests.
+
+        * editing/AlternativeTextController.h:
+        (WebCore::AlternativeTextController::UNLESS_ENABLED):
+        * editing/BreakBlockquoteCommand.h:
+        (BreakBlockquoteCommand):
+        * editing/DeleteButton.h:
+        (DeleteButton):
+        * editing/DeleteButtonController.h:
+        (DeleteButtonController):
+        * editing/EditCommand.h:
+        (EditCommand):
+        (WebCore::SimpleEditCommand::SimpleEditCommand):
+        * editing/EditingBehavior.h:
+        (WebCore::EditingBehavior::EditingBehavior):
+        * editing/EditingStyle.h:
+        (EditingStyle):
+        * editing/Editor.h:
+        (Editor):
+        * editing/FrameSelection.h:
+        (FrameSelection):
+        * editing/InsertLineBreakCommand.h:
+        (InsertLineBreakCommand):
+        * editing/ModifySelectionListLevel.h:
+        (ModifySelectionListLevelCommand):
+        (DecreaseSelectionListLevelCommand):
+        * editing/RemoveFormatCommand.h:
+        (RemoveFormatCommand):
+        * editing/RemoveNodeCommand.h:
+        (RemoveNodeCommand):
+        * editing/RemoveNodePreservingChildrenCommand.h:
+        (RemoveNodePreservingChildrenCommand):
+        * editing/ReplaceNodeWithSpanCommand.h:
+        (ReplaceNodeWithSpanCommand):
+        * editing/TextInsertionBaseCommand.h:
+        (TextInsertionBaseCommand):
+        * editing/UndoManager.h:
+        (UndoManager):
+        * editing/UnlinkCommand.h:
+        (UnlinkCommand):
+        * editing/WrapContentsInDummySpanCommand.h:
+        (WrapContentsInDummySpanCommand):
+
 2012-07-23  Dominic Mazzoni  <dmazzoni@google.com>
 
         AX: Need AccessibilityObjects for nodes without renderers in canvas subtree
index f6e6484..19334d6 100644 (file)
@@ -94,7 +94,7 @@ class AlternativeTextController {
     WTF_MAKE_NONCOPYABLE(AlternativeTextController);
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    AlternativeTextController(Frame*) UNLESS_ENABLED({ })
+    explicit AlternativeTextController(Frame*) UNLESS_ENABLED({ })
     ~AlternativeTextController() UNLESS_ENABLED({ })
 
     void startAlternativeTextUITimer(AlternativeTextType) UNLESS_ENABLED({ })
index 885e5d6..6ebac54 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
 
 private:
-    BreakBlockquoteCommand(Document*);
+    explicit BreakBlockquoteCommand(Document*);
     virtual void doApply();
 };
 
index af6c1f4..d50d75f 100644 (file)
@@ -35,7 +35,7 @@ public:
     static PassRefPtr<DeleteButton> create(Document*);
 
 private:
-    DeleteButton(Document*);
+    explicit DeleteButton(Document*);
 
     virtual void defaultEventHandler(Event*);
 };
index a7f7d1f..f914fef 100644 (file)
@@ -39,7 +39,7 @@ class VisibleSelection;
 class DeleteButtonController {
     WTF_MAKE_NONCOPYABLE(DeleteButtonController); WTF_MAKE_FAST_ALLOCATED;
 public:
-    DeleteButtonController(Frame*);
+    explicit DeleteButtonController(Frame*);
 
     static const char* const containerElementIdentifier;
 
index 142012b..048d825 100644 (file)
@@ -58,7 +58,7 @@ public:
     virtual void doApply() = 0;
 
 protected:
-    EditCommand(Document*);
+    explicit EditCommand(Document*);
     EditCommand(Document*, const VisibleSelection&, const VisibleSelection&);
 
     Document* document() const { return m_document.get(); }
@@ -83,7 +83,7 @@ public:
 #endif
 
 protected:
-    SimpleEditCommand(Document* document) : EditCommand(document) { }
+    explicit SimpleEditCommand(Document* document) : EditCommand(document) { }
 
 #ifndef NDEBUG
     void addNodeAndDescendants(Node*, HashSet<Node*>&);
index bbf68f5..941430f 100644 (file)
@@ -28,7 +28,7 @@ namespace WebCore {
 class EditingBehavior {
 
 public:
-    EditingBehavior(EditingBehaviorType type)
+    explicit EditingBehavior(EditingBehaviorType type)
         : m_type(type)
     {
     }
index 177c2a0..00e9d57 100644 (file)
@@ -150,8 +150,8 @@ private:
     EditingStyle();
     EditingStyle(Node*, PropertiesToInclude);
     EditingStyle(const Position&, PropertiesToInclude);
-    EditingStyle(const StylePropertySet*);
-    EditingStyle(const CSSStyleDeclaration*);
+    explicit EditingStyle(const StylePropertySet*);
+    explicit EditingStyle(const CSSStyleDeclaration*);
     EditingStyle(CSSPropertyID, const String& value);
     void init(Node*, PropertiesToInclude);
     void removeTextFillAndStrokeColorsIfNeeded(RenderStyle*);
index c555555..bdd3829 100644 (file)
@@ -86,7 +86,7 @@ enum EditorParagraphSeparator { EditorParagraphSeparatorIsDiv, EditorParagraphSe
 
 class Editor : public FrameDestructionObserver {
 public:
-    Editor(Frame*);
+    explicit Editor(Frame*);
     ~Editor();
 
     EditorClient* client() const;
index 11b6e46..4a58194 100644 (file)
@@ -131,7 +131,7 @@ public:
         return static_cast<EUserTriggered>(options & UserTriggered);
     }
 
-    FrameSelection(Frame* = 0);
+    explicit FrameSelection(Frame* = 0);
 
     Element* rootEditableElement() const { return m_selection.rootEditableElement(); }
     Element* rootEditableElementOrDocumentElement() const;
index 9e73add..f83fe0d 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
 
 private:
-    InsertLineBreakCommand(Document*);
+    explicit InsertLineBreakCommand(Document*);
 
     virtual void doApply();
 
index feefa91..d486eae 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 // It is not used on its own.
 class ModifySelectionListLevelCommand : public CompositeEditCommand {
 protected:
-    ModifySelectionListLevelCommand(Document*);
+    explicit ModifySelectionListLevelCommand(Document*);
     
     void appendSiblingNodeRange(Node* startNode, Node* endNode, Element* newParent);
     void insertSiblingNodeRangeBefore(Node* startNode, Node* endNode, Node* refNode);
@@ -82,7 +82,7 @@ private:
         return adoptRef(new DecreaseSelectionListLevelCommand(document));
     }
 
-    DecreaseSelectionListLevelCommand(Document*);
+    explicit DecreaseSelectionListLevelCommand(Document*);
 
     virtual void doApply();
 };
index daca2db..cd446a8 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
 
 private:
-    RemoveFormatCommand(Document*);
+    explicit RemoveFormatCommand(Document*);
 
     virtual void doApply();
     virtual EditAction editingAction() const { return EditActionUnspecified; }
index 3eac088..fafb7ab 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
 
 private:
-    RemoveNodeCommand(PassRefPtr<Node>);
+    explicit RemoveNodeCommand(PassRefPtr<Node>);
 
     virtual void doApply() OVERRIDE;
     virtual void doUnapply() OVERRIDE;
index d2b635f..ba3c820 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
 
 private:
-    RemoveNodePreservingChildrenCommand(PassRefPtr<Node>);
+    explicit RemoveNodePreservingChildrenCommand(PassRefPtr<Node>);
 
     virtual void doApply();
 
index 0f1bf70..b05422a 100644 (file)
@@ -48,7 +48,7 @@ public:
     HTMLElement* spanElement() { return m_spanElement.get(); }
 
 private:
-    ReplaceNodeWithSpanCommand(PassRefPtr<HTMLElement>);
+    explicit ReplaceNodeWithSpanCommand(PassRefPtr<HTMLElement>);
 
     virtual void doApply() OVERRIDE;
     virtual void doUnapply() OVERRIDE;
index 9dff6dc..2a33d23 100644 (file)
@@ -39,7 +39,7 @@ public:
     virtual ~TextInsertionBaseCommand() { };
 
 protected:
-    TextInsertionBaseCommand(Document*);
+    explicit TextInsertionBaseCommand(Document*);
     static void applyTextInsertionCommand(Frame*, PassRefPtr<TextInsertionBaseCommand>, const VisibleSelection& selectionForInsertion, const VisibleSelection& endingSelection);
 };
 
index 5b62468..56638cd 100644 (file)
@@ -53,7 +53,7 @@ public:
     void clearRedo();
 
 private:
-    UndoManager(Node* host);
+    explicit UndoManager(Node* host);
     Node* m_undoScopeHost;
 };
     
index f3d560f..8647ee8 100644 (file)
@@ -38,7 +38,7 @@ public:
     }
 
 private:
-    UnlinkCommand(Document*);
+    explicit UnlinkCommand(Document*);
 
     virtual void doApply();
     virtual EditAction editingAction() const { return EditActionUnlink; }
index eccf0ec..f4d6bef 100644 (file)
@@ -40,7 +40,7 @@ public:
     }
 
 private:
-    WrapContentsInDummySpanCommand(PassRefPtr<Element>);
+    explicit WrapContentsInDummySpanCommand(PassRefPtr<Element>);
 
     virtual void doApply() OVERRIDE;
     virtual void doUnapply() OVERRIDE;