[Webkit-unassigned] [Bug 18837] New: The database panel fails to display tables if any value is NULL.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 1 15:57:25 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=18837

           Summary: The database panel fails to display tables if any value
                    is NULL.
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Web Inspector
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: thos.davis at mac.com


An SQL NULL value in an SQLite database is correctly returned in the results as
having the javascript null type, which (in file DatabasesPanel.js, function
_tableForResult ) either causes the div.textContent or the text.length to throw
an exception.

The fix is to check for null and then reassign the text value, possible adding
a new classname to the div as in:
--- DatabasesPanel.js   2008/05/01 22:48:06     1.1
+++ DatabasesPanel.js   2008/05/01 22:51:23     1.2
@@ -204,6 +204,10 @@

                 var text = row[column];
                 var div = document.createElement("div");
+               if ( text == null ) {
+                   text = "NULL"
+                   div.className = "sql_null";
+               }
                 div.textContent = text;
                 div.title = text;
                 td.appendChild(div);

To make use of the className = "sql_null", append the following to
inspector.js:
.sql_null {
    text-align: center;
    color: #faa;
}


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list