Changeset 83816 in webkit


Ignore:
Timestamp:
Apr 13, 2011 10:44:29 PM (13 years ago)
Author:
rolandsteiner@chromium.org
Message:

2011-04-13 Roland Steiner <rolandsteiner@chromium.org>

Reviewed by Dimitri Glazkov.

Bug 58460 - childTypeAllowed() should be const
https://bugs.webkit.org/show_bug.cgi?id=58460

Made childTypeAllowed const.

No new tests. (minor refactoring).

  • dom/Attr.cpp: (WebCore::Attr::childTypeAllowed):
  • dom/Attr.h:
  • dom/CDATASection.cpp: (WebCore::CDATASection::childTypeAllowed):
  • dom/CDATASection.h:
  • dom/Comment.cpp: (WebCore::Comment::childTypeAllowed):
  • dom/Comment.h:
  • dom/Document.cpp: (WebCore::Document::childTypeAllowed):
  • dom/Document.h:
  • dom/DocumentFragment.cpp: (WebCore::DocumentFragment::childTypeAllowed):
  • dom/DocumentFragment.h:
  • dom/Element.cpp: (WebCore::Element::childTypeAllowed):
  • dom/Element.h:
  • dom/Node.h: (WebCore::Node::childTypeAllowed):
  • dom/Notation.cpp: (WebCore::Notation::childTypeAllowed):
  • dom/Notation.h:
  • dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::childTypeAllowed):
  • dom/ProcessingInstruction.h:
  • dom/Text.cpp: (WebCore::Text::childTypeAllowed):
  • dom/Text.h:
