Web Inspector: glass pane does not disappear after network panel's grid column resize.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Oct 2011 09:12:52 +0000 (09:12 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Oct 2011 09:12:52 +0000 (09:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=69607

Reviewed by Yury Semikhatsky.

* src/js/DevTools.js:

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

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/js/DevTools.js

index 1fa2f0a..5bee28d 100644 (file)
@@ -1,3 +1,12 @@
+2011-10-07  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: glass pane does not disappear after network panel's grid column resize.
+        https://bugs.webkit.org/show_bug.cgi?id=69607
+
+        Reviewed by Yury Semikhatsky.
+
+        * src/js/DevTools.js:
+
 2011-10-07  Nate Chapin  <japhet@chromium.org>
 
         Always call setActive() in WebViewImpl::setFocus(),
index 515843e..93e0de3 100644 (file)
@@ -100,16 +100,30 @@ WebInspector.UIString = function(string)
 /** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */
 (function()
 {
-    var originalDragStart = WebInspector.elementDragStart;
-    WebInspector.elementDragStart = function(element)
+    var glassPane = null;
+
+    function showGlassPane(element)
     {
-        if (element) {
-            var glassPane = document.createElement("div");
-            glassPane.style.cssText = "position:absolute;width:100%;height:100%;opacity:0;z-index:1";
-            glassPane.id = "glass-pane-for-drag";
-            element.parentElement.appendChild(glassPane);
+        hideGlassPane();
+        glassPane = document.createElement("div");
+        glassPane.style.cssText = "position:absolute;top:0;bottom:0;left:0;right:0;opacity:0;z-index:1";
+        glassPane.id = "glass-pane-for-drag";
+        element.parentElement.appendChild(glassPane);
+    }
+
+    function hideGlassPane()
+    {
+        if (glassPane) {
+            glassPane.parentElement.removeChild(glassPane);
+            glassPane = null;
         }
+    }
 
+    var originalDragStart = WebInspector.elementDragStart;
+    WebInspector.elementDragStart = function(element)
+    {
+        if (element)
+            showGlassPane(element);
         originalDragStart.apply(this, arguments);
     };
 
@@ -117,15 +131,11 @@ WebInspector.UIString = function(string)
     WebInspector.elementDragEnd = function()
     {
         originalDragEnd.apply(this, arguments);
-
-        var glassPane = document.getElementById("glass-pane-for-drag");
-        if (glassPane)
-            glassPane.parentElement.removeChild(glassPane);
+        hideGlassPane();
     };
 })();
 
 
-
 /////////////////////////////
 // Chromium theme support. //
 /////////////////////////////