Changeset 139879 in webkit


Ignore:
Timestamp:
Jan 16, 2013 7:13:10 AM (11 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: fix text-editor-highlight-regexp test
https://bugs.webkit.org/show_bug.cgi?id=107006

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-01-16
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Use 'height: 100%' instead of pixel values on highlight spans to bring in some platform independency in test expectations.

No new tests: no changes in behaviour.

  • inspector/front-end/DefaultTextEditor.js:

(WebInspector.TextEditorMainPanel.prototype._measureRegex):
(WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):

  • inspector/front-end/textEditor.css:

(.text-editor-overlay-highlight):
(.webkit-line-content):

LayoutTests:

Fixing test expectations: no more height style.

  • inspector/editor/text-editor-highlight-regexp-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139874 r139879  
     12013-01-16  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: fix text-editor-highlight-regexp test
     4        https://bugs.webkit.org/show_bug.cgi?id=107006
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Fixing test expectations: no more height style.
     9
     10        * inspector/editor/text-editor-highlight-regexp-expected.txt:
     11
    1122013-01-16  Zan Dobersek  <zdobersek@igalia.com>
    213
  • trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp-expected.txt

    r139844 r139879  
    1818<div class="inner-container" tabindex="0">
    1919<div class="webkit-line-content">foo();</div>
    20 <div class="webkit-line-content">foo_1; foor; foo_;<span class="some-css-class text-editor-overlay-highlight" style="margin-left: -127px; width: 37px; height: 14px;"></span><span class="some-css-class text-editor-overlay-highlight" style="margin-left: -36px; width: 37px; height: 14px;"></span></div>
     20<div class="webkit-line-content">foo_1; foor; foo_;<span class="some-css-class text-editor-overlay-highlight" style="margin-left: -127px; width: 37px;"></span><span class="some-css-class text-editor-overlay-highlight" style="margin-left: -36px; width: 37px;"></span></div>
    2121<div class="webkit-line-content">foo_</div>
    2222<div class="webkit-line-content">global_foo</div>
    2323<div class="webkit-line-content">global_foo2</div>
    24 <div class="webkit-line-content">some_other_foo_X<span class="some-css-class text-editor-overlay-highlight" style="margin-left: -36px; width: 37px; height: 14px;"></span></div></div>
     24<div class="webkit-line-content">some_other_foo_X<span class="some-css-class text-editor-overlay-highlight" style="margin-left: -36px; width: 37px;"></span></div></div>
    2525
    2626Remove highlight for regexp /foo_./
  • trunk/Source/WebCore/ChangeLog

    r139878 r139879  
     12013-01-16  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: fix text-editor-highlight-regexp test
     4        https://bugs.webkit.org/show_bug.cgi?id=107006
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        Use 'height: 100%' instead of pixel values on highlight spans to bring in some platform independency in test expectations.
     9
     10        No new tests: no changes in behaviour.
     11
     12        * inspector/front-end/DefaultTextEditor.js:
     13        (WebInspector.TextEditorMainPanel.prototype._measureRegex):
     14        (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
     15        * inspector/front-end/textEditor.css:
     16        (.text-editor-overlay-highlight):
     17        (.webkit-line-content):
     18
    1192013-01-16  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
    220
  • trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js

    r139873 r139879  
    19451945     * @param {string} line
    19461946     * @param {RegExp} regex
    1947      * @return {Array.<{left: number, width: number, height: number}>}
     1947     * @return {Array.<{left: number, width: number}>}
    19481948     */
    19491949    _measureRegex: function(lineRow, line, regex)
     
    19621962            metrics.push({
    19631963                left: spans[i].offsetLeft,
    1964                 width: spans[i].offsetWidth,
    1965                 height: spans[i].offsetHeight
     1964                width: spans[i].offsetWidth
    19661965            });
    19671966        return metrics;
     
    19831982            highlight.style.marginLeft = (metrics[i].left - highlight.offsetLeft - extraWidth) + "px";
    19841983            highlight.style.width = (metrics[i].width + extraWidth * 2) + "px";
    1985             highlight.style.height = metrics[i].height + "px";
    19861984            highlight.addStyleClass("text-editor-overlay-highlight");
    19871985        }
  • trunk/Source/WebCore/inspector/front-end/textEditor.css

    r139844 r139879  
    3333.text-editor-overlay-highlight {
    3434    position: absolute;
     35    height: 100%;
    3536    pointer-events: none;
    3637    -webkit-user-select: none;
     
    5455    -webkit-user-modify: read-only;
    5556    background-color: rgb(240, 240, 240);
     57}
     58
     59.webkit-line-content {
     60    position: relative;
    5661}
    5762
Note: See TracChangeset for help on using the changeset viewer.