[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:49:53 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit f7e4a0336687c78e340c1557e28dbfb439905618
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 15 11:29:08 2009 +0000
2009-12-15 Alexander Pavlov <apavlov at chromium.org>
Reviewed by Pavel Feldman.
Extract WebInspector.Section from WebInspector.PropertiesSection.
https://bugs.webkit.org/show_bug.cgi?id=32523
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/front-end/PropertiesSection.js:
(WebInspector.PropertiesSection):
* inspector/front-end/Section.js: Added.
(WebInspector.Section):
(WebInspector.Section.prototype.get title):
(WebInspector.Section.prototype.set title):
(WebInspector.Section.prototype.get subtitle):
(WebInspector.Section.prototype.set subtitle):
(WebInspector.Section.prototype.get expanded):
(WebInspector.Section.prototype.set expanded):
(WebInspector.Section.prototype.get populated):
(WebInspector.Section.prototype.set populated):
(WebInspector.Section.prototype.expand):
(WebInspector.Section.prototype.collapse):
(WebInspector.Section.prototype.toggleExpanded):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52149 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 79fea3a..e5f3bd7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2009-12-15 Alexander Pavlov <apavlov at chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Extract WebInspector.Section from WebInspector.PropertiesSection.
+ https://bugs.webkit.org/show_bug.cgi?id=32523
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/front-end/PropertiesSection.js:
+ (WebInspector.PropertiesSection):
+ * inspector/front-end/Section.js: Added.
+ (WebInspector.Section):
+ (WebInspector.Section.prototype.get title):
+ (WebInspector.Section.prototype.set title):
+ (WebInspector.Section.prototype.get subtitle):
+ (WebInspector.Section.prototype.set subtitle):
+ (WebInspector.Section.prototype.get expanded):
+ (WebInspector.Section.prototype.set expanded):
+ (WebInspector.Section.prototype.get populated):
+ (WebInspector.Section.prototype.set populated):
+ (WebInspector.Section.prototype.expand):
+ (WebInspector.Section.prototype.collapse):
+ (WebInspector.Section.prototype.toggleExpanded):
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+
2009-12-15 Eric Seidel <eric at webkit.org>
No review, rolling out r52140.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 2680e65..6bcfff8 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -3700,6 +3700,7 @@
'inspector/front-end/Script.js',
'inspector/front-end/ScriptsPanel.js',
'inspector/front-end/ScriptView.js',
+ 'inspector/front-end/Section.js',
'inspector/front-end/SidebarPane.js',
'inspector/front-end/SidebarTreeElement.js',
'inspector/front-end/SourceFrame.js',
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 71d8052..f7a3d7d 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -42620,6 +42620,10 @@
>
</File>
<File
+ RelativePath="..\inspector\front-end\Section.js"
+ >
+ </File>
+ <File
RelativePath="..\inspector\front-end\SidebarPane.js"
>
</File>
diff --git a/WebCore/inspector/front-end/PropertiesSection.js b/WebCore/inspector/front-end/PropertiesSection.js
index 7db496b..bc2eb4c 100644
--- a/WebCore/inspector/front-end/PropertiesSection.js
+++ b/WebCore/inspector/front-end/PropertiesSection.js
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
+ * 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
@@ -28,22 +29,7 @@
WebInspector.PropertiesSection = function(title, subtitle)
{
- this.element = document.createElement("div");
- this.element.className = "section";
-
- this.headerElement = document.createElement("div");
- this.headerElement.className = "header";
-
- this.titleElement = document.createElement("div");
- this.titleElement.className = "title";
-
- this.subtitleElement = document.createElement("div");
- this.subtitleElement.className = "subtitle";
-
- this.headerElement.appendChild(this.subtitleElement);
- this.headerElement.appendChild(this.titleElement);
-
- this.headerElement.addEventListener("click", this.toggleExpanded.bind(this), false);
+ WebInspector.Section.call(this, title, subtitle);
this.propertiesElement = document.createElement("ol");
this.propertiesElement.className = "properties";
@@ -51,96 +37,7 @@ WebInspector.PropertiesSection = function(title, subtitle)
this.propertiesTreeOutline = new TreeOutline(this.propertiesElement);
this.propertiesTreeOutline.section = this;
- this.element.appendChild(this.headerElement);
this.element.appendChild(this.propertiesElement);
-
- this.title = title;
- this.subtitle = subtitle;
- this._expanded = false;
}
-WebInspector.PropertiesSection.prototype = {
- get title()
- {
- return this._title;
- },
-
- set title(x)
- {
- if (this._title === x)
- return;
- this._title = x;
-
- if (x instanceof Node) {
- this.titleElement.removeChildren();
- this.titleElement.appendChild(x);
- } else
- this.titleElement.textContent = x;
- },
-
- get subtitle()
- {
- return this._subtitle;
- },
-
- set subtitle(x)
- {
- if (this._subtitle === x)
- return;
- this._subtitle = x;
- this.subtitleElement.innerHTML = x;
- },
-
- get expanded()
- {
- return this._expanded;
- },
-
- set expanded(x)
- {
- if (x)
- this.expand();
- else
- this.collapse();
- },
-
- get populated()
- {
- return this._populated;
- },
-
- set populated(x)
- {
- this._populated = x;
- if (!x && this.onpopulate && this._expanded) {
- this.onpopulate(this);
- this._populated = true;
- }
- },
-
- expand: function()
- {
- if (this._expanded)
- return;
- this._expanded = true;
- this.element.addStyleClass("expanded");
-
- if (!this._populated && this.onpopulate) {
- this.onpopulate(this);
- this._populated = true;
- }
- },
-
- collapse: function()
- {
- if (!this._expanded)
- return;
- this._expanded = false;
- this.element.removeStyleClass("expanded");
- },
-
- toggleExpanded: function()
- {
- this.expanded = !this.expanded;
- }
-}
+WebInspector.PropertiesSection.prototype.__proto__ = WebInspector.Section.prototype;
diff --git a/WebCore/inspector/front-end/Section.js b/WebCore/inspector/front-end/Section.js
new file mode 100644
index 0000000..394f86d
--- /dev/null
+++ b/WebCore/inspector/front-end/Section.js
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * 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. ("Apple") 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 "AS IS" 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.
+ */
+
+WebInspector.Section = function(title, subtitle)
+{
+ this.element = document.createElement("div");
+ this.element.className = "section";
+
+ this.headerElement = document.createElement("div");
+ this.headerElement.className = "header";
+
+ this.titleElement = document.createElement("div");
+ this.titleElement.className = "title";
+
+ this.subtitleElement = document.createElement("div");
+ this.subtitleElement.className = "subtitle";
+
+ this.headerElement.appendChild(this.subtitleElement);
+ this.headerElement.appendChild(this.titleElement);
+
+ this.headerElement.addEventListener("click", this.toggleExpanded.bind(this), false);
+ this.element.appendChild(this.headerElement);
+
+ this.title = title;
+ this.subtitle = subtitle;
+ this._expanded = false;
+}
+
+WebInspector.Section.prototype = {
+ get title()
+ {
+ return this._title;
+ },
+
+ set title(x)
+ {
+ if (this._title === x)
+ return;
+ this._title = x;
+
+ if (x instanceof Node) {
+ this.titleElement.removeChildren();
+ this.titleElement.appendChild(x);
+ } else
+ this.titleElement.textContent = x;
+ },
+
+ get subtitle()
+ {
+ return this._subtitle;
+ },
+
+ set subtitle(x)
+ {
+ if (this._subtitle === x)
+ return;
+ this._subtitle = x;
+ this.subtitleElement.innerHTML = x;
+ },
+
+ get expanded()
+ {
+ return this._expanded;
+ },
+
+ set expanded(x)
+ {
+ if (x)
+ this.expand();
+ else
+ this.collapse();
+ },
+
+ get populated()
+ {
+ return this._populated;
+ },
+
+ set populated(x)
+ {
+ this._populated = x;
+ if (!x && this.onpopulate && this._expanded) {
+ this.onpopulate(this);
+ this._populated = true;
+ }
+ },
+
+ expand: function()
+ {
+ if (this._expanded)
+ return;
+ this._expanded = true;
+ this.element.addStyleClass("expanded");
+
+ if (!this._populated && this.onpopulate) {
+ this.onpopulate(this);
+ this._populated = true;
+ }
+ },
+
+ collapse: function()
+ {
+ if (!this._expanded)
+ return;
+ this._expanded = false;
+ this.element.removeStyleClass("expanded");
+ },
+
+ toggleExpanded: function()
+ {
+ this.expanded = !this.expanded;
+ }
+}
diff --git a/WebCore/inspector/front-end/WebKit.qrc b/WebCore/inspector/front-end/WebKit.qrc
index eb299fc..1bb2894 100644
--- a/WebCore/inspector/front-end/WebKit.qrc
+++ b/WebCore/inspector/front-end/WebKit.qrc
@@ -53,6 +53,7 @@
<file>Script.js</file>
<file>ScriptsPanel.js</file>
<file>ScriptView.js</file>
+ <file>Section.js</file>
<file>SidebarPane.js</file>
<file>SidebarTreeElement.js</file>
<file>SourceFrame.js</file>
diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html
index c2070e2..ce62cd2 100644
--- a/WebCore/inspector/front-end/inspector.html
+++ b/WebCore/inspector/front-end/inspector.html
@@ -62,6 +62,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<script type="text/javascript" src="SidebarPane.js"></script>
<script type="text/javascript" src="ElementsTreeOutline.js"></script>
<script type="text/javascript" src="SidebarTreeElement.js"></script>
+ <script type="text/javascript" src="Section.js"></script>
<script type="text/javascript" src="PropertiesSection.js"></script>
<script type="text/javascript" src="ObjectProxy.js"></script>
<script type="text/javascript" src="ObjectPropertiesSection.js"></script>
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list