Title: [92278] trunk/Source/WebCore
Revision
92278
Author
[email protected]
Date
2011-08-03 07:33:18 -0700 (Wed, 03 Aug 2011)

Log Message

Web Inspector: Console scroll position should be saved when switching panels.
https://bugs.webkit.org/show_bug.cgi?id=65607

Reviewed by Pavel Feldman.

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._formatAsArrayEntry):
(WebInspector.ConsoleView.prototype.get scrollLeft):
(WebInspector.ConsoleView.prototype.set scrollLeft):
(WebInspector.ConsoleView.prototype.get scrollTop):
(WebInspector.ConsoleView.prototype.set scrollTop):
* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.show):
(WebInspector.Drawer.prototype._endStatusBarDragging):
(WebInspector.Drawer.prototype.get scrollLeft):
(WebInspector.Drawer.prototype.set scrollLeft):
(WebInspector.Drawer.prototype.get scrollTop):
(WebInspector.Drawer.prototype.set scrollTop):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (92277 => 92278)


--- trunk/Source/WebCore/ChangeLog	2011-08-03 14:25:23 UTC (rev 92277)
+++ trunk/Source/WebCore/ChangeLog	2011-08-03 14:33:18 UTC (rev 92278)
@@ -1,3 +1,24 @@
+2011-08-03  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: Console scroll position should be saved when switching panels.
+        https://bugs.webkit.org/show_bug.cgi?id=65607
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView.prototype._formatAsArrayEntry):
+        (WebInspector.ConsoleView.prototype.get scrollLeft):
+        (WebInspector.ConsoleView.prototype.set scrollLeft):
+        (WebInspector.ConsoleView.prototype.get scrollTop):
+        (WebInspector.ConsoleView.prototype.set scrollTop):
+        * inspector/front-end/Drawer.js:
+        (WebInspector.Drawer.prototype.show):
+        (WebInspector.Drawer.prototype._endStatusBarDragging):
+        (WebInspector.Drawer.prototype.get scrollLeft):
+        (WebInspector.Drawer.prototype.set scrollLeft):
+        (WebInspector.Drawer.prototype.get scrollTop):
+        (WebInspector.Drawer.prototype.set scrollTop):
+
 2011-08-03  Philippe Normand  <[email protected]>
 
         libsoup-CRITICAL **: soup_message_io_pause: assertion `io != NULL' failed

Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (92277 => 92278)


--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2011-08-03 14:25:23 UTC (rev 92277)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2011-08-03 14:33:18 UTC (rev 92278)
@@ -739,6 +739,26 @@
     {
         // Prevent infinite expansion of cross-referencing arrays.
         return this._format(output, output.subtype && output.subtype === "array");
+    },
+    
+    get scrollLeft()
+    {
+        return this.messagesElement.scrollLeft;
+    },
+
+    set scrollLeft(scrollLeft)
+    {
+        this.messagesElement.scrollLeft = scrollLeft;
+    },
+
+    get scrollTop()
+    {
+        return this.messagesElement.scrollTop;
+    },
+
+    set scrollTop(scrollTop)
+    {
+        this.messagesElement.scrollTop = scrollTop;
     }
 }
 

Modified: trunk/Source/WebCore/inspector/front-end/Drawer.js (92277 => 92278)


--- trunk/Source/WebCore/inspector/front-end/Drawer.js	2011-08-03 14:25:23 UTC (rev 92277)
+++ trunk/Source/WebCore/inspector/front-end/Drawer.js	2011-08-03 14:33:18 UTC (rev 92278)
@@ -134,6 +134,7 @@
         }
 
         this._currentAnimation = WebInspector.animateStyle(animations, this._animationDuration(), animationFinished.bind(this));
+        this.restoreScrollPositions();
     },
 
     hide: function()
@@ -358,6 +359,28 @@
         delete this._statusBarDragOffset;
 
         event.stopPropagation();
+    },
+    
+    get scrollLeft()
+    {
+        return this.visibleView ? this.visibleView.scrollLeft : 0;
+    },
+
+    set scrollLeft(scrollLeft)
+    {
+        if (this.visibleView)
+            this.visibleView.scrollLeft = scrollLeft;
+    },
+
+    get scrollTop()
+    {
+        return this.visibleView ? this.visibleView.scrollTop : 0;
+    },
+
+    set scrollTop(scrollTop)
+    {
+        if (this.visibleView)
+            this.visibleView.scrollTop = scrollTop;
     }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to