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
+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 :|
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.
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();
bool activeStyleSheetsContains(const CSSStyleSheet*) const;
private:
- DocumentStyleSheetCollection(Document*);
+ explicit DocumentStyleSheetCollection(Document*);
void collectActiveStyleSheets(Vector<RefPtr<StyleSheet> >&);
enum StyleResolverUpdateType {
class ElementAncestorIterator : public ElementIterator<ElementType> {
public:
ElementAncestorIterator();
- ElementAncestorIterator(ElementType* current);
+ explicit ElementAncestorIterator(ElementType* current);
ElementAncestorIterator& operator++();
};
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();
template <typename ElementType>
class ElementAncestorConstIteratorAdapter {
public:
- ElementAncestorConstIteratorAdapter(const ElementType* descendant);
+ explicit ElementAncestorConstIteratorAdapter(const ElementType* descendant);
ElementAncestorConstIterator<ElementType> begin() const;
ElementAncestorConstIterator<ElementType> end() const;
protected:
ElementData();
- ElementData(unsigned arraySize);
+ explicit ElementData(unsigned arraySize);
ElementData(const ElementData&, bool isUnique);
unsigned m_isUnique : 1;
RefPtr<PseudoElement> m_beforePseudoElement;
RefPtr<PseudoElement> m_afterPseudoElement;
- ElementRareData(RenderObject*);
+ explicit ElementRareData(RenderObject*);
void releasePseudoElement(PseudoElement*);
};
WTF_MAKE_NONCOPYABLE(EventListenerIterator);
public:
EventListenerIterator();
- EventListenerIterator(EventTarget*);
+ explicit EventListenerIterator(EventTarget*);
#ifndef NDEBUG
~EventListenerIterator();
#endif
};
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
protected:
TreeScope(ContainerNode*, Document*);
- TreeScope(Document*);
+ explicit TreeScope(Document*);
virtual ~TreeScope();
void destroyTreeScopeData();
ValueLandscape = -5
};
- ViewportArguments(Type type = Implicit)
+ explicit ViewportArguments(Type type = Implicit)
: type(type)
, width(ValueAuto)
, minWidth(ValueAuto)
EInsideLink determineLinkState(Element*);
private:
- VisitedLinkState(Document*);
+ explicit VisitedLinkState(Document*);
EInsideLink determineLinkStateSlowCase(Element*);