Changeset 80348 in webkit


Ignore:
Timestamp:
Mar 4, 2011 6:51:24 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

2011-03-02 Andrey Adaikin <aandrey@google.com>

Reviewed by Pavel Feldman.

Web Inspector: Gutter height should be 100% when few lines are displayed
https://bugs.webkit.org/show_bug.cgi?id=55574

  • inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._startEditing):
  • inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype._syncScroll): (WebInspector.TextEditorGutterPanel.prototype._expandChunks): (WebInspector.TextEditorGutterPanel.prototype.textChanged): (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight):
  • inspector/front-end/textViewer.css: (.text-editor-lines): (.text-editor-contents .inner-container): (.webkit-line-number):
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80347 r80348  
     12011-03-02  Andrey Adaikin  <aandrey@google.com>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Gutter height should be 100% when few lines are displayed
     6        https://bugs.webkit.org/show_bug.cgi?id=55574
     7
     8        * inspector/front-end/SourceFrame.js:
     9        (WebInspector.SourceFrame.prototype._startEditing):
     10        * inspector/front-end/TextViewer.js:
     11        (WebInspector.TextViewer.prototype._syncScroll):
     12        (WebInspector.TextEditorGutterPanel.prototype._expandChunks):
     13        (WebInspector.TextEditorGutterPanel.prototype.textChanged):
     14        (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight):
     15        * inspector/front-end/textViewer.css:
     16        (.text-editor-lines):
     17        (.text-editor-contents .inner-container):
     18        (.webkit-line-number):
     19
    1202011-03-04  Andrey Adaikin  <aandrey@google.com>
    221
  • trunk/Source/WebCore/inspector/front-end/TextViewer.js

    r80347 r80348  
    202202            var mainElement = this._mainPanel.element;
    203203            var gutterElement = this._gutterPanel.element;
    204 
    205204            // Handle horizontal scroll bar at the bottom of the main panel.
    206             if (gutterElement.offsetHeight > mainElement.clientHeight)
    207                 this._gutterPanel._container.style.setProperty("padding-bottom", (gutterElement.offsetHeight - mainElement.clientHeight) + "px");
    208             else
    209                 this._gutterPanel._container.style.removeProperty("padding-bottom");
    210 
     205            this._gutterPanel.syncClientHeight(mainElement.clientHeight);
    211206            gutterElement.scrollTop = mainElement.scrollTop;
    212207        }.bind(this), 0);
     
    494489        for (var i = 0; i < this._textChunks.length; ++i)
    495490            this._textChunks[i].expanded = (fromIndex <= i && i < toIndex);
    496         this.element.style.setProperty("width", this._container.offsetWidth + "px");
    497491    },
    498492
     
    538532            }
    539533        }
     534    },
     535
     536    syncClientHeight: function(clientHeight)
     537    {
     538        if (this.element.offsetHeight > clientHeight)
     539            this._container.style.setProperty("padding-bottom", (this.element.offsetHeight - clientHeight) + "px");
     540        else
     541            this._container.style.removeProperty("padding-bottom");
    540542    }
    541543}
  • trunk/Source/WebCore/inspector/front-end/textViewer.css

    r80119 r80348  
    1616    overflow: hidden;
    1717    -webkit-user-select: none;
    18 }
    19 
    20 .inner-container {
    21     position: absolute;
    22     top: 0;
    23     left: 0;
    24     right: auto;
    25     bottom: auto;
    26     min-width: 100%;
     18    background-color: rgb(240, 240, 240);
     19    border-right: 1px solid rgb(187, 187, 187);
     20    min-width: 19px;
    2721}
    2822
     
    3529    overflow: auto;
    3630    -webkit-user-select: text;
     31}
     32
     33.text-editor-contents .inner-container {
     34    position: absolute;
     35    top: 0;
     36    left: 0;
     37    right: auto;
     38    bottom: auto;
     39    min-width: 100%;
    3740}
    3841
     
    9093.webkit-line-number {
    9194    color: rgb(128, 128, 128);
    92     background-color: rgb(240, 240, 240);
    93     border-right: 1px solid rgb(187, 187, 187);
    9495    text-align: right;
    9596    vertical-align: top;
Note: See TracChangeset for help on using the changeset viewer.