<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>5672</bug_id>
          
          <creation_ts>2005-11-09 02:44:38 -0800</creation_ts>
          <short_desc>RenderObject should be thinned out and some methods made pure virtual</short_desc>
          <delta_ts>2013-06-05 10:56:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ian</cc>
    
    <cc>robert</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>23839</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-11-09 02:44:38 -0800</bug_when>
    <thetext>RenderObject should be thinned out and some methods made pure virtual

RenderObject has lots of methods on it that it IMO really shouldn&apos;t.  This makes it *really* hard when 
writing a new RenderObject subclass, and likely has lead to other previous errors made when editing 
the existing tree.

Examples of methods which should be removed (i.e. only exist on subclasses):

    virtual RenderObject *firstChild() const { return 0; }
    virtual RenderObject *lastChild() const { return 0; }


Examples of methods which should be made pure virtual:

    virtual void setWidth( int /*width*/ ) { }
    virtual void setHeight( int /*height*/ ) { }

The usage model would then be to ask the RenderObject in question:

renderObject-&gt;isContainer()

then cast it to the appropriate type:

RenderContainer *renderContainer = static_cast&lt;RenderContainer *&gt;(renderObject);

finally then, can you ask it the questions you care about:

renderContainer-&gt;firstChild()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>896957</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2013-06-04 10:38:10 -0700</bug_when>
    <thetext>The things this bug wishes for don&apos;t exist yet - but are they still valid? Seems like we should just close it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>897472</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-06-05 10:56:41 -0700</bug_when>
    <thetext>Yes, this bug hasn&apos;t helped since 2005, so it&apos;s unlikely to help in the future.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>