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/RenderElement.cpp

    r156639 r156738  
    6565bool RenderElement::s_noLongerAffectsParentBlock = false;
    6666
    67 RenderElement::RenderElement(Element* element)
     67RenderElement::RenderElement(Element* element, unsigned baseTypeFlags)
    6868    : RenderObject(element)
     69    , m_baseTypeFlags(baseTypeFlags)
    6970    , m_ancestorLineBoxDirty(false)
    7071    , m_firstChild(nullptr)
     
    274275    // style changing, since it depends on whether we decide to composite these elements. When the
    275276    // layer status of one of these elements changes, we need to force a layout.
    276     if (diff == StyleDifferenceEqual && style() && isLayerModelObject()) {
     277    if (diff == StyleDifferenceEqual && style() && isRenderLayerModelObject()) {
    277278        if (hasLayer() != toRenderLayerModelObject(this)->requiresLayer())
    278279            diff = StyleDifferenceLayout;
Note: See TracChangeset for help on using the changeset viewer.