diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 18:03:02 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-20 18:03:02 +0000 |
commit | 537063859cbd93a94c4cf68e8e1230bf90ac571a (patch) | |
tree | a07fe0b04f8e6bb095e74d1a41e265b71770d7c6 | |
parent | 37701f96631b77cbe4855a7670f70beb64451ae0 (diff) | |
download | chromium_src-537063859cbd93a94c4cf68e8e1230bf90ac571a.zip chromium_src-537063859cbd93a94c4cf68e8e1230bf90ac571a.tar.gz chromium_src-537063859cbd93a94c4cf68e8e1230bf90ac571a.tar.bz2 |
DevTools: Make splitters move while dragged over iframes.
BUG=16608
Review URL: http://codereview.chromium.org/159080
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21082 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/devtools/js/devtools.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js index 1099776..3875cdd 100644 --- a/webkit/glue/devtools/js/devtools.js +++ b/webkit/glue/devtools/js/devtools.js @@ -1034,3 +1034,26 @@ WebInspector.Console.prototype._formatobject = function(object, elem) { } elem.appendChild(section.element); }; + + +/** Pending WebKit upstream by apavlov). Fixes iframe vs drag problem. */ +(function() { + var originalDragStart = WebInspector.elementDragStart; + WebInspector.elementDragStart = function(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); + + originalDragStart.apply(this, arguments); + }; + + var originalDragEnd = WebInspector.elementDragEnd; + WebInspector.elementDragEnd = function() { + originalDragEnd.apply(this, arguments); + + var glassPane = document.getElementById('glass-pane-for-drag'); + glassPane.parentElement.removeChild(glassPane); + }; +})(); |