Title: [110198] trunk/Source/WebCore
Revision
110198
Author
[email protected]
Date
2012-03-08 13:40:32 -0800 (Thu, 08 Mar 2012)

Log Message

Web Inspector: Creating a selector for class names with trailing spaces results with two dots instead of one
https://bugs.webkit.org/show_bug.cgi?id=80529

Trim the className before replacing the whitespaces with dot "."

Patch by Vivek Galatage <[email protected]> on 2012-03-08
Reviewed by Pavel Feldman.

No new tests.

* inspector/front-end/DOMAgent.js:
(WebInspector.DOMNode.prototype.appropriateSelectorFor):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110197 => 110198)


--- trunk/Source/WebCore/ChangeLog	2012-03-08 21:23:38 UTC (rev 110197)
+++ trunk/Source/WebCore/ChangeLog	2012-03-08 21:40:32 UTC (rev 110198)
@@ -1,3 +1,17 @@
+2012-03-08  Vivek Galatage  <[email protected]>
+
+        Web Inspector: Creating a selector for class names with trailing spaces results with two dots instead of one
+        https://bugs.webkit.org/show_bug.cgi?id=80529
+
+        Trim the className before replacing the whitespaces with dot "."
+
+        Reviewed by Pavel Feldman.
+
+        No new tests.
+
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMNode.prototype.appropriateSelectorFor):
+
 2012-03-08  Dan Bernstein  <[email protected]>
 
         <rdar://problem/10981173> Dashboard regions should not be in device space

Modified: trunk/Source/WebCore/inspector/front-end/DOMAgent.js (110197 => 110198)


--- trunk/Source/WebCore/inspector/front-end/DOMAgent.js	2012-03-08 21:23:38 UTC (rev 110197)
+++ trunk/Source/WebCore/inspector/front-end/DOMAgent.js	2012-03-08 21:40:32 UTC (rev 110198)
@@ -365,7 +365,7 @@
 
         var className = this.getAttribute("class");
         if (className) {
-            var selector = "." + className.replace(/\s+/g, ".");
+            var selector = "." + className.trim().replace(/\s+/g, ".");
             return (justSelector ? selector : lowerCaseName + selector);
         }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to