Diff
Modified: trunk/Source/WebCore/ChangeLog (143728 => 143729)
--- trunk/Source/WebCore/ChangeLog 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/ChangeLog 2013-02-22 15:54:12 UTC (rev 143729)
@@ -1,3 +1,41 @@
+2013-02-22 Andrey Lushnikov <[email protected]>
+
+ Web Inspector: show source location after drawer views
+ https://bugs.webkit.org/show_bug.cgi?id=110156
+
+ Reviewed by Pavel Feldman.
+
+ - Add statusBarText method
+ - Add #drawer-view-anchor, which determines layout position of
+ drawerView
+ - Fix layout in #panel-status-bar to avoid floating elements.
+
+ No new tests.
+
+ * inspector/front-end/Panel.js:
+ (WebInspector.Panel.prototype.wasShown): Add statusBarItems before
+ drawer-view-anchor and statusBarText after.
+ (WebInspector.Panel.prototype.willHide): Remove statusBarText from DOM in the
+ way it's done for statusBarItems
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype.statusBarText): Added.
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame.prototype.statusBarText): Added.
+ (WebInspector.SourceFrame.prototype.statusBarItems):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype.get statusBarItems):
+ * inspector/front-end/View.js:
+ (WebInspector.View.prototype.statusBarText):
+ * inspector/front-end/inspector.css:
+ (#drawer-view-anchor):
+ (.source-frame-cursor-position):
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/inspector.js:
+ (WebInspector.showViewInDrawer):
+ * inspector/front-end/timelinePanel.css:
+ (.timeline-records-stats):
+ (.timeline-records-stats-container):
+
2013-02-22 Allan Sandfeld Jensen <[email protected]>
Allow child-frame content in hit-tests.
Modified: trunk/Source/WebCore/inspector/front-end/Panel.js (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/Panel.js 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/Panel.js 2013-02-22 15:54:12 UTC (rev 143729)
@@ -60,13 +60,20 @@
wasShown: function()
{
+ var panelStatusBar = document.getElementById("panel-status-bar")
+ var drawerViewAnchor = document.getElementById("drawer-view-anchor");
var statusBarItems = this.statusBarItems;
if (statusBarItems) {
this._statusBarItemContainer = document.createElement("div");
for (var i = 0; i < statusBarItems.length; ++i)
this._statusBarItemContainer.appendChild(statusBarItems[i]);
- document.getElementById("panel-status-bar").appendChild(this._statusBarItemContainer);
+ panelStatusBar.insertBefore(this._statusBarItemContainer, drawerViewAnchor);
}
+ var statusBarText = this.statusBarText();
+ if (statusBarText) {
+ this._statusBarTextElement = statusBarText;
+ panelStatusBar.appendChild(statusBarText);
+ }
this.focus();
},
@@ -76,6 +83,10 @@
if (this._statusBarItemContainer && this._statusBarItemContainer.parentNode)
this._statusBarItemContainer.parentNode.removeChild(this._statusBarItemContainer);
delete this._statusBarItemContainer;
+
+ if (this._statusBarTextElement && this._statusBarTextElement.parentNode)
+ this._statusBarTextElement.parentNode.removeChild(this._statusBarTextElement);
+ delete this._statusBarTextElement;
},
reset: function()
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2013-02-22 15:54:12 UTC (rev 143729)
@@ -189,6 +189,15 @@
return [this.enableToggleButton.element, this._pauseOnExceptionButton.element, this._toggleFormatSourceButton.element, this._scriptViewStatusBarItemsContainer];
},
+ /**
+ * @return {?Element}
+ */
+ statusBarText: function()
+ {
+ var sourceFrame = this.visibleView;
+ return sourceFrame ? sourceFrame.statusBarText() : null;
+ },
+
defaultFocusedElement: function()
{
return this._navigator.view.defaultFocusedElement();
Modified: trunk/Source/WebCore/inspector/front-end/SourceFrame.js (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/SourceFrame.js 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/SourceFrame.js 2013-02-22 15:54:12 UTC (rev 143729)
@@ -112,11 +112,19 @@
},
/**
+ * @return {?Element}
+ */
+ statusBarText: function()
+ {
+ return this._sourcePositionElement;
+ },
+
+ /**
* @return {Array.<Element>}
*/
statusBarItems: function()
{
- return [this._sourcePositionElement];
+ return [];
},
defaultFocusedElement: function()
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2013-02-22 15:54:12 UTC (rev 143729)
@@ -220,9 +220,7 @@
get statusBarItems()
{
return this._statusBarItems.select("element").concat([
- this._miscStatusBarItems,
- this.recordsCounter,
- this.frameStatistics
+ this._miscStatusBarItems
]);
},
@@ -282,11 +280,15 @@
this._statusBarFilters.appendChild(this._createTimelineCategoryStatusBarCheckbox(category, this._onCategoryCheckboxClicked.bind(this, category)));
}
- this.recordsCounter = document.createElement("span");
+ var statsContainer = this._statusBarFilters.createChild("div");
+ statsContainer.className = "timeline-records-stats-container";
+
+ this.recordsCounter = statsContainer.createChild("div");
this.recordsCounter.className = "timeline-records-stats";
- this.frameStatistics = document.createElement("span");
+ this.frameStatistics = statsContainer.createChild("div");
this.frameStatistics.className = "timeline-records-stats hidden";
+
function getAnchor()
{
return this.frameStatistics;
Modified: trunk/Source/WebCore/inspector/front-end/View.js (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/View.js 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/View.js 2013-02-22 15:54:12 UTC (rev 143729)
@@ -45,6 +45,14 @@
WebInspector.View._cssFileToStyleElement = {};
WebInspector.View.prototype = {
+ /**
+ * @return {?Element}
+ */
+ statusBarText: function()
+ {
+ return null;
+ },
+
markAsRoot: function()
{
WebInspector.View._assert(!this.element.parentElement, "Attempt to mark as root attached node");
Modified: trunk/Source/WebCore/inspector/front-end/inspector.css (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/inspector.css 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/inspector.css 2013-02-22 15:54:12 UTC (rev 143729)
@@ -637,8 +637,8 @@
pointer-events: none;
}
-#panel-status-bar > div {
- width: 100%;
+#drawer-view-anchor {
+ display: inline-block;
}
.status-bar-item:active {
@@ -3074,4 +3074,5 @@
pointer-events: auto;
-webkit-user-select: text;
font-size: 11px;
+ cursor: text;
}
Modified: trunk/Source/WebCore/inspector/front-end/inspector.html (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/inspector.html 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/inspector.html 2013-02-22 15:54:12 UTC (rev 143729)
@@ -197,7 +197,9 @@
<div id="drawer"></div>
<div id="main-status-bar" class="status-bar">
<div id="bottom-status-bar-container">
- <div id="panel-status-bar"></div>
+ <div id="panel-status-bar">
+ <div id="drawer-view-anchor"></div>
+ </div>
</div>
<div id="error-warning-count" class="hidden"></div>
</div>
Modified: trunk/Source/WebCore/inspector/front-end/inspector.js (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/inspector.js 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/inspector.js 2013-02-22 15:54:12 UTC (rev 143729)
@@ -129,7 +129,9 @@
closeButton.addStyleClass("drawer-header-close-button");
closeButton.addEventListener("click", this.closeViewInDrawer.bind(this), false);
- document.getElementById("panel-status-bar").firstElementChild.appendChild(drawerStatusBarHeader);
+ var panelStatusBar = document.getElementById("panel-status-bar");
+ var drawerViewAnchor = document.getElementById("drawer-view-anchor");
+ panelStatusBar.insertBefore(drawerStatusBarHeader, drawerViewAnchor);
this._drawerStatusBarHeader = drawerStatusBarHeader;
this.drawer.show(view, WebInspector.Drawer.AnimationType.Immediately);
},
Modified: trunk/Source/WebCore/inspector/front-end/timelinePanel.css (143728 => 143729)
--- trunk/Source/WebCore/inspector/front-end/timelinePanel.css 2013-02-22 15:31:39 UTC (rev 143728)
+++ trunk/Source/WebCore/inspector/front-end/timelinePanel.css 2013-02-22 15:54:12 UTC (rev 143729)
@@ -427,11 +427,17 @@
}
.timeline-records-stats {
- float: right;
margin-top: 5px;
- margin-right: 6px;
+ margin-left: 6px;
}
+.timeline-records-stats-container {
+ display: inline-block;
+ border-left: 1px solid rgb(202, 202, 202);
+ height: 24px;
+ margin-left: 6px;
+}
+
.timeline-frames-stats {
pointer-events: auto;
text-decoration: underline;