Ignore:
Timestamp:
Oct 1, 2013, 3:29:34 PM (12 years ago)
Author:
Antti Koivisto
Message:

Make tests for renderer base types non-virtual
https://bugs.webkit.org/show_bug.cgi?id=122185

Reviewed by Dave Hyatt.

Make isRenderFoo() functions for commonly tested base types use bit flags instead of virtual calls.
This is faster and we have space in RenderElement.

These bits are not mutully exclusive. For testing leaf types we can add an enum.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderObject.h

    r156639 r156738  
    304304
    305305    bool isRenderElement() const { return !isText(); }
    306     virtual bool isBoxModelObject() const { return false; }
     306    bool isRenderReplaced() const;
     307    bool isBoxModelObject() const;
     308    bool isRenderBlock() const;
     309    bool isRenderBlockFlow() const;
     310    bool isRenderInline() const;
     311    bool isRenderLayerModelObject() const;
     312
    307313    virtual bool isCounter() const { return false; }
    308314    virtual bool isQuote() const { return false; }
     
    318324    virtual bool isImage() const { return false; }
    319325    virtual bool isInlineBlockOrInlineTable() const { return false; }
    320     virtual bool isLayerModelObject() const { return false; }
    321326    virtual bool isListBox() const { return false; }
    322327    virtual bool isListItem() const { return false; }
     
    331336    virtual bool isProgress() const { return false; }
    332337#endif
    333     virtual bool isRenderBlock() const { return false; }
    334     virtual bool isRenderBlockFlow() const { return false; }
    335338    virtual bool isRenderSVGBlock() const { return false; };
    336339    virtual bool isRenderButton() const { return false; }
    337340    virtual bool isRenderIFrame() const { return false; }
    338341    virtual bool isRenderImage() const { return false; }
    339     virtual bool isRenderInline() const { return false; }
    340342    virtual bool isRenderRegion() const { return false; }
    341     virtual bool isRenderReplaced() const { return false; }
    342343    virtual bool isReplica() const { return false; }
    343344
Note: See TracChangeset for help on using the changeset viewer.