<?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>76423</bug_id>
          
          <creation_ts>2012-01-16 20:59:09 -0800</creation_ts>
          <short_desc>[Meta] Refactoring Internals</short_desc>
          <delta_ts>2012-07-25 22:56:44 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          <dependson>88508</dependson>
    
    <dependson>76424</dependson>
    
    <dependson>76426</dependson>
    
    <dependson>88499</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hajime Morrita">morrita</reporter>
          <assigned_to name="Hajime Morrita">morrita</assigned_to>
          <cc>abarth</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>dbates</cc>
    
    <cc>dglazkov</cc>
    
    <cc>dominicc</cc>
    
    <cc>donggwan.kim</cc>
    
    <cc>dpranke</cc>
    
    <cc>jesus</cc>
    
    <cc>rakuco</cc>
    
    <cc>rniwa</cc>
    
    <cc>skyul</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>536869</commentid>
    <comment_count>0</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2012-01-16 20:59:09 -0800</bug_when>
    <thetext>The number of Internals API becomes too much API. These API should be reassigned into multiple smaller objects.

My current plan is to introduce:
- SettingsInternals
- ElementInternals
- NodeInternals
- DocumentInternals</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536872</commentid>
    <comment_count>1</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2012-01-16 21:05:55 -0800</bug_when>
    <thetext>Is the plan to arrange them like:

internals.settings.m()
internals.element.n()
etc.?

I think this is neat, because existing if (window.internals) tests work, and you can slowly migrate API from internals to internals.x.

Why not keep all of the DOM-related ones together, eg instead of internals.element, internals.node and internals.document just have internals.dom? It’s shorter and even if the API of internals.dom is large, it is pretty strongly related. Need to think less which specific part of internals I need for a given testing task.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>537470</commentid>
    <comment_count>2</comment_count>
    <who name="Hajime Morrita">morrita</who>
    <bug_when>2012-01-17 17:15:52 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Why not keep all of the DOM-related ones together, eg instead of internals.element, internals.node and internals.document just have internals.dom? It’s shorter and even if the API of internals.dom is large, it is pretty strongly related. Need to think less which specific part of internals I need for a given testing task.

Well. window.internals.dom might be better.
What I thought is internals.element(x).foo().
But per element instance is possibly too much.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>537478</commentid>
    <comment_count>3</comment_count>
    <who name="Dominic Cooney">dominicc</who>
    <bug_when>2012-01-17 17:20:10 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Why not keep all of the DOM-related ones together, eg instead of internals.element, internals.node and internals.document just have internals.dom? It’s shorter and even if the API of internals.dom is large, it is pretty strongly related. Need to think less which specific part of internals I need for a given testing task.
&gt; 
&gt; Well. window.internals.dom might be better.
&gt; What I thought is internals.element(x).foo().

Wrappers! Could be convenient.

&gt; But per element instance is possibly too much.

I think per-instance is OK. I was worried if you have Node and Element I am going to need to keep track of which wrapper has the API I want. (Unless Element is a superset of Node API?)

Looking at the internals API it looks like it splits into Document and Element, and there is no node. So maybe it is OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561300</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-02-21 15:46:12 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Why not keep all of the DOM-related ones together, eg instead of internals.element, internals.node and internals.document just have internals.dom? It’s shorter and even if the API of internals.dom is large, it is pretty strongly related. Need to think less which specific part of internals I need for a given testing task.
&gt; 
&gt; Well. window.internals.dom might be better.
&gt; What I thought is internals.element(x).foo().

Hm... I&apos;m worried that this would make the test code less obvious. e.g. you can do something like:

var x = internals.element(x);
...
x.foo(); // Wait, where did foo come from?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>