Adding "explicit" keyword in DOM related classes constructor
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2013 06:16:47 +0000 (06:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2013 06:16:47 +0000 (06:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121031

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-09-09
Reviewed by Ryosuke Niwa.

Added the explicit keyword in constructors.

* dom/ActiveDOMObject.h:
* dom/ContainerNode.h:
* dom/DocumentStyleSheetCollection.h:
* dom/ElementAncestorIterator.h:
* dom/ElementData.h:
* dom/ElementRareData.h:
* dom/EventListenerMap.h:
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedName):
* dom/TreeScope.h:
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::ViewportArguments):
* dom/VisitedLinkState.h:

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

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/ActiveDOMObject.h
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/DocumentStyleSheetCollection.h
Source/WebCore/dom/ElementAncestorIterator.h
Source/WebCore/dom/ElementData.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/dom/EventListenerMap.h
Source/WebCore/dom/QualifiedName.h
Source/WebCore/dom/TreeScope.h
Source/WebCore/dom/ViewportArguments.h
Source/WebCore/dom/VisitedLinkState.h

index 97c5a78035c383224bd58adf95a3e2a8e0eabb53..af7a1088844e007c5ab4023eb9fea45db53437b9 100644 (file)
@@ -1,3 +1,26 @@
+2013-09-09  Santosh Mahto  <santosh.ma@samsung.com>
+
+        Adding "explicit" keyword in DOM related classes constructor
+        https://bugs.webkit.org/show_bug.cgi?id=121031
+
+        Reviewed by Ryosuke Niwa.
+
+        Added the explicit keyword in constructors.
+
+        * dom/ActiveDOMObject.h:
+        * dom/ContainerNode.h:
+        * dom/DocumentStyleSheetCollection.h:
+        * dom/ElementAncestorIterator.h:
+        * dom/ElementData.h:
+        * dom/ElementRareData.h:
+        * dom/EventListenerMap.h:
+        * dom/QualifiedName.h:
+        (WebCore::QualifiedName::QualifiedName):
+        * dom/TreeScope.h:
+        * dom/ViewportArguments.h:
+        (WebCore::ViewportArguments::ViewportArguments):
+        * dom/VisitedLinkState.h:
+
 2013-09-09  Andreas Kling  <akling@apple.com>
 
         Remove unreviewed gunk I just accidentally committed :|
