<?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>47884</bug_id>
          
          <creation_ts>2010-10-18 22:54:17 -0700</creation_ts>
          <short_desc>should we allow multiple inheritance in python code in webkit?</short_desc>
          <delta_ts>2010-10-21 16:42:16 -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>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Pranke">dpranke</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>levin</cc>
    
    <cc>ojan</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>296010</commentid>
    <comment_count>0</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2010-10-18 22:54:17 -0700</bug_when>
    <thetext>See bug 47874 for some background ... there are places in the code where using MI would make the code cleaner, like webkitpy/layout_tests/port/{google_chrome,chromium_gpu}.py , where the classes naturally want some sort of diamond and/or mixin behavior, and we resort to unpleasantness in its absence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>296016</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-18 22:57:05 -0700</bug_when>
    <thetext>We use multiple inheritance in a bunch of places in webkitpy, mostly int the Mixin pattern.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>296017</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-18 22:57:30 -0700</bug_when>
    <thetext>Actually, also to inherit from &quot;pure virtual&quot; interfaces.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>296243</commentid>
    <comment_count>3</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-10-19 09:56:48 -0700</bug_when>
    <thetext>I&apos;m fine with pure virtual interfaces and to a lesser degree, mixin.

The proper way to refactor the google_chrome and chromium_gpu ports would be to have delegate classes for specific functionality of a port.  For example, having a delegate that provides a few path functions (e.g., baseline search path and path to expectations) and have it be a member variable of Port.  This could also be done via mixins, but I think the delegate pattern is more widely used in WebKit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>296244</commentid>
    <comment_count>4</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-10-19 09:59:07 -0700</bug_when>
    <thetext>To clarify, I think what we want to avoid is a GPU port and a Linux port where we inherit from both to make a Linux GPU port.  That would be confusing because you don&apos;t know what functions are provided by which base class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>297718</commentid>
    <comment_count>5</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2010-10-21 16:42:16 -0700</bug_when>
    <thetext>I think I will consider this closed as &quot;yes, with caution&quot;. Anyone please reopen or comment if you disagree :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>