Changeset 95716 in webkit
- Timestamp:
- Sep 22, 2011 6:43:23 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95715 r95716 1 2011-09-22 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: Console is always scrolled to the top 4 https://bugs.webkit.org/show_bug.cgi?id=67483 5 6 Reviewed by Pavel Feldman. 7 8 * inspector/front-end/ConsoleView.js: 9 (WebInspector.ConsoleView.prototype.wasShown): 10 (WebInspector.ConsoleView.prototype.storeScrollPositions): 11 (WebInspector.ConsoleView.prototype.restoreScrollPositions): 12 (WebInspector.ConsoleView.prototype.onResize): 13 (WebInspector.ConsoleView.prototype._immediatelyScrollIntoView): 14 (WebInspector.ConsoleView.prototype._cancelScheduledScrollIntoView): 15 (WebInspector.ConsoleView.prototype._consoleCleared): 16 * inspector/front-end/Drawer.js: 17 (WebInspector.Drawer.prototype.hide): 18 (WebInspector.Drawer.prototype.resize): 19 (WebInspector.Drawer.prototype._startStatusBarDragging): 20 (WebInspector.Drawer.prototype._statusBarDragging): 21 * inspector/front-end/inspector.js: 22 (WebInspector.animateStyle): 23 (WebInspector.animateStyle.forceComplete): 24 1 25 2011-09-22 Alpha Lam <hclam@chromium.org> 2 26 -
trunk/Source/WebCore/inspector/front-end/ConsoleView.js
r95536 r95716 227 227 wasShown: function() 228 228 { 229 WebInspector.View.prototype.wasShown.call(this); 229 230 if (!this.prompt.isCaretInsidePrompt()) 230 231 this.prompt.moveCaretToEndOfPrompt(); … … 236 237 }, 237 238 239 storeScrollPositions: function() 240 { 241 WebInspector.View.prototype.storeScrollPositions.call(this); 242 this._scrolledToBottom = this.messagesElement.isScrolledToBottom(); 243 }, 244 245 restoreScrollPositions: function() 246 { 247 if (this._scrolledToBottom) 248 this._immediatelyScrollIntoView(); 249 else 250 WebInspector.View.prototype.restoreScrollPositions.call(this); 251 }, 252 253 onResize: function() 254 { 255 this.restoreScrollPositions(); 256 }, 257 238 258 _isScrollIntoViewScheduled: function() 239 259 { … … 252 272 } 253 273 this._scrollIntoViewTimer = setTimeout(scrollIntoView.bind(this), 20); 274 }, 275 276 _immediatelyScrollIntoView: function() 277 { 278 this.promptElement.scrollIntoView(true); 279 this._cancelScheduledScrollIntoView(); 280 }, 281 282 _cancelScheduledScrollIntoView: function() 283 { 284 if (!this._isScrollIntoViewScheduled()) 285 return; 286 287 clearTimeout(this._scrollIntoViewTimer); 288 delete this._scrollIntoViewTimer; 254 289 }, 255 290 … … 287 322 _consoleCleared: function() 288 323 { 324 this._scrolledToBottom = true; 289 325 this.messages = []; 290 326 -
trunk/Source/WebCore/inspector/front-end/Drawer.js
r95536 r95716 59 59 show: function(view, immediately) 60 60 { 61 this.immediatelyFinishAnimation(); 62 61 63 var drawerWasVisible = this.visible; 62 63 this.immediatelyFinishAnimation(); 64 64 65 if (this._view) 65 66 this.element.removeChild(this._view.element); 66 67 67 68 this._view = view; 68 this._view.show(this.element);69 69 70 70 var statusBarItems = this._view.statusBarItems || []; … … 76 76 77 77 document.body.addStyleClass("drawer-visible"); 78 79 this._view.show(this.element); 78 80 79 81 var anchoredItems = document.getElementById("anchored-status-bar-items"); … … 121 123 this._savedHeight = this.element.offsetHeight; 122 124 123 this.element.removeChild(this._view.element);124 delete this._view;125 126 125 if (this.element === WebInspector.currentFocusElement || this.element.isAncestor(WebInspector.currentFocusElement)) 127 126 WebInspector.currentFocusElement = WebInspector.previousFocusElement; … … 162 161 } 163 162 163 this._view.hide(); 164 this.element.removeChild(this._view.element); 165 delete this._view; 164 166 document.body.removeStyleClass("drawer-visible"); 165 167 delete this._currentAnimation; … … 176 178 return; 177 179 180 this._view.storeScrollPositions(); 178 181 var height = this._constrainHeight(parseInt(this.element.style.height)); 179 182 this._mainElement.style.bottom = height + "px"; … … 227 230 return; 228 231 232 this._view.storeScrollPositions(); 229 233 WebInspector.elementDragStart(this._mainStatusBar, this._statusBarDragging.bind(this), this._endStatusBarDragging.bind(this), event, "row-resize"); 230 234 … … 243 247 if (WebInspector.currentPanel()) 244 248 WebInspector.currentPanel().doResize(); 249 this._view.doResize(); 245 250 246 251 event.preventDefault(); -
trunk/Source/WebCore/inspector/front-end/inspector.js
r95636 r95716 918 918 function animateLoop() 919 919 { 920 if (hasCompleted) 921 return; 922 920 923 // Advance forward. 921 924 complete += intervalDuration; … … 954 957 function forceComplete() 955 958 { 956 if (!hasCompleted) { 957 complete = duration; 958 animateLoop(); 959 } 959 if (hasCompleted) 960 return; 961 962 complete = duration; 963 animateLoop(); 960 964 } 961 965
Note: See TracChangeset
for help on using the changeset viewer.