Location:
trunk/Source/WebCore
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83814 r83816  
     12011-04-13  Roland Steiner  <rolandsteiner@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Bug 58460 - childTypeAllowed() should be const
     6        https://bugs.webkit.org/show_bug.cgi?id=58460
     7
     8        Made childTypeAllowed const.
     9
     10        No new tests. (minor refactoring).
     11
     12        * dom/Attr.cpp:
     13        (WebCore::Attr::childTypeAllowed):
     14        * dom/Attr.h:
     15        * dom/CDATASection.cpp:
     16        (WebCore::CDATASection::childTypeAllowed):
     17        * dom/CDATASection.h:
     18        * dom/Comment.cpp:
     19        (WebCore::Comment::childTypeAllowed):
     20        * dom/Comment.h:
     21        * dom/Document.cpp:
     22        (WebCore::Document::childTypeAllowed):
     23        * dom/Document.h:
     24        * dom/DocumentFragment.cpp:
     25        (WebCore::DocumentFragment::childTypeAllowed):
     26        * dom/DocumentFragment.h:
     27        * dom/Element.cpp:
     28        (WebCore::Element::childTypeAllowed):
     29        * dom/Element.h:
     30        * dom/Node.h:
     31        (WebCore::Node::childTypeAllowed):
     32        * dom/Notation.cpp:
     33        (WebCore::Notation::childTypeAllowed):
     34        * dom/Notation.h:
     35        * dom/ProcessingInstruction.cpp:
     36        (WebCore::ProcessingInstruction::childTypeAllowed):
     37        * dom/ProcessingInstruction.h:
     38        * dom/Text.cpp:
     39        (WebCore::Text::childTypeAllowed):
     40        * dom/Text.h:
     41
    1422011-04-13  Jon Lee  <jonlee@apple.com>
    243
  • trunk/Source/WebCore/dom/Attr.cpp

    r79810 r83816  
    153153
    154154// DOM Section 1.1.1
    155 bool Attr::childTypeAllowed(NodeType type)
     155bool Attr::childTypeAllowed(NodeType type) const
    156156{
    157157    switch (type) {
  • trunk/Source/WebCore/dom/Attr.h

    r68096 r83816  
    8080
    8181    virtual bool isAttributeNode() const { return true; }
    82     virtual bool childTypeAllowed(NodeType);
     82    virtual bool childTypeAllowed(NodeType) const;
    8383
    8484    virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0);
  • trunk/Source/WebCore/dom/CDATASection.cpp

    r47313 r83816  
    5252}
    5353
    54 bool CDATASection::childTypeAllowed(NodeType)
     54bool CDATASection::childTypeAllowed(NodeType) const
    5555{
    5656    return false;
  • trunk/Source/WebCore/dom/CDATASection.h

    r47313 r83816  
    3838    virtual NodeType nodeType() const;
    3939    virtual PassRefPtr<Node> cloneNode(bool deep);
    40     virtual bool childTypeAllowed(NodeType);
     40    virtual bool childTypeAllowed(NodeType) const;
    4141    virtual PassRefPtr<Text> virtualCreate(const String&);
    4242};
  • trunk/Source/WebCore/dom/Comment.cpp

    r58914 r83816  
    5252}
    5353
    54 bool Comment::childTypeAllowed(NodeType)
     54bool Comment::childTypeAllowed(NodeType) const
    5555{
    5656    return false;
  • trunk/Source/WebCore/dom/Comment.h

    r58914 r83816  
    3838    virtual NodeType nodeType() const;
    3939    virtual PassRefPtr<Node> cloneNode(bool deep);
    40     virtual bool childTypeAllowed(NodeType);
     40    virtual bool childTypeAllowed(NodeType) const;
    4141};
    4242
  • trunk/Source/WebCore/dom/Document.cpp

    r83349 r83816  
    27342734
    27352735// DOM Section 1.1.1
    2736 bool Document::childTypeAllowed(NodeType type)
     2736bool Document::childTypeAllowed(NodeType type) const
    27372737{
    27382738    switch (type) {
  • trunk/Source/WebCore/dom/Document.h

    r83773 r83816  
    11251125    virtual String nodeName() const;
    11261126    virtual NodeType nodeType() const;
    1127     virtual bool childTypeAllowed(NodeType);
     1127    virtual bool childTypeAllowed(NodeType) const;
    11281128    virtual PassRefPtr<Node> cloneNode(bool deep);
    11291129    virtual bool canReplaceChild(Node* newChild, Node* oldChild);
  • trunk/Source/WebCore/dom/DocumentFragment.cpp

    r83256 r83816  
    5353}
    5454
    55 bool DocumentFragment::childTypeAllowed(NodeType type)
     55bool DocumentFragment::childTypeAllowed(NodeType type) const
    5656{
    5757    switch (type) {
  • trunk/Source/WebCore/dom/DocumentFragment.h

    r83796 r83816  
    4444    virtual NodeType nodeType() const;
    4545    virtual PassRefPtr<Node> cloneNode(bool deep);
    46     virtual bool childTypeAllowed(NodeType);
     46    virtual bool childTypeAllowed(NodeType) const;
    4747};
    4848
  • trunk/Source/WebCore/dom/Element.cpp

    r83699 r83816  
    11941194}
    11951195
    1196 bool Element::childTypeAllowed(NodeType type)
     1196bool Element::childTypeAllowed(NodeType type) const
    11971197{
    11981198    switch (type) {
  • trunk/Source/WebCore/dom/Element.h

    r83256 r83816  
    377377    virtual void setPrefix(const AtomicString&, ExceptionCode&);
    378378    virtual NodeType nodeType() const;
    379     virtual bool childTypeAllowed(NodeType);
     379    virtual bool childTypeAllowed(NodeType) const;
    380380
    381381    virtual PassRefPtr<Attribute> createAttribute(const QualifiedName&, const AtomicString& value);
  • trunk/Source/WebCore/dom/Node.h

    r83349 r83816  
    373373
    374374    bool isReadOnlyNode() const { return nodeType() == ENTITY_REFERENCE_NODE; }
    375     virtual bool childTypeAllowed(NodeType) { return false; }
     375    virtual bool childTypeAllowed(NodeType) const { return false; }
    376376    unsigned childNodeCount() const;
    377377    Node* childNode(unsigned index) const;
  • trunk/Source/WebCore/dom/Notation.cpp

    r58925 r83816  
    5050}
    5151
    52 bool Notation::childTypeAllowed(NodeType)
     52bool Notation::childTypeAllowed(NodeType) const
    5353{
    5454    return false;
  • trunk/Source/WebCore/dom/Notation.h

    r47313 r83816  
    4040    virtual NodeType nodeType() const;
    4141    virtual PassRefPtr<Node> cloneNode(bool deep);
    42     virtual bool childTypeAllowed(NodeType);
     42    virtual bool childTypeAllowed(NodeType) const;
    4343
    4444    String m_name;
  • trunk/Source/WebCore/dom/ProcessingInstruction.cpp

    r79244 r83816  
    102102
    103103// DOM Section 1.1.1
    104 bool ProcessingInstruction::childTypeAllowed(NodeType)
     104bool ProcessingInstruction::childTypeAllowed(NodeType) const
    105105{
    106106    return false;
  • trunk/Source/WebCore/dom/ProcessingInstruction.h

    r79244 r83816  
    6262    virtual void setNodeValue(const String&, ExceptionCode&);
    6363    virtual PassRefPtr<Node> cloneNode(bool deep);
    64     virtual bool childTypeAllowed(NodeType);
     64    virtual bool childTypeAllowed(NodeType) const;
    6565    virtual bool offsetInCharacters() const;
    6666    virtual int maxCharacterOffset() const;
  • trunk/Source/WebCore/dom/Text.cpp

    r80526 r83816  
    293293}
    294294
    295 bool Text::childTypeAllowed(NodeType)
     295bool Text::childTypeAllowed(NodeType) const
    296296{
    297297    return false;
  • trunk/Source/WebCore/dom/Text.h

    r80526 r83816  
    5757    virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
    5858    virtual void recalcStyle(StyleChange = NoChange);
    59     virtual bool childTypeAllowed(NodeType);
     59    virtual bool childTypeAllowed(NodeType) const;
    6060
    6161    virtual PassRefPtr<Text> virtualCreate(const String&);
Note: See TracChangeset for help on using the changeset viewer.