<!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>[41449] trunk/WebCore</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/41449">41449</a></dd>
<dt>Author</dt> <dd>dglazkov@chromium.org</dd>
<dt>Date</dt> <dd>2009-03-05 09:14:07 -0800 (Thu, 05 Mar 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>2009-03-05  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;

        Reviewed by Timothy Hatcher.

        https://bugs.webkit.org/show_bug.cgi?id=24376
        Split InspectorController.cpp file into separate classes.

        * GNUmakefile.am: Modified to include new files.
        * WebCore.pro: Ditto.
        * WebCore.scons: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * WebCoreSources.bkl: Ditto.
        * inspector/ConsoleMessage.cpp: Added.
        * inspector/ConsoleMessage.h: Added.
        * inspector/InspectorController.cpp:
        * inspector/InspectorDOMStorageResource.cpp: Added.
        * inspector/InspectorDOMStorageResource.h: Added.
        * inspector/InspectorDatabaseResource.cpp: Added.
        * inspector/InspectorDatabaseResource.h: Added.
        * inspector/InspectorResource.cpp: Added.
        * inspector/InspectorResource.h: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreGNUmakefileam">trunk/WebCore/GNUmakefile.am</a></li>
<li><a href="#trunkWebCoreWebCorepro">trunk/WebCore/WebCore.pro</a></li>
<li><a href="#trunkWebCoreWebCorescons">trunk/WebCore/WebCore.scons</a></li>
<li><a href="#trunkWebCoreWebCorevcprojWebCorevcproj">trunk/WebCore/WebCore.vcproj/WebCore.vcproj</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCoreWebCoreSourcesbkl">trunk/WebCore/WebCoreSources.bkl</a></li>
<li><a href="#trunkWebCoreinspectorInspectorControllercpp">trunk/WebCore/inspector/InspectorController.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebCoreinspectorConsoleMessagecpp">trunk/WebCore/inspector/ConsoleMessage.cpp</a></li>
<li><a href="#trunkWebCoreinspectorConsoleMessageh">trunk/WebCore/inspector/ConsoleMessage.h</a></li>
<li><a href="#trunkWebCoreinspectorInspectorDOMStorageResourcecpp">trunk/WebCore/inspector/InspectorDOMStorageResource.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorDOMStorageResourceh">trunk/WebCore/inspector/InspectorDOMStorageResource.h</a></li>
<li><a href="#trunkWebCoreinspectorInspectorDatabaseResourcecpp">trunk/WebCore/inspector/InspectorDatabaseResource.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorDatabaseResourceh">trunk/WebCore/inspector/InspectorDatabaseResource.h</a></li>
<li><a href="#trunkWebCoreinspectorInspectorResourcecpp">trunk/WebCore/inspector/InspectorResource.cpp</a></li>
<li><a href="#trunkWebCoreinspectorInspectorResourceh">trunk/WebCore/inspector/InspectorResource.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/ChangeLog        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2009-03-05  Dimitri Glazkov  &lt;dglazkov@chromium.org&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        https://bugs.webkit.org/show_bug.cgi?id=24376
+        Split InspectorController.cpp file into separate classes.
+
+        * GNUmakefile.am: Modified to include new files.
+        * WebCore.pro: Ditto.
+        * WebCore.scons: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * WebCoreSources.bkl: Ditto.
+        * inspector/ConsoleMessage.cpp: Added.
+        * inspector/ConsoleMessage.h: Added.
+        * inspector/InspectorController.cpp:
+        * inspector/InspectorDOMStorageResource.cpp: Added.
+        * inspector/InspectorDOMStorageResource.h: Added.
+        * inspector/InspectorDatabaseResource.cpp: Added.
+        * inspector/InspectorDatabaseResource.h: Added.
+        * inspector/InspectorResource.cpp: Added.
+        * inspector/InspectorResource.h: Added.
+
</ins><span class="cx"> 2009-03-05  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin Adler
</span></span></pre></div>
<a id="trunkWebCoreGNUmakefileam"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/GNUmakefile.am (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/GNUmakefile.am        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/GNUmakefile.am        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -1015,9 +1015,17 @@
</span><span class="cx">         WebCore/icu/unicode/utf_old.h \
</span><span class="cx">         WebCore/icu/unicode/utypes.h \
</span><span class="cx">         WebCore/icu/unicode/uversion.h \
</span><ins>+        WebCore/inspector/ConsoleMessage.cpp \
+        WebCore/inspector/ConsoleMessage.h \
+        WebCore/inspector/InspectorDatabaseResource.cpp \
+        WebCore/inspector/InspectorDatabaseResource.h \
+        WebCore/inspector/InspectorDOMStorageResource.cpp \
+        WebCore/inspector/InspectorDOMStorageResource.h \
</ins><span class="cx">         WebCore/inspector/InspectorClient.h \
</span><span class="cx">         WebCore/inspector/InspectorController.cpp \
</span><span class="cx">         WebCore/inspector/InspectorController.h \
</span><ins>+        WebCore/inspector/InspectorResource.cpp \
+        WebCore/inspector/InspectorResource.h \
</ins><span class="cx">         WebCore/inspector/JavaScriptCallFrame.cpp \
</span><span class="cx">         WebCore/inspector/JavaScriptCallFrame.h \
</span><span class="cx">         WebCore/inspector/JavaScriptDebugListener.h \
</span></span></pre></div>
<a id="trunkWebCoreWebCorepro"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.pro (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.pro        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/WebCore.pro        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -774,7 +774,11 @@
</span><span class="cx">     html/HTMLViewSourceDocument.cpp \
</span><span class="cx">     html/ImageData.cpp \
</span><span class="cx">     html/PreloadScanner.cpp \
</span><ins>+    inspector/ConsoleMessage.cpp \
+    inspector/InspectorDatabaseResource.cpp \
+    inspector/InspectorDOMStorageResource.cpp \
</ins><span class="cx">     inspector/InspectorController.cpp \
</span><ins>+    inspector/InspectorResource.cpp \
</ins><span class="cx">     inspector/JavaScriptCallFrame.cpp \
</span><span class="cx">     inspector/JavaScriptDebugServer.cpp \
</span><span class="cx">     inspector/JavaScriptProfile.cpp \
</span></span></pre></div>
<a id="trunkWebCoreWebCorescons"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.scons (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.scons        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/WebCore.scons        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -291,7 +291,11 @@
</span><span class="cx">     'html/TimeRanges.cpp'
</span><span class="cx"> ]
</span><span class="cx"> sources['inspector'] = [
</span><ins>+    'inspector/ConsoleMessage.cpp',
+    'inspector/InspectorDatabaseResource.cpp',
+    'inspector/InspectorDOMStorageResource.cpp',
</ins><span class="cx">     'inspector/InspectorController.cpp',
</span><ins>+    'inspector/InspectorResource.cpp',
</ins><span class="cx">     'inspector/JavaScriptCallFrame.cpp',
</span><span class="cx">     'inspector/JavaScriptDebugServer.cpp',
</span><span class="cx">     'inspector/JavaScriptProfile.cpp',
</span></span></pre></div>
<a id="trunkWebCoreWebCorevcprojWebCorevcproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.vcproj/WebCore.vcproj (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.vcproj/WebCore.vcproj        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/WebCore.vcproj/WebCore.vcproj        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -16162,6 +16162,30 @@
</span><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><ins>+                                RelativePath=&quot;..\inspector\ConsoleMessage.cpp&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\ConsoleMessage.h&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\InspectorDatabaseResource.cpp&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\InspectorDatabaseResource.h&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\InspectorDOMStorageResource.cpp&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\InspectorDOMStorageResource.h&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
</ins><span class="cx">                                 RelativePath=&quot;..\inspector\InspectorController.cpp&quot;
</span><span class="cx">                                 &gt;
</span><span class="cx">                                 &lt;FileConfiguration
</span><span class="lines">@@ -16178,6 +16202,14 @@
</span><span class="cx">                                 &gt;
</span><span class="cx">                         &lt;/File&gt;
</span><span class="cx">                         &lt;File
</span><ins>+                                RelativePath=&quot;..\inspector\InspectorResource.cpp&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
+                                RelativePath=&quot;..\inspector\InspectorResource.h&quot;
+                                &gt;
+                        &lt;/File&gt;
+                        &lt;File
</ins><span class="cx">                                 RelativePath=&quot;..\inspector\JavaScriptCallFrame.cpp&quot;
</span><span class="cx">                                 &gt;
</span><span class="cx">                                 &lt;FileConfiguration
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -637,6 +637,14 @@
</span><span class="cx">                 41C760B10EDE03D300C1655F /* ScriptState.h in Headers */ = {isa = PBXBuildFile; fileRef = 41C760B00EDE03D300C1655F /* ScriptState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 41D015CA0F4B5C71004A662F /* ContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 41D015C80F4B5C71004A662F /* ContentType.h */; };
</span><span class="cx">                 41D015CB0F4B5C71004A662F /* ContentType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41D015C90F4B5C71004A662F /* ContentType.cpp */; };
</span><ins>+                41F063EC0F5F9A0000A07EAC /* InspectorDatabaseResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F063E60F5F9A0000A07EAC /* InspectorDatabaseResource.cpp */; };
+                41F063ED0F5F9A0000A07EAC /* InspectorDatabaseResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F063E70F5F9A0000A07EAC /* InspectorDatabaseResource.h */; };
+                41F063EE0F5F9A0000A07EAC /* InspectorDOMStorageResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F063E80F5F9A0000A07EAC /* InspectorDOMStorageResource.cpp */; };
+                41F063EF0F5F9A0000A07EAC /* InspectorDOMStorageResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F063E90F5F9A0000A07EAC /* InspectorDOMStorageResource.h */; };
+                41F063F00F5F9A0000A07EAC /* InspectorResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F063EA0F5F9A0000A07EAC /* InspectorResource.cpp */; };
+                41F063F10F5F9A0000A07EAC /* InspectorResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F063EB0F5F9A0000A07EAC /* InspectorResource.h */; };
+                41F063F40F5F9A0D00A07EAC /* ConsoleMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F063F20F5F9A0D00A07EAC /* ConsoleMessage.cpp */; };
+                41F063F50F5F9A0D00A07EAC /* ConsoleMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F063F30F5F9A0D00A07EAC /* ConsoleMessage.h */; };
</ins><span class="cx">                 41F1D21F0EF35C2A00DA8753 /* ScriptCachedFrameData.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F1D21D0EF35C2A00DA8753 /* ScriptCachedFrameData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 41F1D2200EF35C2A00DA8753 /* ScriptCachedFrameData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */; };
</span><span class="cx">                 4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */; };
</span><span class="lines">@@ -5569,6 +5577,14 @@
</span><span class="cx">                 41C760B00EDE03D300C1655F /* ScriptState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptState.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 41D015C80F4B5C71004A662F /* ContentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentType.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 41D015C90F4B5C71004A662F /* ContentType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentType.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                41F063E60F5F9A0000A07EAC /* InspectorDatabaseResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDatabaseResource.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063E70F5F9A0000A07EAC /* InspectorDatabaseResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDatabaseResource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063E80F5F9A0000A07EAC /* InspectorDOMStorageResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorDOMStorageResource.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063E90F5F9A0000A07EAC /* InspectorDOMStorageResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorDOMStorageResource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063EA0F5F9A0000A07EAC /* InspectorResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorResource.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063EB0F5F9A0000A07EAC /* InspectorResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorResource.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063F20F5F9A0D00A07EAC /* ConsoleMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConsoleMessage.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                41F063F30F5F9A0D00A07EAC /* ConsoleMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleMessage.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 41F1D21D0EF35C2A00DA8753 /* ScriptCachedFrameData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptCachedFrameData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 41F1D21E0EF35C2A00DA8753 /* ScriptCachedFrameData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCachedFrameData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPlugInImageElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -9695,10 +9711,18 @@
</span><span class="cx">                 1C81B94D0E9732D900266E07 /* inspector */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                41F063F20F5F9A0D00A07EAC /* ConsoleMessage.cpp */,
+                                41F063F30F5F9A0D00A07EAC /* ConsoleMessage.h */,
</ins><span class="cx">                                 1C81B9590E97330800266E07 /* front-end */,
</span><ins>+                                41F063E60F5F9A0000A07EAC /* InspectorDatabaseResource.cpp */,
+                                41F063E70F5F9A0000A07EAC /* InspectorDatabaseResource.h */,
+                                41F063E80F5F9A0000A07EAC /* InspectorDOMStorageResource.cpp */,
+                                41F063E90F5F9A0000A07EAC /* InspectorDOMStorageResource.h */,
</ins><span class="cx">                                 1C81B9580E97330800266E07 /* InspectorClient.h */,
</span><span class="cx">                                 1C81B9570E97330800266E07 /* InspectorController.cpp */,
</span><span class="cx">                                 1C81B9560E97330800266E07 /* InspectorController.h */,
</span><ins>+                                41F063EA0F5F9A0000A07EAC /* InspectorResource.cpp */,
+                                41F063EB0F5F9A0000A07EAC /* InspectorResource.h */,
</ins><span class="cx">                                 1C81BA030E97348300266E07 /* JavaScriptCallFrame.cpp */,
</span><span class="cx">                                 1C81BA040E97348300266E07 /* JavaScriptCallFrame.h */,
</span><span class="cx">                                 1C81BA050E97348300266E07 /* JavaScriptCallFrame.idl */,
</span><span class="lines">@@ -16805,6 +16829,10 @@
</span><span class="cx">                                 1A569D250D7E2B82007C3983 /* runtime_root.h in Headers */,
</span><span class="cx">                                 93309E1E099E64920056E581 /* visible_units.h in Headers */,
</span><span class="cx">                                 BCE494AB0F4F5E9E0084E319 /* GeolocationServiceMac.h in Headers */,
</span><ins>+                                41F063ED0F5F9A0000A07EAC /* InspectorDatabaseResource.h in Headers */,
+                                41F063EF0F5F9A0000A07EAC /* InspectorDOMStorageResource.h in Headers */,
+                                41F063F10F5F9A0000A07EAC /* InspectorResource.h in Headers */,
+                                41F063F50F5F9A0D00A07EAC /* ConsoleMessage.h in Headers */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -17200,6 +17228,7 @@
</span><span class="cx">                                 316FE1150E6E1DA700BF6088 /* CompositeAnimation.cpp in Sources */,
</span><span class="cx">                                 93309DDC099E64920056E581 /* CompositeEditCommand.cpp in Sources */,
</span><span class="cx">                                 BC0B36A40CD3C67C00AC7EB5 /* Console.cpp in Sources */,
</span><ins>+                                41F063F40F5F9A0D00A07EAC /* ConsoleMessage.cpp in Sources */,
</ins><span class="cx">                                 A818721F0977D3C0005826D9 /* ContainerNode.cpp in Sources */,
</span><span class="cx">                                 BC5EB9800E82072500B25965 /* ContentData.cpp in Sources */,
</span><span class="cx">                                 41D015CB0F4B5C71004A662F /* ContentType.cpp in Sources */,
</span><span class="lines">@@ -17718,7 +17747,10 @@
</span><span class="cx">                                 93309DED099E64920056E581 /* InsertNodeBeforeCommand.cpp in Sources */,
</span><span class="cx">                                 93309DEF099E64920056E581 /* InsertParagraphSeparatorCommand.cpp in Sources */,
</span><span class="cx">                                 93309DF1099E64920056E581 /* InsertTextCommand.cpp in Sources */,
</span><ins>+                                41F063EC0F5F9A0000A07EAC /* InspectorDatabaseResource.cpp in Sources */,
+                                41F063EE0F5F9A0000A07EAC /* InspectorDOMStorageResource.cpp in Sources */,
</ins><span class="cx">                                 1C81B95B0E97330800266E07 /* InspectorController.cpp in Sources */,
</span><ins>+                                41F063F00F5F9A0000A07EAC /* InspectorResource.cpp in Sources */,
</ins><span class="cx">                                 B27535600B053814002CE64F /* IntPointCG.cpp in Sources */,
</span><span class="cx">                                 B275357C0B053814002CE64F /* IntPointMac.mm in Sources */,
</span><span class="cx">                                 B27535730B053814002CE64F /* IntRect.cpp in Sources */,
</span></span></pre></div>
<a id="trunkWebCoreWebCoreSourcesbkl"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCoreSources.bkl (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCoreSources.bkl        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/WebCoreSources.bkl        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -614,7 +614,11 @@
</span><span class="cx">     &lt;/set&gt;
</span><span class="cx"> 
</span><span class="cx">     &lt;set append=&quot;1&quot; var=&quot;WEBCORE_SOURCES_INSPECTOR&quot;&gt;
</span><ins>+        inspector/ConsoleMessage.cpp
+        inspector/InspectorDatabaseResource.cpp
+        inspector/InspectorDOMStorageResource.cpp
</ins><span class="cx">         inspector/InspectorController.cpp
</span><ins>+        inspector/InspectorResource.cpp
</ins><span class="cx">         inspector/JavaScriptCallFrame.cpp
</span><span class="cx">         inspector/JavaScriptDebugServer.cpp
</span><span class="cx">         inspector/JavaScriptProfile.cpp
</span></span></pre></div>
<a id="trunkWebCoreinspectorConsoleMessagecpp"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/ConsoleMessage.cpp (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/ConsoleMessage.cpp                                (rev 0)
+++ trunk/WebCore/inspector/ConsoleMessage.cpp        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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;
+#include &quot;ConsoleMessage.h&quot;
+
+#include &quot;JSInspectedObjectWrapper.h&quot;
+#include &quot;ScriptString.h&quot;
+#include &quot;ScriptCallStack.h&quot;
+#include &quot;ScriptCallFrame.h&quot;
+
+#include &lt;JavaScriptCore/APICast.h&gt;
+#include &lt;JavaScriptCore/JSValueRef.h&gt;
+#include &lt;runtime/JSLock.h&gt;
+
+using namespace JSC;
+
+namespace WebCore {
+
+ConsoleMessage::ConsoleMessage(MessageSource s, MessageLevel l, const String&amp; m, unsigned li, const String&amp; u, unsigned g)
+    : source(s)
+    , level(l)
+    , message(m)
+    , line(li)
+    , url(u)
+    , groupLevel(g)
+    , repeatCount(1)
+{
+}
+
+ConsoleMessage::ConsoleMessage(MessageSource s, MessageLevel l, ScriptCallStack* callStack, unsigned g, bool storeTrace)
+    : source(s)
+    , level(l)
+    , wrappedArguments(callStack-&gt;at(0).argumentCount())
+    , frames(storeTrace ? callStack-&gt;size() : 0)
+    , groupLevel(g)
+    , repeatCount(1)
+{
+    const ScriptCallFrame&amp; lastCaller = callStack-&gt;at(0);
+    line = lastCaller.lineNumber();
+    url = lastCaller.sourceURL().string();
+
+    // FIXME: For now, just store function names as strings.
+    // As ScriptCallStack start storing line number and source URL for all
+    // frames, refactor to use that, as well.
+    if (storeTrace) {
+        unsigned stackSize = callStack-&gt;size();
+        for (unsigned i = 0; i &lt; stackSize; ++i)
+            frames[i] = callStack-&gt;at(i).functionName();
+    }
+
+    JSLock lock(false);
+
+    for (unsigned i = 0; i &lt; lastCaller.argumentCount(); ++i)
+        wrappedArguments[i] = JSInspectedObjectWrapper::wrap(callStack-&gt;state(), lastCaller.argumentAt(i).jsValue());
+}
+
+bool ConsoleMessage::isEqual(ExecState* exec, ConsoleMessage* msg) const
+{
+    if (msg-&gt;wrappedArguments.size() != this-&gt;wrappedArguments.size() ||
+        (!exec &amp;&amp; msg-&gt;wrappedArguments.size()))
+        return false;
+
+    for (size_t i = 0; i &lt; msg-&gt;wrappedArguments.size(); ++i) {
+        ASSERT_ARG(exec, exec);
+        if (!JSValueIsEqual(toRef(exec), toRef(msg-&gt;wrappedArguments[i].get()), toRef(this-&gt;wrappedArguments[i].get()), 0))
+            return false;
+    }
+
+    size_t frameCount = msg-&gt;frames.size();
+    if (frameCount != this-&gt;frames.size())
+        return false;
+
+    for (size_t i = 0; i &lt; frameCount; ++i) {
+        const ScriptString&amp; myFrameFunctionName = this-&gt;frames[i];
+        if (myFrameFunctionName != msg-&gt;frames[i])
+            return false;
+    }
+
+    return msg-&gt;source == this-&gt;source
+    &amp;&amp; msg-&gt;level == this-&gt;level
+    &amp;&amp; msg-&gt;message == this-&gt;message
+    &amp;&amp; msg-&gt;line == this-&gt;line
+    &amp;&amp; msg-&gt;url == this-&gt;url
+    &amp;&amp; msg-&gt;groupLevel == this-&gt;groupLevel;
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkWebCoreinspectorConsoleMessageh"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/ConsoleMessage.h (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/ConsoleMessage.h                                (rev 0)
+++ trunk/WebCore/inspector/ConsoleMessage.h        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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 ConsoleMessage_h
+#define ConsoleMessage_h
+
+#include &quot;Console.h&quot;
+
+#include &lt;JavaScriptCore/Protect.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace JSC {
+    class ExecState;
+}
+
+namespace WebCore {
+
+    class ScriptCallStack;
+    class ScriptString;
+
+    class ConsoleMessage {
+    public:
+        ConsoleMessage(MessageSource, MessageLevel, const String&amp; m, unsigned li, const String&amp; u, unsigned g);        
+        ConsoleMessage(MessageSource, MessageLevel, ScriptCallStack*, unsigned g, bool storeTrace = false);
+
+        bool isEqual(JSC::ExecState* exec, ConsoleMessage* msg) const;
+
+        MessageSource source;
+        MessageLevel level;
+        String message;
+        Vector&lt;JSC::ProtectedJSValuePtr&gt; wrappedArguments;
+        Vector&lt;ScriptString&gt; frames;
+        unsigned line;
+        String url;
+        unsigned groupLevel;
+        unsigned repeatCount;
+    };
+
+} // namespace WebCore
+
+#endif // ConsoleMessage_h
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/inspector/InspectorController.cpp (41448 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorController.cpp        2009-03-05 17:12:08 UTC (rev 41448)
+++ trunk/WebCore/inspector/InspectorController.cpp        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;CString.h&quot;
</span><span class="cx"> #include &quot;CachedResource.h&quot;
</span><span class="cx"> #include &quot;Console.h&quot;
</span><ins>+#include &quot;ConsoleMessage.h&quot;
</ins><span class="cx"> #include &quot;DOMWindow.h&quot;
</span><span class="cx"> #include &quot;DocLoader.h&quot;
</span><span class="cx"> #include &quot;Document.h&quot;
</span><span class="lines">@@ -49,6 +50,9 @@
</span><span class="cx"> #include &quot;HTMLFrameOwnerElement.h&quot;
</span><span class="cx"> #include &quot;HitTestResult.h&quot;
</span><span class="cx"> #include &quot;InspectorClient.h&quot;
</span><ins>+#include &quot;InspectorDatabaseResource.h&quot;
+#include &quot;InspectorDOMStorageResource.h&quot;
+#include &quot;InspectorResource.h&quot;
</ins><span class="cx"> #include &quot;JSDOMWindow.h&quot;
</span><span class="cx"> #include &quot;JSInspectedObjectWrapper.h&quot;
</span><span class="cx"> #include &quot;JSInspectorCallbackWrapper.h&quot;
</span><span class="lines">@@ -166,343 +170,6 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// ConsoleMessage Struct
-
-struct ConsoleMessage {
-    ConsoleMessage(MessageSource s, MessageLevel l, const String&amp; m, unsigned li, const String&amp; u, unsigned g)
-        : source(s)
-        , level(l)
-        , message(m)
-        , line(li)
-        , url(u)
-        , groupLevel(g)
-        , repeatCount(1)
-    {
-    }
-
-    ConsoleMessage(MessageSource s, MessageLevel l, ScriptCallStack* callStack, unsigned g, bool storeTrace = false)
-        : source(s)
-        , level(l)
-        , wrappedArguments(callStack-&gt;at(0).argumentCount())
-        , frames(storeTrace ? callStack-&gt;size() : 0)
-        , groupLevel(g)
-        , repeatCount(1)
-    {
-        const ScriptCallFrame&amp; lastCaller = callStack-&gt;at(0);
-        line = lastCaller.lineNumber();
-        url = lastCaller.sourceURL().string();
-
-        // FIXME: For now, just store function names as strings.
-        // As ScriptCallStack start storing line number and source URL for all
-        // frames, refactor to use that, as well.
-        if (storeTrace) {
-            unsigned stackSize = callStack-&gt;size();
-            for (unsigned i = 0; i &lt; stackSize; ++i)
-                frames[i] = callStack-&gt;at(i).functionName();
-        }
-
-        JSLock lock(false);
-
-        for (unsigned i = 0; i &lt; lastCaller.argumentCount(); ++i)
-            wrappedArguments[i] = JSInspectedObjectWrapper::wrap(callStack-&gt;state(), lastCaller.argumentAt(i).jsValue());
-    }
-    
-    bool isEqual(ExecState* exec, ConsoleMessage* msg) const
-    {
-        if (msg-&gt;wrappedArguments.size() != this-&gt;wrappedArguments.size() ||
-           (!exec &amp;&amp; msg-&gt;wrappedArguments.size()))
-            return false;
-
-        for (size_t i = 0; i &lt; msg-&gt;wrappedArguments.size(); ++i) {
-            ASSERT_ARG(exec, exec);
-            if (!JSValueIsEqual(toRef(exec), toRef(msg-&gt;wrappedArguments[i].get()), toRef(this-&gt;wrappedArguments[i].get()), 0))
-                return false;
-        }
-
-        size_t frameCount = msg-&gt;frames.size();
-        if (frameCount != this-&gt;frames.size())
-            return false;
-        
-        for (size_t i = 0; i &lt; frameCount; ++i) {
-            const ScriptString&amp; myFrameFunctionName = this-&gt;frames[i];
-            if (myFrameFunctionName != msg-&gt;frames[i])
-                return false;
-        }
-    
-        return msg-&gt;source == this-&gt;source
-            &amp;&amp; msg-&gt;level == this-&gt;level
-            &amp;&amp; msg-&gt;message == this-&gt;message
-            &amp;&amp; msg-&gt;line == this-&gt;line
-            &amp;&amp; msg-&gt;url == this-&gt;url
-            &amp;&amp; msg-&gt;groupLevel == this-&gt;groupLevel;
-    }
-
-    MessageSource source;
-    MessageLevel level;
-    String message;
-    Vector&lt;ProtectedJSValuePtr&gt; wrappedArguments;
-    Vector&lt;ScriptString&gt; frames;
-    unsigned line;
-    String url;
-    unsigned groupLevel;
-    unsigned repeatCount;
-};
-
-// XMLHttpRequestResource Class
-
-struct XMLHttpRequestResource {
-    XMLHttpRequestResource(const JSC::UString&amp; sourceString)
-    {
-        JSC::JSLock lock(false);
-        this-&gt;sourceString = sourceString.rep();
-    }
-
-    ~XMLHttpRequestResource()
-    {
-        JSC::JSLock lock(false);
-        sourceString.clear();
-    }
-
-    RefPtr&lt;JSC::UString::Rep&gt; sourceString;
-};
-
-// InspectorResource Struct
-
-struct InspectorResource : public RefCounted&lt;InspectorResource&gt; {
-    // Keep these in sync with WebInspector.Resource.Type
-    enum Type {
-        Doc,
-        Stylesheet,
-        Image,
-        Font,
-        Script,
-        XHR,
-        Media,
-        Other
-    };
-
-    static PassRefPtr&lt;InspectorResource&gt; create(long long identifier, DocumentLoader* documentLoader, Frame* frame)
-    {
-        return adoptRef(new InspectorResource(identifier, documentLoader, frame));
-    }
-    
-    ~InspectorResource()
-    {
-        setScriptObject(0, 0);
-    }
-
-    Type type() const
-    {
-        if (xmlHttpRequestResource)
-            return XHR;
-
-        if (requestURL == loader-&gt;requestURL())
-            return Doc;
-
-        if (loader-&gt;frameLoader() &amp;&amp; requestURL == loader-&gt;frameLoader()-&gt;iconURL())
-            return Image;
-
-        CachedResource* cachedResource = frame-&gt;document()-&gt;docLoader()-&gt;cachedResource(requestURL.string());
-        if (!cachedResource)
-            return Other;
-
-        switch (cachedResource-&gt;type()) {
-            case CachedResource::ImageResource:
-                return Image;
-            case CachedResource::FontResource:
-                return Font;
-            case CachedResource::CSSStyleSheet:
-#if ENABLE(XSLT)
-            case CachedResource::XSLStyleSheet:
-#endif
-                return Stylesheet;
-            case CachedResource::Script:
-                return Script;
-            default:
-                return Other;
-        }
-    }
-
-    void setScriptObject(JSContextRef context, JSObjectRef newScriptObject)
-    {
-        if (scriptContext &amp;&amp; scriptObject)
-            JSValueUnprotect(scriptContext, scriptObject);
-
-        scriptObject = newScriptObject;
-        scriptContext = context;
-
-        ASSERT((context &amp;&amp; newScriptObject) || (!context &amp;&amp; !newScriptObject));
-        if (context &amp;&amp; newScriptObject)
-            JSValueProtect(context, newScriptObject);
-    }
-
-    void setXMLHttpRequestProperties(const JSC::UString&amp; data)
-    {
-        xmlHttpRequestResource.set(new XMLHttpRequestResource(data));
-    }
-    
-    String sourceString() const
-     {
-         if (xmlHttpRequestResource)
-            return JSC::UString(xmlHttpRequestResource-&gt;sourceString);
-
-        RefPtr&lt;SharedBuffer&gt; buffer;
-        String textEncodingName;
-
-        if (requestURL == loader-&gt;requestURL()) {
-            buffer = loader-&gt;mainResourceData();
-            textEncodingName = frame-&gt;document()-&gt;inputEncoding();
-        } else {
-            CachedResource* cachedResource = frame-&gt;document()-&gt;docLoader()-&gt;cachedResource(requestURL.string());
-            if (!cachedResource)
-                return String();
-
-            if (cachedResource-&gt;isPurgeable()) {
-                // If the resource is purgeable then make it unpurgeable to get
-                // get its data. This might fail, in which case we return an
-                // empty String.
-                // FIXME: should we do something else in the case of a purged
-                // resource that informs the user why there is no data in the
-                // inspector?
-                if (!cachedResource-&gt;makePurgeable(false))
-                    return String();
-            }
-
-            buffer = cachedResource-&gt;data();
-            textEncodingName = cachedResource-&gt;encoding();
-        }
-
-        if (!buffer)
-            return String();
-
-        TextEncoding encoding(textEncodingName);
-        if (!encoding.isValid())
-            encoding = WindowsLatin1Encoding();
-        return encoding.decode(buffer-&gt;data(), buffer-&gt;size());
-     }
-
-    long long identifier;
-    RefPtr&lt;DocumentLoader&gt; loader;
-    RefPtr&lt;Frame&gt; frame;
-    OwnPtr&lt;XMLHttpRequestResource&gt; xmlHttpRequestResource;
-    KURL requestURL;
-    HTTPHeaderMap requestHeaderFields;
-    HTTPHeaderMap responseHeaderFields;
-    String mimeType;
-    String suggestedFilename;
-    JSContextRef scriptContext;
-    JSObjectRef scriptObject;
-    long long expectedContentLength;
-    bool cached;
-    bool finished;
-    bool failed;
-    int length;
-    int responseStatusCode;
-    double startTime;
-    double responseReceivedTime;
-    double endTime;
-
-protected:
-    InspectorResource(long long identifier, DocumentLoader* documentLoader, Frame* frame)
-        : identifier(identifier)
-        , loader(documentLoader)
-        , frame(frame)
-        , xmlHttpRequestResource(0)
-        , scriptContext(0)
-        , scriptObject(0)
-        , expectedContentLength(0)
-        , cached(false)
-        , finished(false)
-        , failed(false)
-        , length(0)
-        , responseStatusCode(0)
-        , startTime(-1.0)
-        , responseReceivedTime(-1.0)
-        , endTime(-1.0)
-    {
-    }
-};
-
-// InspectorDatabaseResource Struct
-
-#if ENABLE(DATABASE)
-struct InspectorDatabaseResource : public RefCounted&lt;InspectorDatabaseResource&gt; {
-    static PassRefPtr&lt;InspectorDatabaseResource&gt; create(Database* database, const String&amp; domain, const String&amp; name, const String&amp; version)
-    {
-        return adoptRef(new InspectorDatabaseResource(database, domain, name, version));
-    }
-
-    void setScriptObject(JSContextRef context, JSObjectRef newScriptObject)
-    {
-        if (scriptContext &amp;&amp; scriptObject)
-            JSValueUnprotect(scriptContext, scriptObject);
-
-        scriptObject = newScriptObject;
-        scriptContext = context;
-
-        ASSERT((context &amp;&amp; newScriptObject) || (!context &amp;&amp; !newScriptObject));
-        if (context &amp;&amp; newScriptObject)
-            JSValueProtect(context, newScriptObject);
-    }
-
-    RefPtr&lt;Database&gt; database;
-    String domain;
-    String name;
-    String version;
-    JSContextRef scriptContext;
-    JSObjectRef scriptObject;
-    
-private:
-    InspectorDatabaseResource(Database* database, const String&amp; domain, const String&amp; name, const String&amp; version)
-        : database(database)
-        , domain(domain)
-        , name(name)
-        , version(version)
-        , scriptContext(0)
-        , scriptObject(0)
-    {
-    }
-};
-#endif
-
-#if ENABLE(DOM_STORAGE)
-struct InspectorDOMStorageResource : public RefCounted&lt;InspectorDOMStorageResource&gt; {
-    static PassRefPtr&lt;InspectorDOMStorageResource&gt; create(Storage* domStorage, bool isLocalStorage, Frame* frame)
-    {
-        return adoptRef(new InspectorDOMStorageResource(domStorage, isLocalStorage, frame));
-    }
-
-    void setScriptObject(JSContextRef context, JSObjectRef newScriptObject)
-    {
-        if (scriptContext &amp;&amp; scriptObject)
-            JSValueUnprotect(scriptContext, scriptObject);
-
-        scriptObject = newScriptObject;
-        scriptContext = context;
-
-        ASSERT((context &amp;&amp; newScriptObject) || (!context &amp;&amp; !newScriptObject));
-        if (context &amp;&amp; newScriptObject)
-            JSValueProtect(context, newScriptObject);
-    }
-
-    RefPtr&lt;Storage&gt; domStorage;
-    bool isLocalStorage;
-    RefPtr&lt;Frame&gt; frame;
-    JSContextRef scriptContext;
-    JSObjectRef scriptObject;
-    
-private:
-    InspectorDOMStorageResource(Storage* domStorage, bool isLocalStorage, Frame* frame)
-        : domStorage(domStorage)
-        , isLocalStorage(isLocalStorage)
-        , frame(frame)
-        , scriptContext(0)
-        , scriptObject(0)
-    {
-    }
-};
-#endif
-
</del><span class="cx"> // JavaScript Callbacks
</span><span class="cx"> 
</span><span class="cx"> #define SIMPLE_INSPECTOR_CALLBACK(jsFunction, inspectorControllerMethod) \
</span></span></pre></div>
<a id="trunkWebCoreinspectorInspectorDOMStorageResourcecpp"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorDOMStorageResource.cpp (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorDOMStorageResource.cpp                                (rev 0)
+++ trunk/WebCore/inspector/InspectorDOMStorageResource.cpp        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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(DOM_STORAGE)
+
+#include &quot;InspectorDOMStorageResource.h&quot;
+
+#include &quot;Frame.h&quot;
+#include &quot;Storage.h&quot;
+
+using namespace JSC;
+
+namespace WebCore {
+
+InspectorDOMStorageResource::InspectorDOMStorageResource(Storage* domStorage, bool isLocalStorage, Frame* frame)
+    : domStorage(domStorage)
+    , isLocalStorage(isLocalStorage)
+    , frame(frame)
+    , scriptContext(0)
+    , scriptObject(0)
+{
+}
+
+void InspectorDOMStorageResource::setScriptObject(JSContextRef context, JSObjectRef newScriptObject)
+{
+    if (scriptContext &amp;&amp; scriptObject)
+        JSValueUnprotect(scriptContext, scriptObject);
+
+    scriptObject = newScriptObject;
+    scriptContext = context;
+
+    ASSERT((context &amp;&amp; newScriptObject) || (!context &amp;&amp; !newScriptObject));
+    if (context &amp;&amp; newScriptObject)
+        JSValueProtect(context, newScriptObject);
+}
+
+} // namespace WebCore
+
+#endif
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorDOMStorageResourceh"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorDOMStorageResource.h (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorDOMStorageResource.h                                (rev 0)
+++ trunk/WebCore/inspector/InspectorDOMStorageResource.h        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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 InspectorDOMStorageResource_h
+#define InspectorDOMStorageResource_h
+
+#if ENABLE(DOM_STORAGE)
+
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+
+namespace WebCore {
+
+    class Storage;
+    class Frame;
+
+    class InspectorDOMStorageResource : public RefCounted&lt;InspectorDOMStorageResource&gt; {
+    public:
+        static PassRefPtr&lt;InspectorDOMStorageResource&gt; create(Storage* domStorage, bool isLocalStorage, Frame* frame)
+        {
+            return adoptRef(new InspectorDOMStorageResource(domStorage, isLocalStorage, frame));
+        }
+
+        void setScriptObject(JSContextRef, JSObjectRef);
+
+        RefPtr&lt;Storage&gt; domStorage;
+        bool isLocalStorage;
+        RefPtr&lt;Frame&gt; frame;
+        JSContextRef scriptContext;
+        JSObjectRef scriptObject;
+
+    private:
+        InspectorDOMStorageResource(Storage*, bool isLocalStorage, Frame*);
+    };
+
+} // namespace WebCore
+
+#endif
+
+#endif // InspectorDOMStorageResource_h
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorDatabaseResourcecpp"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorDatabaseResource.cpp (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorDatabaseResource.cpp                                (rev 0)
+++ trunk/WebCore/inspector/InspectorDatabaseResource.cpp        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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(DATABASE)
+
+#include &quot;InspectorDatabaseResource.h&quot;
+
+#include &quot;Database.h&quot;
+
+namespace WebCore {
+
+    InspectorDatabaseResource::InspectorDatabaseResource(Database* database, const String&amp; domain, const String&amp; name, const String&amp; version)
+        : database(database)
+        , domain(domain)
+        , name(name)
+        , version(version)
+        , scriptContext(0)
+        , scriptObject(0)
+    {
+    }
+
+    void InspectorDatabaseResource::setScriptObject(JSContextRef context, JSObjectRef newScriptObject)
+    {
+        if (scriptContext &amp;&amp; scriptObject)
+            JSValueUnprotect(scriptContext, scriptObject);
+
+        scriptObject = newScriptObject;
+        scriptContext = context;
+
+        ASSERT((context &amp;&amp; newScriptObject) || (!context &amp;&amp; !newScriptObject));
+        if (context &amp;&amp; newScriptObject)
+            JSValueProtect(context, newScriptObject);
+    }
+
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorDatabaseResourceh"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorDatabaseResource.h (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorDatabaseResource.h                                (rev 0)
+++ trunk/WebCore/inspector/InspectorDatabaseResource.h        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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 InspectorDatabaseResource_h
+#define InspectorDatabaseResource_h
+
+#if ENABLE(DATABASE)
+
+#include &quot;Database.h&quot;
+
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+    class InspectorDatabaseResource : public RefCounted&lt;InspectorDatabaseResource&gt; {
+    public:
+        static PassRefPtr&lt;InspectorDatabaseResource&gt; create(Database* database, const String&amp; domain, const String&amp; name, const String&amp; version)
+        {
+            return adoptRef(new InspectorDatabaseResource(database, domain, name, version));
+        }
+
+        void setScriptObject(JSContextRef, JSObjectRef);
+
+        RefPtr&lt;Database&gt; database;
+        String domain;
+        String name;
+        String version;
+        JSContextRef scriptContext;
+        JSObjectRef scriptObject;
+
+    private:
+        InspectorDatabaseResource(Database*, const String&amp; domain, const String&amp; name, const String&amp; version);
+    };
+
+} // namespace WebCore
+
+#endif // ENABLE(DATABASE)
+
+#endif // InspectorDatabaseResource_h
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorResourcecpp"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorResource.cpp (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorResource.cpp                                (rev 0)
+++ trunk/WebCore/inspector/InspectorResource.cpp        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,176 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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;
+#include &quot;InspectorResource.h&quot;
+
+#include &quot;CachedResource.h&quot;
+#include &quot;DocLoader.h&quot;
+#include &quot;DocumentLoader.h&quot;
+#include &quot;Frame.h&quot;
+#include &quot;TextEncoding.h&quot;
+
+#include &lt;runtime/JSLock.h&gt;
+
+namespace WebCore {
+
+// XMLHttpRequestResource Class
+
+struct XMLHttpRequestResource {
+    XMLHttpRequestResource(const JSC::UString&amp; sourceString)
+    {
+        JSC::JSLock lock(false);
+        this-&gt;sourceString = sourceString.rep();
+    }
+
+    ~XMLHttpRequestResource()
+    {
+        JSC::JSLock lock(false);
+        sourceString.clear();
+    }
+
+    RefPtr&lt;JSC::UString::Rep&gt; sourceString;
+};
+
+    InspectorResource::InspectorResource(long long identifier, DocumentLoader* documentLoader, Frame* frame)
+    : identifier(identifier)
+    , loader(documentLoader)
+    , frame(frame)
+    , scriptContext(0)
+    , scriptObject(0)
+    , expectedContentLength(0)
+    , cached(false)
+    , finished(false)
+    , failed(false)
+    , length(0)
+    , responseStatusCode(0)
+    , startTime(-1.0)
+    , responseReceivedTime(-1.0)
+    , endTime(-1.0)
+    , xmlHttpRequestResource(0)
+    {
+    }
+
+InspectorResource::~InspectorResource()
+{
+    setScriptObject(0, 0);
+}
+
+InspectorResource::Type InspectorResource::type() const
+{
+    if (xmlHttpRequestResource)
+        return XHR;
+
+    if (requestURL == loader-&gt;requestURL())
+        return Doc;
+
+    if (loader-&gt;frameLoader() &amp;&amp; requestURL == loader-&gt;frameLoader()-&gt;iconURL())
+        return Image;
+
+    CachedResource* cachedResource = frame-&gt;document()-&gt;docLoader()-&gt;cachedResource(requestURL.string());
+    if (!cachedResource)
+        return Other;
+
+    switch (cachedResource-&gt;type()) {
+        case CachedResource::ImageResource:
+            return Image;
+        case CachedResource::FontResource:
+            return Font;
+        case CachedResource::CSSStyleSheet:
+#if ENABLE(XSLT)
+        case CachedResource::XSLStyleSheet:
+#endif
+            return Stylesheet;
+        case CachedResource::Script:
+            return Script;
+        default:
+            return Other;
+    }
+}
+
+void InspectorResource::setScriptObject(JSContextRef context, JSObjectRef newScriptObject)
+{
+    if (scriptContext &amp;&amp; scriptObject)
+        JSValueUnprotect(scriptContext, scriptObject);
+
+    scriptObject = newScriptObject;
+    scriptContext = context;
+
+    ASSERT((context &amp;&amp; newScriptObject) || (!context &amp;&amp; !newScriptObject));
+    if (context &amp;&amp; newScriptObject)
+        JSValueProtect(context, newScriptObject);
+}
+
+void InspectorResource::setXMLHttpRequestProperties(const JSC::UString&amp; data)
+{
+    xmlHttpRequestResource.set(new XMLHttpRequestResource(data));
+}
+
+String InspectorResource::sourceString() const
+{
+    if (xmlHttpRequestResource)
+        return JSC::UString(xmlHttpRequestResource-&gt;sourceString);
+
+    RefPtr&lt;SharedBuffer&gt; buffer;
+    String textEncodingName;
+
+    if (requestURL == loader-&gt;requestURL()) {
+        buffer = loader-&gt;mainResourceData();
+        textEncodingName = frame-&gt;document()-&gt;inputEncoding();
+    } else {
+        CachedResource* cachedResource = frame-&gt;document()-&gt;docLoader()-&gt;cachedResource(requestURL.string());
+        if (!cachedResource)
+            return String();
+
+        if (cachedResource-&gt;isPurgeable()) {
+            // If the resource is purgeable then make it unpurgeable to get
+            // get its data. This might fail, in which case we return an
+            // empty String.
+            // FIXME: should we do something else in the case of a purged
+            // resource that informs the user why there is no data in the
+            // inspector?
+            if (!cachedResource-&gt;makePurgeable(false))
+                return String();
+        }
+
+        buffer = cachedResource-&gt;data();
+        textEncodingName = cachedResource-&gt;encoding();
+    }
+
+    if (!buffer)
+        return String();
+
+    TextEncoding encoding(textEncodingName);
+    if (!encoding.isValid())
+        encoding = WindowsLatin1Encoding();
+    return encoding.decode(buffer-&gt;data(), buffer-&gt;size());
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkWebCoreinspectorInspectorResourceh"></a>
<div class="addfile"><h4>Added: trunk/WebCore/inspector/InspectorResource.h (0 => 41449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/inspector/InspectorResource.h                                (rev 0)
+++ trunk/WebCore/inspector/InspectorResource.h        2009-03-05 17:14:07 UTC (rev 41449)
</span><span class="lines">@@ -0,0 +1,108 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Matt Lilek &lt;webkit@mattlilek.com&gt;
+ * 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ * 3.  Neither the name of Apple Computer, Inc. (&quot;Apple&quot;) 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 APPLE AND ITS 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 APPLE OR ITS 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 InspectorResource_h
+#define InspectorResource_h
+
+#include &lt;JavaScriptCore/JSContextRef.h&gt;
+
+#include &quot;HTTPHeaderMap.h&quot;
+#include &quot;KURL.h&quot;
+
+#include &lt;wtf/OwnPtr.h&gt;
+#include &lt;wtf/PassRefPtr.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace JSC {
+    class UString;
+}
+
+namespace WebCore {
+    class DocumentLoader;
+    class Frame;
+    struct XMLHttpRequestResource;
+
+    class InspectorResource : public RefCounted&lt;InspectorResource&gt; {
+    public:
+
+        // Keep these in sync with WebInspector.Resource.Type
+        enum Type {
+            Doc,
+            Stylesheet,
+            Image,
+            Font,
+            Script,
+            XHR,
+            Media,
+            Other
+        };
+
+        static PassRefPtr&lt;InspectorResource&gt; create(long long identifier, DocumentLoader* documentLoader, Frame* frame)
+        {
+            return adoptRef(new InspectorResource(identifier, documentLoader, frame));
+        }
+
+        ~InspectorResource();
+        Type type() const;
+        void setScriptObject(JSContextRef, JSObjectRef);
+        void setXMLHttpRequestProperties(const JSC::UString&amp; data);
+
+        String sourceString() const;
+
+        long long identifier;
+        RefPtr&lt;DocumentLoader&gt; loader;
+        RefPtr&lt;Frame&gt; frame;
+        KURL requestURL;
+        HTTPHeaderMap requestHeaderFields;
+        HTTPHeaderMap responseHeaderFields;
+        String mimeType;
+        String suggestedFilename;
+        JSContextRef scriptContext;
+        JSObjectRef scriptObject;
+        long long expectedContentLength;
+        bool cached;
+        bool finished;
+        bool failed;
+        int length;
+        int responseStatusCode;
+        double startTime;
+        double responseReceivedTime;
+        double endTime;
+
+    private:
+        InspectorResource(long long identifier, DocumentLoader*, Frame*);
+
+        OwnPtr&lt;XMLHttpRequestResource&gt; xmlHttpRequestResource;
+    };
+
+} // namespace WebCore
+
+#endif // InspectorResource_h
</ins></span></pre>
</div>
</div>

</body>
</html>