REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 07:07:52 +0000 (07:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 07:07:52 +0000 (07:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181518
<rdar://problem/36427197>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-10
Reviewed by Matt Baker.

* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel):
Add back the initialization parameter still used by SearchSidebarPanel
and add back its implementation. There were still references to
dynamically update _topOverflowShadowElement in NavigationSidebarPanel.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226765 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.css
Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js

index f2bba2f..e840444 100644 (file)
@@ -1,5 +1,21 @@
 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
 
+        REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)
+        https://bugs.webkit.org/show_bug.cgi?id=181518
+        <rdar://problem/36427197>
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/NavigationSidebarPanel.css:
+        (.sidebar > .panel.navigation > .overflow-shadow.top):
+        * UserInterface/Views/NavigationSidebarPanel.js:
+        (WI.NavigationSidebarPanel):
+        Add back the initialization parameter still used by SearchSidebarPanel
+        and add back its implementation. There were still references to
+        dynamically update _topOverflowShadowElement in NavigationSidebarPanel.
+
+2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: Incorrect check with WI.debuggableType
         https://bugs.webkit.org/show_bug.cgi?id=181515
         <rdar://problem/36425509>
index 495fc06..be454c1 100644 (file)
@@ -47,3 +47,8 @@
 
     border-bottom: 1px solid var(--border-color);
 }
+
+.sidebar > .panel.navigation > .overflow-shadow.top {
+    top: calc(var(--navigation-bar-height) - 1px);
+    bottom: initial;
+}
index 180f41f..06d1b5b 100644 (file)
@@ -25,7 +25,7 @@
 
 WI.NavigationSidebarPanel = class NavigationSidebarPanel extends WI.SidebarPanel
 {
-    constructor(identifier, displayName, shouldAutoPruneStaleTopLevelResourceTreeElements)
+    constructor(identifier, displayName, shouldAutoPruneStaleTopLevelResourceTreeElements, wantsTopOverflowShadow)
     {
         super(identifier, displayName);
 
@@ -44,6 +44,11 @@ WI.NavigationSidebarPanel = class NavigationSidebarPanel extends WI.SidebarPanel
         this._bottomOverflowShadowElement.className = WI.NavigationSidebarPanel.OverflowShadowElementStyleClassName;
         this.element.appendChild(this._bottomOverflowShadowElement);
 
+        if (wantsTopOverflowShadow) {
+            this._topOverflowShadowElement = this.element.appendChild(document.createElement("div"));
+            this._topOverflowShadowElement.classList.add(WI.NavigationSidebarPanel.OverflowShadowElementStyleClassName, "top");
+        }
+
         this._boundUpdateContentOverflowShadowVisibility = this.soon._updateContentOverflowShadowVisibility;
         window.addEventListener("resize", this._boundUpdateContentOverflowShadowVisibility);