index a0732a456b419841153f4c1792bf831983fed646..6ab12e415919ed3d95950bed97a8c6e25ace25ec 100644 (file)
@@ -35,7 +35,7 @@ namespace WebCore {
 
 class ActiveDOMObject : public ContextDestructionObserver {
 public:
-    ActiveDOMObject(ScriptExecutionContext*);
+    explicit ActiveDOMObject(ScriptExecutionContext*);
 
     // suspendIfNeeded() should be called exactly once after object construction to synchronize
     // the suspend state with that in ScriptExecutionContext.
index 16a60245266c7129a412d6eaff11e24ab7fb49bc..d55079d9914c0d93ad2cf22b540fa8df2f60f66c 100644 (file)
@@ -124,7 +124,7 @@ public:
     virtual bool childShouldCreateRenderer(const Node*) const { return true; }
 
 protected:
-    ContainerNode(Document*, ConstructionType = CreateContainer);
+    explicit ContainerNode(Document*, ConstructionType = CreateContainer);
 
     static void queuePostAttachCallback(NodeCallback, Node*, unsigned = 0);
     static bool postAttachCallbacksAreSuspended();
index 384fa861c795a6d84d8cdc9c0175ec59eabf8fbb..b8199516a2f5e9bf967ae7cb6be4b35a67eda6fb 100644 (file)
@@ -118,7 +118,7 @@ public:
     bool activeStyleSheetsContains(const CSSStyleSheet*) const;
 
 private:
-    DocumentStyleSheetCollection(Document*);
+    explicit DocumentStyleSheetCollection(Document*);
 
     void collectActiveStyleSheets(Vector<RefPtr<StyleSheet> >&);
     enum StyleResolverUpdateType {
index e8b417cf78c1363e3b088098cf2a84469b6ee2f2..3a04f84024718c91b35788060634981e7db83be9 100644 (file)
@@ -34,7 +34,7 @@ template <typename ElementType>
 class ElementAncestorIterator : public ElementIterator<ElementType> {
 public:
     ElementAncestorIterator();
-    ElementAncestorIterator(ElementType* current);
+    explicit ElementAncestorIterator(ElementType* current);
     ElementAncestorIterator& operator++();
 };
 
@@ -42,14 +42,14 @@ template <typename ElementType>
 class ElementAncestorConstIterator : public ElementConstIterator<ElementType> {
 public:
     ElementAncestorConstIterator();
-    ElementAncestorConstIterator(const ElementType* current);
+    explicit ElementAncestorConstIterator(const ElementType* current);
     ElementAncestorConstIterator& operator++();
 };
 
 template <typename ElementType>
 class ElementAncestorIteratorAdapter {
 public:
-    ElementAncestorIteratorAdapter(ElementType* descendant);
+    explicit ElementAncestorIteratorAdapter(ElementType* descendant);
     ElementAncestorIterator<ElementType> begin();
     ElementAncestorIterator<ElementType> end();
 
@@ -60,7 +60,7 @@ private:
 template <typename ElementType>
 class ElementAncestorConstIteratorAdapter {
 public:
-    ElementAncestorConstIteratorAdapter(const ElementType* descendant);
+    explicit ElementAncestorConstIteratorAdapter(const ElementType* descendant);
     ElementAncestorConstIterator<ElementType> begin() const;
     ElementAncestorConstIterator<ElementType> end() const;
 
index 9147809e6367b6af7123f4cb3dfe694ac5a90c79..36cc9b8e989fcad58b1a3d6225fd00d6a1ba69cd 100644 (file)
@@ -75,7 +75,7 @@ public:
 
 protected:
     ElementData();
-    ElementData(unsigned arraySize);
+    explicit ElementData(unsigned arraySize);
     ElementData(const ElementData&, bool isUnique);
 
     unsigned m_isUnique : 1;
index 2ef546574903e99d203b5763280a1e02dfa58582..7e0161d52d8514b4adb2597cdf5e22a7429fe517 100644 (file)
@@ -166,7 +166,7 @@ private:
     RefPtr<PseudoElement> m_beforePseudoElement;
     RefPtr<PseudoElement> m_afterPseudoElement;
 
-    ElementRareData(RenderObject*);
+    explicit ElementRareData(RenderObject*);
     void releasePseudoElement(PseudoElement*);
 };
 
index e29b4c6dc9e8c0545bc2f17734697fb2ed7b8cc2..80a51cfd9bff3e3cda5e0b8eace31a0472028384 100644 (file)
@@ -79,7 +79,7 @@ class EventListenerIterator {
     WTF_MAKE_NONCOPYABLE(EventListenerIterator);
 public:
     EventListenerIterator();
-    EventListenerIterator(EventTarget*);
+    explicit EventListenerIterator(EventTarget*);
 #ifndef NDEBUG
     ~EventListenerIterator();
 #endif
index 841fc64ff34decf85df3a84a234729e38a2236af..78f13cf268b550e4ef18ffd11b036c0190f9a3be 100644 (file)
@@ -66,7 +66,7 @@ public:
     };
 
     QualifiedName(const AtomicString& prefix, const AtomicString& localName, const AtomicString& namespaceURI);
-    QualifiedName(WTF::HashTableDeletedValueType) : m_impl(hashTableDeletedValue()) { }
+    explicit QualifiedName(WTF::HashTableDeletedValueType) : m_impl(hashTableDeletedValue()) { }
     bool isHashTableDeletedValue() const { return m_impl == hashTableDeletedValue(); }
     ~QualifiedName();
 #ifdef QNAME_DEFAULT_CONSTRUCTOR
index a9c17b0adfdd828e4dc6a6aefebc7d849f91af21..0bf1f1b365e7f31dbd76022a08634862582e65a3 100644 (file)
@@ -133,7 +133,7 @@ public:
 
 protected:
     TreeScope(ContainerNode*, Document*);
-    TreeScope(Document*);
+    explicit TreeScope(Document*);
     virtual ~TreeScope();
 
     void destroyTreeScopeData();
index 65f3d5785fc79f65676ca68d32b8d43e8b8b0a89..333c997432bde8831b6eff45a13486e2f57833c6 100644 (file)
@@ -75,7 +75,7 @@ struct ViewportArguments {
         ValueLandscape = -5
     };
 
-    ViewportArguments(Type type = Implicit)
+    explicit ViewportArguments(Type type = Implicit)
         : type(type)
         , width(ValueAuto)
         , minWidth(ValueAuto)
index 8f643af5305b96af6abfbf0339102e2bc714e939..331ca469c9f4232d3124e10f9461c7f086d9cb8a 100644 (file)
@@ -50,7 +50,7 @@ public:
     EInsideLink determineLinkState(Element*);
 
 private:
-    VisitedLinkState(Document*);
+    explicit VisitedLinkState(Document*);
 
     EInsideLink determineLinkStateSlowCase(Element*);