<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[46077] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/46077">46077</a></dd>
<dt>Author</dt> <dd>jorlow@chromium.org</dd>
<dt>Date</dt> <dd>2009-07-17 18:42:17 -0700 (Fri, 17 Jul 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebCore:

2009-07-17  Jens Alfke  &lt;snej@chromium.org&gt;

        Reviewed by Dimitri Glazkov.

        Hook up V8 bindings for DataGrid elements.
        https://bugs.webkit.org/show_bug.cgi?id=27383
        http://code.google.com/p/chromium/issues/detail?id=16730

        Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
        to handle exceptions, check appropriate JS prototypes, and
        test column-list's item() method as well as array-indexing.

        * WebCore.gypi: Added new source files.
        * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
        * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
        * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
        (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
        * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
        (WebCore::V8DataGridDataSource::V8DataGridDataSource):
        (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
        * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
        (WebCore::V8DataGridDataSource::create):
        (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
        (WebCore::V8DataGridDataSource::jsDataSource):
        (WebCore::asV8DataGridDataSource):
        * bindings/v8/V8GCController.h: Added new handle type &quot;DATASOURCE&quot;.
        * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
        * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
        * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
        (WebCore::ACCESSOR_GETTER):
        (WebCore::ACCESSOR_SETTER):

LayoutTests:

2009-07-17  Jens Alfke  &lt;snej@chromium.org&gt;

        Reviewed by Dimitri Glazkov.

        Hook up V8 bindings for DataGrid elements.
        https://bugs.webkit.org/show_bug.cgi?id=27383
        http://code.google.com/p/chromium/issues/detail?id=16730

        Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
        to handle exceptions, check appropriate JS prototypes, and
        test column-list's item() method as well as array-indexing.

        * fast/dom/HTMLDataGridElement/DataGridColumns-basic-expected.txt:
        * fast/dom/HTMLDataGridElement/DataGridColumns-basic.html:
        * fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html:
        * fast/dom/HTMLDataGridElement/DataGridColumns-dom-expected.txt:
        * fast/dom/HTMLDataGridElement/DataGridColumns-dom.html:
        * fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsbasicexpectedtxt">trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsbasichtml">trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsdomattributeshtml">trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsdomexpectedtxt">trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsdomhtml">trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLDataGridElementDataGridDataSourcebasichtml">trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCoregypi">trunk/WebCore/WebCore.gypi</a></li>
<li><a href="#trunkWebCorebindingsscriptsCodeGeneratorV8pm">trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm</a></li>
<li><a href="#trunkWebCorebindingsv8DOMObjectsIncludeh">trunk/WebCore/bindings/v8/DOMObjectsInclude.h</a></li>
<li><a href="#trunkWebCorebindingsv8V8DOMWrappercpp">trunk/WebCore/bindings/v8/V8DOMWrapper.cpp</a></li>
<li><a href="#trunkWebCorebindingsv8V8GCControllerh">trunk/WebCore/bindings/v8/V8GCController.h</a></li>
<li><a href="#trunkWebCorebindingsv8V8Indexh">trunk/WebCore/bindings/v8/V8Index.h</a></li>
<li><a href="#trunkWebCorebindingsv8customV8CustomBindingh">trunk/WebCore/bindings/v8/custom/V8CustomBinding.h</a></li>
<li><a href="#trunkWebCorebindingsv8customV8HTMLDataGridElementCustomcpp">trunk/WebCore/bindings/v8/custom/V8HTMLDataGridElementCustom.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebCorebindingsv8V8DataGridDataSourcecpp">trunk/WebCore/bindings/v8/V8DataGridDataSource.cpp</a></li>
<li><a href="#trunkWebCorebindingsv8V8DataGridDataSourceh">trunk/WebCore/bindings/v8/V8DataGridDataSource.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/ChangeLog        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2009-07-17  Jens Alfke  &lt;snej@chromium.org&gt;
+
+        Reviewed by Dimitri Glazkov.
+
+        Hook up V8 bindings for DataGrid elements.
+        https://bugs.webkit.org/show_bug.cgi?id=27383
+        http://code.google.com/p/chromium/issues/detail?id=16730
+
+        Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
+        to handle exceptions, check appropriate JS prototypes, and
+        test column-list's item() method as well as array-indexing.
+
+        * fast/dom/HTMLDataGridElement/DataGridColumns-basic-expected.txt:
+        * fast/dom/HTMLDataGridElement/DataGridColumns-basic.html:
+        * fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html:
+        * fast/dom/HTMLDataGridElement/DataGridColumns-dom-expected.txt:
+        * fast/dom/HTMLDataGridElement/DataGridColumns-dom.html:
+        * fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html:
+
</ins><span class="cx"> 2009-07-17  Alexey Proskuryakov  &lt;ap@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Dan Bernstein.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsbasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic-expected.txt (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic-expected.txt        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic-expected.txt        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> PASS: Initial length of datagrid.columns is 0.
</span><span class="cx"> PASS: Column returned from add.
</span><span class="cx"> PASS: We have one column in the list.
</span><ins>+PASS: The column at item(0) is the column we got back from add.
</ins><span class="cx"> PASS: The column at index 0 is the column we got back from add.
</span><span class="cx"> PASS: The column when referenced by name is the one we got back from add.
</span><span class="cx"> PASS: The column's ID is fromcol as expected.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsbasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic.html (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic.html        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-basic.html        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -8,6 +8,8 @@
</span><span class="cx">             layoutTestController.waitUntilDone();
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        try {
+
</ins><span class="cx">         function log(msg)
</span><span class="cx">         {
</span><span class="cx">             document.getElementById('console').appendChild(document.createTextNode(msg + &quot;\n&quot;));
</span><span class="lines">@@ -46,17 +48,27 @@
</span><span class="cx">             log(&quot;FAIL: Expected one column in the list but have &quot; + datagrid.columns.length + &quot; columns instead.&quot;);
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        // Make sure the column we got back from add is the one in the list.
-        if (datagrid.columns[0] == column) {
</del><ins>+        // Use item(0) to make sure the column we got back from add is the one in the list.
+        var gotColumn = datagrid.columns.item(0);
+        if (gotColumn == column) {
+            log(&quot;PASS: The column at item(0) is the column we got back from add.&quot;);
+        } else {
+            log(&quot;FAIL: The column at item(0) (&quot; + gotColumn + &quot;) is not the one we expected (&quot; + column + &quot;).&quot;);
+        }
+        
+        // Use [0] to make sure the column we got back from add is the one in the list.
+        gotColumn = datagrid.columns[0];
+        if (gotColumn == column) {
</ins><span class="cx">             log(&quot;PASS: The column at index 0 is the column we got back from add.&quot;);
</span><span class="cx">         } else {
</span><del>-            log(&quot;FAIL: The column at index 0 is not the one we expected.&quot;);
</del><ins>+            log(&quot;FAIL: The column at index 0 (&quot; + gotColumn + &quot;) is not the one we expected (&quot; + column + &quot;).&quot;);
</ins><span class="cx">         }
</span><span class="cx">         
</span><del>-        if (datagrid.columns[&quot;fromcol&quot;] == column) {
</del><ins>+        gotColumn = datagrid.columns[&quot;fromcol&quot;];
+        if (gotColumn == column) {
</ins><span class="cx">             log(&quot;PASS: The column when referenced by name is the one we got back from add.&quot;);
</span><span class="cx">         } else {
</span><del>-            log(&quot;FAIL: The column when referenced by name is not the one we expected.&quot;);
</del><ins>+            log(&quot;FAIL: The column when referenced by name (&quot; + gotColumn + &quot;) is not the one we expected (&quot; + column + &quot;).&quot;);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Examine the column's properties to make sure they are what we expected.
</span><span class="lines">@@ -97,6 +109,10 @@
</span><span class="cx">             log(&quot;FAIL: The column is not the primary column as expected.&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        } catch (exception) {
+            log(&quot;FAIL: Threw exception &quot; + exception);
+        }
+
</ins><span class="cx">         if (window.layoutTestController)
</span><span class="cx">             layoutTestController.notifyDone();
</span><span class="cx">     &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsdomattributeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-attributes.html        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -8,6 +8,8 @@
</span><span class="cx">             layoutTestController.waitUntilDone();
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        try{
+
</ins><span class="cx">         function log(msg)
</span><span class="cx">         {
</span><span class="cx">             document.getElementById('console').appendChild(document.createTextNode(msg + &quot;\n&quot;));
</span><span class="lines">@@ -74,6 +76,10 @@
</span><span class="cx">             log(&quot;FAIL: The first column is not the primary column as expected.&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        } catch (exception) {
+            log(&quot;FAIL: Threw exception &quot; + exception);
+        }
+
</ins><span class="cx">         if (window.layoutTestController)
</span><span class="cx">             layoutTestController.notifyDone();
</span><span class="cx">     &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsdomexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-expected.txt (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-expected.txt        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom-expected.txt        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -1,5 +1,8 @@
</span><ins>+PASS: datagrid JS binding is [object HTMLDataGridElement]
</ins><span class="cx"> PASS: Initial value of datagrid.columns is defined.
</span><ins>+PASS: datagrid.columns JS binding is [object DataGridColumnList]
</ins><span class="cx"> PASS: Initial length of datagrid.columns is 2.
</span><ins>+PASS: newCol JS binding is [object HTMLDataGridColElement]
</ins><span class="cx"> PASS: We have three columns in the list.
</span><span class="cx"> PASS: The column's ID is from as expected.
</span><span class="cx"> PASS: The column's label is From as expected.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLDataGridElementDataGridColumnsdomhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom.html (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom.html        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridColumns-dom.html        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -7,14 +7,29 @@
</span><span class="cx">             layoutTestController.dumpAsText();
</span><span class="cx">             layoutTestController.waitUntilDone();
</span><span class="cx">         }
</span><ins>+        
+        try {
</ins><span class="cx"> 
</span><span class="cx">         function log(msg)
</span><span class="cx">         {
</span><span class="cx">             document.getElementById('console').appendChild(document.createTextNode(msg + &quot;\n&quot;));
</span><span class="cx">         }
</span><del>-
</del><ins>+        
+        function expectBinding(what, obj, classname)
+        {
+            var desc = String(obj);
+            var expectedDesc = &quot;[object &quot; + classname + &quot;]&quot;;
+            if (desc == expectedDesc) {
+                log(&quot;PASS: &quot; + what + &quot; JS binding is &quot; + desc);
+            } else {
+                log(&quot;FAIL: &quot; + what + &quot; JS binding is &quot; + desc + &quot;(expected &quot; + expectedDesc + &quot;)&quot;);
+            }
+        }
+        
+        // Test binding of &lt;datagrid&gt; to JS HTMLDataGridElement:
</ins><span class="cx">         var datagrid = document.getElementById('test');
</span><del>-
</del><ins>+        expectBinding(&quot;datagrid&quot;, datagrid, &quot;HTMLDataGridElement&quot;);
+        
</ins><span class="cx">         // Test initial value.
</span><span class="cx">         if (datagrid.columns != null) {
</span><span class="cx">             log(&quot;PASS: Initial value of datagrid.columns is defined.&quot;);
</span><span class="lines">@@ -22,6 +37,9 @@
</span><span class="cx">             log(&quot;FAIL: Initial value of datagrid.columns was null.&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        // Test binding of &lt;dcol&gt; to JS DataGridColumnList:
+        expectBinding(&quot;datagrid.columns&quot;, datagrid.columns, &quot;DataGridColumnList&quot;);
+        
</ins><span class="cx">         // Test initial length.
</span><span class="cx">         if (datagrid.columns.length == 2) {
</span><span class="cx">             log(&quot;PASS: Initial length of datagrid.columns is 2.&quot;);
</span><span class="lines">@@ -31,6 +49,7 @@
</span><span class="cx">         
</span><span class="cx">         // Test adding a column.
</span><span class="cx">         var newCol = document.createElement(&quot;dcol&quot;);
</span><ins>+        expectBinding(&quot;newCol&quot;, newCol, &quot;HTMLDataGridColElement&quot;);
</ins><span class="cx">         newCol.setAttribute(&quot;id&quot;, &quot;date&quot;);
</span><span class="cx">         newCol.setAttribute(&quot;label&quot;, &quot;Date Received&quot;);
</span><span class="cx">         newCol.setAttribute(&quot;type&quot;, &quot;text&quot;);
</span><span class="lines">@@ -98,7 +117,11 @@
</span><span class="cx">         } else {
</span><span class="cx">             log(&quot;FAIL: There is a primary column, but there should not be.&quot;);
</span><span class="cx">         }
</span><del>-    
</del><ins>+            
+        } catch (exception) {
+            log(&quot;FAIL: Threw exception &quot; + exception);
+        }
+        
</ins><span class="cx">         if (window.layoutTestController)
</span><span class="cx">             layoutTestController.notifyDone();
</span><span class="cx">     &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLDataGridElementDataGridDataSourcebasichtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/LayoutTests/fast/dom/HTMLDataGridElement/DataGridDataSource-basic.html        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -6,6 +6,8 @@
</span><span class="cx">         if (window.layoutTestController)
</span><span class="cx">             layoutTestController.dumpAsText();
</span><span class="cx"> 
</span><ins>+        try {
+            
</ins><span class="cx">         function log(msg)
</span><span class="cx">         {
</span><span class="cx">             document.getElementById('console').appendChild(document.createTextNode(msg + &quot;\n&quot;));
</span><span class="lines">@@ -14,7 +16,7 @@
</span><span class="cx">         var datagrid = document.getElementById('test');
</span><span class="cx"> 
</span><span class="cx">         // Test initial value.
</span><del>-        if (datagrid.dataSource == null) {
</del><ins>+        if (datagrid.dataSource === null) {
</ins><span class="cx">             log(&quot;PASS: Initial value of datagrid.dataSource is null.&quot;);
</span><span class="cx">         } else {
</span><span class="cx">             log(&quot;FAIL: Initial value of datagrid.dataSource was not null. Was &quot; + datagrid.dataSource + &quot;.&quot;);
</span><span class="lines">@@ -22,18 +24,18 @@
</span><span class="cx"> 
</span><span class="cx">         // Test setting to a JS number
</span><span class="cx">         datagrid.dataSource = 10;
</span><del>-        if (datagrid.dataSource == 10) {
</del><ins>+        if (datagrid.dataSource === 10) {
</ins><span class="cx">             log(&quot;PASS: Allowed setting datagrid.dataSource to a number.&quot;);
</span><span class="cx">         } else {
</span><del>-            log(&quot;FAIL: Did not allowed setting datagrid.dataSource to a number.&quot;);
</del><ins>+            log(&quot;FAIL: Did not allow setting datagrid.dataSource to a number.&quot;);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Test setting to a JS number
</span><span class="cx">         datagrid.dataSource = &quot;Test String&quot;;
</span><del>-        if (datagrid.dataSource == &quot;Test String&quot;) {
</del><ins>+        if (datagrid.dataSource === &quot;Test String&quot;) {
</ins><span class="cx">             log(&quot;PASS: Allowed setting datagrid.dataSource to a string.&quot;);
</span><span class="cx">         } else {
</span><del>-            log(&quot;FAIL: Did not allowed setting datagrid.dataSource to a string.&quot;);
</del><ins>+            log(&quot;FAIL: Did not allow setting datagrid.dataSource to a string.&quot;);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Test setting dataSource to an object.
</span><span class="lines">@@ -42,16 +44,20 @@
</span><span class="cx">         if (datagrid.dataSource == dataSource) {
</span><span class="cx">             log(&quot;PASS: Allowed setting datagrid.dataSource to an object.&quot;);
</span><span class="cx">         } else {
</span><del>-            log(&quot;FAIL: Did not allowed setting datagrid.dataSource to an object.&quot;);
</del><ins>+            log(&quot;FAIL: Did not allow setting datagrid.dataSource to an object.&quot;);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        // Test setting dataSource to an object.
</del><ins>+        // Test setting dataSource to null.
</ins><span class="cx">         datagrid.dataSource = null;
</span><del>-        if (datagrid.dataSource == null) {
</del><ins>+        if (datagrid.dataSource === null) {
</ins><span class="cx">             log(&quot;PASS: Allowed setting datagrid.dataSource to null.&quot;);
</span><span class="cx">         } else {
</span><del>-            log(&quot;FAIL: Did not allowed setting datagrid.dataSource to null.&quot;);
</del><ins>+            log(&quot;FAIL: Did not allow setting datagrid.dataSource to null.&quot;);
</ins><span class="cx">         }
</span><ins>+        
+        } catch (exception) {
+            log(&quot;FAIL: Threw exception &quot; + exception);
+        }
</ins><span class="cx">     &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/ChangeLog        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2009-07-17  Jens Alfke  &lt;snej@chromium.org&gt;
+
+        Reviewed by Dimitri Glazkov.
+
+        Hook up V8 bindings for DataGrid elements.
+        https://bugs.webkit.org/show_bug.cgi?id=27383
+        http://code.google.com/p/chromium/issues/detail?id=16730
+
+        Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
+        to handle exceptions, check appropriate JS prototypes, and
+        test column-list's item() method as well as array-indexing.
+
+        * WebCore.gypi: Added new source files.
+        * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
+        * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
+        * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
+        (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
+        * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
+        (WebCore::V8DataGridDataSource::V8DataGridDataSource):
+        (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
+        * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
+        (WebCore::V8DataGridDataSource::create):
+        (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
+        (WebCore::V8DataGridDataSource::jsDataSource):
+        (WebCore::asV8DataGridDataSource):
+        * bindings/v8/V8GCController.h: Added new handle type &quot;DATASOURCE&quot;.
+        * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
+        * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
+        * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
+        (WebCore::ACCESSOR_GETTER):
+        (WebCore::ACCESSOR_SETTER):
+
</ins><span class="cx"> 2009-07-17  Jeremy Orlow  &lt;jorlow@chromium.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Fisher.
</span></span></pre></div>
<a id="trunkWebCoreWebCoregypi"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.gypi (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.gypi        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/WebCore.gypi        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -603,6 +603,7 @@
</span><span class="cx">             'bindings/v8/custom/V8CustomXPathNSResolver.cpp',
</span><span class="cx">             'bindings/v8/custom/V8CustomXPathNSResolver.h',
</span><span class="cx">             'bindings/v8/custom/V8DatabaseCustom.cpp',
</span><ins>+            'bindings/v8/custom/V8DataGridColumnListCustom.cpp',
</ins><span class="cx">             'bindings/v8/custom/V8DocumentLocationCustom.cpp',
</span><span class="cx">             'bindings/v8/custom/V8DOMParserConstructor.cpp',
</span><span class="cx">             'bindings/v8/custom/V8DOMWindowCustom.cpp',
</span><span class="lines">@@ -693,6 +694,8 @@
</span><span class="cx">             'bindings/v8/V8Binding.h',
</span><span class="cx">             'bindings/v8/V8Collection.cpp',
</span><span class="cx">             'bindings/v8/V8Collection.h',
</span><ins>+            'bindings/v8/V8DataGridDataSource.cpp',
+            'bindings/v8/V8DataGridDataSource.h',
</ins><span class="cx">             'bindings/v8/V8DOMMap.cpp',
</span><span class="cx">             'bindings/v8/V8DOMMap.h',
</span><span class="cx">             'bindings/v8/V8DOMWrapper.cpp',
</span></span></pre></div>
<a id="trunkWebCorebindingsscriptsCodeGeneratorV8pm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -243,6 +243,18 @@
</span><span class="cx">     return &quot;${iface}.h&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+# If the node has a [Conditional=XXX] attribute, returns an &quot;ENABLE(XXX)&quot; string for use in an #if.
+sub GenerateConditionalString
+{
+    my $node = shift;
+    my $conditional = $node-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;};
+    if ($conditional) {
+        return &quot;ENABLE(&quot; . join(&quot;) &amp;&amp; ENABLE(&quot;, split(/&amp;/, $conditional)) . &quot;)&quot;;
+    } else {
+        return &quot;&quot;;
+    }
+}
+
</ins><span class="cx"> sub GenerateHeader
</span><span class="cx"> {
</span><span class="cx">     my $object = shift;
</span><span class="lines">@@ -257,17 +269,12 @@
</span><span class="cx">     $codeGenerator-&gt;AddMethodsConstantsAndAttributesFromParentClasses($dataNode);
</span><span class="cx"> 
</span><span class="cx">     my $hasLegacyParent = $dataNode-&gt;extendedAttributes-&gt;{&quot;LegacyParent&quot;};
</span><del>-    my $conditional = $dataNode-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;};
</del><ins>+    my $conditionalString = GenerateConditionalString($dataNode);
</ins><span class="cx"> 
</span><span class="cx">     # - Add default header template
</span><span class="cx">     @headerContent = split(&quot;\r&quot;, $headerTemplate);
</span><span class="cx"> 
</span><del>-    my $conditionalString;
-    if ($conditional) {
-        $conditionalString = &quot;ENABLE(&quot; . join(&quot;) &amp;&amp; ENABLE(&quot;, split(/&amp;/, $conditional)) . &quot;)&quot;;
-        push(@headerContent, &quot;\n#if ${conditionalString}\n\n&quot;);
-    }
-
</del><ins>+    push(@headerContent, &quot;\n#if ${conditionalString}\n\n&quot;) if $conditionalString;
</ins><span class="cx">     push(@headerContent, &quot;\n#ifndef $className&quot; . &quot;_H&quot;);
</span><span class="cx">     push(@headerContent, &quot;\n#define $className&quot; . &quot;_H\n\n&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -310,7 +317,7 @@
</span><span class="cx">     push(@headerContent, &quot;}\n\n&quot;);
</span><span class="cx">     push(@headerContent, &quot;#endif // $className&quot; . &quot;_H\n&quot;);
</span><span class="cx"> 
</span><del>-    push(@headerContent, &quot;#endif // ${conditionalString}\n\n&quot;) if $conditional;
</del><ins>+    push(@headerContent, &quot;#endif // ${conditionalString}\n\n&quot;) if $conditionalString;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -903,134 +910,138 @@
</span><span class="cx">             $accessControl = &quot;v8::ALL_CAN_WRITE&quot;;
</span><span class="cx">         } elsif ($attrExt-&gt;{&quot;DoNotCheckDomainSecurity&quot;}) {
</span><span class="cx">             $accessControl = &quot;v8::ALL_CAN_READ&quot;;
</span><del>-        if (!($attribute-&gt;type =~ /^readonly/) &amp;&amp; !($attrExt-&gt;{&quot;V8ReadOnly&quot;})) {
-            $accessControl .= &quot;|v8::ALL_CAN_WRITE&quot;;
</del><ins>+            if (!($attribute-&gt;type =~ /^readonly/) &amp;&amp; !($attrExt-&gt;{&quot;V8ReadOnly&quot;})) {
+                $accessControl .= &quot;|v8::ALL_CAN_WRITE&quot;;
+            }
</ins><span class="cx">         }
</span><del>-    }
-    if ($attrExt-&gt;{&quot;V8DisallowShadowing&quot;}) {
-        $accessControl .= &quot;|v8::PROHIBITS_OVERWRITING&quot;;
-    }
-    $accessControl = &quot;static_cast&lt;v8::AccessControl&gt;(&quot; . $accessControl . &quot;)&quot;;
</del><ins>+        if ($attrExt-&gt;{&quot;V8DisallowShadowing&quot;}) {
+            $accessControl .= &quot;|v8::PROHIBITS_OVERWRITING&quot;;
+        }
+        $accessControl = &quot;static_cast&lt;v8::AccessControl&gt;(&quot; . $accessControl . &quot;)&quot;;
</ins><span class="cx"> 
</span><del>-    my $customAccessor =
-        $attrExt-&gt;{&quot;Custom&quot;} ||
-        $attrExt-&gt;{&quot;CustomSetter&quot;} ||
-        $attrExt-&gt;{&quot;CustomGetter&quot;} ||
-        $attrExt-&gt;{&quot;V8Custom&quot;} ||
-        $attrExt-&gt;{&quot;V8CustomSetter&quot;} ||
-        $attrExt-&gt;{&quot;V8CustomGetter&quot;} ||
-        &quot;&quot;;
-    if ($customAccessor eq 1) {
-        # use the naming convension, interface + (capitalize) attr name
-        $customAccessor = $interfaceName . WK_ucfirst($attrName);
-    }
</del><ins>+        my $customAccessor =
+            $attrExt-&gt;{&quot;Custom&quot;} ||
+            $attrExt-&gt;{&quot;CustomSetter&quot;} ||
+            $attrExt-&gt;{&quot;CustomGetter&quot;} ||
+            $attrExt-&gt;{&quot;V8Custom&quot;} ||
+            $attrExt-&gt;{&quot;V8CustomSetter&quot;} ||
+            $attrExt-&gt;{&quot;V8CustomGetter&quot;} ||
+            &quot;&quot;;
+        if ($customAccessor eq 1) {
+            # use the naming convension, interface + (capitalize) attr name
+            $customAccessor = $interfaceName . WK_ucfirst($attrName);
+        }
</ins><span class="cx"> 
</span><del>-    my $getter;
-    my $setter;
-    my $propAttr = &quot;v8::None&quot;;
-    my $hasCustomSetter = 0;
</del><ins>+        my $getter;
+        my $setter;
+        my $propAttr = &quot;v8::None&quot;;
+        my $hasCustomSetter = 0;
</ins><span class="cx"> 
</span><del>-    # Check attributes.
-    if ($attrExt-&gt;{&quot;DontEnum&quot;}) {
-        $propAttr .= &quot;|v8::DontEnum&quot;;
-    }
-    if ($attrExt-&gt;{&quot;V8DisallowShadowing&quot;}) {
-        $propAttr .= &quot;|v8::DontDelete&quot;;
-    }
</del><ins>+        # Check attributes.
+        if ($attrExt-&gt;{&quot;DontEnum&quot;}) {
+            $propAttr .= &quot;|v8::DontEnum&quot;;
+        }
+        if ($attrExt-&gt;{&quot;V8DisallowShadowing&quot;}) {
+            $propAttr .= &quot;|v8::DontDelete&quot;;
+        }
</ins><span class="cx"> 
</span><del>-    my $on_proto = &quot;0 /* on instance */&quot;;
-    my $data = &quot;V8ClassIndex::INVALID_CLASS_INDEX /* no data */&quot;;
</del><ins>+        my $on_proto = &quot;0 /* on instance */&quot;;
+        my $data = &quot;V8ClassIndex::INVALID_CLASS_INDEX /* no data */&quot;;
</ins><span class="cx"> 
</span><del>-    # Constructor
-    if ($attribute-&gt;signature-&gt;type =~ /Constructor$/) {
-        my $constructorType = $codeGenerator-&gt;StripModule($attribute-&gt;signature-&gt;type);
-        $constructorType =~ s/Constructor$//;
-        my $constructorIndex = uc($constructorType);
-        $data = &quot;V8ClassIndex::${constructorIndex}&quot;;
-        $getter = &quot;${interfaceName}Internal::${interfaceName}ConstructorGetter&quot;;
-        $setter = &quot;0&quot;;
-        $propAttr = &quot;v8::ReadOnly&quot;;
</del><ins>+        # Constructor
+        if ($attribute-&gt;signature-&gt;type =~ /Constructor$/) {
+            my $constructorType = $codeGenerator-&gt;StripModule($attribute-&gt;signature-&gt;type);
+            $constructorType =~ s/Constructor$//;
+            my $constructorIndex = uc($constructorType);
+            $data = &quot;V8ClassIndex::${constructorIndex}&quot;;
+            $getter = &quot;${interfaceName}Internal::${interfaceName}ConstructorGetter&quot;;
+            $setter = &quot;0&quot;;
+            $propAttr = &quot;v8::ReadOnly&quot;;
</ins><span class="cx"> 
</span><del>-    # EventListeners
-    } elsif ($attribute-&gt;signature-&gt;type eq &quot;EventListener&quot;) {
-        if ($interfaceName eq &quot;DOMWindow&quot;) {
-            $getter = &quot;V8Custom::v8DOMWindowEventHandlerAccessorGetter&quot;;
-            $setter = &quot;V8Custom::v8DOMWindowEventHandlerAccessorSetter&quot;;
-        } elsif ($interfaceName eq &quot;Element&quot; || $interfaceName eq &quot;Document&quot; || $interfaceName eq &quot;HTMLBodyElement&quot; || $interfaceName eq &quot;SVGElementInstance&quot; || $interfaceName eq &quot;HTMLFrameSetElement&quot;) {
-            $getter = &quot;V8Custom::v8ElementEventHandlerAccessorGetter&quot;;
-            $setter = &quot;V8Custom::v8ElementEventHandlerAccessorSetter&quot;;
-        } else {
</del><ins>+        # EventListeners
+        } elsif ($attribute-&gt;signature-&gt;type eq &quot;EventListener&quot;) {
+            if ($interfaceName eq &quot;DOMWindow&quot;) {
+                $getter = &quot;V8Custom::v8DOMWindowEventHandlerAccessorGetter&quot;;
+                $setter = &quot;V8Custom::v8DOMWindowEventHandlerAccessorSetter&quot;;
+            } elsif ($interfaceName eq &quot;Element&quot; || $interfaceName eq &quot;Document&quot; || $interfaceName eq &quot;HTMLBodyElement&quot; || $interfaceName eq &quot;SVGElementInstance&quot; || $interfaceName eq &quot;HTMLFrameSetElement&quot;) {
+                $getter = &quot;V8Custom::v8ElementEventHandlerAccessorGetter&quot;;
+                $setter = &quot;V8Custom::v8ElementEventHandlerAccessorSetter&quot;;
+            } else {
+                $getter = &quot;V8Custom::v8${customAccessor}AccessorGetter&quot;;
+                if ($interfaceName eq &quot;WorkerContext&quot; and $attrName eq &quot;self&quot;) {
+                    $setter = &quot;0&quot;;
+                    $propAttr = &quot;v8::ReadOnly&quot;;
+                } else {
+                    $setter = &quot;V8Custom::v8${customAccessor}AccessorSetter&quot;;
+                }
+            }
+
+        # Custom Getter and Setter
+        } elsif ($attrExt-&gt;{&quot;Custom&quot;} || $attrExt-&gt;{&quot;V8Custom&quot;}) {
</ins><span class="cx">             $getter = &quot;V8Custom::v8${customAccessor}AccessorGetter&quot;;
</span><span class="cx">             if ($interfaceName eq &quot;WorkerContext&quot; and $attrName eq &quot;self&quot;) {
</span><span class="cx">                 $setter = &quot;0&quot;;
</span><span class="cx">                 $propAttr = &quot;v8::ReadOnly&quot;;
</span><span class="cx">             } else {
</span><ins>+                $hasCustomSetter = 1;
</ins><span class="cx">                 $setter = &quot;V8Custom::v8${customAccessor}AccessorSetter&quot;;
</span><span class="cx">             }
</span><del>-        }
</del><span class="cx"> 
</span><del>-    # Custom Getter and Setter
-    } elsif ($attrExt-&gt;{&quot;Custom&quot;} || $attrExt-&gt;{&quot;V8Custom&quot;}) {
-        $getter = &quot;V8Custom::v8${customAccessor}AccessorGetter&quot;;
-        if ($interfaceName eq &quot;WorkerContext&quot; and $attrName eq &quot;self&quot;) {
-            $setter = &quot;0&quot;;
-            $propAttr = &quot;v8::ReadOnly&quot;;
-        } else {
</del><ins>+        # Custom Setter
+        } elsif ($attrExt-&gt;{&quot;CustomSetter&quot;} || $attrExt-&gt;{&quot;V8CustomSetter&quot;}) {
</ins><span class="cx">             $hasCustomSetter = 1;
</span><ins>+            $getter = &quot;${interfaceName}Internal::${attrName}AttrGetter&quot;;
</ins><span class="cx">             $setter = &quot;V8Custom::v8${customAccessor}AccessorSetter&quot;;
</span><del>-        }
</del><span class="cx"> 
</span><del>-    # Custom Setter
-    } elsif ($attrExt-&gt;{&quot;CustomSetter&quot;} || $attrExt-&gt;{&quot;V8CustomSetter&quot;}) {
-        $hasCustomSetter = 1;
-        $getter = &quot;${interfaceName}Internal::${attrName}AttrGetter&quot;;
-        $setter = &quot;V8Custom::v8${customAccessor}AccessorSetter&quot;;
</del><ins>+        # Custom Getter
+        } elsif ($attrExt-&gt;{&quot;CustomGetter&quot;}) {
+            $getter = &quot;V8Custom::v8${customAccessor}AccessorGetter&quot;;
+            $setter = &quot;${interfaceName}Internal::${attrName}AttrSetter&quot;;
</ins><span class="cx"> 
</span><del>-    # Custom Getter
-    } elsif ($attrExt-&gt;{&quot;CustomGetter&quot;}) {
-        $getter = &quot;V8Custom::v8${customAccessor}AccessorGetter&quot;;
-        $setter = &quot;${interfaceName}Internal::${attrName}AttrSetter&quot;;
</del><ins>+        # Replaceable
+        } elsif ($attrExt-&gt;{&quot;Replaceable&quot;}) {
+            # Replaceable accessor is put on instance template with ReadOnly attribute.
+            $getter = &quot;${interfaceName}Internal::${attrName}AttrGetter&quot;;
+            $setter = &quot;0&quot;;
</ins><span class="cx"> 
</span><del>-    # Replaceable
-    } elsif ($attrExt-&gt;{&quot;Replaceable&quot;}) {
-        # Replaceable accessor is put on instance template with ReadOnly attribute.
-        $getter = &quot;${interfaceName}Internal::${attrName}AttrGetter&quot;;
-        $setter = &quot;0&quot;;
</del><ins>+            # Mark to avoid duplicate v8::ReadOnly flags in output.
+            $hasCustomSetter = 1;
</ins><span class="cx"> 
</span><del>-        # Mark to avoid duplicate v8::ReadOnly flags in output.
-        $hasCustomSetter = 1;
</del><ins>+            # Handle the special case of window.top being marked upstream as Replaceable.
+            # FIXME: Investigate why [Replaceable] is not marked as ReadOnly
+            # upstream and reach parity.
+            if (!($interfaceName eq &quot;DOMWindow&quot; and $attrName eq &quot;top&quot;)) {
+                $propAttr .= &quot;|v8::ReadOnly&quot;;
+            }
</ins><span class="cx"> 
</span><del>-        # Handle the special case of window.top being marked upstream as Replaceable.
-        # FIXME: Investigate why [Replaceable] is not marked as ReadOnly
-        # upstream and reach parity.
-        if (!($interfaceName eq &quot;DOMWindow&quot; and $attrName eq &quot;top&quot;)) {
</del><ins>+        # Normal
+        } else {
+            $getter = &quot;${interfaceName}Internal::${attrName}AttrGetter&quot;;
+            $setter = &quot;${interfaceName}Internal::${attrName}AttrSetter&quot;;
+        }
+
+        if ($attrExt-&gt;{&quot;Replaceable&quot;} &amp;&amp; !$hasCustomSetter) {
+            $setter = &quot;0&quot;;
</ins><span class="cx">             $propAttr .= &quot;|v8::ReadOnly&quot;;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-    # Normal
-    } else {
-        $getter = &quot;${interfaceName}Internal::${attrName}AttrGetter&quot;;
-        $setter = &quot;${interfaceName}Internal::${attrName}AttrSetter&quot;;
-    }
</del><ins>+        # Read only attributes
+        if ($attribute-&gt;type =~ /^readonly/ || $attrExt-&gt;{&quot;V8ReadOnly&quot;}) {
+            $setter = &quot;0&quot;;
+        }
</ins><span class="cx"> 
</span><del>-    if ($attrExt-&gt;{&quot;Replaceable&quot;} &amp;&amp; !$hasCustomSetter) {
-        $setter = &quot;0&quot;;
-        $propAttr .= &quot;|v8::ReadOnly&quot;;
-    }
</del><ins>+        # An accessor can be installed on the proto
+        if ($attrExt-&gt;{&quot;v8OnProto&quot;}) {
+            $on_proto = &quot;1 /* on proto */&quot;;
+        }
</ins><span class="cx"> 
</span><del>-    # Read only attributes
-    if ($attribute-&gt;type =~ /^readonly/ || $attrExt-&gt;{&quot;V8ReadOnly&quot;}) {
-        $setter = &quot;0&quot;;
-    }
</del><ins>+        my $commentInfo = &quot;Attribute '$attrName' (Type: '&quot; . $attribute-&gt;type .
+                          &quot;' ExtAttr: '&quot; . join(' ', keys(%{$attrExt})) . &quot;')&quot;;
+        
+        my $conditionalString = GenerateConditionalString($attribute-&gt;signature);
+        push(@implContent, &quot;\n#if ${conditionalString}\n&quot;) if $conditionalString;
</ins><span class="cx"> 
</span><del>-    # An accessor can be installed on the proto
-    if ($attrExt-&gt;{&quot;v8OnProto&quot;}) {
-        $on_proto = &quot;1 /* on proto */&quot;;
-    }
-
-    my $commentInfo = &quot;Attribute '$attrName' (Type: '&quot; . $attribute-&gt;type .
-                      &quot;' ExtAttr: '&quot; . join(' ', keys(%{$attrExt})) . &quot;')&quot;;
-    push(@implContent, &lt;&lt;END);
</del><ins>+        push(@implContent, &lt;&lt;END);
</ins><span class="cx">   // $commentInfo
</span><span class="cx">   { &quot;$attrName&quot;,
</span><span class="cx">     $getter,
</span><span class="lines">@@ -1040,6 +1051,7 @@
</span><span class="cx">     static_cast&lt;v8::PropertyAttribute&gt;($propAttr),
</span><span class="cx">     $on_proto },
</span><span class="cx"> END
</span><ins>+        push(@implContent, &quot;\n#endif // ${conditionalString}\n&quot;) if $conditionalString;
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1054,7 +1066,7 @@
</span><span class="cx">     my $classIndex = uc($codeGenerator-&gt;StripModule($interfaceName));
</span><span class="cx"> 
</span><span class="cx">     my $hasLegacyParent = $dataNode-&gt;extendedAttributes-&gt;{&quot;LegacyParent&quot;};
</span><del>-    my $conditional = $dataNode-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;};
</del><ins>+    my $conditionalString = GenerateConditionalString($dataNode);
</ins><span class="cx"> 
</span><span class="cx">     @allParents = $codeGenerator-&gt;FindParentsRecursively($dataNode);
</span><span class="cx"> 
</span><span class="lines">@@ -1067,11 +1079,7 @@
</span><span class="cx">          &quot;#include \&quot;V8Binding.h\&quot;\n\n&quot; .
</span><span class="cx">          &quot;#undef LOG\n\n&quot;);
</span><span class="cx"> 
</span><del>-    my $conditionalString;
-    if ($conditional) {
-        $conditionalString = &quot;ENABLE(&quot; . join(&quot;) &amp;&amp; ENABLE(&quot;, split(/&amp;/, $conditional)) . &quot;)&quot;;
-        push(@implFixedHeader, &quot;\n#if ${conditionalString}\n\n&quot;);
-    }
</del><ins>+    push(@implFixedHeader, &quot;\n#if ${conditionalString}\n\n&quot;) if $conditionalString;
</ins><span class="cx"> 
</span><span class="cx">     if ($className =~ /^V8SVGAnimated/) {
</span><span class="cx">         AddIncludesForSVGAnimatedType($interfaceName);
</span><span class="lines">@@ -1387,7 +1395,7 @@
</span><span class="cx"> } // namespace WebCore
</span><span class="cx"> END
</span><span class="cx"> 
</span><del>-    push(@implContent, &quot;\n#endif // ${conditionalString}\n&quot;) if $conditional;
</del><ins>+    push(@implContent, &quot;\n#endif // ${conditionalString}\n&quot;) if $conditionalString;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -2040,8 +2048,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ($type eq &quot;RGBColor&quot;) {
</span><del>-        my $construct = &quot;RefPtr&lt;RGBColor&gt; rgbcolor = RGBColor::create($value);\n&quot;;
-        my $convert = &quot;V8DOMWrapper::convertToV8Object(V8ClassIndex::RGBCOLOR, WTF::getPtr(rgbcolor))&quot;;
</del><ins>+        my $construct = &quot;RefPtr&lt;RGBColor&gt; rgbcolor = RGBColor::create($value);\n&quot;;
+        my $convert = &quot;V8DOMWrapper::convertToV8Object(V8ClassIndex::RGBCOLOR, WTF::getPtr(rgbcolor))&quot;;
</ins><span class="cx">         return $construct . $indent . &quot;return &quot; . $convert;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkWebCorebindingsv8DOMObjectsIncludeh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/DOMObjectsInclude.h (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/DOMObjectsInclude.h        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/v8/DOMObjectsInclude.h        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -153,6 +153,11 @@
</span><span class="cx"> #include &quot;XPathNSResolver.h&quot;
</span><span class="cx"> #include &quot;XPathResult.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATAGRID)
+#include &quot;DataGridColumn.h&quot;
+#include &quot;DataGridColumnList.h&quot;
+#endif // DATAGRID
+
</ins><span class="cx"> #if ENABLE(DOM_STORAGE)
</span><span class="cx"> #include &quot;Storage.h&quot;
</span><span class="cx"> #include &quot;StorageEvent.h&quot;
</span></span></pre></div>
<a id="trunkWebCorebindingsv8V8DOMWrappercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/V8DOMWrapper.cpp (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/V8DOMWrapper.cpp        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/v8/V8DOMWrapper.cpp        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -452,8 +452,14 @@
</span><span class="cx">     case V8ClassIndex::CLIENTRECTLIST:
</span><span class="cx">         descriptor-&gt;InstanceTemplate()-&gt;SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(ClientRectList));
</span><span class="cx">         break;
</span><del>-    default:
</del><ins>+#if ENABLE(DATAGRID)
+    case V8ClassIndex::DATAGRIDCOLUMNLIST:
+        descriptor-&gt;InstanceTemplate()-&gt;SetIndexedPropertyHandler(USE_INDEXED_PROPERTY_GETTER(DataGridColumnList));
+        descriptor-&gt;InstanceTemplate()-&gt;SetNamedPropertyHandler(USE_NAMED_PROPERTY_GETTER(DataGridColumnList));
</ins><span class="cx">         break;
</span><ins>+#endif
+      default:
+        break;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     *cacheCell = descriptor;
</span><span class="lines">@@ -787,7 +793,18 @@
</span><span class="cx"> #define FOR_EACH_VIDEO_TAG(macro)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATAGRID)
+#define FOR_EACH_DATAGRID_TAG(macro)               \
+  macro(datagrid, DATAGRID)                        \
+  macro(dcell, DATAGRIDCELL)                       \
+  macro(dcol, DATAGRIDCOL)                         \
+  macro(drow, DATAGRIDROW)
+#else
+#define FOR_EACH_DATAGRID_TAG(macro)
+#endif
+
</ins><span class="cx"> #define FOR_EACH_TAG(macro)                        \
</span><ins>+    FOR_EACH_DATAGRID_TAG(macro)                   \
</ins><span class="cx">     macro(a, ANCHOR)                               \
</span><span class="cx">     macro(applet, APPLET)                          \
</span><span class="cx">     macro(area, AREA)                              \
</span></span></pre></div>
<a id="trunkWebCorebindingsv8V8DataGridDataSourcecpp"></a>
<div class="addfile"><h4>Added: trunk/WebCore/bindings/v8/V8DataGridDataSource.cpp (0 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/V8DataGridDataSource.cpp                                (rev 0)
+++ trunk/WebCore/bindings/v8/V8DataGridDataSource.cpp        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#if ENABLE(DATAGRID)
+
+#include &quot;V8DataGridDataSource.h&quot;
+
+#include &quot;Document.h&quot;
+#include &quot;Frame.h&quot;
+#include &quot;HTMLDataGridElement.h&quot;
+#include &quot;V8HTMLDataGridElement.h&quot;
+
+
+namespace WebCore {
+
+V8DataGridDataSource::V8DataGridDataSource(v8::Handle&lt;v8::Value&gt; dataSource, Frame* frame)
+    : m_dataSource(v8::Persistent&lt;v8::Value&gt;::New(dataSource))
+    , m_frame(frame)
+{
+#ifndef NDEBUG
+    V8GCController::registerGlobalHandle(DATASOURCE, this, m_dataSource);
+#endif
+}
+
+V8DataGridDataSource::~V8DataGridDataSource()
+{
+#ifndef NDEBUG
+    V8GCController::unregisterGlobalHandle(this, m_dataSource);
+#endif
+    m_dataSource.Dispose();
+    m_dataSource.Clear();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
</ins></span></pre></div>
<a id="trunkWebCorebindingsv8V8DataGridDataSourceh"></a>
<div class="addfile"><h4>Added: trunk/WebCore/bindings/v8/V8DataGridDataSource.h (0 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/V8DataGridDataSource.h                                (rev 0)
+++ trunk/WebCore/bindings/v8/V8DataGridDataSource.h        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#ifndef V8DataGridDataSource_h
+#define V8DataGridDataSource_h
+
+#if ENABLE(DATAGRID)
+
+#include &quot;DataGridDataSource.h&quot;
+#include &lt;v8.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class Frame;
+class HTMLDataGridElement;
+
+class V8DataGridDataSource : public DataGridDataSource {
+public:
+    static PassRefPtr&lt;V8DataGridDataSource&gt; create(v8::Handle&lt;v8::Value&gt; dataSource, Frame* frame)
+    {
+        return adoptRef(new V8DataGridDataSource(dataSource, frame));
+    }
+
+    virtual ~V8DataGridDataSource();
+
+    virtual bool isJSDataGridDataSource() const { return true; }
+    v8::Handle&lt;v8::Value&gt; jsDataSource() const { return m_dataSource; }
+
+private:
+    V8DataGridDataSource(v8::Handle&lt;v8::Value&gt;, Frame*);
+
+    v8::Persistent&lt;v8::Value&gt; m_dataSource;
+    RefPtr&lt;Frame&gt; m_frame;
+};
+
+inline V8DataGridDataSource* asV8DataGridDataSource(DataGridDataSource* dataSource)
+{
+    ASSERT(dataSource-&gt;isJSDataGridDataSource());
+    return static_cast&lt;V8DataGridDataSource*&gt;(dataSource);
+}
+
+inline const V8DataGridDataSource* asV8DataGridDataSource(const DataGridDataSource* dataSource)
+{
+    ASSERT(dataSource-&gt;isJSDataGridDataSource());
+    return static_cast&lt;const V8DataGridDataSource*&gt;(dataSource);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)
+#endif // V8DataGridDataSource_h
</ins></span></pre></div>
<a id="trunkWebCorebindingsv8V8GCControllerh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/V8GCController.h (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/V8GCController.h        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/v8/V8GCController.h        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -44,7 +44,8 @@
</span><span class="cx">     V(EVENT_LISTENER)             \
</span><span class="cx">     V(NODE_FILTER)                \
</span><span class="cx">     V(SCRIPTINSTANCE)             \
</span><del>-    V(SCRIPTVALUE)
</del><ins>+    V(SCRIPTVALUE)                \
+    V(DATASOURCE)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     // Host information of persistent handles.
</span></span></pre></div>
<a id="trunkWebCorebindingsv8V8Indexh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/V8Index.h (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/V8Index.h        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/v8/V8Index.h        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -38,6 +38,20 @@
</span><span class="cx"> 
</span><span class="cx"> typedef v8::Persistent&lt;v8::FunctionTemplate&gt; (*FunctionTemplateFactory)();
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATAGRID)
+#define DATAGRID_HTMLELEMENT_TYPES(V)                                   \
+    V(HTMLDATAGRIDCELLELEMENT, HTMLDataGridCellElement)                 \
+    V(HTMLDATAGRIDCOLELEMENT, HTMLDataGridColElement)                   \
+    V(HTMLDATAGRIDELEMENT, HTMLDataGridElement)                         \
+    V(HTMLDATAGRIDROWELEMENT, HTMLDataGridRowElement)
+#define DATAGRID_NONNODE_TYPES(V)                                       \
+    V(DATAGRIDCOLUMN, DataGridColumn)                                   \
+    V(DATAGRIDCOLUMNLIST, DataGridColumnList)
+#else
+#define DATAGRID_HTMLELEMENT_TYPES(V)
+#define DATAGRID_NONNODE_TYPES(V)
+#endif
+
</ins><span class="cx"> #if ENABLE(VIDEO)
</span><span class="cx"> #define VIDEO_HTMLELEMENT_TYPES(V)                                      \
</span><span class="cx">     V(HTMLAUDIOELEMENT, HTMLAudioElement)                               \
</span><span class="lines">@@ -79,9 +93,7 @@
</span><span class="cx">     V(ATTR, Attr)                                                       \
</span><span class="cx">     V(CHARACTERDATA, CharacterData)                                     \
</span><span class="cx">     V(CDATASECTION, CDATASection)                                       \
</span><del>-    V(COMMENT, Comment)                                                 \
-    V(DATAGRIDCOLUMN, DataGridColumn)                                   \
-    V(DATAGRIDCOLUMNLIST, DataGridColumnList)                           \
</del><ins>+    V(COMMENT, Comment)                                                 \
</ins><span class="cx">     V(DOCUMENT, Document)                                               \
</span><span class="cx">     V(DOCUMENTFRAGMENT, DocumentFragment)                               \
</span><span class="cx">     V(DOCUMENTTYPE, DocumentType)                                       \
</span><span class="lines">@@ -103,10 +115,6 @@
</span><span class="cx">     V(HTMLBRELEMENT, HTMLBRElement)                                     \
</span><span class="cx">     V(HTMLBUTTONELEMENT, HTMLButtonElement)                             \
</span><span class="cx">     V(HTMLCANVASELEMENT, HTMLCanvasElement)                             \
</span><del>-    V(HTMLDATAGRIDCELLELEMENT, HTMLDataGridCellElement)                 \
-    V(HTMLDATAGRIDCOLELEMENT, HTMLDataGridColElement)                   \
-    V(HTMLDATAGRIDELEMENT, HTMLDataGridElement)                         \
-    V(HTMLDATAGRIDROWELEMENT, HTMLDataGridRowElement)                   \
</del><span class="cx">     V(HTMLDIRECTORYELEMENT, HTMLDirectoryElement)                       \
</span><span class="cx">     V(HTMLDIVELEMENT, HTMLDivElement)                                   \
</span><span class="cx">     V(HTMLDLISTELEMENT, HTMLDListElement)                               \
</span><span class="lines">@@ -154,6 +162,7 @@
</span><span class="cx">     V(HTMLTITLEELEMENT, HTMLTitleElement)                               \
</span><span class="cx">     V(HTMLULISTELEMENT, HTMLUListElement)                               \
</span><span class="cx">     V(HTMLELEMENT, HTMLElement)                                         \
</span><ins>+    DATAGRID_HTMLELEMENT_TYPES(V)                                       \
</ins><span class="cx">     VIDEO_HTMLELEMENT_TYPES(V)
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SVG_ANIMATION)
</span><span class="lines">@@ -376,6 +385,7 @@
</span><span class="cx">     V(XPATHRESULT, XPathResult)                                         \
</span><span class="cx">     V(XSLTPROCESSOR, XSLTProcessor)                                     \
</span><span class="cx">     ACTIVE_DOM_OBJECT_TYPES(V)                                          \
</span><ins>+    DATAGRID_NONNODE_TYPES(V)                                           \
</ins><span class="cx">     VIDEO_NONNODE_TYPES(V)                                              \
</span><span class="cx">     SHARED_WORKER_NONNODE_WRAPPER_TYPES(V)                              \
</span><span class="cx">     WORKER_NONNODE_WRAPPER_TYPES(V)
</span><span class="lines">@@ -389,16 +399,16 @@
</span><span class="cx">     V(SQLTRANSACTION, SQLTransaction)
</span><span class="cx"> #else
</span><span class="cx"> #define DOM_OBJECT_DATABASE_TYPES(V)
</span><del>-#endif
-
-#if ENABLE(DOM_STORAGE)
-#define DOM_OBJECT_STORAGE_TYPES(V)                                     \
-    V(STORAGE, Storage)                                                 \
-    V(STORAGEEVENT, StorageEvent)
-#else
-#define DOM_OBJECT_STORAGE_TYPES(V)
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(DOM_STORAGE)
+#define DOM_OBJECT_STORAGE_TYPES(V)                                     \
+    V(STORAGE, Storage)                                                 \
+    V(STORAGEEVENT, StorageEvent)
+#else
+#define DOM_OBJECT_STORAGE_TYPES(V)
+#endif
+
</ins><span class="cx"> #define DOM_OBJECT_TYPES(V)                                             \
</span><span class="cx">     DOM_OBJECT_TYPES_1(V)                                               \
</span><span class="cx">     DOM_OBJECT_TYPES_2(V)                                               \
</span></span></pre></div>
<a id="trunkWebCorebindingsv8customV8CustomBindingh"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/custom/V8CustomBinding.h (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/custom/V8CustomBinding.h        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/v8/custom/V8CustomBinding.h        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -406,8 +406,6 @@
</span><span class="cx"> 
</span><span class="cx">         DECLARE_CALLBACK(NodeFilterAcceptNode);
</span><span class="cx"> 
</span><del>-        DECLARE_PROPERTY_ACCESSOR(HTMLDataGridElementDataSource);
-
</del><span class="cx">         DECLARE_CALLBACK(HTMLFormElementSubmit);
</span><span class="cx"> 
</span><span class="cx">         DECLARE_NAMED_PROPERTY_GETTER(DOMWindow);
</span><span class="lines">@@ -452,6 +450,12 @@
</span><span class="cx">         DECLARE_CALLBACK(SQLResultSetRowListItem);
</span><span class="cx"> 
</span><span class="cx">         DECLARE_INDEXED_PROPERTY_GETTER(ClientRectList);
</span><ins>+  
+#if ENABLE(DATAGRID)
+        DECLARE_PROPERTY_ACCESSOR(HTMLDataGridElementDataSource);
+        DECLARE_INDEXED_PROPERTY_GETTER(DataGridColumnList);
+        DECLARE_NAMED_PROPERTY_GETTER(DataGridColumnList);
+#endif      
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(DOM_STORAGE)
</span><span class="cx">         DECLARE_INDEXED_PROPERTY_GETTER(Storage);
</span></span></pre></div>
<a id="trunkWebCorebindingsv8customV8HTMLDataGridElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/v8/custom/V8HTMLDataGridElementCustom.cpp (46076 => 46077)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/v8/custom/V8HTMLDataGridElementCustom.cpp        2009-07-18 01:36:08 UTC (rev 46076)
+++ trunk/WebCore/bindings/v8/custom/V8HTMLDataGridElementCustom.cpp        2009-07-18 01:42:17 UTC (rev 46077)
</span><span class="lines">@@ -29,27 +29,42 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><ins>+#include &quot;Document.h&quot;
</ins><span class="cx"> #include &quot;HTMLDataGridElement.h&quot;
</span><ins>+#include &quot;V8DataGridDataSource.h&quot;
</ins><span class="cx"> 
</span><del>-#include &quot;NotImplemented.h&quot;
-
</del><span class="cx"> #include &quot;V8Binding.h&quot;
</span><span class="cx"> #include &quot;V8CustomBinding.h&quot;
</span><span class="cx"> #include &quot;V8Proxy.h&quot;
</span><span class="cx"> 
</span><ins>+#if ENABLE(DATAGRID)
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> ACCESSOR_GETTER(HTMLDataGridElementDataSource)
</span><span class="cx"> {
</span><span class="cx">     INC_STATS(&quot;DOM.HTMLDataGridElement.dataSource._get&quot;);
</span><del>-    notImplemented();
</del><ins>+    v8::Handle&lt;v8::Object&gt; holder = info.Holder();
+    HTMLDataGridElement* imp = V8DOMWrapper::convertDOMWrapperToNode&lt;HTMLDataGridElement&gt;(holder);
+    DataGridDataSource* dataSource = imp-&gt;dataSource();
+    if (dataSource &amp;&amp; dataSource-&gt;isJSDataGridDataSource())
+        return asV8DataGridDataSource(dataSource)-&gt;jsDataSource();
</ins><span class="cx">     return v8::Null();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ACCESSOR_SETTER(HTMLDataGridElementDataSource)
</span><span class="cx"> {
</span><span class="cx">     INC_STATS(&quot;DOM.HTMLDataGridElement.dataSource._set&quot;);
</span><del>-    notImplemented();
</del><ins>+    v8::Handle&lt;v8::Object&gt; holder = info.Holder();
+    HTMLDataGridElement* imp = V8DOMWrapper::convertDOMWrapperToNode&lt;HTMLDataGridElement&gt;(holder);
+    PassRefPtr&lt;DataGridDataSource&gt; dataSource;
+    if (!value.IsEmpty()) {
+        Frame *frame = imp-&gt;document()-&gt;frame();
+        dataSource = V8DataGridDataSource::create(value, frame);
+    }
+    imp-&gt;setDataSource(dataSource.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif ENABLE(DATAGRID)
</ins></span></pre>
</div>
</div>

</body>
</html>