Title: [139879] trunk
Revision
139879
Author
[email protected]
Date
2013-01-16 07:13:10 -0800 (Wed, 16 Jan 2013)

Log Message

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

Patch by Andrey Lushnikov <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (139878 => 139879)


--- trunk/LayoutTests/ChangeLog	2013-01-16 15:06:46 UTC (rev 139878)
+++ trunk/LayoutTests/ChangeLog	2013-01-16 15:13:10 UTC (rev 139879)
@@ -1,3 +1,14 @@
+2013-01-16  Andrey Lushnikov  <[email protected]>
+
+        Web Inspector: fix text-editor-highlight-regexp test
+        https://bugs.webkit.org/show_bug.cgi?id=107006
+
+        Reviewed by Vsevolod Vlasov.
+
+        Fixing test expectations: no more height style.
+
+        * inspector/editor/text-editor-highlight-regexp-expected.txt:
+
 2013-01-16  Zan Dobersek  <[email protected]>
 
         Unreviewed GTK gardening.

Modified: trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp-expected.txt (139878 => 139879)


--- trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp-expected.txt	2013-01-16 15:06:46 UTC (rev 139878)
+++ trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp-expected.txt	2013-01-16 15:13:10 UTC (rev 139879)
@@ -17,11 +17,11 @@
 
 <div class="inner-container" tabindex="0">
 <div class="webkit-line-content">foo();</div>
-<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>
+<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>
 <div class="webkit-line-content">foo_</div>
 <div class="webkit-line-content">global_foo</div>
 <div class="webkit-line-content">global_foo2</div>
-<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>
+<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>
 
 Remove highlight for regexp /foo_./
 

Modified: trunk/Source/WebCore/ChangeLog (139878 => 139879)


--- trunk/Source/WebCore/ChangeLog	2013-01-16 15:06:46 UTC (rev 139878)
+++ trunk/Source/WebCore/ChangeLog	2013-01-16 15:13:10 UTC (rev 139879)
@@ -1,3 +1,21 @@
+2013-01-16  Andrey Lushnikov  <[email protected]>
+
+        Web Inspector: fix text-editor-highlight-regexp test
+        https://bugs.webkit.org/show_bug.cgi?id=107006
+
+        Reviewed by Vsevolod Vlasov.
+
+        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):
+
 2013-01-16  Jocelyn Turcotte  <[email protected]>
 
         [Qt] Use the shared HistoryItem serialization for QWebHistory

Modified: trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js (139878 => 139879)


--- trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js	2013-01-16 15:06:46 UTC (rev 139878)
+++ trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js	2013-01-16 15:13:10 UTC (rev 139879)
@@ -1944,7 +1944,7 @@
      * @param {Element} lineRow
      * @param {string} line
      * @param {RegExp} regex
-     * @return {Array.<{left: number, width: number, height: number}>}
+     * @return {Array.<{left: number, width: number}>}
      */
     _measureRegex: function(lineRow, line, regex)
     {
@@ -1961,8 +1961,7 @@
         for(var i = 0; i < ranges.length; ++i)
             metrics.push({
                 left: spans[i].offsetLeft,
-                width: spans[i].offsetWidth,
-                height: spans[i].offsetHeight
+                width: spans[i].offsetWidth
             });
         return metrics;
     },
@@ -1982,7 +1981,6 @@
 
             highlight.style.marginLeft = (metrics[i].left - highlight.offsetLeft - extraWidth) + "px";
             highlight.style.width = (metrics[i].width + extraWidth * 2) + "px";
-            highlight.style.height = metrics[i].height + "px";
             highlight.addStyleClass("text-editor-overlay-highlight");
         }
     },

Modified: trunk/Source/WebCore/inspector/front-end/textEditor.css (139878 => 139879)


--- trunk/Source/WebCore/inspector/front-end/textEditor.css	2013-01-16 15:06:46 UTC (rev 139878)
+++ trunk/Source/WebCore/inspector/front-end/textEditor.css	2013-01-16 15:13:10 UTC (rev 139879)
@@ -32,6 +32,7 @@
 
 .text-editor-overlay-highlight {
     position: absolute;
+    height: 100%;
     pointer-events: none;
     -webkit-user-select: none;
     z-index: -1;
@@ -55,6 +56,10 @@
     background-color: rgb(240, 240, 240);
 }
 
+.webkit-line-content {
+    position: relative;
+}
+
 .webkit-line-decorations {
     pointer-events: none;
     -webkit-user-select: none;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to