⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 155422 in webkit


Ignore:
Timestamp:
Sep 9, 2013, 11:16:47 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Adding "explicit" keyword in DOM related classes constructor
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:
Location:
trunk/Source/WebCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r155421 r155422  
     12013-09-09  Santosh Mahto  <santosh.ma@samsung.com>
     2
     3        Adding "explicit" keyword in DOM related classes constructor
     4        https://bugs.webkit.org/show_bug.cgi?id=121031
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Added the explicit keyword in constructors.
     9
     10        * dom/ActiveDOMObject.h:
     11        * dom/ContainerNode.h:
     12        * dom/DocumentStyleSheetCollection.h:
     13        * dom/ElementAncestorIterator.h:
     14        * dom/ElementData.h:
     15        * dom/ElementRareData.h:
     16        * dom/EventListenerMap.h:
     17        * dom/QualifiedName.h:
     18        (WebCore::QualifiedName::QualifiedName):
     19        * dom/TreeScope.h:
     20        * dom/ViewportArguments.h:
     21        (WebCore::ViewportArguments::ViewportArguments):
     22        * dom/VisitedLinkState.h:
     23
    1242013-09-09  Andreas Kling  <akling@apple.com>
    225
  • trunk/Source/WebCore/dom/ActiveDOMObject.h

    r148921 r155422  
    3636class ActiveDOMObject : public ContextDestructionObserver {
    3737public:
    38     ActiveDOMObject(ScriptExecutionContext*);
     38    explicit ActiveDOMObject(ScriptExecutionContext*);
    3939
    4040    // suspendIfNeeded() should be called exactly once after object construction to synchronize
  • trunk/Source/WebCore/dom/ContainerNode.h

    r155303 r155422  
    125125
    126126protected:
    127     ContainerNode(Document*, ConstructionType = CreateContainer);
     127    explicit ContainerNode(Document*, ConstructionType = CreateContainer);
    128128
    129129    static void queuePostAttachCallback(NodeCallback, Node*, unsigned = 0);
  • trunk/Source/WebCore/dom/DocumentStyleSheetCollection.h

    r155251 r155422  
    119119
    120120private:
    121     DocumentStyleSheetCollection(Document*);
     121    explicit DocumentStyleSheetCollection(Document*);
    122122
    123123    void collectActiveStyleSheets(Vector<RefPtr<StyleSheet> >&);
  • trunk/Source/WebCore/dom/ElementAncestorIterator.h

    r154940 r155422  
    3535public:
    3636    ElementAncestorIterator();
    37     ElementAncestorIterator(ElementType* current);
     37    explicit ElementAncestorIterator(ElementType* current);
    3838    ElementAncestorIterator& operator++();
    3939};
     
    4343public:
    4444    ElementAncestorConstIterator();
    45     ElementAncestorConstIterator(const ElementType* current);
     45    explicit ElementAncestorConstIterator(const ElementType* current);
    4646    ElementAncestorConstIterator& operator++();
    4747};
     
    5050class ElementAncestorIteratorAdapter {
    5151public:
    52     ElementAncestorIteratorAdapter(ElementType* descendant);
     52    explicit ElementAncestorIteratorAdapter(ElementType* descendant);
    5353    ElementAncestorIterator<ElementType> begin();
    5454    ElementAncestorIterator<ElementType> end();
     
    6161class ElementAncestorConstIteratorAdapter {
    6262public:
    63     ElementAncestorConstIteratorAdapter(const ElementType* descendant);
     63    explicit ElementAncestorConstIteratorAdapter(const ElementType* descendant);
    6464    ElementAncestorConstIterator<ElementType> begin() const;
    6565    ElementAncestorConstIterator<ElementType> end() const;
  • trunk/Source/WebCore/dom/ElementData.h

    r154780 r155422  
    7676protected:
    7777    ElementData();
    78     ElementData(unsigned arraySize);
     78    explicit ElementData(unsigned arraySize);
    7979    ElementData(const ElementData&, bool isUnique);
    8080
  • trunk/Source/WebCore/dom/ElementRareData.h

    r154835 r155422  
    167167    RefPtr<PseudoElement> m_afterPseudoElement;
    168168
    169     ElementRareData(RenderObject*);
     169    explicit ElementRareData(RenderObject*);
    170170    void releasePseudoElement(PseudoElement*);
    171171};
  • trunk/Source/WebCore/dom/EventListenerMap.h

    r149173 r155422  
    8080public:
    8181    EventListenerIterator();
    82     EventListenerIterator(EventTarget*);
     82    explicit EventListenerIterator(EventTarget*);
    8383#ifndef NDEBUG
    8484    ~EventListenerIterator();
  • trunk/Source/WebCore/dom/QualifiedName.h

    r154054 r155422  
    6767
    6868    QualifiedName(const AtomicString& prefix, const AtomicString& localName, const AtomicString& namespaceURI);
    69     QualifiedName(WTF::HashTableDeletedValueType) : m_impl(hashTableDeletedValue()) { }
     69    explicit QualifiedName(WTF::HashTableDeletedValueType) : m_impl(hashTableDeletedValue()) { }
    7070    bool isHashTableDeletedValue() const { return m_impl == hashTableDeletedValue(); }
    7171    ~QualifiedName();
  • trunk/Source/WebCore/dom/TreeScope.h

    r154809 r155422  
    134134protected:
    135135    TreeScope(ContainerNode*, Document*);
    136     TreeScope(Document*);
     136    explicit TreeScope(Document*);
    137137    virtual ~TreeScope();
    138138
  • trunk/Source/WebCore/dom/ViewportArguments.h

    r152523 r155422  
    7676    };
    7777
    78     ViewportArguments(Type type = Implicit)
     78    explicit ViewportArguments(Type type = Implicit)
    7979        : type(type)
    8080        , width(ValueAuto)
  • trunk/Source/WebCore/dom/VisitedLinkState.h

    r138515 r155422  
    5151
    5252private:
    53     VisitedLinkState(Document*);
     53    explicit VisitedLinkState(Document*);
    5454
    5555    EInsideLink determineLinkStateSlowCase(Element*);
Note: See TracChangeset for help on using the changeset viewer.