Changeset 141647 in webkit
- Timestamp:
- Feb 1, 2013 2:55:51 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r141645 r141647 1 2013-02-01 Andrey Lushnikov <lushnikov@chromium.org> 2 3 Web Inspector: remove extra padding around overlay highlight. 4 https://bugs.webkit.org/show_bug.cgi?id=108679 5 6 Reviewed by Alexander Pavlov. 7 8 Update layout test expectations to correspond to updated overlay highlight style. 9 10 * inspector/editor/text-editor-highlight-api-expected.txt: 11 * inspector/editor/text-editor-highlight-token-expected.txt: 12 1 13 2013-02-01 Philip Rogers <pdr@google.com> 2 14 -
trunk/LayoutTests/inspector/editor/text-editor-highlight-api-expected.txt
r141414 r141647 19 19 <div class="inner-container" tabindex="0"> 20 20 <div class="webkit-line-content">foo();</div> 21 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-css-class text-editor-overlay-highlight" style="left: -1px; width: 37px; height: <number>px;"></span><span class="some-css-class text-editor-overlay-highlight" style="left: 90px; width: 37px; height: <number>px;"></span></div>21 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-css-class text-editor-overlay-highlight" style="left: 0px; width: 35px; height: <number>px;"></span><span class="some-css-class text-editor-overlay-highlight" style="left: 91px; width: 35px; height: <number>px;"></span></div> 22 22 <div class="webkit-line-content">foo_</div> 23 23 <div class="webkit-line-content">global_foo</div> 24 24 <div class="webkit-line-content">global_foo2</div> 25 <div class="webkit-line-content">some_other_foo_X<span class="some-css-class text-editor-overlay-highlight" style="left: 7 6px; width: 37px; height: <number>px;"></span></div></div>25 <div class="webkit-line-content">some_other_foo_X<span class="some-css-class text-editor-overlay-highlight" style="left: 77px; width: 35px; height: <number>px;"></span></div></div> 26 26 27 27 Running: testHighlightRange … … 32 32 <div class="inner-container" tabindex="0"> 33 33 <div class="webkit-line-content">foo();</div> 34 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-css-class text-editor-overlay-highlight" style="left: -1px; width: 37px; height: <number>px;"></span><span class="some-css-class text-editor-overlay-highlight" style="left: 90px; width: 37px; height: <number>px;"></span><span class="some-other-class text-editor-overlay-highlight" style="left: 90px; width: 37px; height: <number>px;"></span></div>35 <div class="webkit-line-content">foo_<span class="some-other-class text-editor-overlay-highlight" style="left: -1px; width: 30px; height: <number>px;"></span></div>36 <div class="webkit-line-content">global_foo<span class="some-other-class text-editor-overlay-highlight" style="left: -1px; width: 72px; height: <number>px;"></span></div>34 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-css-class text-editor-overlay-highlight" style="left: 0px; width: 35px; height: <number>px;"></span><span class="some-css-class text-editor-overlay-highlight" style="left: 91px; width: 35px; height: <number>px;"></span><span class="some-other-class text-editor-overlay-highlight" style="left: 91px; width: 35px; height: <number>px;"></span></div> 35 <div class="webkit-line-content">foo_<span class="some-other-class text-editor-overlay-highlight" style="left: 0px; width: 28px; height: <number>px;"></span></div> 36 <div class="webkit-line-content">global_foo<span class="some-other-class text-editor-overlay-highlight" style="left: 0px; width: 70px; height: <number>px;"></span></div> 37 37 <div class="webkit-line-content">global_foo2</div> 38 <div class="webkit-line-content">some_other_foo_X<span class="some-css-class text-editor-overlay-highlight" style="left: 7 6px; width: 37px; height: <number>px;"></span></div></div>38 <div class="webkit-line-content">some_other_foo_X<span class="some-css-class text-editor-overlay-highlight" style="left: 77px; width: 35px; height: <number>px;"></span></div></div> 39 39 40 40 Running: testRemoveRegexHighlight … … 45 45 <div class="inner-container" tabindex="0"> 46 46 <div class="webkit-line-content">foo();</div> 47 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-other-class text-editor-overlay-highlight" style="left: 9 0px; width: 37px; height: <number>px;"></span></div>48 <div class="webkit-line-content">foo_<span class="some-other-class text-editor-overlay-highlight" style="left: -1px; width: 30px; height: <number>px;"></span></div>49 <div class="webkit-line-content">global_foo<span class="some-other-class text-editor-overlay-highlight" style="left: -1px; width: 72px; height: <number>px;"></span></div>47 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-other-class text-editor-overlay-highlight" style="left: 91px; width: 35px; height: <number>px;"></span></div> 48 <div class="webkit-line-content">foo_<span class="some-other-class text-editor-overlay-highlight" style="left: 0px; width: 28px; height: <number>px;"></span></div> 49 <div class="webkit-line-content">global_foo<span class="some-other-class text-editor-overlay-highlight" style="left: 0px; width: 70px; height: <number>px;"></span></div> 50 50 <div class="webkit-line-content">global_foo2</div> 51 51 <div class="webkit-line-content">some_other_foo_X</div></div> -
trunk/LayoutTests/inspector/editor/text-editor-highlight-token-expected.txt
r141414 r141647 22 22 23 23 <div class="inner-container text-editor-editable" tabindex="0"> 24 <div class="webkit-line-content">function findElement(collection, elem) {<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 14 6px; width: 72px; height: <number>px;"></span></div>24 <div class="webkit-line-content">function findElement(collection, elem) {<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 147px; width: 70px; height: <number>px;"></span></div> 25 25 <div class="webkit-line-content"> // length</div> 26 <div class="webkit-line-content"> for(var i = 0; i <span class="webkit-html-tag"><</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 18 8px; width: 72px; height: <number>px;"></span></div>27 <div class="webkit-line-content"> <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 11 1px; width: 72px; height: <number>px;"></span></div>26 <div class="webkit-line-content"> for(var i = 0; i <span class="webkit-html-tag"><</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 189px; width: 70px; height: <number>px;"></span></div> 27 <div class="webkit-line-content"> <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 112px; width: 70px; height: <number>px;"></span></div> 28 28 <div class="webkit-line-content"> <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">i;</span></div> 29 29 <div class="webkit-line-content"> <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">null;</span></div> … … 32 32 33 33 <div class="inner-container text-editor-editable" tabindex="0"> 34 <div class="webkit-line-content">function findElement(collection, elem) {<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 23 0px; width: 30px; height: <number>px;"></span></div>34 <div class="webkit-line-content">function findElement(collection, elem) {<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 231px; width: 28px; height: <number>px;"></span></div> 35 35 <div class="webkit-line-content"> // length</div> 36 36 <div class="webkit-line-content"> for(var i = 0; i <span class="webkit-html-tag"><</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span></div> 37 <div class="webkit-line-content"> <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 23 7px; width: 30px; height: <number>px;"></span></div>37 <div class="webkit-line-content"> <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 238px; width: 28px; height: <number>px;"></span></div> 38 38 <div class="webkit-line-content"> <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">i;</span></div> 39 39 <div class="webkit-line-content"> <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">null;</span></div> … … 43 43 <div class="inner-container text-editor-editable" tabindex="0"> 44 44 <div class="webkit-line-content">function findElement(collection, elem) {</div> 45 <div class="webkit-line-content"> // length<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 7 6px; width: 44px; height: <number>px;"></span></div>46 <div class="webkit-line-content"> for(var i = 0; i <span class="webkit-html-tag"><</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 26 5px; width: 44px; height: <number>px;"></span></div>45 <div class="webkit-line-content"> // length<span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 77px; width: 42px; height: <number>px;"></span></div> 46 <div class="webkit-line-content"> for(var i = 0; i <span class="webkit-html-tag"><</span> <span class="webkit-html-tag">collection.length;</span> <span class="webkit-html-attribute-name">++i)</span><span class="text-editor-token-highlight text-editor-overlay-highlight" style="left: 266px; width: 42px; height: <number>px;"></span></div> 47 47 <div class="webkit-line-content"> <span class="webkit-html-attribute-name">if</span> <span class="webkit-html-attribute-name">(collection</span>[<span class="webkit-html-attribute-name">i</span>] === <span class="webkit-html-attribute-value">elem)</span></div> 48 48 <div class="webkit-line-content"> <span class="webkit-html-attribute-value">return</span> <span class="webkit-html-attribute-value">i;</span></div> -
trunk/Source/WebCore/ChangeLog
r141645 r141647 1 2013-02-01 Andrey Lushnikov <lushnikov@chromium.org> 2 3 Web Inspector: remove extra padding around overlay highlight. 4 https://bugs.webkit.org/show_bug.cgi?id=108679 5 6 Reviewed by Alexander Pavlov. 7 8 No new tests: no change in behaviour. 9 10 Remove extraWidth from overlay highlight spans. 11 12 * inspector/front-end/DefaultTextEditor.js: 13 (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight): 14 1 15 2013-02-01 Philip Rogers <pdr@google.com> 2 16 -
trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js
r141426 r141647 1944 1944 _appendOverlayHighlight: function(lineRow, highlight) 1945 1945 { 1946 const extraWidth = 1;1947 1946 var metrics = highlight.metrics; 1948 1947 var cssClass = highlight.cssClass; … … 1951 1950 highlightSpan._isOverlayHighlightElement = true; 1952 1951 highlightSpan.addStyleClass(cssClass); 1953 highlightSpan.style.left = (metrics[i].left - extraWidth)+ "px";1954 highlightSpan.style.width = (metrics[i].width + extraWidth * 2)+ "px";1952 highlightSpan.style.left = metrics[i].left + "px"; 1953 highlightSpan.style.width = metrics[i].width + "px"; 1955 1954 highlightSpan.style.height = metrics[i].height + "px"; 1956 1955 highlightSpan.addStyleClass("text-editor-overlay-highlight");
Note: See TracChangeset
for help on using the changeset viewer.